Parcourir la source

feat(odin): some changes to make the push work

Zander Hawke il y a 9 mois
Parent
commit
3da17890ee
1 fichiers modifiés avec 92 ajouts et 91 suppressions
  1. 92 91
      hosts/odin/default.nix

+ 92 - 91
hosts/odin/default.nix

@@ -29,25 +29,26 @@
     # };
   };
 
-  # # Boot configuration
-  # boot = {
-  #   # Use systemd-boot for UEFI systems
-  #   loader = {
-  #     systemd-boot.enable = true;
-  #     efi.canTouchEfiVariables = true;
-  #     timeout = 3;
-  #   };
-  #
-  #   # Kernel parameters for server workload
-  #   kernelParams = [ "rootflags=compress=zstd:1,noatime" ];
-  #
-  #   # Enable KSM for memory efficiency with containers
-  #   kernel.sysctl = {
-  #     "kernel.sysrq" = 1;
-  #     "vm.swappiness" = 10;
-  #     "net.core.default_qdisc" = "cake";
-  #   };
-  #
+  # Boot configuration
+  boot = {
+    # Use systemd-boot for UEFI systems
+    loader = {
+      systemd-boot.enable = true;
+      efi.canTouchEfiVariables = true;
+      grub.devices = [ "/dev/nvme0n1" ];
+      timeout = 3;
+    };
+
+    # Kernel parameters for server workload
+    kernelParams = [ "rootflags=compress=zstd:1,noatime" ];
+
+    # Enable KSM for memory efficiency with containers
+    kernel.sysctl = {
+      "kernel.sysrq" = 1;
+      "vm.swappiness" = 10;
+      "net.core.default_qdisc" = "cake";
+    };
+  };
   #   # Impermanence: reset root on boot
   #   initrd.postDeviceCommands = lib.mkAfter ''
   #     # Get device from disko config
@@ -252,78 +253,78 @@
     };
   };
 
-  # File system mounts for impermanence
-  fileSystems = {
-    # Boot partition
-    "/boot" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part1";
-      fsType = "vfat";
-    };
-
-    # Root filesystem
-    "/" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@root" "compress=zstd:1" "noatime" ];
-    };
-
-    # Nix store
-    "/nix" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@nix" "compress=zstd:1" "noatime" ];
-    };
-
-    # Home directory
-    "/home" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@home" "compress=zstd:1" "noatime" ];
-    };
-
-    # Persistent data
-    "/persist" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@persist" "compress=zstd:1" "noatime" ];
-      neededForBoot = true;
-    };
-
-    # Logs
-    "/logs" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@logs" "compress=zstd:1" "noatime" ];
-    };
-
-    # Services data
-    "/services" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@services" "compress=zstd:1" "noatime" ];
-    };
-
-    # Database storage - nodatacow for performance
-    "/databases" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@databases" "compress=zstd:1" "noatime" "nodatacow" ];
-    };
-
-    # Cache storage - nodatacow for performance
-    "/cache" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@cache" "compress=zstd:1" "noatime" "nodatacow" ];
-    };
-
-    # Container storage - nodatacow for performance
-    "/containers" = {
-      device = "/dev/disk/by-id/nvme-KINGSTON_SNV3S1000G_50026B7383CC0908-part2";
-      fsType = "btrfs";
-      options = [ "subvol=@containers" "compress=zstd:1" "noatime" "nodatacow" ];
-    };
-  };
+  # # File system mounts for impermanence
+  # fileSystems = {
+  #   # Boot partition
+  #   "/boot" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-efi";
+  #     fsType = "vfat";
+  #   };
+  #
+  #   # Root filesystem
+  #   "/" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@root" "compress=zstd:1" "noatime" ];
+  #   };
+  #
+  #   # Nix store
+  #   "/nix" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@nix" "compress=zstd:1" "noatime" ];
+  #   };
+  #
+  #   # Home directory
+  #   "/home" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@home" "compress=zstd:1" "noatime" ];
+  #   };
+  #
+  #   # Persistent data
+  #   "/persist" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@persist" "compress=zstd:1" "noatime" ];
+  #     neededForBoot = true;
+  #   };
+  #
+  #   # Logs
+  #   "/logs" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@logs" "compress=zstd:1" "noatime" ];
+  #   };
+  #
+  #   # Services data
+  #   "/services" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@services" "compress=zstd:1" "noatime" ];
+  #   };
+  #
+  #   # Database storage - nodatacow for performance
+  #   "/databases" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@databases" "compress=zstd:1" "noatime" "nodatacow" ];
+  #   };
+  #
+  #   # Cache storage - nodatacow for performance
+  #   "/cache" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@cache" "compress=zstd:1" "noatime" "nodatacow" ];
+  #   };
+  #
+  #   # Container storage - nodatacow for performance
+  #   "/containers" = {
+  #     device = lib.mkDefault "/dev/disk/by-partlabel/disk-main-root";
+  #     fsType = "btrfs";
+  #     options = [ "subvol=@containers" "compress=zstd:1" "noatime" "nodatacow" ];
+  #   };
+  # };
 
   # # Persistent directories for impermanence
   # environment.persistence."/persist" = {