pinchflat vpn, testbed random, virt-manager
This commit is contained in:
parent
d2eaec6860
commit
db6d5161ff
13 changed files with 1645 additions and 64 deletions
19
hosts/testbed/hardware-configuration.nix
Normal file
19
hosts/testbed/hardware-configuration.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
boot.initrd.postMountCommands = lib.mkAfter ''
|
||||
# Mount Btrfs volume (the device containing your root subvolumes)
|
||||
mkdir -p /btrfs_tmp
|
||||
mount -o subvol=/ /dev/disk/by-label/NIXROOT /btrfs_tmp
|
||||
|
||||
# Delete current @root, then restore from snapshot
|
||||
btrfs subvolume delete /btrfs_tmp/@root || true
|
||||
btrfs subvolume snapshot /btrfs_tmp/@snapshots/root-empty /btrfs_tmp/@root
|
||||
|
||||
umount /btrfs_tmp
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue