32 lines
757 B
Nix
32 lines
757 B
Nix
{ impermanence, ... }:
|
|
|
|
{
|
|
imports = [ impermanence.nixosModules.impermanence ];
|
|
|
|
environment.persistence."/persistence" = {
|
|
directories = [
|
|
"/nix"
|
|
"/var/lib/nixos"
|
|
|
|
# Systemd's state directory.
|
|
# This is for instance where timers activation times are stored, hence
|
|
# why it is desirable for this directory to be persistent.
|
|
"/var/lib/systemd"
|
|
|
|
# We want this to be preserved accross reboots, to debug crash cause
|
|
"/var/log/journal"
|
|
];
|
|
|
|
files = [
|
|
# The machine ID is not supposed to change across reboots. For instance,
|
|
# it's used by journald to filter logs.
|
|
"/etc/machine-id"
|
|
];
|
|
};
|
|
|
|
fileSystems."/persistence" = {
|
|
enable = true;
|
|
neededForBoot = true;
|
|
};
|
|
}
|