From 3963027f0496c93f93805e3e9d094bdbefb02d97 Mon Sep 17 00:00:00 2001 From: Yves Dubromelle Date: Fri, 24 Mar 2017 23:14:20 +0100 Subject: [PATCH] isDesktop -> isDesktopEnvironment + groupes de logiciels --- config-generator.nix | 28 +++++++++++++------------ public/applications/adminsys.nix | 4 ++-- public/applications/bureau.nix | 6 ++++-- public/applications/bureautique.nix | 2 +- public/applications/client-internet.nix | 2 +- public/applications/multimedia.nix | 3 ++- public/applications/network.nix | 1 - public/applications/securite.nix | 8 +------ public/services/x11.nix | 2 +- 9 files changed, 27 insertions(+), 29 deletions(-) diff --git a/config-generator.nix b/config-generator.nix index 0b3bcbf..1795905 100644 --- a/config-generator.nix +++ b/config-generator.nix @@ -9,7 +9,9 @@ let in { -# TODO: ménage +# TODO camel case partout +# TODO everything in english +# TODO sortir ce qui est privé ###### interface options = { @@ -20,8 +22,7 @@ in 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)."; + isDesktopEnvironment = mkEnableOption "Pour indiquer une machine avec interface graphique."; isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur."; isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler."; }; @@ -51,20 +52,24 @@ in hydra-builder = mkEnableOption "Profil pour une machine qui compile pour hydra."; hydra-core = mkEnableOption "Profil pour un serveur hydra."; kibana = mkEnableOption "Profil pour activer le service kibana."; + internetSuite = mkEnableOption "Profil pour la suite de logiciels pour Internet."; jetbrains-licensed = mkEnableOption "Profil pour la suite de développement Jetbrains payante (sous-ensemble)."; 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."; mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres."; + multimediaSuite = mkEnableOption "Profil pour la suite multimédia."; murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)"; 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."; nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store"; + officeSuite = mkEnableOption "Profil pour la suite bureautique"; print = mkEnableOption "Profil pour activer cups & pouvoir imprimer."; pulseaudio = mkEnableOption "Profil pour activer pulseaudio."; rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP."; radicale = mkEnableOption "Profil pour activer le service d'hébergement de calendrier + tâches & contacts."; scanner = mkEnableOption "Profil pour que les scanners soient utilisable."; + securitySuite = mkEnableOption "Profil pour la suite de logiciels de sécurité."; smokeping = mkEnableOption "Profil pour activer le monitoring réseau par smokeping."; swap = mkEnableOption "Profil pour que le swap soit activé."; virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox."; @@ -108,16 +113,16 @@ in config = mkMerge [ ## Définition des profils génériques - (mkIf pfl.isDesktop { + (mkIf pfl.isDesktopEnvironment { r6d.config-generator = { awesome = true; - #nix-serve-client = true; + internetSuite = true; + multimediaSuite = true; + officeSuite = true; pulseaudio = true; + securitySuite = true; }; }) - (mkIf pfl.isHome { - r6d.profiles.isDesktop = true; - }) (mkIf (pfl.isServer && !comp.isMonstre) { r6d.config-generator = { #database_postgres = true; @@ -137,7 +142,7 @@ in }; }) (mkIf pfl.isWorkstation { - r6d.profiles.isDesktop = true; + r6d.profiles.isDesktopEnvironment = true; r6d.config-generator = { docker = true; @@ -247,7 +252,6 @@ in (mkIf comp.isRadx { networking.hostName = "radx.prunetwork.fr"; # Define your hostname. r6d.profiles = { - isHome = true; isPrunetwork = true; isWorkstation = true; }; @@ -275,7 +279,6 @@ in networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; isWorkstation = true; }; @@ -318,7 +321,7 @@ in networking.hostName = "neo-nomade.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; + isDesktopEnvironment = true; }; r6d.config-generator = { @@ -357,7 +360,6 @@ in networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; isWorkstation = true; }; diff --git a/public/applications/adminsys.nix b/public/applications/adminsys.nix index 3483fea..b112837 100644 --- a/public/applications/adminsys.nix +++ b/public/applications/adminsys.nix @@ -51,11 +51,11 @@ mkIf true { duff # outil de recherche de fichiers en doublons rdfind # recherche de fichiers doublons pour remplacement par hard/soft link - (mkIf profiles.isDesktop + (mkIf profiles.isDesktopEnvironment ## Gestion de FS gparted # Gestion graphique de partitions ) - (mkIf profiles.isDesktop + (mkIf profiles.isDesktopEnvironment unetbootin # création de clefs USB bootables ) ]; diff --git a/public/applications/bureau.nix b/public/applications/bureau.nix index b3ca6a3..934d172 100644 --- a/public/applications/bureau.nix +++ b/public/applications/bureau.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf profiles.isDesktopEnvironment { # Paquets environment.systemPackages = with pkgs; [ @@ -33,7 +33,7 @@ mkIf profiles.isDesktop { ]; # Polices supplémentaires - fonts.fonts = with pkgs; mkIf profiles.isDesktop [ + fonts.fonts = with pkgs; [ fira # police créée pour Firefox fira-code # idem fira-mono + ligatures pour la programmation fira-mono # dérivée de fira en monospace @@ -46,5 +46,7 @@ mkIf profiles.isDesktop { # pour le montage des media amovibles devmon.source = "${pkgs.udevil}/bin/devmon"; udevil.source = "${pkgs.udevil}/bin/udevil"; # utilisé par spacefm + # vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root + slock.source = "${pkgs.slock}/bin/slock"; }; } diff --git a/public/applications/bureautique.nix b/public/applications/bureautique.nix index 27f70b3..1feb95c 100644 --- a/public/applications/bureautique.nix +++ b/public/applications/bureautique.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf cfg.officeSuite { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/applications/client-internet.nix b/public/applications/client-internet.nix index 4866319..c615d04 100644 --- a/public/applications/client-internet.nix +++ b/public/applications/client-internet.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in # TODO: ménage -mkIf profiles.isDesktop { +mkIf cfg.internetSuite { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/applications/multimedia.nix b/public/applications/multimedia.nix index d825abb..d6188bc 100644 --- a/public/applications/multimedia.nix +++ b/public/applications/multimedia.nix @@ -7,7 +7,8 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +# TODO ranger le spécifique pulseaudio +mkIf cfg.multimediaSuite { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/applications/network.nix b/public/applications/network.nix index f52c5e0..7f82062 100644 --- a/public/applications/network.nix +++ b/public/applications/network.nix @@ -8,7 +8,6 @@ let in mkIf true { -#mkIf profiles.isDesktop { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/applications/securite.nix b/public/applications/securite.nix index ec89433..a11d5c5 100644 --- a/public/applications/securite.nix +++ b/public/applications/securite.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf cfg.securitySuite { # Paquets environment.systemPackages = with pkgs; [ @@ -17,10 +17,4 @@ mkIf profiles.isDesktop { pwgen # générateur de mots de passe #yubikey-personalization-gui # utilisation de la clef Yubikey ]; - - # Paquets avec setui root - security.wrappers = { - # vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root - slock.source = "${pkgs.slock}/bin/slock"; - }; } diff --git a/public/services/x11.nix b/public/services/x11.nix index 93e8b16..4c9bdf7 100644 --- a/public/services/x11.nix +++ b/public/services/x11.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf profiles.isDesktopEnvironment { # Services # Enable the X11 windowing system.