From 351a03ba764c788861ac631976e9efe4e2e2e06a Mon Sep 17 00:00:00 2001 From: David Crompton Date: Thu, 19 Oct 2023 10:20:35 -0400 Subject: [PATCH] Restructure Groups (and Permissions) --- machines/kcnhub/users.nix | 4 ++++ machines/kcnhub/users/alan.nix | 1 - machines/kcnhub/users/carol.nix | 1 - machines/kcnhub/users/darian.nix | 1 - machines/kcnhub/users/david.nix | 1 - machines/kcnhub/users/frances.nix | 5 ----- machines/kcnhub/users/groups/admin.nix | 8 ++++++++ machines/kcnhub/users/groups/nfrf.nix | 8 ++++++++ machines/kcnhub/users/matlab-server.nix | 1 - machines/kcnhub/users/spandan.nix | 5 ----- 10 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 machines/kcnhub/users/groups/admin.nix create mode 100644 machines/kcnhub/users/groups/nfrf.nix diff --git a/machines/kcnhub/users.nix b/machines/kcnhub/users.nix index de8a085..a46976e 100644 --- a/machines/kcnhub/users.nix +++ b/machines/kcnhub/users.nix @@ -7,5 +7,9 @@ ./users/spandan.nix ./users/matlab-server.nix ./users/frances.nix + + # Groups + ./users/groups/admin.nix + ./users/groups/nfrf.nix ]; } diff --git a/machines/kcnhub/users/alan.nix b/machines/kcnhub/users/alan.nix index def80e9..ce0a0e5 100644 --- a/machines/kcnhub/users/alan.nix +++ b/machines/kcnhub/users/alan.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { users.users.alan = { isNormalUser = true; - extraGroups = [ "wheel" ]; homeSize = "50g"; homeProjectId = 103; packages = with pkgs; [ diff --git a/machines/kcnhub/users/carol.nix b/machines/kcnhub/users/carol.nix index 0205c18..3b00b2e 100644 --- a/machines/kcnhub/users/carol.nix +++ b/machines/kcnhub/users/carol.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { users.users.carol = { isNormalUser = true; - extraGroups = [ "wheel" ]; homeSize = "50g"; homeProjectId = 102; packages = with pkgs; [ diff --git a/machines/kcnhub/users/darian.nix b/machines/kcnhub/users/darian.nix index 5f9381d..d986c88 100644 --- a/machines/kcnhub/users/darian.nix +++ b/machines/kcnhub/users/darian.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { users.users.darian = { isNormalUser = true; - extraGroups = [ "wheel" ]; homeSize = "50g"; homeProjectId = 101; packages = with pkgs; [ diff --git a/machines/kcnhub/users/david.nix b/machines/kcnhub/users/david.nix index 7b258b1..d64bbc3 100644 --- a/machines/kcnhub/users/david.nix +++ b/machines/kcnhub/users/david.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { users.users.david = { isNormalUser = true; - extraGroups = [ "wheel" ]; homeSize = "50g"; homeProjectId = 100; packages = with pkgs; [ diff --git a/machines/kcnhub/users/frances.nix b/machines/kcnhub/users/frances.nix index af67543..4f9f548 100644 --- a/machines/kcnhub/users/frances.nix +++ b/machines/kcnhub/users/frances.nix @@ -1,10 +1,6 @@ { pkgs, ... }: { users.users.frances = { isNormalUser = true; - extraGroups = [ - "wheel" - "mousetbi" - ]; homeSize = "50g"; homeProjectId = 106; packages = with pkgs; [ @@ -12,5 +8,4 @@ ]; initialHashedPassword = "$y$j9T$I9LtX8Vx/2RKuUT1HjPKN/$TmoQPB/J7y3owZf80oWZjLPv//CVeUd8gVttcFeINQA"; }; - users.groups."mousetbi" = { }; } diff --git a/machines/kcnhub/users/groups/admin.nix b/machines/kcnhub/users/groups/admin.nix new file mode 100644 index 0000000..ed3b370 --- /dev/null +++ b/machines/kcnhub/users/groups/admin.nix @@ -0,0 +1,8 @@ +{ ... }: { + users.groups."wheel" = { + members = [ + "root" + "david" + ]; + }; +} diff --git a/machines/kcnhub/users/groups/nfrf.nix b/machines/kcnhub/users/groups/nfrf.nix new file mode 100644 index 0000000..f4ce678 --- /dev/null +++ b/machines/kcnhub/users/groups/nfrf.nix @@ -0,0 +1,8 @@ +{ ... }: { + users.groups."nfrf" = { + members = [ + "spandan" + "frances" + ]; + }; +} diff --git a/machines/kcnhub/users/matlab-server.nix b/machines/kcnhub/users/matlab-server.nix index a723ad3..5183de8 100644 --- a/machines/kcnhub/users/matlab-server.nix +++ b/machines/kcnhub/users/matlab-server.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { users.users.matlab-server = { isNormalUser = true; - extraGroups = [ "wheel" ]; homeSize = "15g"; homeProjectId = 105; packages = with pkgs; [ diff --git a/machines/kcnhub/users/spandan.nix b/machines/kcnhub/users/spandan.nix index 8941aa0..fa82e34 100644 --- a/machines/kcnhub/users/spandan.nix +++ b/machines/kcnhub/users/spandan.nix @@ -1,15 +1,10 @@ { pkgs, ... }: { users.users.spandan = { isNormalUser = true; - extraGroups = [ - "wheel" - "mousetbi" - ]; homeSize = "50g"; homeProjectId = 104; packages = with pkgs; [ ]; }; - users.groups."mousetbi" = { }; }