commented/tidied sync.nix & regreet.nix

This commit is contained in:
serenity-F 2025-03-25 22:39:48 +10:00
parent 86640e26ce
commit cfef8df3d8
2 changed files with 11 additions and 50 deletions

View file

@ -1,13 +1,9 @@
# # 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
{ config, lib, pkgs, ... }:
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
let
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
&& (builtins.tryEval kernelPackages).success
@ -16,10 +12,8 @@ let
latestKernelPackage = lib.last
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
(builtins.attrValues zfsCompatibleKernelPackages));
in {
imports = [ ];
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## Enable zfs in kernel and boot
boot = {
@ -33,12 +27,7 @@ in {
forceImportRoot = false;
};
};
#fileSystems."/run/media/serenity/Orcus" = {
#device = "orcus";
#fsType = "zfs";
#options = [ "users" ];
#};
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
## Adding ZFS package to system just in case
environment.systemPackages = with pkgs; [ zfs ];
@ -46,21 +35,9 @@ in {
## 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; };
#trim.enable = true; # zfs trim service for SSDS
autoScrub = { enable = true; }; # autoscrub data integrity ZFS service,
};
};
## Automount service for the ZFS pools
## Is supposed to be enabled by default
#systemd.services.zfs-mount = {
#enable = true;
#};
## Unsure why this is here actually ?
networking = { hostId = "603b0c8b"; };
}