diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index c35f4a9..8cd5773 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -10,6 +10,7 @@ ./auto-upgrade.nix ./doas.nix ./journald.nix + ./shared.nix ./user.nix ./timezone.nix ]; diff --git a/modules/nixos/system/shared.nix b/modules/nixos/system/shared.nix new file mode 100644 index 0000000..89e9c00 --- /dev/null +++ b/modules/nixos/system/shared.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: +{ + + config = lib.mkIf config.server { + + # Create a shared group for many services + users.groups.shared = { }; + + # Give the human user access to the shared group + users.users.${config.user}.extraGroups = [ config.users.groups.shared.name ]; + + }; + +}