nixos-config/users/root/default.nix

30 lines
847 B
Nix
Raw Permalink Normal View History

2024-11-07 07:51:24 +00:00
{
nixos-config,
config,
lib,
...
2024-11-09 14:02:26 +00:00
}:
{
2024-10-29 13:55:53 +00:00
users.users.root = {
2024-10-30 06:45:16 +00:00
createHome = true;
2024-10-29 13:55:53 +00:00
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;
2024-11-06 08:55:04 +00:00
sopsFile = ./system.yaml;
2024-10-29 13:55:53 +00:00
};
2024-11-07 07:51:24 +00:00
sops.secrets.".ssh/builder_id_ed25519" = {
mode = "600";
sopsFile = "${nixos-config}/programs/ssh/shared-keys.yaml";
};
sops.secrets.".ssh/id_ed25519_sk" = {
mode = "600";
sopsFile = "${nixos-config}/programs/ssh/shared-keys.yaml";
2024-11-06 08:55:04 +00:00
};
2024-11-09 14:02:26 +00:00
home-manager.users.root.sops.secrets = lib.mkForce { };
environment.impermanence.users = [ "root" ];
2024-10-29 13:55:53 +00:00
}