2016-08-08 22:58:30 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2016-07-22 14:16:20 +02:00
|
|
|
|
|
|
|
|
let
|
2016-08-12 12:46:36 +02:00
|
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
2017-04-24 23:22:11 +02:00
|
|
|
annuaire = config.r6d.machines;
|
2021-05-06 23:50:07 +02:00
|
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
2017-05-31 00:23:10 +02:00
|
|
|
flags = currentMachine.configurationFlags;
|
2016-08-08 22:58:30 +02:00
|
|
|
in
|
|
|
|
|
|
2021-11-06 15:21:27 +01:00
|
|
|
{
|
2016-08-12 12:46:36 +02:00
|
|
|
|
2016-06-03 14:38:58 +02:00
|
|
|
# Automatic update & automatic clean
|
2016-07-09 21:26:20 +02:00
|
|
|
|
2021-11-06 15:21:27 +01:00
|
|
|
system.autoUpgrade.enable = flags.auto-upgrade;
|
2021-11-06 14:59:51 +01:00
|
|
|
nix = {
|
|
|
|
|
autoOptimiseStore = true;
|
|
|
|
|
gc = {
|
|
|
|
|
automatic = true;
|
|
|
|
|
dates = "daily";
|
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
|
};
|
|
|
|
|
};
|
2016-06-03 14:38:58 +02:00
|
|
|
}
|