summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/disks/default.nix62
1 files changed, 41 insertions, 21 deletions
diff --git a/system/disks/default.nix b/system/disks/default.nix
index 24898fe..5453426 100644
--- a/system/disks/default.nix
+++ b/system/disks/default.nix
@@ -7,7 +7,6 @@ with lib; let
cfg = config.system.disks;
defaultMountOptions = ["compress-force=zstd:15"];
in {
-
options.system.disks = {
disk = mkOption {
type = lib.types.path;
@@ -21,26 +20,47 @@ in {
disk.main = {
device = cfg.disk;
content = {
- type = "btrfs";
- extraArgs = ["-f" "--label nixos"]; # f: Override existing partitions
- subvolumes = {
- "nix" = {
- mountpoint = "/nix";
- mountOptions = defaultMountOptions;
- };
- "persistent-storage" = {
- mountpoint = "/srv";
- mountOptions = defaultMountOptions;
- };
- "persistent-storage@snapshots" = {
- mountpoint = "/srv/.snapshots";
- mountOptions = defaultMountOptions;
- };
- "boot" = {
- mountpoint = "/boot";
- mountOptions = defaultMountOptions;
- };
- };
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ name = "boot";
+ start = "0";
+ end = "1M";
+ part-type = "primary";
+ flags = ["bios_grub"];
+ }
+ {
+ name = "root";
+ # leave space for the grub aka BIOS boot
+ start = "1M";
+ end = "100%";
+ part-type = "primary";
+ bootable = true;
+ content = {
+ type = "btrfs";
+ extraArgs = ["-f" "--label nixos"]; # f: Override existing partitions
+ subvolumes = {
+ "nix" = {
+ mountpoint = "/nix";
+ mountOptions = defaultMountOptions;
+ };
+ "persistent-storage" = {
+ mountpoint = "/srv";
+ mountOptions = defaultMountOptions;
+ };
+ "persistent-storage@snapshots" = {
+ mountpoint = "/srv/.snapshots";
+ mountOptions = defaultMountOptions;
+ };
+ "boot" = {
+ mountpoint = "/boot";
+ mountOptions = defaultMountOptions;
+ };
+ };
+ };
+ }
+ ];
};
};
nodev = {