Compare commits

...

5 Commits

Author SHA1 Message Date
28f65522ae ajout variable pour ajouter variable d'environnement awesome 2016-07-18 12:14:00 +02:00
Yves Dubromelle
b7f05e47ac prise en compte de nomade par le générateur 2016-07-16 20:42:30 +02:00
Yves Dubromelle
350b62aef2 formattage 2016-07-16 20:41:00 +02:00
Yves Dubromelle
f6b939ffa9 ajout de politique d'énergie pour laptop 2016-07-15 11:59:39 +02:00
Yves Dubromelle
aa48575f58 déplacement de l'activation de nixos server vers phenom 2016-07-15 11:37:52 +02:00
2 changed files with 77 additions and 58 deletions

View File

@@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
# Gestion spécifique pour PC portable
powerManagement.cpuFreqGovernor = pkgs.lib.mkIf config.r6d.config-generator.laptop "powersave";
}

View File

@@ -9,9 +9,10 @@ let
host = config.networking.hostName; host = config.networking.hostName;
in in
{ {
imports = [ imports = [
./activation-manuelle/auto-upgrade.nix ./activation-manuelle/auto-upgrade.nix
./activation-manuelle/laptop.nix
./activation-manuelle/locate.nix ./activation-manuelle/locate.nix
./activation-manuelle/fail2ban.nix ./activation-manuelle/fail2ban.nix
./activation-manuelle/nix-serve-client.nix ./activation-manuelle/nix-serve-client.nix
@@ -38,6 +39,7 @@ in
#* Utilisé dans les fichiers .nix #* Utilisé dans les fichiers .nix
r6d.config-generator = { r6d.config-generator = {
enable = mkEnableOption "Génération de la configuration d'une machine."; enable = mkEnableOption "Génération de la configuration d'une machine.";
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques."; auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
docker = mkEnableOption "Profil pour l'utilisation de Docker."; docker = mkEnableOption "Profil pour l'utilisation de Docker.";
fail2ban = mkEnableOption "Profil pour activer Fail2ban."; fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
@@ -54,6 +56,7 @@ in
isLatitude = mkEnableOption "Identification du nom de machine."; isLatitude = mkEnableOption "Identification du nom de machine.";
isMonstre = mkEnableOption "Identification du nom de machine."; isMonstre = mkEnableOption "Identification du nom de machine.";
isNeoNomade = mkEnableOption "Identification du nom de machine."; isNeoNomade = mkEnableOption "Identification du nom de machine.";
isNomade = mkEnableOption "Identification du nom de machine.";
isPhenom = mkEnableOption "Identification du nom de machine."; isPhenom = mkEnableOption "Identification du nom de machine.";
isRadx = mkEnableOption "Identification du nom de machine."; isRadx = mkEnableOption "Identification du nom de machine.";
isXray = mkEnableOption "Identification du nom de machine."; isXray = mkEnableOption "Identification du nom de machine.";
@@ -71,6 +74,7 @@ in
isLatitude = host == "latitude.dubronetwork.fr"; isLatitude = host == "latitude.dubronetwork.fr";
isMonstre = host == "monstre.dubronetwork.fr"; isMonstre = host == "monstre.dubronetwork.fr";
isNeoNomade = host == "neo-nomade.dubronetwork.fr"; isNeoNomade = host == "neo-nomade.dubronetwork.fr";
isNomade = host == "nomade.dubronetwork.fr";
isPhenom = host == "phenom.dubronetwork.fr"; isPhenom = host == "phenom.dubronetwork.fr";
isRadx = host == "radx.prunetwork.fr"; isRadx = host == "radx.prunetwork.fr";
isXray = host == "xray.prunetwork.fr"; isXray = host == "xray.prunetwork.fr";
@@ -81,6 +85,7 @@ in
## Définition des profils génériques ## Définition des profils génériques
(mkIf pfl.isDesktop { (mkIf pfl.isDesktop {
r6d.config-generator.awesome = true;
}) })
(mkIf pfl.isHome { (mkIf pfl.isHome {
r6d.profiles.isDesktop = true; r6d.profiles.isDesktop = true;
@@ -104,7 +109,6 @@ in
r6d.config-generator.nix-serve-server = true; r6d.config-generator.nix-serve-server = true;
}) })
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) { (mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
r6d.config-generator.nix-serve-server = true;
r6d.config-generator.virtualbox = true; r6d.config-generator.virtualbox = true;
}) })
(mkIf pfl.isPrunetwork { (mkIf pfl.isPrunetwork {
@@ -154,10 +158,19 @@ in
laptop = true; laptop = true;
}; };
}) })
(mkIf comp.isNomade{
r6d.profiles.isDubronetwork = true;
r6d.config-generator = {
laptop = true;
};
})
(mkIf comp.isPhenom { (mkIf comp.isPhenom {
r6d.profiles.isDubronetwork = true; r6d.profiles.isDubronetwork = true;
r6d.profiles.isHome = true; r6d.profiles.isHome = true;
r6d.profiles.isWorkstation = true; r6d.profiles.isWorkstation = true;
r6d.config-generator.nix-serve-server = true;
}) })
]; ];
} }