Shura: re-add filesystems module, but in a way that works
This commit is contained in:
parent
3a1bc51b68
commit
01b4e6eacf
|
@ -7,7 +7,8 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
luksUUID = "9fdc521b-a037-4070-af47-f54da03675e4";
|
luksUUID = "9fdc521b-a037-4070-af47-f54da03675e4"; # The UUID of the locked LUKS partition.
|
||||||
|
rootUUID = "dfb4fc8f-e82b-43a1-91c1-a77acb6337cb"; # The UUID of the unlocked filesystem partition.
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
@ -35,7 +36,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
devices = {
|
devices = {
|
||||||
boot = "/dev/disk/by-uuid/FC20-D155";
|
boot = "/dev/disk/by-uuid/FC20-D155";
|
||||||
btrfs = "/dev/disk/by-uuid/${luksUUID}";
|
btrfs = "/dev/disk/by-uuid/${rootUUID}";
|
||||||
};
|
};
|
||||||
swapFile = {
|
swapFile = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
luksUUID = "bcf67e34-339e-40b9-8ffd-bec8f7f55248"; # The UUID of the locked LUKS partition.
|
||||||
|
rootUUID = "b801fbea-4cb5-4255-bea9-a2ce77d1a1b7"; # The UUID of the unlocked filesystem partition.
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
@ -24,8 +28,8 @@
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
"rtsx_pci_sdmmc"
|
"rtsx_pci_sdmmc"
|
||||||
];
|
];
|
||||||
luks.devices."luks-bcf67e34-339e-40b9-8ffd-bec8f7f55248" = {
|
luks.devices."luks-${luksUUID}" = {
|
||||||
device = "/dev/disk/by-uuid/bcf67e34-339e-40b9-8ffd-bec8f7f55248";
|
device = "/dev/disk/by-uuid/${luksUUID}";
|
||||||
crypttabExtraOpts = [ "tpm2-device=auto" ]; # Enable TPM auto-unlocking
|
crypttabExtraOpts = [ "tpm2-device=auto" ]; # Enable TPM auto-unlocking
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -33,25 +37,16 @@
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
# Configure the main filesystem.
|
||||||
"/" = {
|
aux.system.filesystem.btrfs = {
|
||||||
device = "/dev/disk/by-uuid/b801fbea-4cb5-4255-bea9-a2ce77d1a1b7";
|
enable = true;
|
||||||
fsType = "btrfs";
|
devices = {
|
||||||
options = [ "subvol=@,compress=zstd,discard" ];
|
boot = "/dev/disk/by-uuid/FC20-D155";
|
||||||
|
btrfs = "/dev/disk/by-uuid/${rootUUID}";
|
||||||
};
|
};
|
||||||
"/home" = {
|
swapFile = {
|
||||||
device = "/dev/disk/by-uuid/b801fbea-4cb5-4255-bea9-a2ce77d1a1b7";
|
enable = true;
|
||||||
fsType = "btrfs";
|
size = 16384;
|
||||||
options = [ "subvol=@home,compress=zstd,discard" ];
|
|
||||||
};
|
|
||||||
"/swap" = {
|
|
||||||
device = "/dev/disk/by-uuid/b801fbea-4cb5-4255-bea9-a2ce77d1a1b7";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@swap" ];
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/AFCB-D880";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue