Better disko setup

This commit is contained in:
Jan-Bulthuis committed 2025-05-29 14:19:19 +02:00
1 parent f0d56df191
commit 51ab89cd98
4 files changed
+77 -16

No files matched your search

+9 -1
View File
@@ -33,7 +33,7 @@
rootFsOptions = {
compression = "zstd";
};
mountpoint = "none";
mountpoint = null;
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
@@ -41,6 +41,14 @@
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
};
+7 -15
View File
@@ -19,6 +19,10 @@ in
# Enabled modules
modules = {
profiles.base.enable = true;
disko = {
enable = true;
profile = "vm";
};
ssh.enable = true;
};
@@ -36,6 +40,9 @@ in
# Machine platform
nixpkgs.hostPlatform = "x86_64-linux";
# Set hostid
networking.hostId = "deadbeef";
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
@@ -51,21 +58,6 @@ in
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-partlabel/root";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/EFI";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{