{ 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" ]; 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; }; }