nixos-config/users/root/default.nix
Charlotte 🦝 Delenk 2d886aa739
All checks were successful
Hydra nixosConfigurations.not522 Hydra build #22699 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #22700 of nixos-config:pr618:nixosConfigurations.not522-installer
persist the root nix cache and bash history
2024-10-31 18:08:51 +01:00

17 lines
595 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 = ./password.yaml;
};
environment.persistence."/persistent" = {
directories = ["/root/.cache/nix"]; # for sanity
files = ["/root/.bash_history"];
};
}