From af15068c2958eb77186a870d92b5bdf410006c90 Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Fri, 22 Jul 2016 13:46:46 +0200 Subject: [PATCH] =?UTF-8?q?utilisation=20de=20blocs=20pour=20=C3=A9viter?= =?UTF-8?q?=20de=20r=C3=A9peter=20le=20pr=C3=A9fixe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-generator.nix | 78 ++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/config-generator.nix b/config-generator.nix index 49da805..13eb3fd 100644 --- a/config-generator.nix +++ b/config-generator.nix @@ -91,8 +91,10 @@ in ## Définition des profils génériques (mkIf pfl.isDesktop { - r6d.config-generator.awesome = true; - r6d.config-generator.nix-serve-client = true; + r6d.config-generator = { + awesome = true; + nix-serve-client = true; + }; }) (mkIf pfl.isHome { r6d.profiles.isDesktop = true; @@ -108,9 +110,11 @@ in ## Profils liés à Dubronetwork (mkIf pfl.isDubronetwork { - r6d.config-generator.auto-upgrade = true; - r6d.config-generator.nix-serve-client = true; - r6d.config-generator.print = true; + r6d.config-generator = { + auto-upgrade = true; + nix-serve-client = true; + print = true; + }; }) (mkIf (pfl.isDubronetwork && pfl.isHome) { r6d.config-generator.jeux = true; @@ -124,36 +128,46 @@ in ## Profils liés à Prunetwork (mkIf pfl.isPrunetwork { - r6d.config-generator.auto-upgrade = true; - r6d.config-generator.fail2ban = true; - r6d.config-generator.swap = true; + r6d.config-generator = { + auto-upgrade = true; + fail2ban = true; + swap = true; + }; }) ## Affectation des profils aux machines (mkIf comp.isOcean { - r6d.profiles.isPrunetwork = true; - r6d.profiles.isServer = true; + r6d.profiles = { + isPrunetwork = true; + isServer = true; + }; }) (mkIf comp.isRadx { - r6d.profiles.isHome = true; - r6d.profiles.isPrunetwork = true; - r6d.profiles.isServer = true; - r6d.profiles.isWorkstation = true; + r6d.profiles = { + isHome = true; + isPrunetwork = true; + isServer = true; + isWorkstation = true; + }; r6d.config-generator = { virtualbox = true; }; }) (mkIf comp.isXray { - r6d.profiles.isPrunetwork = true; - r6d.profiles.isServer = true; + r6d.profiles = { + isPrunetwork = true; + isServer = true; + }; }) (mkIf comp.isLatitude { - r6d.profiles.isDubronetwork = true; - r6d.profiles.isHome = true; - r6d.profiles.isWorkstation = true; + r6d.profiles = { + isDubronetwork = true; + isHome = true; + isWorkstation = true; + }; r6d.config-generator = { laptop = true; @@ -161,14 +175,18 @@ in }; }) (mkIf comp.isMonstre { - r6d.profiles.isDubronetwork = true; - r6d.profiles.isServer = true; + r6d.profiles = { + isDubronetwork = true; + isServer = true; + }; r6d.config-generator.fail2ban = true; }) (mkIf comp.isNeoNomade{ - r6d.profiles.isDubronetwork = true; - r6d.profiles.isHome = true; + r6d.profiles = { + isDubronetwork = true; + isHome = true; + }; r6d.config-generator = { laptop = true; @@ -182,12 +200,16 @@ in }; }) (mkIf comp.isPhenom { - r6d.profiles.isDubronetwork = true; - r6d.profiles.isHome = true; - r6d.profiles.isWorkstation = true; + r6d.profiles = { + isDubronetwork = true; + isHome = true; + isWorkstation = true; + }; - r6d.config-generator.nix-serve-server = true; - r6d.config-generator.xmonad = true; + r6d.config-generator = { + nix-serve-server = true; + xmonad = true; + }; }) ]; }