diff --git a/common/default.nix b/common/default.nix index 6465876..2430901 100644 --- a/common/default.nix +++ b/common/default.nix @@ -3,6 +3,7 @@ ./sysadmin ./users ./environment.nix + ./home-manager.nix ./nginx.nix ./openssh.nix ./security.nix diff --git a/common/home-manager.nix b/common/home-manager.nix new file mode 100644 index 0000000..6740dbc --- /dev/null +++ b/common/home-manager.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +{ + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + + users = { + qenya = { config, lib, pkgs, osConfig, ... }: { + home.homeDirectory = osConfig.users.users.qenya.home; + + imports = [ + ../home/qenya + ]; + }; + }; + }; +} diff --git a/common/users/qenya.nix b/common/users/qenya.nix index 00f35af..127d6cc 100644 --- a/common/users/qenya.nix +++ b/common/users/qenya.nix @@ -5,21 +5,8 @@ in { users.users.qenya = { isNormalUser = true; home = "/home/qenya"; - extraGroups = [ - "wheel" # sudo - "networkmanager" # UI wifi configuration - "dialout" # access to serial ports - ]; shell = pkgs.zsh; openssh.authorizedKeys.keys = keys.users.qenya; uid = 1001; }; - - home-manager.users.qenya = { config, lib, pkgs, osConfig, ... }: { - home.homeDirectory = osConfig.users.users.qenya.home; - - imports = [ - ../../home - ]; - }; } diff --git a/flake.nix b/flake.nix index c86693f..68f65da 100644 --- a/flake.nix +++ b/flake.nix @@ -47,11 +47,6 @@ overlays = [ nur.overlay ]; }; - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - }; - imports = [ home-manager.nixosModules.home-manager nur.nixosModules.nur diff --git a/home/cli.nix b/home/qenya/cli.nix similarity index 100% rename from home/cli.nix rename to home/qenya/cli.nix diff --git a/home/dconf/appearance.nix b/home/qenya/dconf/appearance.nix similarity index 100% rename from home/dconf/appearance.nix rename to home/qenya/dconf/appearance.nix diff --git a/home/dconf/background-image.jpg b/home/qenya/dconf/background-image.jpg similarity index 100% rename from home/dconf/background-image.jpg rename to home/qenya/dconf/background-image.jpg diff --git a/home/dconf/default.nix b/home/qenya/dconf/default.nix similarity index 100% rename from home/dconf/default.nix rename to home/qenya/dconf/default.nix diff --git a/home/dconf/keyboard.nix b/home/qenya/dconf/keyboard.nix similarity index 100% rename from home/dconf/keyboard.nix rename to home/qenya/dconf/keyboard.nix diff --git a/home/default.nix b/home/qenya/default.nix similarity index 100% rename from home/default.nix rename to home/qenya/default.nix diff --git a/home/git.nix b/home/qenya/git.nix similarity index 100% rename from home/git.nix rename to home/qenya/git.nix diff --git a/home/tmux.nix b/home/qenya/tmux.nix similarity index 100% rename from home/tmux.nix rename to home/qenya/tmux.nix diff --git a/home/vscode.nix b/home/qenya/vscode.nix similarity index 100% rename from home/vscode.nix rename to home/qenya/vscode.nix diff --git a/home/zsh.nix b/home/qenya/zsh.nix similarity index 100% rename from home/zsh.nix rename to home/qenya/zsh.nix diff --git a/hosts/kalessin/configuration.nix b/hosts/kalessin/configuration.nix index 238ddb9..4e2ddea 100644 --- a/hosts/kalessin/configuration.nix +++ b/hosts/kalessin/configuration.nix @@ -7,7 +7,8 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - + + users.users.qenya.extraGroups = [ "wheel" ]; qenya.sysadmin.enable = true; system.stateVersion = "23.11"; diff --git a/hosts/orm/configuration.nix b/hosts/orm/configuration.nix index d33d4e6..e0cbe89 100644 --- a/hosts/orm/configuration.nix +++ b/hosts/orm/configuration.nix @@ -8,6 +8,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + users.users.qenya.extraGroups = [ "wheel" ]; qenya.sysadmin.enable = true; age.secrets.wireguard-peer-orm.file = ../../secrets/wireguard-peer-orm.age; diff --git a/hosts/tohru/configuration.nix b/hosts/tohru/configuration.nix index bc9f644..ff3a1a5 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -43,6 +43,12 @@ sound.enable = true; hardware.pulseaudio.enable = true; + users.users.qenya.extraGroups = [ + "wheel" # sudo + "networkmanager" # UI wifi configuration + "dialout" # access to serial ports + ]; + # USB drives boot.supportedFilesystems = [ "ntfs" ]; diff --git a/hosts/yevaud/configuration.nix b/hosts/yevaud/configuration.nix index d8d11aa..13b70b3 100644 --- a/hosts/yevaud/configuration.nix +++ b/hosts/yevaud/configuration.nix @@ -7,7 +7,9 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - + + users.users.qenya.extraGroups = [ "wheel" ]; + qenya.sysadmin.enable = true; age.secrets.wireguard-peer-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;