Add password as secret

This commit is contained in:
Kevin Kandlbinder 2023-02-27 14:16:18 +00:00
parent dabdd3a7c2
commit b7685fe749
3 changed files with 44 additions and 0 deletions

View file

@ -1,10 +1,19 @@
{
imports = [ ./ssh.nix ];
sops.secrets.password_kevin = {
neededForUsers = true;
sopsFile = ../shared/secrets/passwords.yaml;
};
users.mutableUsers = false;
users.users.kevin = {
isNormalUser = true;
description = "Kevin Kandlbinder";
extraGroups = [ "wheel" "docker" "dialout" "networkmanager" "floppy" "audio" "lp" "cdrom" "tape" "video" "render" ];
passwordFile = config.sops.secrets.password-kevin.path;
};
kevin.ssh.authorized.kevin.users = ["kevin" "root"];