ajout header + utilisation
parent
c5b7c16946
commit
326da0f7e8
@ -1,8 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
cfg = config.r6d.config-generator;
|
||||
in {
|
||||
# Automatic update & automatic clean
|
||||
|
||||
system.autoUpgrade.enable = config.r6d.config-generator.auto-upgrade;
|
||||
nix.gc.automatic = config.r6d.config-generator.auto-upgrade;
|
||||
system.autoUpgrade.enable = cfg.auto-upgrade;
|
||||
nix.gc.automatic = cfg.auto-upgrade;
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
cfg = config.r6d.config-generator;
|
||||
in {
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
cfg = config.r6d.config-generator;
|
||||
in {
|
||||
imports = [
|
||||
];
|
||||
|
||||
services.locate = {
|
||||
enable = config.r6d.config-generator.locate;
|
||||
enable = cfg.locate;
|
||||
interval = "hourly";
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
cfg = config.r6d.config-generator;
|
||||
in {
|
||||
# Cache http pour le store
|
||||
|
||||
services.nix-serve.enable = config.r6d.config-generator.nix-serve-server;
|
||||
networking.firewall.allowedTCPPorts = pkgs.lib.mkIf config.r6d.config-generator.nix-serve-server [ 5000 ];
|
||||
services.nix-serve.enable = cfg.nix-serve-server;
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.nix-serve-server [ 5000 ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue