Add Nodens, a VM to install NixOS VMs
This commit is contained in:
parent
51c83c8ec0
commit
35707122fa
3 changed files with 74 additions and 20 deletions
48
nixos/machines/nodens/hardware-configuration.nix
Normal file
48
nixos/machines/nodens/hardware-configuration.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
# A machine that exists to install other NixOS machines from some config
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
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"];
|
||||
};
|
||||
|
||||
#Machine to be installed
|
||||
fileSystems."/mnt/persist" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=persist"];
|
||||
};
|
||||
fileSystems."/mnt/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/mnt/nix" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix"];
|
||||
};
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/89e13a83-506a-43b4-b06a-09424500ceda";}];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue