ajout header + utilisation
parent
c5b7c16946
commit
326da0f7e8
@ -1,8 +1,12 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
in {
|
||||||
# Automatic update & automatic clean
|
# Automatic update & automatic clean
|
||||||
|
|
||||||
system.autoUpgrade.enable = config.r6d.config-generator.auto-upgrade;
|
system.autoUpgrade.enable = cfg.auto-upgrade;
|
||||||
nix.gc.automatic = config.r6d.config-generator.auto-upgrade;
|
nix.gc.automatic = cfg.auto-upgrade;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
in {
|
||||||
# Gestion spécifique pour PC portable
|
# Gestion spécifique pour PC portable
|
||||||
powerManagement.cpuFreqGovernor = pkgs.lib.mkIf config.r6d.config-generator.laptop "powersave";
|
powerManagement.cpuFreqGovernor = mkIf cfg.laptop "powersave";
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
];
|
];
|
||||||
|
|
||||||
services.locate = {
|
services.locate = {
|
||||||
enable = config.r6d.config-generator.locate;
|
enable = cfg.locate;
|
||||||
interval = "hourly";
|
interval = "hourly";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
in {
|
||||||
# Cache http pour le store
|
# Cache http pour le store
|
||||||
|
|
||||||
services.nix-serve.enable = config.r6d.config-generator.nix-serve-server;
|
services.nix-serve.enable = cfg.nix-serve-server;
|
||||||
networking.firewall.allowedTCPPorts = pkgs.lib.mkIf config.r6d.config-generator.nix-serve-server [ 5000 ];
|
networking.firewall.allowedTCPPorts = mkIf cfg.nix-serve-server [ 5000 ];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue