This commit is contained in:
Andrea Ciceri 2024-02-11 14:10:04 +01:00
parent cb0a071ee6
commit 7f3441fc76
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
4 changed files with 54 additions and 13 deletions

View file

@ -0,0 +1,16 @@
{pkgs, ...}: {
# Creates an user that home assistant can log in as to power off the system
users.users.hass = {
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFcoVVrMFili8UBjziIu2wyFgcDGTlT1avBh2nLTa9aM"];
isNormalUser = true;
isSystemUser = false;
group = "hass";
createHome = false;
};
users.groups.hass = {};
security.sudo.extraConfig = ''
hass ALL=NOPASSWD:${pkgs.systemd}/bin/systemctl
'';
}