fixes, config passes nix flake check .

This commit is contained in:
2026-06-21 22:40:03 -05:00
parent 1c7f690500
commit 3b813df802
11 changed files with 100 additions and 84 deletions
+24 -13
View File
@@ -16,23 +16,34 @@
];
boot = {
zfs.forceImportRoot = false;
supportedFilesystems = [ "zfs" ];
loader = {
initrd = {
systemd.enable = true;
luks.devices."cryptroot" = {
device = "/dev/disk/by-partlabel/luks";
allowDiscards = true;
};
initrd.availableKernelModules = [
"tpm_tis"
"tpm_crb"
];
initrd = {
luks.devices."cryptroot" = {
device = "/dev/disk/by-partlabel/luks";
allowDiscards = true;
};
efi.canTouchEfiVariables = true;
availableKernelModules = [
"tpm_tis"
"tpm_crb"
];
};
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot"; # Adjust if your EFI partition is mounted elsewhere (e.g., /boot/efi)
};
grub = {
enable = true;
device = "nodev"; # "nodev" is required for EFI installs
efiSupport = true;
useOSProber = true; # Set to true if you are dual-booting with Windows/other distros
};
};
kernelModules = [
"tpm_tis"
"tpm_crb"
+51 -54
View File
@@ -1,71 +1,68 @@
{ disk, ... }:
{
disko.devices.disk.main = {
type = "disk";
device = disk;
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
# important: allow TPM-based unlocking
settings = {
allowDiscards = true;
};
# this is key for TPM workflows
initrdUnlock = true;
disko.devices = {
disk.main = {
type = "disk";
device = disk;
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "zfs";
pool = "rpool";
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
# important: allow TPM-based unlocking
settings = {
allowDiscards = true;
};
# this is key for TPM workflows
initrdUnlock = true;
content = {
type = "zfs";
pool = "rpool";
};
};
};
};
};
};
};
zpool.rpool = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "true";
};
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
# Moved inside disko.devices
zpool.rpool = {
type = "zpool";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "true";
};
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
home = {
type = "zfs_fs";
mountpoint = "/home";
home = {
type = "zfs_fs";
mountpoint = "/home";
};
};
};
};