nixos/machines/Sheol/impermanence.nix

42 lines
961 B
Nix
Raw Normal View History

{ impermanence, ... }:
{
2024-11-15 21:58:10 +01:00
imports = [
impermanence.nixosModules.impermanence
];
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/etc/nixos"
# Stores auto assigned user/group ids
"/var/lib/nixos"
"/var/log"
# User directories
"/home/derped/.config/home-manager"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/var/lib/sops-nix/key.txt"
];
2024-12-31 15:29:22 +01:00
users.derped = {
directories = [
".local/state"
{
directory = ".gnupg";
mode = "0700";
}
{
directory = ".ssh";
mode = "0700";
}
];
};
2024-11-15 21:58:10 +01:00
};
2024-12-31 15:29:22 +01:00
system.activationScripts.profile-init.text = ''
ln -sfn /home/derped/.local/state/nix/profiles/profile /home/derped/.nix-profile
'';
2024-11-15 21:58:10 +01:00
}