diff --git a/common/default.nix b/common/default.nix index 2430901..6465876 100644 --- a/common/default.nix +++ b/common/default.nix @@ -3,7 +3,6 @@ ./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 deleted file mode 100644 index 6740dbc..0000000 --- a/common/home-manager.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ 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 127d6cc..00f35af 100644 --- a/common/users/qenya.nix +++ b/common/users/qenya.nix @@ -5,8 +5,21 @@ 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 68f65da..c86693f 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,11 @@ overlays = [ nur.overlay ]; }; + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + }; + imports = [ home-manager.nixosModules.home-manager nur.nixosModules.nur diff --git a/home/qenya/cli.nix b/home/cli.nix similarity index 100% rename from home/qenya/cli.nix rename to home/cli.nix diff --git a/home/qenya/dconf/appearance.nix b/home/dconf/appearance.nix similarity index 100% rename from home/qenya/dconf/appearance.nix rename to home/dconf/appearance.nix diff --git a/home/qenya/dconf/background-image.jpg b/home/dconf/background-image.jpg similarity index 100% rename from home/qenya/dconf/background-image.jpg rename to home/dconf/background-image.jpg diff --git a/home/qenya/dconf/default.nix b/home/dconf/default.nix similarity index 100% rename from home/qenya/dconf/default.nix rename to home/dconf/default.nix diff --git a/home/qenya/dconf/keyboard.nix b/home/dconf/keyboard.nix similarity index 100% rename from home/qenya/dconf/keyboard.nix rename to home/dconf/keyboard.nix diff --git a/home/qenya/default.nix b/home/default.nix similarity index 100% rename from home/qenya/default.nix rename to home/default.nix diff --git a/home/qenya/git.nix b/home/git.nix similarity index 100% rename from home/qenya/git.nix rename to home/git.nix diff --git a/home/qenya/tmux.nix b/home/tmux.nix similarity index 100% rename from home/qenya/tmux.nix rename to home/tmux.nix diff --git a/home/qenya/vscode.nix b/home/vscode.nix similarity index 100% rename from home/qenya/vscode.nix rename to home/vscode.nix diff --git a/home/qenya/zsh.nix b/home/zsh.nix similarity index 100% rename from home/qenya/zsh.nix rename to home/zsh.nix diff --git a/hosts/kalessin/configuration.nix b/hosts/kalessin/configuration.nix index 4e2ddea..238ddb9 100644 --- a/hosts/kalessin/configuration.nix +++ b/hosts/kalessin/configuration.nix @@ -7,8 +7,7 @@ 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 e0cbe89..d33d4e6 100644 --- a/hosts/orm/configuration.nix +++ b/hosts/orm/configuration.nix @@ -8,7 +8,6 @@ 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 ff3a1a5..bc9f644 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -43,12 +43,6 @@ 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 13b70b3..d8d11aa 100644 --- a/hosts/yevaud/configuration.nix +++ b/hosts/yevaud/configuration.nix @@ -7,9 +7,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-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;