Add Nodens, a VM to install NixOS VMs

This commit is contained in:
Gonne 2024-11-29 11:55:58 +01:00
parent ac85711356
commit 6ce2ea22b1
3 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,33 @@
{
lib,
pkgs,
...
}: {
imports = [];
fileSystems."/" = {
device = "root";
fsType = "tmpfs";
options = ["size=1G" "mode=755"];
};
# Different than usual names in order to automount other VMs
fileSystems."/persist" = {
device = "/dev/disk/by-label/nixosNodens";
fsType = "btrfs";
options = ["subvol=persist"];
neededForBoot = true;
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/bootNodens";
fsType = "ext4";
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/nixosNodens";
fsType = "btrfs";
options = ["subvol=nix"];
};
# swapDevices = [{device = "/dev/disk/by-uuid/TODO";}];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}