You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
938 B
Nix
39 lines
938 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
|
annuaire = config.r6d.machines;
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
|
flags = currentMachine.configurationFlags;
|
|
in
|
|
|
|
{
|
|
|
|
# Automatic update & automatic clean
|
|
|
|
system.autoUpgrade.enable = flags.auto-upgrade;
|
|
nix = {
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
settings = {
|
|
auto-optimise-store = true;
|
|
# Nombre de process d'installation en parrallèle effectués par Nix
|
|
cores = 0;
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "daily";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
};
|
|
|
|
# Affichage des modifications de profil (maj/ajout/suppression) dans le terminal
|
|
system.activationScripts.diff = {
|
|
supportsDryActivation = true;
|
|
text = ''
|
|
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
|
|
'';
|
|
};
|
|
}
|