Compare commits
5 Commits
2016-07-13
...
2016-07-20
| Author | SHA1 | Date | |
|---|---|---|---|
| 28f65522ae | |||
|
|
b7f05e47ac | ||
|
|
350b62aef2 | ||
|
|
f6b939ffa9 | ||
|
|
aa48575f58 |
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";
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user