diff --git a/applications/graphical/adminsys.nix b/applications/graphical/adminsys.nix new file mode 100644 index 0000000..7e5c66a --- /dev/null +++ b/applications/graphical/adminsys.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.graphical { + + # Paquets + environment.systemPackages = with pkgs; [ + # Gestion de FS + parted # Gestion graphique de partitions + unetbootin # création de clefs USB bootables + ]; +} diff --git a/public/app-bureau.nix b/applications/graphical/bureau.nix similarity index 87% rename from public/app-bureau.nix rename to applications/graphical/bureau.nix index b3ca6a3..934d172 100644 --- a/public/app-bureau.nix +++ b/applications/graphical/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/applications/graphical/bureautique.nix b/applications/graphical/bureautique.nix new file mode 100644 index 0000000..a826720 --- /dev/null +++ b/applications/graphical/bureautique.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.officeSuite && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + # Bureautique + gnumeric # tableur + #kde4.ksnapshot# réalisation de capture d'écran + + ## Cartes mentales + freemind + + ## Diagrammes & Schémas + dia # dessin & schéma technique + + ## Editeur de texte + #lyx # surcouche WISIWIM à LaTeX + #focuswriter # outil pour l'écriture + textadept # un éditeur de texte facile pour copier-coller graphique + #zim # outil de prise de notes, wiki de bureau + + ## Visionneuse + #kde5.okular # pdf + mcomix # livres (cbr, liste d'images), gestion d'une bibliothèque + pdfpc # pdf + qpdfview # pdf + gqview # visionneuse image & gestion basique de collection + ]; +} diff --git a/public/app-cao.nix b/applications/graphical/cao.nix similarity index 92% rename from public/app-cao.nix rename to applications/graphical/cao.nix index 6d13c2f..3be3ed7 100644 --- a/public/app-cao.nix +++ b/applications/graphical/cao.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf cfg.conception-assistee { +mkIf (cfg.conception-assistee && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/app-cartographie.nix b/applications/graphical/cartographie.nix similarity index 83% rename from public/app-cartographie.nix rename to applications/graphical/cartographie.nix index 4e41b18..c2c91b9 100644 --- a/public/app-cartographie.nix +++ b/applications/graphical/cartographie.nix @@ -7,13 +7,11 @@ let profiles = config.r6d.profiles; in -mkIf cfg.cartographie { +mkIf (cfg.cartographie && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ # Gestion de données géographiques - expat - gpsbabel # pour convettir les données des GPS josm # outil de contribution à OpenStreetMap #qgis # client lourd de manipulation de données géographiques viking # analyse de topo, gestion de données GPS diff --git a/public/app-client-internet.nix b/applications/graphical/client-internet.nix similarity index 80% rename from public/app-client-internet.nix rename to applications/graphical/client-internet.nix index 4866319..e6711eb 100644 --- a/public/app-client-internet.nix +++ b/applications/graphical/client-internet.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in # TODO: ménage -mkIf profiles.isDesktop { +mkIf (cfg.internetSuite && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ @@ -17,18 +17,12 @@ environment.systemPackages = with pkgs; [ chromium firefox - ## Réseaux sociaux - #python27Packages.turses # client twitter en ncurse - python27Packages.rainbowstream # client twitter en console - rtv # client reddit en console - ## Mail & Discussion (texte, audio) clawsMail hexchat quassel quasselClient mumble - mutt pidgin thunderbird @@ -53,5 +47,4 @@ environment.systemPackages = with pkgs; [ #nixpkgs.config.permittedInsecurePackages = [ # "webkitgtk-2.4.11" # pour que le plugin fancy de claws-mail fonctionne #]; - } diff --git a/applications/graphical/default-applications.nix b/applications/graphical/default-applications.nix new file mode 100644 index 0000000..34478cb --- /dev/null +++ b/applications/graphical/default-applications.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (true && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; +} diff --git a/applications/graphical/default.nix b/applications/graphical/default.nix new file mode 100644 index 0000000..315933b --- /dev/null +++ b/applications/graphical/default.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +let + #inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +{ + imports = [ + # installées systématiquement + ./default-applications.nix + + # commandées par config-generator + ## option de configuration spécifique + ./cao.nix # de conception assisté par ordinateur & modélisation + ./cartographie.nix # manipuler les données géographiques & cartes + ./developpement.nix # développer des programmes/scripts + ./developpement-elm.nix # développer en elm + ./developpement-haskell.nix # développer en haskell + ./developpement-java.nix # développer en java + ./developpement-jetbrains.nix # outils jetbrains + ./developpement-rust.nix # développer en rust + ./edition-musique.nix # modifier les fichiers musicaux + ./edition-photo.nix # modifier les photos & assimilé + ./edition-video.nix # modifier les vidéos + ./jeux.nix # jouer, tout simplement ;) + + ## if isDesktop + ./adminsys.nix # pour gérer le système dans son ensemble et les services + ./bureau.nix # éléments pour avoir un environement graphique minimal utilisable + ./bureautique.nix # dédiée à la bureautique (traitement de texte, dessin, ...) + ./client-internet.nix # pour accéder & utiliser des ressources par le réseau + ./multimedia.nix # pour gérer le son, l'image et la vidéo + ./network.nix # de gestion, de diagnostique & surveillance réseau + ./securite.nix # relatives à la sécurité (chiffrement, gpg, mots de passe, ...) + ]; +} diff --git a/applications/graphical/developpement-elm.nix b/applications/graphical/developpement-elm.nix new file mode 100644 index 0000000..ab11ef5 --- /dev/null +++ b/applications/graphical/developpement-elm.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.developpement-elm && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; + + # Services + + # Réseau + networking.firewall = { + allowedTCPPorts = [ + ]; + allowedUDPPorts = [ + ]; + }; +} diff --git a/applications/graphical/developpement-haskell.nix b/applications/graphical/developpement-haskell.nix new file mode 100644 index 0000000..f118036 --- /dev/null +++ b/applications/graphical/developpement-haskell.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.developpement-haskell && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + ] ++ (with pkgs.haskellPackages; [ + # Haskell lib + threadscope # visualisation des threads (.eventlog) + ]); +} diff --git a/public/app-developpement-java.nix b/applications/graphical/developpement-java.nix similarity index 83% rename from public/app-developpement-java.nix rename to applications/graphical/developpement-java.nix index 87f0087..6e91238 100644 --- a/public/app-developpement-java.nix +++ b/applications/graphical/developpement-java.nix @@ -7,15 +7,11 @@ let profiles = config.r6d.profiles; in -mkIf cfg.developpement-java { +mkIf (cfg.developpement-java && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ # IDE idea.idea-community # IntelliJ IDEA - - # Java - maven - zulu ]; } diff --git a/public/app-developpement-jetbrains.nix b/applications/graphical/developpement-jetbrains.nix similarity index 87% rename from public/app-developpement-jetbrains.nix rename to applications/graphical/developpement-jetbrains.nix index 3c7e259..3901bb3 100644 --- a/public/app-developpement-jetbrains.nix +++ b/applications/graphical/developpement-jetbrains.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf cfg.jetbrains-licensed { +mkIf (cfg.jetbrains-licensed && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ diff --git a/applications/graphical/developpement-rust.nix b/applications/graphical/developpement-rust.nix new file mode 100644 index 0000000..5a64ba1 --- /dev/null +++ b/applications/graphical/developpement-rust.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.developpement-rust && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; +} diff --git a/public/app-developpement.nix b/applications/graphical/developpement.nix similarity index 66% rename from public/app-developpement.nix rename to applications/graphical/developpement.nix index 867e88c..2a07dd5 100644 --- a/public/app-developpement.nix +++ b/applications/graphical/developpement.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf cfg.developpement { +mkIf (cfg.developpement && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ @@ -15,28 +15,20 @@ mkIf cfg.developpement { pgadmin # interface d'administration de postgres sqlitebrowser # interface d'administration de sqlite - # C / C++ - gcc # pour les appels depuis les scripts - # Documentation #zeal # consulter la documentation hors ligne # Gestion des sources - cloc # outil pour compter les lignes de code source - git # déjà présent dans "base" - gitg # interface pour utiliser git (historique, commit) + #gitg # interface pour utiliser git (historique, commit) gitstats # génère un site web statique avec des statistiques gitAndTools.gitFull # pour gitk git-cola # interface pour utiliser git (historique, commit) - mercurial - subversion - - # Mono - #mono46 # interpréteur .NET ## Visualisation & outils de diff #gource # visualisation en mouvement de l'historique git meld # outil de comparaison graphique - #vbindiff # diff de fichier hexadecimaux avec vim + + # Editeur texte + atom ]; } diff --git a/public/app-edition-musique.nix b/applications/graphical/edition-musique.nix similarity index 90% rename from public/app-edition-musique.nix rename to applications/graphical/edition-musique.nix index 7e9c67d..5f692f7 100644 --- a/public/app-edition-musique.nix +++ b/applications/graphical/edition-musique.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf cfg.edition-musique { +mkIf (cfg.edition-musique && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ diff --git a/public/app-edition-photo.nix b/applications/graphical/edition-photo.nix similarity index 77% rename from public/app-edition-photo.nix rename to applications/graphical/edition-photo.nix index 67ba57a..cdda5de 100644 --- a/public/app-edition-photo.nix +++ b/applications/graphical/edition-photo.nix @@ -7,18 +7,13 @@ let profiles = config.r6d.profiles; in -mkIf cfg.edition-photo { +mkIf (cfg.edition-photo && cfg.graphical) { # Paquets -environment.systemPackages = with pkgs; [ - # Méta données - exif - exiftags - + environment.systemPackages = with pkgs; [ # Retouche, modification & dessin vectoriel gimp # logiciel d'édition/montage/retouche photo inkscape # édition d'image vectorielle (svg & autre) - imagemagick # modification image en CLI #rawtherapee # développemen de photos en RAW # TEST d'outil de gestion de catalogue de photos diff --git a/applications/graphical/edition-video.nix b/applications/graphical/edition-video.nix new file mode 100644 index 0000000..3314453 --- /dev/null +++ b/applications/graphical/edition-video.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.edition-video && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + # Vidéo + #cinelerra # editeur video + pitivi # montage vidéo + ]; +} diff --git a/applications/graphical/jeux.nix b/applications/graphical/jeux.nix new file mode 100644 index 0000000..8ecb8da --- /dev/null +++ b/applications/graphical/jeux.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.jeux && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + # Jeux + urbanterror + ]; +} diff --git a/public/app-multimedia.nix b/applications/graphical/multimedia.nix similarity index 72% rename from public/app-multimedia.nix rename to applications/graphical/multimedia.nix index d825abb..1124636 100644 --- a/public/app-multimedia.nix +++ b/applications/graphical/multimedia.nix @@ -7,19 +7,14 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +# TODO ranger le spécifique pulseaudio +mkIf (cfg.multimediaSuite && cfg.graphical) { # Paquets environment.systemPackages = with pkgs; [ - # Multimedia - ## Audio - beep - cmus # lecteur audio console - espeak # synthèse vocale paprefs # préferences pulseaudio pavucontrol # mixer pulseaudio - vorbis-tools # codec ## Video smplayer # lecteur vidéo diff --git a/applications/graphical/network.nix b/applications/graphical/network.nix new file mode 100644 index 0000000..93809df --- /dev/null +++ b/applications/graphical/network.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (true && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + ## Diagnostic + wireshark + ]; +} diff --git a/applications/graphical/securite.nix b/applications/graphical/securite.nix new file mode 100644 index 0000000..461e836 --- /dev/null +++ b/applications/graphical/securite.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf (cfg.securitySuite && cfg.graphical) { + + # Paquets + environment.systemPackages = with pkgs; [ + gnome3.seahorse # gestionnaire graphique de clef GPG + #yubikey-personalization-gui # utilisation de la clef Yubikey + ]; +} diff --git a/public/app-adminsys.nix b/applications/terminal/adminsys.nix similarity index 85% rename from public/app-adminsys.nix rename to applications/terminal/adminsys.nix index ba0e51b..723cfc5 100644 --- a/public/app-adminsys.nix +++ b/applications/terminal/adminsys.nix @@ -22,6 +22,7 @@ mkIf true { powertop python27Packages.ansible2 python27Packages.glances + sysstat # pour la commande "iostat -x -1" de monitoring d'activité disque usbutils # Backup @@ -49,13 +50,5 @@ mkIf true { detox # The detox utility renames files to make them easier to work with. duff # outil de recherche de fichiers en doublons rdfind # recherche de fichiers doublons pour remplacement par hard/soft link - - (mkIf profiles.isDesktop - ## Gestion de FS - gparted # Gestion graphique de partitions - ) - (mkIf profiles.isDesktop - unetbootin # création de clefs USB bootables - ) ]; } diff --git a/applications/terminal/bureau.nix b/applications/terminal/bureau.nix new file mode 100644 index 0000000..b72fbec --- /dev/null +++ b/applications/terminal/bureau.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf true { + + # Paquets + environment.systemPackages = with pkgs; [ + ## Manipulation de fichier + vifm # gestionnaire de fichiers basé sur VIM (console) + ]; +} diff --git a/public/app-bureautique.nix b/applications/terminal/bureautique.nix similarity index 58% rename from public/app-bureautique.nix rename to applications/terminal/bureautique.nix index 27f70b3..bb2e5f4 100644 --- a/public/app-bureautique.nix +++ b/applications/terminal/bureautique.nix @@ -7,37 +7,16 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf cfg.officeSuite { # Paquets environment.systemPackages = with pkgs; [ # Bureautique aspell aspellDicts.fr # correction d'ortographe - gnumeric # tableur - #kde4.ksnapshot# réalisation de capture d'écran # Gestion de tâche taskwarrior # gestionnaire de tâches en console - ## Cartes mentales - freemind - - ## Diagrammes & Schémas - dia # dessin & schéma technique - - ## Editeur de texte - #lyx # surcouche WISIWIM à LaTeX - #focuswriter # outil pour l'écriture - textadept # un éditeur de texte facile pour copier-coller graphique - #zim # outil de prise de notes, wiki de bureau - - ## Visionneuse - #kde5.okular # pdf - mcomix # livres (cbr, liste d'images), gestion d'une bibliothèque - pdfpc # pdf - qpdfview # pdf - gqview # visionneuse image & gestion basique de collection - ## Convertisseurs (texte -> ) gnuplot # générateur de graphes à partir de données numériques graphviz # dot, neato : traçage de graphes (carré, rond) diff --git a/applications/terminal/cao.nix b/applications/terminal/cao.nix new file mode 100644 index 0000000..ac5da71 --- /dev/null +++ b/applications/terminal/cao.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.conception-assistee { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; +} diff --git a/applications/terminal/cartographie.nix b/applications/terminal/cartographie.nix new file mode 100644 index 0000000..b7c80c7 --- /dev/null +++ b/applications/terminal/cartographie.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.cartographie { + + # Paquets + environment.systemPackages = with pkgs; [ + # Gestion de données géographiques + expat + gpsbabel # pour convertir les données des GPS + ]; +} diff --git a/applications/terminal/client-internet.nix b/applications/terminal/client-internet.nix new file mode 100644 index 0000000..146b9f0 --- /dev/null +++ b/applications/terminal/client-internet.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in +# TODO: ménage +mkIf cfg.internetSuite { + +# Paquets +environment.systemPackages = with pkgs; [ + # Clients Internet + + ## Réseaux sociaux + #python27Packages.turses # client twitter en ncurse + python27Packages.rainbowstream # client twitter en console + rtv # client reddit en console + + ## Mail & Discussion (texte, audio) + mutt + ]; +} diff --git a/applications/terminal/default-applications.nix b/applications/terminal/default-applications.nix new file mode 100644 index 0000000..598975e --- /dev/null +++ b/applications/terminal/default-applications.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf true { + + # Paquets + environment.systemPackages = with pkgs; [ + bind # utilisé pour les utilitaires comme dig + byobu # permet de se déconnecter d'un terminal sans l'aréter + dhcp # client dhcp + git gitAndTools.gitSVN gitAndTools.tig gti # outil de gestion de version + gnumake # pour décrire les recettes de compilation + gnupg # GPG + gpm # prise en charge de la souris en console + htop # monitoring + lsb-release # pour les scripts qui utilisent cet outil + #libressl # librairie pour faire du TLS et les algorithmes de crypto par OpenBSD + ncdu # outil pour voir l'espace utilisé + par2cmdline # outil de récupération de fichiers corrompus - .par2 + p7zip # compression de fichier + parted # partitionnement de disque + pciutils + pinentry # pour taper les mots de passe gpg + psmisc # fournis les utilitaires comme killall, fuser, pstree + python # python -- python -m SimpleHTTPServer 8000 + #python34Packages.glances # monitoring + pwgen # générateur de mot de passe + rtorrent # TODO outil de téléchargement de torrent & magnet + tmux # nécessaire pour byobu + tree # affiche une arborescence de fichiers et dossiers + usbutils + (import ./vim.nix) + wget # client HTTP console + which # pour connaitre le chemin d'un exécutable + ]; +} diff --git a/applications/terminal/default.nix b/applications/terminal/default.nix new file mode 100644 index 0000000..315933b --- /dev/null +++ b/applications/terminal/default.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +let + #inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +{ + imports = [ + # installées systématiquement + ./default-applications.nix + + # commandées par config-generator + ## option de configuration spécifique + ./cao.nix # de conception assisté par ordinateur & modélisation + ./cartographie.nix # manipuler les données géographiques & cartes + ./developpement.nix # développer des programmes/scripts + ./developpement-elm.nix # développer en elm + ./developpement-haskell.nix # développer en haskell + ./developpement-java.nix # développer en java + ./developpement-jetbrains.nix # outils jetbrains + ./developpement-rust.nix # développer en rust + ./edition-musique.nix # modifier les fichiers musicaux + ./edition-photo.nix # modifier les photos & assimilé + ./edition-video.nix # modifier les vidéos + ./jeux.nix # jouer, tout simplement ;) + + ## if isDesktop + ./adminsys.nix # pour gérer le système dans son ensemble et les services + ./bureau.nix # éléments pour avoir un environement graphique minimal utilisable + ./bureautique.nix # dédiée à la bureautique (traitement de texte, dessin, ...) + ./client-internet.nix # pour accéder & utiliser des ressources par le réseau + ./multimedia.nix # pour gérer le son, l'image et la vidéo + ./network.nix # de gestion, de diagnostique & surveillance réseau + ./securite.nix # relatives à la sécurité (chiffrement, gpg, mots de passe, ...) + ]; +} diff --git a/public/app-developpement-elm.nix b/applications/terminal/developpement-elm.nix similarity index 100% rename from public/app-developpement-elm.nix rename to applications/terminal/developpement-elm.nix diff --git a/public/app-developpement-haskell.nix b/applications/terminal/developpement-haskell.nix similarity index 55% rename from public/app-developpement-haskell.nix rename to applications/terminal/developpement-haskell.nix index fda0dbf..a402bf8 100644 --- a/public/app-developpement-haskell.nix +++ b/applications/terminal/developpement-haskell.nix @@ -11,23 +11,23 @@ mkIf cfg.developpement-haskell { # Paquets environment.systemPackages = with pkgs; [ - # Haskell + # Haskell platform cabal-install # fournis cabal cabal2nix # convertir les .cabal en .nix ghc # pour les appels depuis les scripts stack # pour les paquets en LTS de stackage - - haskellPackages.stylish-haskell # qualité de code - haskellPackages.hindent - haskellPackages.hlint - haskellPackages.threadscope + ] ++ (with pkgs.haskellPackages; [ + # Haskell lib + autoproc # ? procmail + darcs # Gestionnaire de version éponyme + ghc-mod + hindent # indentation code + hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques + #postgrest # mapper HTTP <-> PostgreSQL + stylish-haskell # qualité de code + turtle # genre shell-scripting # Application perso - haskellPackages.hahp - - # Application - haskellPackages.autoproc # ? procmail - haskellPackages.darcs # Gestionnaire de version éponyme - haskellPackages.turtle # genre shell-scripting - ]; + hahp + ]); } diff --git a/applications/terminal/developpement-java.nix b/applications/terminal/developpement-java.nix new file mode 100644 index 0000000..880d0e5 --- /dev/null +++ b/applications/terminal/developpement-java.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.developpement-java { + + # Paquets + environment.systemPackages = with pkgs; [ + # Java + maven + openjdk + ]; + environment.variables = { + JAVA_HOME = "${pkgs.openjdk}"; + }; +} diff --git a/applications/terminal/developpement-jetbrains.nix b/applications/terminal/developpement-jetbrains.nix new file mode 100644 index 0000000..de3149e --- /dev/null +++ b/applications/terminal/developpement-jetbrains.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.jetbrains-licensed { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; +} diff --git a/public/app-developpement-rust.nix b/applications/terminal/developpement-rust.nix similarity index 100% rename from public/app-developpement-rust.nix rename to applications/terminal/developpement-rust.nix diff --git a/applications/terminal/developpement.nix b/applications/terminal/developpement.nix new file mode 100644 index 0000000..495df93 --- /dev/null +++ b/applications/terminal/developpement.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.developpement { + + # Paquets + environment.systemPackages = with pkgs; [ + # C / C++ + gcc # pour les appels depuis les scripts + + # Gestion des sources + cloc # outil pour compter les lignes de code source + git # déjà présent dans "base" + mercurial + subversion + + # Mono + #mono46 # interpréteur .NET + + ## Visualisation & outils de diff + #vbindiff # diff de fichier hexadecimaux avec vim + ]; +} diff --git a/applications/terminal/edition-musique.nix b/applications/terminal/edition-musique.nix new file mode 100644 index 0000000..f875da7 --- /dev/null +++ b/applications/terminal/edition-musique.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.edition-musique { + + # Paquets + environment.systemPackages = with pkgs; [ + ]; +} diff --git a/applications/terminal/edition-photo.nix b/applications/terminal/edition-photo.nix new file mode 100644 index 0000000..bc923df --- /dev/null +++ b/applications/terminal/edition-photo.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.edition-photo { + + # Paquets +environment.systemPackages = with pkgs; [ + # Méta données + exif + exiftags + + # Retouche, modification & dessin vectoriel + imagemagick # modification image en CLI + ]; +} diff --git a/public/app-edition-video.nix b/applications/terminal/edition-video.nix similarity index 85% rename from public/app-edition-video.nix rename to applications/terminal/edition-video.nix index 9cbc4b6..c3ae81c 100644 --- a/public/app-edition-video.nix +++ b/applications/terminal/edition-video.nix @@ -11,9 +11,6 @@ mkIf cfg.edition-video { # Paquets environment.systemPackages = with pkgs; [ - # Vidéo - #cinelerra # editeur video - pitivi # montage vidéo ffmpeg-full # assemblage de flux audio & video en ligne de commande ]; diff --git a/public/app-jeux.nix b/applications/terminal/jeux.nix similarity index 90% rename from public/app-jeux.nix rename to applications/terminal/jeux.nix index 54b96b5..ae00806 100644 --- a/public/app-jeux.nix +++ b/applications/terminal/jeux.nix @@ -11,7 +11,5 @@ mkIf cfg.jeux { # Paquets environment.systemPackages = with pkgs; [ - # Jeux - urbanterror ]; } diff --git a/applications/terminal/multimedia.nix b/applications/terminal/multimedia.nix new file mode 100644 index 0000000..847ffe2 --- /dev/null +++ b/applications/terminal/multimedia.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.multimediaSuite { + + # Paquets + environment.systemPackages = with pkgs; [ + ## Audio + beep + cmus # lecteur audio console + espeak # synthèse vocale + vorbis-tools # codec + ]; +} diff --git a/public/app-network.nix b/applications/terminal/network.nix similarity index 95% rename from public/app-network.nix rename to applications/terminal/network.nix index f52c5e0..5432452 100644 --- a/public/app-network.nix +++ b/applications/terminal/network.nix @@ -8,7 +8,6 @@ let in mkIf true { -#mkIf profiles.isDesktop { # Paquets environment.systemPackages = with pkgs; [ @@ -21,7 +20,6 @@ mkIf true { ## Diagnostic arp-scan nmap # outil de scan de port réseau - #wireshark whois ]; diff --git a/applications/terminal/securite.nix b/applications/terminal/securite.nix new file mode 100644 index 0000000..20b4dcf --- /dev/null +++ b/applications/terminal/securite.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +mkIf cfg.securitySuite { + + # Paquets + environment.systemPackages = with pkgs; [ + pass # gestionnaire de mots de passe + pwgen # générateur de mots de passe + ]; +} diff --git a/public/vim.nix b/applications/terminal/vim.nix similarity index 100% rename from public/vim.nix rename to applications/terminal/vim.nix diff --git a/public/vimrc b/applications/terminal/vimrc similarity index 100% rename from public/vimrc rename to applications/terminal/vimrc diff --git a/base.nix b/base.nix index 850731d..1717af4 100644 --- a/base.nix +++ b/base.nix @@ -9,10 +9,13 @@ in { imports = [ - # recettes - ./public/public.nix - # moulinette de configuration ./config-generator.nix + + # subfolders + ./applications/graphical/default.nix + ./applications/terminal/default.nix + ./configuration/default.nix + ./services/default.nix ]; } diff --git a/config-generator.nix b/config-generator.nix index 801f685..6cd21a0 100644 --- a/config-generator.nix +++ b/config-generator.nix @@ -9,7 +9,10 @@ let in { -# TODO: ménage +# TODO camel case partout +# TODO everything in english +# TODO sortir ce qui est privé +# TODO portage du système d'annuaire de machines de capgemini ###### interface options = { @@ -20,8 +23,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."; }; @@ -48,22 +50,29 @@ in edition-video = mkEnableOption "Profil pour la création/édition de video."; elasticsearch = mkEnableOption "Profil pour activer le service elasticsearch."; fail2ban = mkEnableOption "Profil pour activer Fail2ban."; + graphical = mkEnableOption "Profil pour activer les applications graphgiques."; 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."; xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad."; @@ -106,16 +115,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; - scanner = 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; @@ -123,6 +132,7 @@ in #dns_resolveur = true; # inutile d'exposer la conf complète du serveur par le store tant qu'il n'y a pas de protection complémentaire - utilisation SSH ? #nix-serve-server = true; + smokeping = true; #rabbitmq = true; }; @@ -134,10 +144,11 @@ in }; }) (mkIf pfl.isWorkstation { - r6d.profiles.isDesktop = true; + r6d.profiles.isDesktopEnvironment = true; r6d.config-generator = { docker = true; + graphical = true; }; }) @@ -162,6 +173,7 @@ in edition-musique = true; edition-photo = true; edition-video = true; + scanner = true; virtualbox = true; xmonad = true; }; @@ -174,6 +186,7 @@ in docker = true; locate = true; fail2ban = true; + smokeping = true; swap = true; }; }) @@ -192,6 +205,7 @@ in edition-video = true; hydra-core = false; # DO NOT ENABLE ON WORKSTATION, YOU CAN CRASH YOUR SYSTEM print = true; + scanner = true; #virtualbox = true; #xmonad = true; }; @@ -210,10 +224,12 @@ in docker = true; hydra-builder = true; hydra-core = true; - #tincAddress = "192.168.12.6/24"; - #tincExtraConfig = '' - # ConnectTo = rollo_dubronetwork_fr - # ''; + nix-serve-server = true; + tincAddress = "192.168.12.9/24"; + tincExtraConfig = '' + ConnectTo = rollo_dubronetwork_fr + ConnectTo = ocean_prunetwork_fr + ''; }; }) (mkIf comp.isOcean { @@ -225,11 +241,13 @@ in r6d.config-generator = { docker = true; + hydra-builder = true; radicale = true; nix-serve-client = true; nix-serve-server = true; tincAddress = "192.168.12.6/24"; tincExtraConfig = '' + ConnectTo = hydra_prunetwork_fr ConnectTo = rollo_dubronetwork_fr ''; }; @@ -237,7 +255,6 @@ in (mkIf comp.isRadx { networking.hostName = "radx.prunetwork.fr"; # Define your hostname. r6d.profiles = { - isHome = true; isPrunetwork = true; isWorkstation = true; }; @@ -245,7 +262,6 @@ in r6d.config-generator = { database_postgres = true; elasticsearch = true; - hydra-builder = true; #hydra-core = false; # DO NOT ENABLE ON WORKSTATION kibana = true; nix-serve-client = true; @@ -255,8 +271,10 @@ in tincExtraConfig = '' ConnectTo = monstre_dubronetwork_fr ConnectTo = rollo_dubronetwork_fr + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; + virtualbox = true; }; }) @@ -264,20 +282,21 @@ in networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; isWorkstation = true; }; r6d.config-generator = { jetbrains-licensed = true; laptop = true; + nix-serve-client = true; + nix-serve-server = true; tincAddress = "192.168.12.2/24"; tincExtraConfig = '' ConnectTo = monstre_dubronetwork_fr ConnectTo = rollo_dubronetwork_fr + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; - nix-serve-server = true; }; }) (mkIf comp.isMonstre { @@ -296,6 +315,7 @@ in tincAddress = "192.168.12.4/24"; tincExtraConfig = '' ConnectTo = rollo_dubronetwork_fr + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; }; @@ -304,15 +324,18 @@ in networking.hostName = "neo-nomade.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; + isDesktopEnvironment = true; }; r6d.config-generator = { laptop = true; + graphical = true; + scanner = true; tincAddress = "192.168.12.7/24"; tincExtraConfig = '' ConnectTo = monstre_dubronetwork_fr ConnectTo = rollo_dubronetwork_fr + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; }; @@ -341,7 +364,6 @@ in networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname. r6d.profiles = { isDubronetwork = true; - isHome = true; isWorkstation = true; }; @@ -355,6 +377,7 @@ in tincExtraConfig = '' ConnectTo = monstre_dubronetwork_fr ConnectTo = rollo_dubronetwork_fr + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; }; @@ -375,8 +398,10 @@ in nix-serve-server = true; tincAddress = "192.168.12.5/24"; tincExtraConfig = '' + ConnectTo = hydra_prunetwork_fr ConnectTo = ocean_prunetwork_fr ''; + virtualbox = true; znc = true; }; }) diff --git a/public/auto-upgrade.nix b/configuration/auto-upgrade.nix similarity index 100% rename from public/auto-upgrade.nix rename to configuration/auto-upgrade.nix diff --git a/public/app-awesome.nix b/configuration/awesome.nix similarity index 100% rename from public/app-awesome.nix rename to configuration/awesome.nix diff --git a/public/bash-interactive-init.sh b/configuration/bash-interactive-init.sh similarity index 100% rename from public/bash-interactive-init.sh rename to configuration/bash-interactive-init.sh diff --git a/public/bash-prompt.sh b/configuration/bash-prompt.sh similarity index 100% rename from public/bash-prompt.sh rename to configuration/bash-prompt.sh diff --git a/configuration/default.nix b/configuration/default.nix new file mode 100644 index 0000000..e58bd01 --- /dev/null +++ b/configuration/default.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +let + #inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +{ + imports = [ + + # installées systématiquement + ./environment.nix + ./localisation.nix + ./network.nix + #./network-ipv6.nix + ./udev.nix + + # commandées par config-generator + ## option de configuration spécifique + ./auto-upgrade.nix # mise à jour automatique du système + ./awesome.nix # pour le gestionaire de fenêtres awesome + ./laptop.nix # appli & configuration adaptée pour un PC portable + ./swap.nix # définition de l'utilisation du swap + ]; +} diff --git a/public/environment.nix b/configuration/environment.nix similarity index 63% rename from public/environment.nix rename to configuration/environment.nix index b9f5167..3b47c47 100644 --- a/public/environment.nix +++ b/configuration/environment.nix @@ -13,7 +13,7 @@ in nix.buildCores = 0; # The NixOS release to be compatible with for stateful data such as databases. - system.stateVersion = "16.09"; + system.stateVersion = "17.03"; # copies the NixOS configuration file (usually /etc/nixos/configuration.nix) and links it from the resulting system (getting to /run/current-system/configuration.nix) system.copySystemConfiguration = true; @@ -29,35 +29,6 @@ in # Paquets environment = { - systemPackages = with pkgs; [ - bind # utilisé pour les utilitaires comme dig - byobu # permet de se déconnecter d'un terminal sans l'aréter - dhcp # client dhcp - git gitAndTools.gitSVN gitAndTools.tig gti # outil de gestion de version - gnumake # pour décrire les recettes de compilation - gnupg # GPG - gpm # prise en charge de la souris en console - htop # monitoring - lsb-release # pour les scripts qui utilisent cet outil - #libressl # librairie pour faire du TLS et les algorithmes de crypto par OpenBSD - ncdu # outil pour voir l'espace utilisé - par2cmdline # outil de récupération de fichiers corrompus - .par2 - p7zip # compression de fichier - parted # partitionnement de disque - pciutils - pinentry # pour taper les mots de passe gpg - psmisc # fournis les utilitaires comme killall, fuser, pstree - python # python -- python -m SimpleHTTPServer 8000 - #python34Packages.glances # monitoring - pwgen # générateur de mot de passe - rtorrent # TODO outil de téléchargement de torrent & magnet - tmux # nécessaire pour byobu - tree # affiche une arborescence de fichiers et dossiers - usbutils - (import ./vim.nix) - wget # client HTTP console - which # pour connaitre le chemin d'un exécutable - ]; shellAliases = { byobu = "byobu-tmux"; gpg = "gpg2"; diff --git a/public/gitconfig b/configuration/gitconfig similarity index 100% rename from public/gitconfig rename to configuration/gitconfig diff --git a/public/laptop.nix b/configuration/laptop.nix similarity index 86% rename from public/laptop.nix rename to configuration/laptop.nix index 86c592b..e9a47fb 100644 --- a/public/laptop.nix +++ b/configuration/laptop.nix @@ -24,4 +24,10 @@ mkIf cfg.laptop { networkmanagerapplet # gestionnaire réseau graphique + console (nm-applet + nmtui) wirelesstools # fournis iwconfig ]; + + # Services + services.xserver.synaptics = { + enable = true; + twoFingerScroll = true; + }; } diff --git a/public/localisation.nix b/configuration/localisation.nix similarity index 100% rename from public/localisation.nix rename to configuration/localisation.nix diff --git a/public/network-ipv6.nix b/configuration/network-ipv6.nix similarity index 100% rename from public/network-ipv6.nix rename to configuration/network-ipv6.nix diff --git a/public/network.nix b/configuration/network.nix similarity index 100% rename from public/network.nix rename to configuration/network.nix diff --git a/public/swap.nix b/configuration/swap.nix similarity index 100% rename from public/swap.nix rename to configuration/swap.nix diff --git a/public/udev.nix b/configuration/udev.nix similarity index 100% rename from public/udev.nix rename to configuration/udev.nix diff --git a/logiciel-custom/osm2pgsql.nix b/logiciel-custom/osm2pgsql.nix deleted file mode 100644 index 8e001bf..0000000 --- a/logiciel-custom/osm2pgsql.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ stdenv, fetchurl -, boost -, bzip2 -, cmake -, expat -, geos -, lua -, postgresql -, proj -, zlib -} - -stdenv.mkDerivation rec { - #version = "0.87.1"; - version = "0.90.1"; - name = "osm2pgsql-${version}-0"; - - src = fetchurl { - url = "https://github.com/openstreetmap/osm2pgsql/archive/${version}.tar.gz"; - sha256 = "0i0zg8di8nbh96qnyyr156ikwcsq1w9b2291bazm5whb351flmqx"; - }; - - #nativeBuildInputs = [ ]; - buildInputs = [ ]; - - #preConfigure = '' - ''; - #buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; - #installPhase = '' - #''; - - meta = with stdenv.lib; { - homepage = http://wiki.openstreetmap.org/wiki/Osm2pgsql; - description = "osm2pgsql is a tool for loading OpenStreetMap data into a PostgreSQL / PostGIS database suitable for applications like rendering into a map, geocoding with Nominatim, or general analysis."; - license = licenses.gpl2; - #maintainers = [ maintainers.phunehehe ]; - maintainers = [ maintainers.jpierre03 ]; - }; - } - diff --git a/public/app-securite.nix b/public/app-securite.nix deleted file mode 100644 index ec89433..0000000 --- a/public/app-securite.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkMerge mkThenElse; - cfg = config.r6d.config-generator; - computers = config.r6d.computers; - profiles = config.r6d.profiles; -in - -mkIf profiles.isDesktop { - - # Paquets - environment.systemPackages = with pkgs; [ - # Securité - gnome3.seahorse # gestionnaire graphique de clef GPG - pass # gestionnaire de mots de passe - 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/config-awesome-4-rc.lua b/public/config-awesome-4-rc.lua index ae2cf9d..042de0c 100644 --- a/public/config-awesome-4-rc.lua +++ b/public/config-awesome-4-rc.lua @@ -344,6 +344,7 @@ globalkeys = awful.util.table.join( awful.key({ modkey }, "F12", function () awful.util.spawn("slock") end), awful.key({ modkey, "Shift" }, "F1", function () awful.util.spawn("claws-mail") end), awful.key({ modkey, "Shift" }, "F3", function () awful.util.spawn("pcmanfm") end), + awful.key({ modkey }, "F10", function () awful.util.spawn("xrandr-auto-2") end), awful.key({ modkey }, "F11", function () awful.util.spawn("xrandr-auto") end) -- awful.key({ modkey, "Shift" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-left") end), -- awful.key({ modkey, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end), diff --git a/public/public.nix b/public/public.nix deleted file mode 100644 index 0a60e5b..0000000 --- a/public/public.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - #inherit (lib) mkIf mkMerge mkThenElse; - cfg = config.r6d.config-generator; - computers = config.r6d.computers; - profiles = config.r6d.profiles; -in - -{ - imports = [ - # installées systématiquement - ./environment.nix - ./localisation.nix - ./network.nix - #./network-ipv6.nix - ./service-haveged.nix - ./service-monitoring-munin.nix - ./service-monitoring-smokeping.nix - ./service-ssh.nix - ./udev.nix - - # commandées par config-generator - ## option de configuration spécifique - ./app-awesome.nix # pour le gestionaire de fenêtres awesome - ./app-cao.nix # de conception assisté par ordinateur & modélisation - ./app-cartographie.nix # manipuler les données géographiques & cartes - ./app-developpement.nix # développer des programmes/scripts - ./app-developpement-elm.nix # développer en elm - ./app-developpement-haskell.nix # développer en haskell - ./app-developpement-java.nix # développer en java - ./app-developpement-jetbrains.nix # outils jetbrains - ./app-developpement-rust.nix # développer en rust - ./app-docker.nix # activer docker - ./app-edition-musique.nix # modifier les fichiers musicaux - ./app-edition-photo.nix # modifier les photos & assimilé - ./app-edition-video.nix # modifier les vidéos - ./app-jeux.nix # jouer, tout simplement ;) - ./app-virtualbox.nix # activer virtualbox - ./auto-upgrade.nix # mise à jour automatique du système - ./laptop.nix # appli & configuration adaptée pour un PC portable - ./print.nix # configuration de base de cups - ./service-elasticsearch.nix # service de stockage et recher de données - ./service-hydra-build.nix # service de construction de paquet. -> la machine compile des paquets - ./service-hydra-core.nix # service pour l'instance d'hydra - ./service-kibana.nix # service de visualisation de données stockées dans elasticsearch - ./service-laptop.nix # services spécifiques aux pc portables - ./service-locate.nix # service locate - ./swap.nix # définition de l'utilisation du swap - ./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad - - ## if isDesktop - ./app-adminsys.nix # pour gérer le système dans son ensemble et les services - ./app-bureau.nix # éléments pour avoir un environement graphique minimal utilisable - ./app-bureautique.nix # dédiée à la bureautique (traitement de texte, dessin, ...) - ./app-client-internet.nix # pour accéder & utiliser des ressources par le réseau - ./app-multimedia.nix # pour gérer le son, l'image et la vidéo - ./app-network.nix # de gestion, de diagnostique & surveillance réseau - ./app-securite.nix # relatives à la sécurité (chiffrement, gpg, mots de passe, ...) - ./hardware-scanner.nix # utilisation d'un scanner - ./service-pulseaudio.nix # activation du serveur audio - ./service-x11.nix # activation du serveur graphique X - ]; -} diff --git a/public/service-monitoring-smokeping.nix b/public/service-monitoring-smokeping.nix deleted file mode 100644 index 7896832..0000000 --- a/public/service-monitoring-smokeping.nix +++ /dev/null @@ -1,199 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkMerge mkThenElse; - cfg = config.r6d.config-generator; - computers = config.r6d.computers; - profiles = config.r6d.profiles; -in - -# TODO: ajouter option -mkIf true { - - # Paquets - environment.systemPackages = with pkgs; [ - bind - ]; - - # Paquets avec setuid root - security.wrappers = { - # outil de diagnostic réseau - fping.source = "${pkgs.fping}/bin/fping"; - }; - - # Services - - services.smokeping = { - enable = true; - probeConfig = '' - + FPing - #binary = ${pkgs.fping}/bin/fping - binary = ${config.security.wrapperDir}/fping - - +DNS - #binary = ${pkgs.bind}/bin/dig - binary = /run/current-system/sw/bin/dig - forks = 5 - offset = 50% - step = 300 - timeout = 15 - ''; - targetConfig = '' - probe = FPing - menu = Top - title = Suivi de la latence reseau - remark = Monitoring de la latence reseau. \ - Here you will learn all about the latency of our network. - + Local - probe = FPing - menu = Local - title = Local Network - ++ LocalMachine - menu = Local Machine - title = This host - host = localhost - - + Grudu_Tinc - probe = FPing - title = Grudu_Tinc - menu = Grudu.net - Tinc - - ++ Hydra - menu = hydra.grudu.net - title = hydra.grudu.net - host = hydra.grudu.net - - ++ Monstre - menu = monstre.grudu.net - title = monstre.grudu.net - host = monstre.grudu.net - - ++ Rollo - menu = rollo.grudu.net - title = rollo.grudu.net - host = rollo.grudu.net - - ++ Ocean - menu = ocean.grudu.net - title = ocean.grudu.net - host = ocean.grudu.net - - ++ MultiHost - menu = Multihost - title = Ensemble de mesures de latence - host = /Grudu_Tinc/Monstre /Grudu_Tinc/Rollo /Grudu_Tinc/Ocean /Grudu_Tinc/Hydra - - + Grudu_DNS - title = Grudu_DNS - menu = Grudu.net - DNS - probe = DNS - pings = 5 - ++ Ocean - title = ocean - menu = serveur ocean - server = ocean.prunetwork.fr - +++ ocean - host = ocean.grudu.net - lookup = ocean.grudu.net - +++ rollo - host = rollo.grudu.net - lookup = rollo.grudu.net - ++ Rollo - title = rollo - menu = serveur rollo - server = rollo.dubronetwork.fr - +++ ocean - host = ocean.grudu.net - lookup = ocean.grudu.net - +++ rollo - host = rollo.grudu.net - lookup = rollo.grudu.net - ++ MultiHost - menu = Multihost - title = Ensemble de mesures DNS - host = /Grudu_DNS/Ocean/ocean /Grudu_DNS/Ocean/rollo /Grudu_DNS/Rollo/ocean /Grudu_DNS/Rollo/rollo - + France - probe = FPing - title = France - menu = Operateur francais - - ++ Atos - menu = Atos - title = www.atos.fr - host = www.atos.fr - - ++ Axialys - menu = Axialys - title = www.axialys.fr - host = www.axialys.fr - - ++ Azurtel - menu = azurtel - title = www.azurtel.fr - host = www.azurtel.fr - - ++ Bouygues-Telecom - menu = Bouygues-Telecom - title = www.bouygues-telecom.fr - host = www.bouygues-telecom.fr - - ++ Colt - menu = Colt - title = www.colt.fr - host = www.colt.fr - - ++ Completel - menu = completel - title = www.completel.fr - host = www.completel.fr - - ++ Free - menu = Free - title = www.free.fr - host = www.free.fr - - ++ Kosmos - menu = Kosmos - title = www.kosmos.fr - host = www.kosmos.fr - - ++ Orange - menu = Orange - title = www.orange.fr - host = www.orange.fr - - ++ Renater - menu = Renater - title = www.renater.fr - host = www.renater.fr - - ++ SFR - menu = SFR - title = www.sfr.fr - host = www.sfr.fr - - ++ MultiHost - menu = Multihost - title = Ensemble de mesures DNS - host = /France/Atos /France/Axialys /France/Azurtel \ - /France/Bouygues-Telecom \ - /France/Completel \ - /France/Free \ - /France/Kosmos \ - /France/Orange \ - /France/Renater \ - /France/SFR - - # /France/Colt - ''; - }; - - # Réseau - networking.firewall = { - allowedTCPPorts = [ - #8081 # accès depuis localhost uniquement ou à travers un proxy nginx - ]; - allowedUDPPorts = [ - ]; - }; -} diff --git a/services/default.nix b/services/default.nix new file mode 100644 index 0000000..c2eb2f3 --- /dev/null +++ b/services/default.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +let + #inherit (lib) mkIf mkMerge mkThenElse; + cfg = config.r6d.config-generator; + computers = config.r6d.computers; + profiles = config.r6d.profiles; +in + +{ + imports = [ + # installées systématiquement + ./haveged.nix + ./monitoring-munin.nix + ./ssh.nix + + # commandées par config-generator + ## option de configuration spécifique + ./print.nix # configuration de base de cups + ./docker.nix # activer docker + ./elasticsearch.nix # service de stockage et recher de données + ./hoogle.nix # service hoogle pour haskell + ./hydra-build.nix # service de construction de paquet. -> la machine compile des paquets + ./hydra-core.nix # service pour l'instance d'hydra + ./kibana.nix # service de visualisation de données stockées dans elasticsearch + ./locate.nix # service locate + ./virtualbox.nix # activer virtualbox + ./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad + + ## if isDesktop + ./pulseaudio.nix # activation du serveur audio + ./scanner.nix # utilisation d'un scanner + ./x11.nix # activation du serveur graphique X + ]; +} diff --git a/public/app-docker.nix b/services/docker.nix similarity index 100% rename from public/app-docker.nix rename to services/docker.nix diff --git a/public/service-elasticsearch.nix b/services/elasticsearch.nix similarity index 100% rename from public/service-elasticsearch.nix rename to services/elasticsearch.nix diff --git a/public/service-haveged.nix b/services/haveged.nix similarity index 100% rename from public/service-haveged.nix rename to services/haveged.nix diff --git a/public/service-laptop.nix b/services/hoogle.nix similarity index 61% rename from public/service-laptop.nix rename to services/hoogle.nix index fe4c8c2..83f39a7 100644 --- a/public/service-laptop.nix +++ b/services/hoogle.nix @@ -7,13 +7,10 @@ let profiles = config.r6d.profiles; in -mkIf cfg.laptop { +mkIf cfg.developpement-haskell { - # Gestion spécifique pour PC portable - - # Services - services.xserver.synaptics = { + services.hoogle = { enable = true; - twoFingerScroll = true; + # port 8080 }; } diff --git a/public/service-hydra-build.nix b/services/hydra-build.nix similarity index 60% rename from public/service-hydra-build.nix rename to services/hydra-build.nix index 81b8f98..3233fb6 100644 --- a/public/service-hydra-build.nix +++ b/services/hydra-build.nix @@ -28,18 +28,18 @@ mkIf cfg.hydra-builder { ## Ménage automatique tous les jours nix.gc.automatic = true; - users.users."hydrabld" = { - description = "Execution des jobs hydra"; - group = "nixbld"; - extraGroups = [ - "docker" - "nixbld" - "vboxusers" - ]; - isNormalUser = true; # devrait être à false: TODO débugger la conf ssh & users pour que ça marche en user système + # users.users."hydrabld" = { + # description = "Execution des jobs hydra"; + # group = "nixbld"; + # extraGroups = [ + # "docker" + # "nixbld" + # "vboxusers" + # ]; + # isNormalUser = true; # devrait être à false: TODO débugger la conf ssh & users pour que ça marche en user système - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYpjcWJCf8dXpv2LmoIaNVbwZXEC50QUU6Az+lqeD89 hydra radx" - ]; - }; + # openssh.authorizedKeys.keys = [ + # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYpjcWJCf8dXpv2LmoIaNVbwZXEC50QUU6Az+lqeD89 hydra radx" + # ]; + # }; } diff --git a/public/service-hydra-core.nix b/services/hydra-core.nix similarity index 96% rename from public/service-hydra-core.nix rename to services/hydra-core.nix index efbf8e3..a145991 100644 --- a/public/service-hydra-core.nix +++ b/services/hydra-core.nix @@ -62,6 +62,8 @@ mkIf cfg.hydra-core { #package = hydra-src-pkg ; }; + systemd.services.hydra-evaluator.serviceConfig.Nice = -19; + #systemd.services.hydra-evaluator = { # path = [ pkgs.nettools config.services.hydra.package ]; #}; @@ -74,7 +76,7 @@ mkIf cfg.hydra-core { ### Machines connues programs.ssh.knownHosts = { - "hydra.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMhXFlj2oyArVyEwEwDxNXthB/JljHkq+UhTLxbekkMB"; + "hydra.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHqja/yYsQeS5amZKPUG+EKSIkjEN6fYW54Fzvj1pFaP"; "monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc"; "pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD"; "ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA"; diff --git a/public/service-kibana.nix b/services/kibana.nix similarity index 100% rename from public/service-kibana.nix rename to services/kibana.nix diff --git a/public/service-locate.nix b/services/locate.nix similarity index 100% rename from public/service-locate.nix rename to services/locate.nix diff --git a/public/service-monitoring-munin.nix b/services/monitoring-munin.nix similarity index 90% rename from public/service-monitoring-munin.nix rename to services/monitoring-munin.nix index 17c4e2c..d8e6835 100644 --- a/public/service-monitoring-munin.nix +++ b/services/monitoring-munin.nix @@ -36,7 +36,7 @@ mkIf true { address 127.0.0.1 ''; extraGlobalConfig = '' - contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/public/munin-muttrc -s "Munin notification for ''${var:host}" jean-pierre@ocean.prunetwork.fr + contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/public/services/munin-muttrc -s "Munin notification for ''${var:host}" jean-pierre@ocean.prunetwork.fr ''; }; diff --git a/public/munin-muttrc b/services/munin-muttrc similarity index 100% rename from public/munin-muttrc rename to services/munin-muttrc diff --git a/public/print.nix b/services/print.nix similarity index 100% rename from public/print.nix rename to services/print.nix diff --git a/public/service-pulseaudio.nix b/services/pulseaudio.nix similarity index 92% rename from public/service-pulseaudio.nix rename to services/pulseaudio.nix index 7d3f3fe..cec8b10 100644 --- a/public/service-pulseaudio.nix +++ b/services/pulseaudio.nix @@ -7,7 +7,7 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf cfg.pulseaudio { # Pulse Audio hardware.pulseaudio = { diff --git a/public/hardware-scanner.nix b/services/scanner.nix similarity index 100% rename from public/hardware-scanner.nix rename to services/scanner.nix diff --git a/public/service-ssh.nix b/services/ssh.nix similarity index 100% rename from public/service-ssh.nix rename to services/ssh.nix diff --git a/public/app-virtualbox.nix b/services/virtualbox.nix similarity index 100% rename from public/app-virtualbox.nix rename to services/virtualbox.nix diff --git a/public/service-x11.nix b/services/x11.nix similarity index 96% rename from public/service-x11.nix rename to services/x11.nix index 93e8b16..32f352e 100644 --- a/public/service-x11.nix +++ b/services/x11.nix @@ -7,12 +7,12 @@ let profiles = config.r6d.profiles; in -mkIf profiles.isDesktop { +mkIf profiles.isDesktopEnvironment { # Services # Enable the X11 windowing system. services.xserver = { - #enable = true; + enable = true; layout = "fr"; xkbOptions = "eurosign:e"; displayManager.lightdm.enable = true; diff --git a/public/xmonad/xmobarrc b/services/xmonad/xmobarrc similarity index 100% rename from public/xmonad/xmobarrc rename to services/xmonad/xmobarrc diff --git a/public/xmonad/xmonad.hs b/services/xmonad/xmonad.hs similarity index 100% rename from public/xmonad/xmonad.hs rename to services/xmonad/xmonad.hs diff --git a/public/xmonad/xmonad.nix b/services/xmonad/xmonad.nix similarity index 85% rename from public/xmonad/xmonad.nix rename to services/xmonad/xmonad.nix index ab5c91d..d55f5f7 100644 --- a/public/xmonad/xmonad.nix +++ b/services/xmonad/xmonad.nix @@ -13,6 +13,7 @@ mkIf cfg.xmonad { environment.systemPackages = with pkgs; [ dmenu haskellPackages.xmobar + trayer ]; # Services @@ -23,4 +24,7 @@ mkIf cfg.xmonad { haskellPackages.xmobar ]; }; + environment.variables = { + _JAVA_AWT_WM_NONREPARENTING = "1"; + }; }