Nyx: more zfs stuff

This commit is contained in:
blahai 2024-12-15 19:26:54 +02:00
parent 91b2ccabb9
commit 67396f09a8
Signed by: blahai
SSH key fingerprint: SHA256:ZfCryi+V64yG+vC1ZIIsqgvBCmA31tTi7RJ6M8CvpRc
2 changed files with 23 additions and 10 deletions

View file

@ -21,13 +21,16 @@
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
zfs = { zfs = {
forceImportRoot = false; forceImportRoot = false;
extraPools = [ "zpool" ]; extraPools = [ "zpool" "zootfs" ];
devNodes = "/dev/disk/by-id"; devNodes = "/dev/disk/by-id";
package = pkgs-smol.zfs; package = pkgs-smol.zfs;
allowHibernation = true; # might cause corruption? allowHibernation = true; # might cause corruption?
}; };
kernelPackages = pkgs-smol.linuxPackages_6_12; kernelPackages = pkgs-smol.linuxPackages_6_12;
kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; }; kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; };
kernelParams = [
"elevator=none" # for zfs
];
}; };
zramSwap = { zramSwap = {

View file

@ -1,6 +1,3 @@
# 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, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
@ -35,6 +32,25 @@
options = [ "zfsutil" ]; options = [ "zfsutil" ];
}; };
fileSystems."/mnt/zootfs/Storage" = {
device = "zootfs/Storage";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/mnt/zootfs/Media" = {
device = "zootfs/Media";
fsType = "zfs";
options = [ "zfsutil" ];
};
# https://github.com/atuinsh/atuin/issues/952#issuecomment-1902164562
fileSystems."/home/pingu/.local/share/atuin" = {
device = "/dev/zvol/zpool/nixos/atuin";
fsType = "ext4";
options = [ "async" "auto" "nofail" ];
};
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT"; device = "/dev/disk/by-label/BOOT";
fsType = "vfat"; fsType = "vfat";
@ -55,13 +71,7 @@
swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }]; swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp13s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp14s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;