From bcace1acbb1b2a0a1216ca591ba32d184b57f9e2 Mon Sep 17 00:00:00 2001 From: Mohamed Chrayed Date: Sun, 8 Mar 2026 15:51:42 +0100 Subject: [PATCH] disk settings --- modules/disks/sys/singledisk-deck.nix | 23 ---------- ...ingledisk.nix => singledisk-encrypted.nix} | 4 +- modules/disks/sys/singledisk-unencrypted.nix | 42 +++++++++++++++++++ modules/hosts/computer-mo/computer-mo.nix | 2 +- .../hosts/computer-nadine/computer-nadine.nix | 2 +- modules/hosts/deck/deck.nix | 2 +- 6 files changed, 47 insertions(+), 28 deletions(-) delete mode 100644 modules/disks/sys/singledisk-deck.nix rename modules/disks/sys/{singledisk.nix => singledisk-encrypted.nix} (92%) create mode 100644 modules/disks/sys/singledisk-unencrypted.nix diff --git a/modules/disks/sys/singledisk-deck.nix b/modules/disks/sys/singledisk-deck.nix deleted file mode 100644 index c7f4e00..0000000 --- a/modules/disks/sys/singledisk-deck.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: { - flake.nixosModules.disks-sys-singledisk-deck = { inputs, ... }: { - imports = [ inputs.disko.nixosModules.disko ]; - - disko.enableConfig = false; - - fileSystems."/" = { - device = "/dev/disk/by-label/root"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = [{ - device = "/var/lib/swapfile"; - size = 16 * 1024; - }]; - }; -} diff --git a/modules/disks/sys/singledisk.nix b/modules/disks/sys/singledisk-encrypted.nix similarity index 92% rename from modules/disks/sys/singledisk.nix rename to modules/disks/sys/singledisk-encrypted.nix index 88900c0..f9bf1d9 100644 --- a/modules/disks/sys/singledisk.nix +++ b/modules/disks/sys/singledisk-encrypted.nix @@ -1,5 +1,5 @@ { ... }: { - flake.nixosModules.disks-sys-singledisk = { inputs, lib, ... }: { + flake.nixosModules.disks-sys-singledisk-encrypted = { inputs, lib, ... }: { imports = [ inputs.disko.nixosModules.disko ]; disko.devices = { @@ -11,7 +11,7 @@ type = "gpt"; partitions = { ESP = { - size = "512M"; + size = "1024M"; type = "EF00"; content = { type = "filesystem"; diff --git a/modules/disks/sys/singledisk-unencrypted.nix b/modules/disks/sys/singledisk-unencrypted.nix new file mode 100644 index 0000000..c28efbc --- /dev/null +++ b/modules/disks/sys/singledisk-unencrypted.nix @@ -0,0 +1,42 @@ +{ ... }: { + flake.nixosModules.disks-sys-singledisk-unencrypted = { inputs, ... }: { + imports = [ inputs.disko.nixosModules.disko ]; + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1024M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "fmask=0077" "dmask=0077" ]; + extraArgs = [ "-n" "boot" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "xfs"; + mountpoint = "/"; + extraArgs = [ "-L" "root" ]; + }; + }; + }; + }; + }; + }; + }; + swapDevices = [{ + device = "/var/lib/swapfile"; + size = 16 * 1024; + }]; + }; +} diff --git a/modules/hosts/computer-mo/computer-mo.nix b/modules/hosts/computer-mo/computer-mo.nix index aa6aa2b..2d6aaa9 100644 --- a/modules/hosts/computer-mo/computer-mo.nix +++ b/modules/hosts/computer-mo/computer-mo.nix @@ -12,7 +12,7 @@ apps-sys-vesktop base-sys-group desktop-sys-group - disks-sys-singledisk + disks-sys-singledisk-encrypted gaming-sys-controller gaming-sys-lact gaming-sys-nexusmods diff --git a/modules/hosts/computer-nadine/computer-nadine.nix b/modules/hosts/computer-nadine/computer-nadine.nix index 304e856..cc02547 100644 --- a/modules/hosts/computer-nadine/computer-nadine.nix +++ b/modules/hosts/computer-nadine/computer-nadine.nix @@ -10,7 +10,7 @@ apps-sys-vesktop base-sys-group desktop-sys-group - disks-sys-singledisk + disks-sys-singledisk-encrypted gaming-sys-controller gaming-sys-lact gaming-sys-steam diff --git a/modules/hosts/deck/deck.nix b/modules/hosts/deck/deck.nix index 5035c71..31b578b 100644 --- a/modules/hosts/deck/deck.nix +++ b/modules/hosts/deck/deck.nix @@ -10,7 +10,7 @@ apps-sys-vesktop base-sys-group desktop-sys-group - disks-sys-singledisk-deck + disks-sys-singledisk-unencrypted gaming-sys-controller gaming-sys-jovian kde-sys-plasma