feat(nix): nyadmin password
This commit is contained in:
		
							parent
							
								
									af5c0b9f3c
								
							
						
					
					
						commit
						21e49b05c5
					
				
					 3 changed files with 34 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -2,14 +2,20 @@
 | 
			
		|||
 | 
			
		||||
{
 | 
			
		||||
  imports = [ ../default.nix ];
 | 
			
		||||
 | 
			
		||||
  sops.secrets."password-hash/nyadmin" = {
 | 
			
		||||
    neededForUsers = true;
 | 
			
		||||
    sopsFile = ../../secrets/nyadmin/secrets.yaml;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  users.users.nyadmin = {
 | 
			
		||||
   isNormalUser = true;
 | 
			
		||||
   shell = pkgs.zsh;
 | 
			
		||||
   home = "/home/nyadmin";
 | 
			
		||||
   description = "nyadministrator~";
 | 
			
		||||
   extraGroups = [ "wheel" "kvm" "libvirt" "docker" ];
 | 
			
		||||
   initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30";
 | 
			
		||||
   openssh.authorizedKeys.keys = [
 | 
			
		||||
     "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ];
 | 
			
		||||
    isNormalUser = true;
 | 
			
		||||
    shell = pkgs.zsh;
 | 
			
		||||
    home = "/home/nyadmin";
 | 
			
		||||
    description = "nyadministrator~";
 | 
			
		||||
    extraGroups = [ "wheel" "kvm" "libvirt" "docker" ];
 | 
			
		||||
    hashedPasswordFile = config.sops.secrets."password-hash/nyadmin".path;
 | 
			
		||||
    openssh.authorizedKeys.keys = [
 | 
			
		||||
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue