Changes for lambda, with tmpfs root

This commit is contained in:
Root
2021-07-20 18:28:12 -07:00
parent 7b889633d8
commit d69ae43b1a
10 changed files with 154 additions and 114 deletions
+8 -16
View File
@@ -23,14 +23,13 @@ in {
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
kernelPackages = pkgs.linuxPackages.zfs;
kernelModules = [ "kvm-intel" ];
supportedFilesystems = [ "zfs" ];
loader.grub = {
enable = true;
version = 2;
device = "/dev/disk/by-label/lambda-root";
device = "/dev/disk/by-id/wwn-0x600508b1001cecf6b880f591f9b18b29";
};
};
@@ -38,11 +37,13 @@ in {
"/boot" = {
device = "/dev/disk/by-label/lambda-boot";
fsType = "ext4";
options = [ "noexec" ];
};
"/" = {
device = "lambda/transient/root";
fsType = "zfs";
device = "none";
fsType = "tmpfs";
options = [ "noexec" ];
};
"/nix" = {
@@ -54,29 +55,20 @@ in {
device = "lambda/transient/logs";
fsType = "zfs";
neededForBoot = true;
};
"/home" = {
device = "lambda/persistent/home";
fsType = "zfs";
options = [ "noexec" ];
};
"/state" = {
device = "lambda/persistent/state";
fsType = "zfs";
options = [ "noexec" ];
};
};
boot.initrd.postDeviceCommands = lib.mkAfter ''
${pkgs.zfs}/bin/zfs rollback -r lambda/transient/root@blank
'';
swapDevices = [{ device = "/dev/disk/by-label/lambda-swap"; }];
nix.maxJobs = lib.mkDefault 12;
hardware.bluetooth.enable = false;
networking = {
hostId = substring 0 8 (fileContents /etc/machine-id);