|
|
|
@ -9,63 +9,63 @@ let
|
|
|
|
|
host = config.networking.hostName;
|
|
|
|
|
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
|
|
|
|
|
./activation-manuelle/nix-serve-server.nix
|
|
|
|
|
./activation-manuelle/swap.nix
|
|
|
|
|
];
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
./activation-manuelle/auto-upgrade.nix
|
|
|
|
|
./activation-manuelle/laptop.nix
|
|
|
|
|
./activation-manuelle/locate.nix
|
|
|
|
|
./activation-manuelle/fail2ban.nix
|
|
|
|
|
./activation-manuelle/nix-serve-client.nix
|
|
|
|
|
./activation-manuelle/nix-serve-server.nix
|
|
|
|
|
./activation-manuelle/swap.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
#* Utilisé pour afecter des capacités aux machines
|
|
|
|
|
r6d.profiles = {
|
|
|
|
|
# Domaine
|
|
|
|
|
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
|
|
|
|
|
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
|
|
|
|
|
# Utilisation machine
|
|
|
|
|
isDesktop = mkEnableOption "Pour indiquer une machine avec interface graphique.";
|
|
|
|
|
isHome = mkEnableOption "Pour indiquer que la machine sert à la maison (divertissement & autre).";
|
|
|
|
|
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
|
|
|
|
|
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
|
|
|
|
|
};
|
|
|
|
|
#* Utilisé pour afecter des capacités aux machines
|
|
|
|
|
r6d.profiles = {
|
|
|
|
|
# Domaine
|
|
|
|
|
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
|
|
|
|
|
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
|
|
|
|
|
# Utilisation machine
|
|
|
|
|
isDesktop = mkEnableOption "Pour indiquer une machine avec interface graphique.";
|
|
|
|
|
isHome = mkEnableOption "Pour indiquer que la machine sert à la maison (divertissement & autre).";
|
|
|
|
|
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
|
|
|
|
|
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#* Utilisé dans les fichiers .nix
|
|
|
|
|
r6d.config-generator = {
|
|
|
|
|
enable = mkEnableOption "Génération de la configuration d'une machine.";
|
|
|
|
|
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
|
|
|
|
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
|
|
|
|
|
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
|
|
|
|
|
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
|
|
|
|
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
|
|
|
|
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
|
|
|
|
nix-serve-client= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
|
|
|
|
nix-serve-server= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
|
|
|
|
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
|
|
|
|
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
|
|
|
|
};
|
|
|
|
|
#* Utilisé pour avoir des raccourcis de machine
|
|
|
|
|
r6d.computers = {
|
|
|
|
|
isLatitude = mkEnableOption "Identification du nom de machine.";
|
|
|
|
|
isMonstre = mkEnableOption "Identification du nom de machine.";
|
|
|
|
|
isNeoNomade = 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.";
|
|
|
|
|
#* Utilisé dans les fichiers .nix
|
|
|
|
|
r6d.config-generator = {
|
|
|
|
|
enable = mkEnableOption "Génération de la configuration d'une machine.";
|
|
|
|
|
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
|
|
|
|
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
|
|
|
|
|
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
|
|
|
|
|
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
|
|
|
|
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
|
|
|
|
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
|
|
|
|
nix-serve-client= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
|
|
|
|
nix-serve-server= mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
|
|
|
|
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
|
|
|
|
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
|
|
|
|
};
|
|
|
|
|
#* Utilisé pour avoir des raccourcis de machine
|
|
|
|
|
r6d.computers = {
|
|
|
|
|
isLatitude = mkEnableOption "Identification du nom de machine.";
|
|
|
|
|
isMonstre = mkEnableOption "Identification du nom de machine.";
|
|
|
|
|
isNeoNomade = 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.";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
# https://nixos.org/releases/nixos/14.12-small/nixos-14.12.374.61adf9e/manual/sec-writing-modules.html
|
|
|
|
|
# https://nixos.org/wiki/NixOS:extend_NixOS
|
|
|
|
|
config = mkMerge
|
|
|
|
|
[ # Unconditional stuff.
|
|
|
|
|
###### implementation
|
|
|
|
|
# https://nixos.org/releases/nixos/14.12-small/nixos-14.12.374.61adf9e/manual/sec-writing-modules.html
|
|
|
|
|
# https://nixos.org/wiki/NixOS:extend_NixOS
|
|
|
|
|
config = mkMerge
|
|
|
|
|
[ # Unconditional stuff.
|
|
|
|
|
{
|
|
|
|
|
r6d.config-generator.enable = true;
|
|
|
|
|
r6d.computers = {
|
|
|
|
@ -91,10 +91,10 @@ in
|
|
|
|
|
})
|
|
|
|
|
(mkIf pfl.isWorkstation {
|
|
|
|
|
r6d.profiles.isDesktop = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r6d.config-generator.docker = true;
|
|
|
|
|
})
|
|
|
|
|
(mkIf pfl.isDubronetwork {
|
|
|
|
|
(mkIf pfl.isDubronetwork {
|
|
|
|
|
r6d.config-generator.auto-upgrade = true;
|
|
|
|
|
r6d.config-generator.nix-serve-client = true;
|
|
|
|
|
})
|
|
|
|
@ -113,8 +113,8 @@ in
|
|
|
|
|
r6d.config-generator.nix-serve-client = true;
|
|
|
|
|
r6d.config-generator.swap = true;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Affectation des profils aux machines
|
|
|
|
|
(mkIf comp.isRadx {
|
|
|
|
|
r6d.profiles.isHome = true;
|
|
|
|
@ -140,7 +140,7 @@ in
|
|
|
|
|
laptop = true;
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
(mkIf comp.isMonstre {
|
|
|
|
|
(mkIf comp.isMonstre {
|
|
|
|
|
r6d.profiles.isDubronetwork = true;
|
|
|
|
|
r6d.profiles.isServer = true;
|
|
|
|
|
|
|
|
|
@ -154,7 +154,7 @@ in
|
|
|
|
|
laptop = true;
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
(mkIf comp.isPhenom {
|
|
|
|
|
(mkIf comp.isPhenom {
|
|
|
|
|
r6d.profiles.isDubronetwork = true;
|
|
|
|
|
r6d.profiles.isHome = true;
|
|
|
|
|
r6d.profiles.isWorkstation = true;
|
|
|
|
|