mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
7fd44889a5
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
29 lines
972 B
Nix
29 lines
972 B
Nix
# Impermanence: declares what should survive a wipe of "/".
|
|
{
|
|
environment.persistence."/persist" = {
|
|
hideMounts = true;
|
|
|
|
directories = [
|
|
"/etc/NetworkManager/system-connections" # Wifi connections, VPN
|
|
"/var/lib/bluetooth" # Bluetooth connections
|
|
"/var/lib/nixos" # keeps uid/gid stable across boots
|
|
"/var/lib/systemd/coredump"
|
|
"/var/lib/upower" # battery calibration state
|
|
"/var/lib/systemd/backlight" # remembers screen brightness
|
|
"/var/lib/systemd/timers" # last-run timestamps (e.g. nix gc weekly)
|
|
"/var/log"
|
|
"/var/cache/tuigreet"
|
|
"/var/db/sudo/lectured" # remembers that the sudo lecture was already shown
|
|
];
|
|
|
|
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/systemd/random-seed" # avoid a weak entropy pool on first boot
|
|
];
|
|
};
|
|
}
|