2023-09-30 16:21:03 +02:00
|
|
|
{ inputs, lib, ... }:
|
2019-10-19 12:55:35 +02:00
|
|
|
|
2023-09-30 16:21:03 +02:00
|
|
|
let
|
|
|
|
flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
|
|
|
inherit (inputs.self.outputs) nixConfig;
|
2024-05-26 16:45:38 +02:00
|
|
|
in
|
|
|
|
{
|
2019-10-19 12:55:35 +02:00
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
2022-05-03 22:44:29 +02:00
|
|
|
dates = "04:00";
|
2019-10-19 12:55:35 +02:00
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
2021-01-16 17:52:54 +01:00
|
|
|
|
2022-01-31 22:49:52 +01:00
|
|
|
nix.settings = {
|
2022-07-06 15:28:34 +02:00
|
|
|
trusted-users = [ "@wheel" ];
|
2022-01-31 22:49:52 +01:00
|
|
|
auto-optimise-store = true;
|
2023-09-13 15:42:41 +02:00
|
|
|
substituters = nixConfig.extra-substituters;
|
|
|
|
trusted-public-keys = nixConfig.extra-trusted-public-keys;
|
2022-01-31 22:49:52 +01:00
|
|
|
};
|
2022-06-26 12:47:15 +02:00
|
|
|
|
|
|
|
system.autoUpgrade = {
|
|
|
|
enable = true;
|
2023-08-12 19:01:56 +02:00
|
|
|
dates = "03:00";
|
2022-06-26 12:47:15 +02:00
|
|
|
flake = "/etc/nixos";
|
2024-05-26 16:45:38 +02:00
|
|
|
flags =
|
|
|
|
with lib;
|
|
|
|
flatten (
|
|
|
|
mapAttrsToList (n: _: [
|
|
|
|
"--update-input"
|
|
|
|
n
|
|
|
|
]) flakes
|
|
|
|
);
|
2022-06-26 12:47:15 +02:00
|
|
|
};
|
2019-10-19 12:55:35 +02:00
|
|
|
}
|