refactor: dedup several modules by breaking them out into feature modules

This commit is contained in:
2026-10-20 14:37:49 -04:00
parent 22d426001e
commit a6c7d32231
14 changed files with 243 additions and 325 deletions
+47
View File
@@ -0,0 +1,47 @@
{ lib, pkgs, ... }:
let
launchd-time = {
Hour = 3;
Minute = 15;
Weekday = 7;
};
systemd-time = "weekly";
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
in
{
nixpkgs.config.allowUnfree = true;
nix = {
gc = {
automatic = true;
options = "--delete-older-than 30d";
}
// lib.optionalAttrs isDarwin {
interval = launchd-time;
}
// lib.optionalAttrs (!isDarwin) {
dates = systemd-time;
};
optimise = {
automatic = true;
}
// lib.optionalAttrs isDarwin {
interval = launchd-time;
}
// lib.optionalAttrs (!isDarwin) {
dates = systemd-time;
};
settings = {
use-xdg-base-directories = true;
experimental-features = [
"nix-command"
"flakes"
];
};
};
}