nixos-config/system/nix.nix

34 lines
870 B
Nix
Raw Normal View History

{ config, pkgs, lib, inputs, ... }:
2019-10-19 12:55:35 +02:00
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
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;
2022-06-28 02:23:51 +02:00
substituters = [
"https://hydra.iohk.io"
"https://shajra.cachix.org"
"https://felschr.cachix.org"
];
2022-01-31 22:49:52 +01:00
trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"shajra.cachix.org-1:V0x7Wjgd/mHGk2KQwzXv8iydfIgLupbnZKLSQt5hh9o="
2022-06-28 02:23:51 +02:00
"felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A="
2022-01-31 22:49:52 +01:00
];
};
system.autoUpgrade = {
enable = true;
dates = "02:00";
flake = "/etc/nixos";
flags = with lib;
flatten (mapAttrsToList (n: _: [ "--update-input" n ]) flakes);
};
2019-10-19 12:55:35 +02:00
}