Add impermanence config

This commit is contained in:
ItsDrike 2024-04-07 18:28:15 +02:00
parent 935b4094a2
commit 6051c29dd2
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
8 changed files with 221 additions and 112 deletions

View file

@ -2,7 +2,6 @@
{
imports = [
./hardware-configuration.nix
./impermanence.nix
];
boot.supportedFilesystems = [ "btrfs" ];
@ -23,11 +22,26 @@
system = {
hostname = "herugrim";
username = "itsdrike";
impermanence.root = {
enable = true;
# Some people use /nix/persist/system for this, leaving persistent files in /nix subvolume
# I much prefer using a standalone subvolume for this though.
persistentMountPoint = "/persist";
# Configure automatic root subvolume wiping on boot from initrd
autoBtrfsWipe = {
devicePath = "/dev/disk/by-label/NIXROOT";
subvolumePath = "root";
cleanSnapshotPath = "root-blank";
};
};
};
device = {
virtual-machine = false;
cpu.type = "intel";
};
home-manager = {
enable = true;
stateVersion = "23.11";