From 2195033ee5cda46d02737330eeaa09f14efdbbcc Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Thu, 21 Jul 2016 22:25:21 +0200 Subject: [PATCH] ajout de variable pour l'impression --- activation-manuelle/print.nix | 11 +++++++++++ config-generator.nix | 3 +++ services.nix | 8 -------- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 activation-manuelle/print.nix diff --git a/activation-manuelle/print.nix b/activation-manuelle/print.nix new file mode 100644 index 0000000..f176b6e --- /dev/null +++ b/activation-manuelle/print.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + # Enable CUPS to print documents. + services.printing = pkgs.lib.mkIf config.r6d.config-generator.print { + enable = true; + drivers = [ + pkgs.samsung-unified-linux-driver + ]; + }; +} diff --git a/config-generator.nix b/config-generator.nix index 1f65674..1cc0002 100644 --- a/config-generator.nix +++ b/config-generator.nix @@ -17,6 +17,7 @@ in ./activation-manuelle/fail2ban.nix ./activation-manuelle/nix-serve-client.nix ./activation-manuelle/nix-serve-server.nix + ./activation-manuelle/print.nix ./activation-manuelle/swap.nix ./activation-manuelle/users.nix ]; @@ -49,6 +50,7 @@ in locate = mkEnableOption "Profil pour activer la fonction locate."; nix-serve-client= mkEnableOption "Profil pour que la machine soit un client de cache nix."; nix-serve-server= mkEnableOption "Profil pour que la machine soit un serveur de cache nix."; + print = mkEnableOption "Profil pour activer cups & pouvoir imprimer."; swap = mkEnableOption "Profil pour que le swap soit activé."; virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox."; xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad."; @@ -106,6 +108,7 @@ in (mkIf pfl.isDubronetwork { r6d.config-generator.auto-upgrade = true; r6d.config-generator.nix-serve-client = true; + r6d.config-generator.print = true; }) (mkIf (pfl.isDubronetwork && pfl.isHome) { r6d.config-generator.jeux = true; diff --git a/services.nix b/services.nix index af0593f..94fdbef 100644 --- a/services.nix +++ b/services.nix @@ -15,14 +15,6 @@ enable = true; }; - # Enable CUPS to print documents. - services.printing = { - enable = true; - drivers = [ - pkgs.samsung-unified-linux-driver - ]; - }; - # Monitoring ## Noeud de supervision munin = pas de stockage des données locales