From 044dbadbe1f88733d3477f2ca4d132453e345ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Tue, 5 Aug 2025 01:21:48 +0200 Subject: [PATCH] fix: hostname not always set, typo --- SwarselSystems.org | 5 +++-- modules/home/common/env.nix | 2 +- modules/nixos/client/network.nix | 1 + modules/nixos/optional/work.nix | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 2a9758b..893b80f 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -4817,6 +4817,7 @@ Here I only enable =networkmanager= and a few default networks. The rest of the }; networking = { + inherit (config.swarselsystems) hostName; wireless.iwd = { enable = true; settings = { @@ -10148,7 +10149,7 @@ Options that I need specifically at work. There are more options at [[#h:f0b2ea9 options.swarselsystems = { hostName = lib.mkOption { type = lib.types.str; - default = ""; + default = configName; }; fqdn = lib.mkOption { type = lib.types.str; @@ -11133,7 +11134,7 @@ Sets environment variables. Here I am only setting the EDITOR variable, most var in { options.swarselmodules.env = lib.mkEnableOption "env settings"; - config =z lib.mkIf config.swarselmodules.env { + config = lib.mkIf config.swarselmodules.env { home.sessionVariables = { EDITOR = "e -w"; DISPLAY = ":0"; diff --git a/modules/home/common/env.nix b/modules/home/common/env.nix index db4d446..a2604c5 100644 --- a/modules/home/common/env.nix +++ b/modules/home/common/env.nix @@ -8,7 +8,7 @@ let in { options.swarselmodules.env = lib.mkEnableOption "env settings"; - config = z lib.mkIf config.swarselmodules.env { + config = lib.mkIf config.swarselmodules.env { home.sessionVariables = { EDITOR = "e -w"; DISPLAY = ":0"; diff --git a/modules/nixos/client/network.nix b/modules/nixos/client/network.nix index 8f7ffc3..92d4c4f 100644 --- a/modules/nixos/client/network.nix +++ b/modules/nixos/client/network.nix @@ -49,6 +49,7 @@ in }; networking = { + inherit (config.swarselsystems) hostName; wireless.iwd = { enable = true; settings = { diff --git a/modules/nixos/optional/work.nix b/modules/nixos/optional/work.nix index 402851c..5ac8a2c 100644 --- a/modules/nixos/optional/work.nix +++ b/modules/nixos/optional/work.nix @@ -1,4 +1,4 @@ -{ self, lib, pkgs, config, ... }: +{ self, lib, pkgs, config, configName, ... }: let inherit (config.swarselsystems) mainUser homeDir xdgDir; iwd = config.networking.networkmanager.wifi.backend == "iwd"; @@ -29,7 +29,7 @@ in options.swarselsystems = { hostName = lib.mkOption { type = lib.types.str; - default = ""; + default = configName; }; fqdn = lib.mkOption { type = lib.types.str;