From ba76093a418d52ccc155a4efd2516f6d6de2a275 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 1 Jan 2025 19:01:51 +0000 Subject: [PATCH] Extract opdavies user --- nix/hosts/PW05CH3L/default.nix | 1 + nix/hosts/common/default.nix | 3 ++- nix/hosts/common/users.nix | 16 ---------------- nix/hosts/lemp11/default.nix | 1 + nix/hosts/nixedo/default.nix | 1 + nix/hosts/t490/default.nix | 1 + nix/users/opdavies/default.nix | 14 ++++++++++++++ 7 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 nix/users/opdavies/default.nix diff --git a/nix/hosts/PW05CH3L/default.nix b/nix/hosts/PW05CH3L/default.nix index 2ede155..1646bc4 100644 --- a/nix/hosts/PW05CH3L/default.nix +++ b/nix/hosts/PW05CH3L/default.nix @@ -3,6 +3,7 @@ { imports = [ ../common + ../../users/opdavies ./configuration.nix ]; diff --git a/nix/hosts/common/default.nix b/nix/hosts/common/default.nix index 5a33165..5d59ee3 100644 --- a/nix/hosts/common/default.nix +++ b/nix/hosts/common/default.nix @@ -18,9 +18,10 @@ outputs.nixosModules.default ./programs.nix - ./users.nix ]; + users.defaultUserShell = pkgs.zsh; + environment.systemPackages = with pkgs; [ diff --git a/nix/hosts/common/users.nix b/nix/hosts/common/users.nix index faa51b0..efb7b91 100644 --- a/nix/hosts/common/users.nix +++ b/nix/hosts/common/users.nix @@ -1,20 +1,4 @@ { pkgs, username, ... }: { - users = { - users.${username} = { - isNormalUser = true; - description = "Oliver Davies"; - - extraGroups = [ - "docker" - "networkmanager" - "wheel" - ]; - - packages = [ ]; - }; - - defaultUserShell = pkgs.zsh; - }; } diff --git a/nix/hosts/lemp11/default.nix b/nix/hosts/lemp11/default.nix index 7120f66..57b6c7c 100644 --- a/nix/hosts/lemp11/default.nix +++ b/nix/hosts/lemp11/default.nix @@ -25,6 +25,7 @@ imports = [ ../common + ../../users/opdavies ./configuration.nix ]; diff --git a/nix/hosts/nixedo/default.nix b/nix/hosts/nixedo/default.nix index d076836..b001149 100644 --- a/nix/hosts/nixedo/default.nix +++ b/nix/hosts/nixedo/default.nix @@ -20,6 +20,7 @@ imports = [ ../common + ../../users/opdavies ./configuration.nix ./secrets.nix diff --git a/nix/hosts/t490/default.nix b/nix/hosts/t490/default.nix index 15d408b..2d76c26 100644 --- a/nix/hosts/t490/default.nix +++ b/nix/hosts/t490/default.nix @@ -1,6 +1,7 @@ { imports = [ ../common + ../../users/opdavies ./configuration.nix ]; diff --git a/nix/users/opdavies/default.nix b/nix/users/opdavies/default.nix new file mode 100644 index 0000000..cb93549 --- /dev/null +++ b/nix/users/opdavies/default.nix @@ -0,0 +1,14 @@ +{ + users.users.opdavies = { + description = "Oliver Davies"; + isNormalUser = true; + + extraGroups = [ + "docker" + "networkmanager" + "wheel" + ]; + + packages = [ ]; + }; +}