From 7e26ca48b4abffa6a9c458758f32bc91f7efca2a Mon Sep 17 00:00:00 2001 From: Mohamed Chrayed Date: Wed, 4 Mar 2026 19:56:57 +0100 Subject: [PATCH] refactor --- modules/base/sys/boot.nix | 4 ---- modules/disks/sys/singledisk.nix | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/base/sys/boot.nix b/modules/base/sys/boot.nix index 7606df1..5435157 100644 --- a/modules/base/sys/boot.nix +++ b/modules/base/sys/boot.nix @@ -10,9 +10,5 @@ boot.initrd.systemd.enable = true; boot.plymouth.enable = true; boot.plymouth.theme = "bgrt"; - boot.initrd.luks.devices."cryptroot" = { - device = lib.mkForce "/dev/nvme0n1p2"; - #crypttabExtraOpts = [ "tpm2-device=auto" ]; - }; }; } diff --git a/modules/disks/sys/singledisk.nix b/modules/disks/sys/singledisk.nix index 3141ad8..9d67378 100644 --- a/modules/disks/sys/singledisk.nix +++ b/modules/disks/sys/singledisk.nix @@ -1,6 +1,7 @@ { ... }: { - flake.nixosModules.disks-sys-singledisk = { inputs, ... }:{ + flake.nixosModules.disks-sys-singledisk = { inputs, ... }: { imports = [ inputs.disko.nixosModules.disko ]; + disko.devices = { disk = { main = { @@ -44,5 +45,9 @@ device = "/var/lib/swapfile"; size = 16 * 1024; }]; + + boot.initrd.luks.devices."cryptroot" = { + device = lib.mkForce "/dev/nvme0n1p2"; + }; }; }