51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||
# and may be overwritten by future invocations. Please make changes
|
||
# to /etc/nixos/configuration.nix instead.
|
||
{ config, lib, pkgs, ... }:
|
||
|
||
let
|
||
deviceId = "mmc-SL32G_0x259093f6";
|
||
volumeGroup = deviceId;
|
||
|
||
bootGrubDevice = lib.concatStrings [ "/dev/disk/by-id/" deviceId ];
|
||
bootFsDevice = lib.concatStrings [ "/dev/disk/by-partlabel/" deviceId "-part2" ];
|
||
bootLuksDevice = lib.concatStrings [ "/dev/disk/by-partlabel/" deviceId "-part3" ];
|
||
rootFsDevice = lib.concatStrings [ "/dev/" volumeGroup "/root" ];
|
||
swapFsDevice = lib.concatStrings [ "/dev/" volumeGroup "/swap" ];
|
||
|
||
in {
|
||
|
||
fileSystems."/boot" = {
|
||
device = bootFsDevice;
|
||
fsType = "vfat";
|
||
};
|
||
|
||
fileSystems."/" = {
|
||
device = rootFsDevice;
|
||
fsType = "btrfs";
|
||
options = [ "subvol=nixos" ];
|
||
};
|
||
|
||
fileSystems."/home" = {
|
||
device = rootFsDevice;
|
||
fsType = "btrfs";
|
||
options = [ "subvol=home" ];
|
||
};
|
||
|
||
swapDevices = [ { device = swapFsDevice; } ];
|
||
|
||
boot.loader.grub = {
|
||
device = bootGrubDevice;
|
||
efiSupport = true;
|
||
efiInstallAsRemovable = true;
|
||
};
|
||
|
||
boot.initrd.luks.devices = [
|
||
{
|
||
name = "cryptliveusb";
|
||
device = bootLuksDevice;
|
||
preLVM = true;
|
||
allowDiscards = true;
|
||
}
|
||
];
|
||
}
|