Compare commits
6 Commits
2016-07-12
...
2016-07-20
| Author | SHA1 | Date | |
|---|---|---|---|
| 28f65522ae | |||
|
|
b7f05e47ac | ||
|
|
350b62aef2 | ||
|
|
f6b939ffa9 | ||
|
|
aa48575f58 | ||
| a920200904 |
6
activation-manuelle/laptop.nix
Normal file
6
activation-manuelle/laptop.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Gestion spécifique pour PC portable
|
||||
powerManagement.cpuFreqGovernor = pkgs.lib.mkIf config.r6d.config-generator.laptop "powersave";
|
||||
}
|
||||
@@ -12,6 +12,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
./activation-manuelle/auto-upgrade.nix
|
||||
./activation-manuelle/laptop.nix
|
||||
./activation-manuelle/locate.nix
|
||||
./activation-manuelle/fail2ban.nix
|
||||
./activation-manuelle/nix-serve-client.nix
|
||||
@@ -38,6 +39,7 @@ in
|
||||
#* Utilisé dans les fichiers .nix
|
||||
r6d.config-generator = {
|
||||
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.";
|
||||
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
|
||||
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
|
||||
@@ -54,8 +56,10 @@ in
|
||||
isLatitude = mkEnableOption "Identification du nom de machine.";
|
||||
isMonstre = 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.";
|
||||
isRadx = mkEnableOption "Identification du nom de machine.";
|
||||
isXray = mkEnableOption "Identification du nom de machine.";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -70,8 +74,10 @@ in
|
||||
isLatitude = host == "latitude.dubronetwork.fr";
|
||||
isMonstre = host == "monstre.dubronetwork.fr";
|
||||
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
||||
isNomade = host == "nomade.dubronetwork.fr";
|
||||
isPhenom = host == "phenom.dubronetwork.fr";
|
||||
isRadx = host == "radx.prunetwork.fr";
|
||||
isXray = host == "xray.prunetwork.fr";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -79,6 +85,7 @@ in
|
||||
|
||||
## Définition des profils génériques
|
||||
(mkIf pfl.isDesktop {
|
||||
r6d.config-generator.awesome = true;
|
||||
})
|
||||
(mkIf pfl.isHome {
|
||||
r6d.profiles.isDesktop = true;
|
||||
@@ -102,7 +109,6 @@ in
|
||||
r6d.config-generator.nix-serve-server = true;
|
||||
})
|
||||
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
|
||||
r6d.config-generator.nix-serve-server = true;
|
||||
r6d.config-generator.virtualbox = true;
|
||||
})
|
||||
(mkIf pfl.isPrunetwork {
|
||||
@@ -124,6 +130,10 @@ in
|
||||
virtualbox = true;
|
||||
};
|
||||
})
|
||||
(mkIf comp.isXray {
|
||||
r6d.profiles.isPrunetwork = true;
|
||||
r6d.profiles.isServer = true;
|
||||
})
|
||||
|
||||
(mkIf comp.isLatitude {
|
||||
r6d.profiles.isDubronetwork = true;
|
||||
@@ -148,10 +158,19 @@ in
|
||||
laptop = true;
|
||||
};
|
||||
})
|
||||
(mkIf comp.isNomade{
|
||||
r6d.profiles.isDubronetwork = true;
|
||||
|
||||
r6d.config-generator = {
|
||||
laptop = true;
|
||||
};
|
||||
})
|
||||
(mkIf comp.isPhenom {
|
||||
r6d.profiles.isDubronetwork = true;
|
||||
r6d.profiles.isHome = true;
|
||||
r6d.profiles.isWorkstation = true;
|
||||
|
||||
r6d.config-generator.nix-serve-server = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user