add impermanence

This commit is contained in:
2024-10-09 10:47:56 +05:30
parent 8cb4470c6e
commit 4468963be3
10 changed files with 137 additions and 6 deletions

View File

@ -3,9 +3,17 @@
username,
outputs,
config,
lib,
inputs,
...
}: {
}: let
# Sops needs acess to the keys before the persist dirs are even mounted; so
# just persisting the keys won't work, we must point at /persist
hasOptinPersistence = config.environment.persistence."/persist".enable;
in {
imports = [
inputs.impermanence.nixosModules.impermanence
../../modules/nixos/sops.nix
];
@ -91,6 +99,13 @@
settings = {
PasswordAuthentication = false;
};
hostKeys = [
{
path = "${lib.optionalString hasOptinPersistence "/persist"}/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
};

View File

@ -1,9 +1,12 @@
{
outputs,
username,
inputs,
...
}: {
imports = [
inputs.impermanence.nixosModules.home-manager.impermanence
../../modules/home-manager/shell
../../modules/home-manager/git
../../modules/home-manager/starship