nixos: Disk layout cleanup

This commit is contained in:
Jack O'Sullivan 2022-06-06 15:53:57 +01:00
parent 6d3fa55a10
commit 4c2019299c
4 changed files with 12 additions and 21 deletions

View File

@ -37,7 +37,7 @@
boot.loader.systemd-boot.configurationLimit = 20; boot.loader.systemd-boot.configurationLimit = 20;
fileSystems = { fileSystems = {
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/ESP"; device = "/dev/disk/by-uuid/83CA-3BCF";
fsType = "vfat"; fsType = "vfat";
}; };
"/nix" = { "/nix" = {
@ -59,6 +59,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pciutils pciutils
partclone
]; ];
systemd = { systemd = {

View File

@ -38,22 +38,12 @@
waitOnline = "no-carrier"; waitOnline = "no-carrier";
mac = "52:54:00:ab:f1:52"; mac = "52:54:00:ab:f1:52";
}; };
drives = { drives = mkMerge ([ ] ++ (optionals (!config.my.build.isDevVM) [
# TODO: Split into separate LVs (vmLVM "estuary" "esp")
disk = mkIf (!config.my.build.isDevVM) { (vmLVM "estuary" "nix")
backend = { (vmLVM "estuary" "persist")
driver = "host_device"; { esp.frontendOpts.bootindex = 0; }
filename = "/dev/ssds/vm-estuary"; ]));
# It appears this needs to be set on the backend _and_ the format
discard = "unmap";
};
format = {
driver = "raw";
discard = "unmap";
};
frontend = "virtio-blk";
};
};
hostDevices."${wanBDF}" = { }; hostDevices."${wanBDF}" = { };
}; };
shill = { shill = {

View File

@ -45,11 +45,11 @@
fsType = "vfat"; fsType = "vfat";
}; };
"/nix" = { "/nix" = {
device = "/dev/main/nix"; device = "/dev/disk/by-label/nix";
fsType = "ext4"; fsType = "ext4";
}; };
"/persist" = { "/persist" = {
device = "/dev/main/persist"; device = "/dev/disk/by-label/persist";
fsType = "ext4"; fsType = "ext4";
neededForBoot = true; neededForBoot = true;
}; };

View File

@ -43,11 +43,11 @@
fsType = "vfat"; fsType = "vfat";
}; };
"/nix" = { "/nix" = {
device = "/dev/vdb"; device = "/dev/disk/by-label/nix";
fsType = "ext4"; fsType = "ext4";
}; };
"/persist" = { "/persist" = {
device = "/dev/vdc"; device = "/dev/disk/by-label/persist";
fsType = "ext4"; fsType = "ext4";
neededForBoot = true; neededForBoot = true;
}; };