diff --git a/nixos/modules/dynamic-motd.nix b/nixos/modules/dynamic-motd.nix index 04ed188..71450d6 100644 --- a/nixos/modules/dynamic-motd.nix +++ b/nixos/modules/dynamic-motd.nix @@ -10,7 +10,7 @@ in { options.my.dynamic-motd = with lib.types; { enable = mkBoolOpt' true "Whether to enable the dynamic message of the day PAM module."; - services = mkOpt' (listOf str) [ "login" "ssh" ] "PAM services to enable the dynamic message of the day module for."; + services = mkOpt' (listOf str) [ "login" "sshd" ] "PAM services to enable the dynamic message of the day module for."; script = mkOpt' (nullOr lines) null "Script that generates message of the day."; }; diff --git a/nixos/modules/network.nix b/nixos/modules/network.nix index 7953985..cb81498 100644 --- a/nixos/modules/network.nix +++ b/nixos/modules/network.nix @@ -17,6 +17,7 @@ in # Explicitly unset fallback DNS (Nix module will not allow for a blank config) extraConfig = '' FallbackDNS= + Cache=no-negative ''; }; } diff --git a/nixos/modules/tmproot.nix b/nixos/modules/tmproot.nix index 323f1ba..c4820c7 100644 --- a/nixos/modules/tmproot.nix +++ b/nixos/modules/tmproot.nix @@ -109,6 +109,10 @@ in # These are set in environment.etc by the sshd module, but because their mode needs to be changed, # setup-etc will copy them instead of symlinking "/etc/ssh/authorized_keys.d" + + # Auto-generated (on activation?) + "/root/.nix-channels" + "/root/.nix-defexpr" ]; persistence.config = { # In impermanence the key in `environment.persistence.*` (aka name passed the attrsOf submodule) sets the diff --git a/nixos/modules/user.nix b/nixos/modules/user.nix index 59c5bfe..48ebdba 100644 --- a/nixos/modules/user.nix +++ b/nixos/modules/user.nix @@ -44,27 +44,37 @@ in _module.args.name = lib.mkForce user'.name; }; }; - tmproot.persistence.config = - let - perms = { - mode = "0700"; - user = user.name; - group = user.group; + tmproot = { + unsaved.ignore = [ + # Auto-generated (on activation?) + "/home/${user'.name}/.nix-profile" + "/home/${user'.name}/.nix-defexpr" + + "/home/${user'.name}/.config/fish/fish_variables" + ]; + persistence.config = + let + perms = { + mode = "0700"; + user = user.name; + group = user.group; + }; + in + { + files = map (file: { + inherit file; + parentDirectory = perms; + }) [ + "/home/${user'.name}/.bash_history" + ]; + directories = map (directory: { + inherit directory; + } // perms) [ + # Persist all of fish; it's not easy to persist just the history fish won't let you move it to a different + # directory. Also it does some funny stuff and can't really be a symlink it seems. + "/home/${user'.name}/.local/share/fish" + ]; }; - in { - files = map (file: { - inherit file; - parentDirectory = perms; - }) [ - "/home/${user'.name}/.bash_history" - ]; - directories = map (directory: { - inherit directory; - } // perms) [ - # Persist all of fish; it's not easy to persist just the history fish won't let you move it to a different - # directory. Also it does some funny stuff and can't really be a symlink it seems. - "/home/${user'.name}/.local/share/fish" - ]; }; };