nixos-config/users/root/default.nix
Charlotte 🦝 Delenk 4b5587a685
All checks were successful
Hydra devShells.x86_64-linux.default Hydra build #23874 of nixos-config:pr618:devShells.x86_64-linux.default
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #23912 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #23911 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #23910 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra nixosConfigurations.not522 Hydra build #23913 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.pc-installer Hydra build #23915 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra checks.x86_64-linux.containers-default Hydra build #23909 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.not522-installer Hydra build #23914 of nixos-config:pr618:nixosConfigurations.not522-installer
add user sops
2024-11-06 09:55:04 +01:00

19 lines
698 B
Nix

{config, ...}: {
users.users.root = {
createHome = true;
openssh.authorizedKeys.keys = [
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIDXQlfvRUm/z6eP1EjsajIbMibkq9n+ymlbBi7NFiOuaAAAABHNzaDo= ssh:"
];
hashedPasswordFile = config.sops.secrets."users/users/root/hashedPassword".path;
};
sops.secrets."users/users/root/hashedPassword" = {
neededForUsers = true;
sopsFile = ./system.yaml;
};
sops.secrets."users/users/root/age-key" = {
owner = "root";
sopsFile = ./system.yaml;
};
home-manager.users.root.sops.age.keyFile = config.sops.secrets."users/users/root/age-key".path;
environment.impermanence.users = ["root"];
}