modules/nixos: refactor users

This commit is contained in:
zowoq 2024-09-12 14:20:53 +10:00
parent f73f4f9ac3
commit 4d1c91f39c
3 changed files with 6 additions and 9 deletions
modules/nixos
common
community-builder

View file

@ -23,11 +23,6 @@
nix.settings.auto-optimise-store = true; nix.settings.auto-optimise-store = true;
nix.optimise.automatic = false; nix.optimise.automatic = false;
# users in trusted group are trusted by the nix-daemon
nix.settings.trusted-users = [ "@trusted" ];
users.groups.trusted = { };
# Sometimes it fails if a store path is still in use. # Sometimes it fails if a store path is still in use.
# This should fix intermediate issues. # This should fix intermediate issues.
systemd.services.nix-gc.serviceConfig = { systemd.services.nix-gc.serviceConfig = {

View file

@ -14,6 +14,11 @@ in
{ {
imports = userImports; imports = userImports;
# users in trusted group are trusted by the nix-daemon
nix.settings.trusted-users = [ "@trusted" ];
users.groups.trusted = { };
# No mutable users # No mutable users
users.mutableUsers = false; users.mutableUsers = false;
} }

View file

@ -195,8 +195,5 @@ let
}; };
in in
{ {
users = { users.users = lib.mapAttrs descToUser users;
mutableUsers = false;
users = lib.mapAttrs descToUser users;
};
} }