nixos-config/users/root/default.nix

29 lines
844 B
Nix
Raw Normal View History

2024-11-07 07:51:24 +00:00
{
nixos-config,
config,
lib,
...
}: {
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-07 07:51:24 +00:00
home-manager.users.root.sops.secrets = lib.mkForce {};
2024-11-02 13:24:01 +00:00
environment.impermanence.users = ["root"];
2024-10-29 13:55:53 +00:00
}