diff --git a/applications/ldap/client.nix b/applications/ldap/client.nix index 32ce8da..d172b42 100644 --- a/applications/ldap/client.nix +++ b/applications/ldap/client.nix @@ -69,11 +69,6 @@ in { } ]; - nix.settings.trusted-users = [ - "root" - "@skynet-admins-linux" - ]; - # give users a home dir security.pam.services.sshd.makeHomeDir = true; diff --git a/machines/_base.nix b/machines/_base.nix index d3425a6..240bf59 100644 --- a/machines/_base.nix +++ b/machines/_base.nix @@ -25,8 +25,27 @@ ../applications/restic.nix ]; - # flakes are essensial - nix.settings.experimental-features = ["nix-command" "flakes"]; + nix = { + settings = { + # flakes are essensial + experimental-features = ["nix-command" "flakes"]; + trusted-users = [ + "root" + "@skynet-admins-linux" + ]; + }; + + # https://nixos.wiki/wiki/Storage_optimization + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + extraOptions = '' + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} + ''; + }; system.stateVersion = "22.11";