summaryrefslogtreecommitdiff
path: root/nix/disko/drive-simple.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-09-07 20:48:46 -0700
committerPreston Pan <ret2pop@gmail.com>2025-09-07 20:48:46 -0700
commit5b8d09f2d7ebb7a1670c695af5761353d5b76d7e (patch)
tree7cd2d1d4a30012e325c38d5bda65e83e6a48b5d6 /nix/disko/drive-simple.nix
parent5146b2fa654b469eaf425345797d58f0126de4b9 (diff)
create drive abstractions and entry points for disko
Diffstat (limited to 'nix/disko/drive-simple.nix')
-rw-r--r--nix/disko/drive-simple.nix42
1 files changed, 42 insertions, 0 deletions
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;
+}