diff options
Diffstat (limited to 'nix/disko')
| -rw-r--r-- | nix/disko/drive-bios.nix | 35 | ||||
| -rw-r--r-- | nix/disko/drive-simple.nix | 42 | ||||
| -rw-r--r-- | nix/disko/nvme-simple.nix | 35 | ||||
| -rw-r--r-- | nix/disko/sda-simple.nix | 35 | ||||
| -rw-r--r-- | nix/disko/vda-simple.nix | 28 |
5 files changed, 77 insertions, 98 deletions
diff --git a/nix/disko/drive-bios.nix b/nix/disko/drive-bios.nix new file mode 100644 index 0000000..cf0aeba --- /dev/null +++ b/nix/disko/drive-bios.nix @@ -0,0 +1,35 @@ +{ config, lib, ... }: +let + spec = { + disko.devices = { + disk = { + main = { + device = config.monorepo.vars.device; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + }; + root = { + label = "disk-main-root"; + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; + }; +in +{ + monorepo.vars.myDiskoSpec = spec; + disko.devices = spec.disko.devices; +} diff --git a/nix/disko/drive-simple.nix b/nix/disko/drive-simple.nix new file mode 100644 index 0000000..4d229bf --- /dev/null +++ b/nix/disko/drive-simple.nix @@ -0,0 +1,42 @@ +{ lib, config, ... }: +let + spec = { + disko.devices = { + disk = { + my-disk = { + device = config.monorepo.vars.device; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + priority = 1; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + priority = 2; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; + }; +in +{ + monorepo.vars.myDiskoSpec = spec; + disko.devices = spec.disko.devices; +} diff --git a/nix/disko/nvme-simple.nix b/nix/disko/nvme-simple.nix deleted file mode 100644 index 665c17e..0000000 --- a/nix/disko/nvme-simple.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - disko.devices = { - disk = { - my-disk = { - device = "/dev/nvme0n1"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "500M"; - priority = 1; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - priority = 2; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/nix/disko/sda-simple.nix b/nix/disko/sda-simple.nix deleted file mode 100644 index fdf6556..0000000 --- a/nix/disko/sda-simple.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - disko.devices = { - disk = { - my-disk = { - device = "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "500M"; - priority = 1; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - priority = 2; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/nix/disko/vda-simple.nix b/nix/disko/vda-simple.nix deleted file mode 100644 index 3ae1d34..0000000 --- a/nix/disko/vda-simple.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - device = "/dev/vda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; - }; - root = { - label = "disk-main-root"; - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} |
