refactor: dedup several modules by breaking them out into feature modules
This commit is contained in:
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user