nixos: Minor tweaks
This commit is contained in:
		@@ -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.";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,7 @@ in
 | 
			
		||||
        # Explicitly unset fallback DNS (Nix module will not allow for a blank config)
 | 
			
		||||
        extraConfig = ''
 | 
			
		||||
          FallbackDNS=
 | 
			
		||||
          Cache=no-negative
 | 
			
		||||
        '';
 | 
			
		||||
      };
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -44,14 +44,23 @@ in
 | 
			
		||||
          _module.args.name = lib.mkForce user'.name;
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
      tmproot.persistence.config =
 | 
			
		||||
      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 {
 | 
			
		||||
        in
 | 
			
		||||
        {
 | 
			
		||||
          files = map (file: {
 | 
			
		||||
            inherit file;
 | 
			
		||||
            parentDirectory = perms;
 | 
			
		||||
@@ -67,6 +76,7 @@ in
 | 
			
		||||
          ];
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    # mkAliasDefinitions will copy the unmerged defintions to allow the upstream submodule to deal with
 | 
			
		||||
    users.users.${user'.name} = mkAliasDefinitions options.my.user.config;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user