mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-26 05:54:54 +00:00
create shared group for all server services to manage all files
This commit is contained in:
parent
9b948f45ee
commit
00f23f4b9c
@ -10,6 +10,7 @@
|
||||
./auto-upgrade.nix
|
||||
./doas.nix
|
||||
./journald.nix
|
||||
./shared.nix
|
||||
./user.nix
|
||||
./timezone.nix
|
||||
];
|
||||
|
14
modules/nixos/system/shared.nix
Normal file
14
modules/nixos/system/shared.nix
Normal file
@ -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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user