formatting/commenting flake.nix and core/

This commit is contained in:
serenity-F 2026-03-02 20:15:43 +10:00
parent 038e21a444
commit 9edc913a1d
No known key found for this signature in database
8 changed files with 176 additions and 191 deletions

View file

@ -1,9 +1,10 @@
# # ZFS Support NixOS module
# ZFS Support NixOS module
{ config, lib, pkgs, ... }:
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
let
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
&& (builtins.tryEval kernelPackages).success
@ -12,27 +13,23 @@ let
latestKernelPackage = lib.last
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
(builtins.attrValues zfsCompatibleKernelPackages));
in {
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## Enable zfs in kernel and boot
in {
# Enable zfs in kernel and boot
boot = {
## Sets system to use the kernel specified in the let binding above
# Sets system to use the kernel specified in the let binding above
kernelPackages = lib.mkForce latestKernelPackage;
supportedFilesystems = [ "zfs" ];
zfs = {
## uhhh
#extraPools = [ "orcus" ];
## uhhh
#forceImportRoot = false;
};
};
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
## Adding ZFS package to system just in case
environment.systemPackages = with pkgs; [ zfs ];
## Enable trim for ZFS SSDs
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
services = {
zfs = {
#trim.enable = true; # zfs trim service for SSDS