2020-11-16 21:14:46 +01:00
|
|
|
{
|
2026-01-24 22:40:40 +01:00
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
inputs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
let
|
|
|
|
|
cfg = config.my.profiles.core.nix;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
options.my.profiles.core.nix.enable = lib.mkEnableOption "core nix profile";
|
2023-01-12 23:18:58 +01:00
|
|
|
|
2026-01-24 22:40:40 +01:00
|
|
|
config = lib.mkIf cfg.enable {
|
2022-11-09 22:28:10 +01:00
|
|
|
|
2026-01-24 22:40:40 +01:00
|
|
|
nix = {
|
|
|
|
|
daemonCPUSchedPolicy = "idle";
|
|
|
|
|
daemonIOSchedClass = "idle";
|
|
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
trusted-users = [
|
|
|
|
|
"root"
|
|
|
|
|
"@wheel"
|
|
|
|
|
];
|
|
|
|
|
auto-optimise-store = true;
|
|
|
|
|
builders-use-substitutes = true;
|
|
|
|
|
};
|
2022-11-09 22:28:10 +01:00
|
|
|
|
2026-01-24 22:40:40 +01:00
|
|
|
gc = {
|
|
|
|
|
automatic = true;
|
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
|
};
|
2022-12-05 20:18:17 +01:00
|
|
|
|
2026-01-24 22:40:40 +01:00
|
|
|
extraOptions = ''
|
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
registry = {
|
|
|
|
|
nixpkgs.flake = inputs.nixpkgs;
|
|
|
|
|
unstable.flake = inputs.nixpkgs-unstable;
|
|
|
|
|
};
|
2022-12-05 20:18:17 +01:00
|
|
|
};
|
2022-11-09 22:28:10 +01:00
|
|
|
|
2026-01-24 22:40:40 +01:00
|
|
|
# auto upgrade with own flakes
|
|
|
|
|
system.autoUpgrade = {
|
|
|
|
|
enable = true;
|
|
|
|
|
flake = "github:Stunkymonkey/nixos";
|
|
|
|
|
};
|
2023-01-29 15:30:13 +01:00
|
|
|
};
|
2020-11-16 21:14:46 +01:00
|
|
|
}
|