This commit is contained in:
serenity-F 2025-01-09 20:02:31 +10:00
parent 6c180bbb00
commit 38928b05ea
40 changed files with 94 additions and 249 deletions

View file

@ -1,20 +0,0 @@
{ ... }:
{
imports = [
## Selected modules for import
#./hardware.nix # hardware configuration
./network.nix # network configuration
./zfs.nix # zfs configuration
## Selected core modules for import
../../../core/modules/audio.nix
../../../core/modules/display.nix
../../../core/modules/desktop.nix
../../../core/modules/jellyfin.nix
];
}

View file

@ -1,68 +0,0 @@
## ZFS Support NixOS module
## temporary location while we figure out how ZFS works,
## eventually this will be embedded into the flake in a better way
{ lib, pkgs, ... }:
let
## This 'let' binding creates an attribute set
## called "LatestZfsLinux", which we can call as
## a package to specify when building our kernel.
latestZfsLinux = lib.pipe pkgs.linuxKernel.packages [
builtins.attrValues
(builtins.filter (
kPkgs:
(builtins.tryEval kPkgs).success
&& kPkgs ? kernel
&& kPkgs.kernel.pname == "linux"
&& !kPkgs.zfs.meta.broken
))
(builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)))
lib.last
];
in
{
imports = [
];
## Enable zfs in kernel and boot
boot = {
kernelPackages = latestZfsLinux;
supportedFilesystems = [ "zfs" ];
zfs = {
extraPools = [ "orcus" ];
forceImportRoot = false;
};
};
#fileSystems."/home/serenity/Disks/Orcus" = {
#device = "orcus";
#fsType = "zfs";
#options = [ "users" ];
#};
environment.systemPackages = with pkgs; [
zfs
];
## Enable trim for ZFS SSDs
services = {
zfs = {
## Trim for SSSds with ZFS
#trim.enable = true;
## Autoscrub data integrity ZFS service,
## more to be added soon
autoScrub = {
enable = true;
};
};
};
networking = {
hostId = "603b0c8b";
};
}