58 lines
984 B
Nix
58 lines
984 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
username,
|
|
service_configs,
|
|
...
|
|
}:
|
|
{
|
|
environment.persistence."/persistent" = {
|
|
hideMounts = true;
|
|
directories = [
|
|
# System directories
|
|
"/etc/nixos"
|
|
"/var/log"
|
|
"/var/lib/nixos"
|
|
"/var/lib/systemd/coredump"
|
|
"/etc/NetworkManager/system-connections"
|
|
"/etc/ssh"
|
|
|
|
# Wireguard
|
|
"/etc/wireguard"
|
|
|
|
# Systemd persistent timers and state
|
|
"/var/lib/systemd/timers"
|
|
];
|
|
|
|
files = [
|
|
# SSH host keys
|
|
"/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"
|
|
|
|
# Machine ID
|
|
"/etc/machine-id"
|
|
|
|
# ZFS cache
|
|
"/etc/zfs/zpool.cache"
|
|
];
|
|
|
|
users.${username} = {
|
|
directories = [
|
|
".ssh"
|
|
".config/fish"
|
|
".local/share/fish"
|
|
".cache"
|
|
".config/helix"
|
|
];
|
|
|
|
files = [
|
|
".bash_history"
|
|
];
|
|
};
|
|
};
|
|
|
|
}
|