From 8eb423887c43195530196cf3b418ddd8ccf5abe8 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 9 Jan 2025 16:16:00 -0800 Subject: add disko dir --- disko/sda-simple.nix | 39 +++++++++++++++++++++++++++++++++++++++ flake.nix | 2 +- sda/disk-config.nix | 39 --------------------------------------- 3 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 disko/sda-simple.nix delete mode 100644 sda/disk-config.nix diff --git a/disko/sda-simple.nix b/disko/sda-simple.nix new file mode 100644 index 0000000..7e275e5 --- /dev/null +++ b/disko/sda-simple.nix @@ -0,0 +1,39 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + settings.allowDiscards = true; + passwordFile = "/tmp/secret.key"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/flake.nix b/flake.nix index 8ac9000..0f5539c 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ lanzaboote.nixosModules.lanzaboote ./desktop/configuration.nix disko.nixosModules.disko - ./sda/disk-config.nix + ./disko/sda-simple.nix home-manager.nixosModules.home-manager { home-manager = { diff --git a/sda/disk-config.nix b/sda/disk-config.nix deleted file mode 100644 index 7e275e5..0000000 --- a/sda/disk-config.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/sda"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - settings.allowDiscards = true; - passwordFile = "/tmp/secret.key"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; - }; -} -- cgit