infra/nixos-configuration/steveej-live-usb-mmc-SL32G_0x259093f6/hw.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

# 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;
}
];
}