Compare commits

...

21 Commits

Author SHA1 Message Date
ad0799f08d indentation 2017-06-22 19:46:55 +02:00
Yves Dubromelle
4dbcc8ddc0 git alias to show commits not pushed to remotes 2017-06-03 18:06:03 +02:00
Yves Dubromelle
3a5ae68f3a migrated machines cleanup (latitude, monstre, pedro, phenom) 2017-06-03 17:44:49 +02:00
772cab2253 nsp 2017-06-03 13:10:00 +02:00
92bf72c7bf indentation 2017-06-03 13:08:50 +02:00
60f466a887 add sqlite to dev profile 2017-06-03 13:05:14 +02:00
eca3d77610 add option to build nixos documentation 2017-06-03 12:58:10 +02:00
78ece5641d add server options 2017-05-31 17:18:17 +02:00
cc851a7946 add assertion 2017-05-31 15:46:27 +02:00
aa22c6337d migrated into profile 2017-05-31 15:43:42 +02:00
acacc94903 add development packages to workstation profile 2017-05-31 15:41:12 +02:00
1f480bbbff add option to identify Workstations 2017-05-31 14:45:39 +02:00
Yves Dubromelle
ac91ce4492 regroupement des options éparses en configurationOptions et renommage 2017-05-31 00:23:10 +02:00
Yves Dubromelle
c43adc80cb utilisation des profils pour modifier les flags :) 2017-05-30 23:21:33 +02:00
Yves Dubromelle
745d2cd171 on peut se passer de passer lib en paramètre 2017-05-25 23:30:50 +02:00
Yves Dubromelle
259a1a0aa6 cible make pour juste builder NixOS sans appliquer 2017-05-25 02:18:07 +02:00
Yves Dubromelle
854eed9227 ébauche de fonction pour générer un profil 2017-05-25 02:17:42 +02:00
8ee09217cb une machine hydra-builder doit faire du garbage-collection régulièrement 2017-05-22 10:42:16 +02:00
b15672c3ad ménage config generator 2017-05-21 13:58:09 +02:00
ab1d364327 ajout option munin 2017-05-20 22:43:52 +02:00
67eadfab97 ces anciens profils ont été convertis en assertions 2017-05-19 17:18:20 +02:00
77 changed files with 229 additions and 269 deletions

View File

@@ -23,6 +23,9 @@ full-auto: submodules-update upgrade clean optimise
optimise: optimise:
$(TIME) nix-store --optimise $(TIME) nix-store --optimise
rebuild-build:
$(TIME) time nixos-rebuild build --fallback --show-trace
rebuild-switch: rebuild-switch:
$(TIME) time nixos-rebuild switch --fallback --show-trace $(TIME) time nixos-rebuild switch --fallback --show-trace

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.graphical { mkIf flags.graphical {
@@ -14,5 +14,8 @@ mkIf flags.graphical {
# Gestion de FS # Gestion de FS
gparted # Gestion graphique de partitions gparted # Gestion graphique de partitions
unetbootin # création de clefs USB bootables unetbootin # création de clefs USB bootables
# visualisation de log
#logstalgia
]; ];
} }

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf currentMachine.profiles.isDesktopEnvironment { mkIf currentMachine.profiles.isDesktopEnvironment {
@@ -24,12 +24,14 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
gnome3.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM gnome3.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM
## Manipulation de fichier ## Manipulation de fichier
pcmanfm # gestionnaire de fichiers graphique #kde5.dolphin # gestionnaire de fichiers graphique
spaceFM # gestionnaire de fichiers graphique #kde5.dolphin-plugins # gestionnaire de fichiers graphique
#vifm # gestionnaire de fichiers basé sur VIM (console) pcmanfm # gestionnaire de fichiers graphique
spaceFM # gestionnaire de fichiers graphique
#vifm # gestionnaire de fichiers basé sur VIM (console)
## Terminal ## Terminal
sakura # terminal sakura # terminal
]; ];
# Polices supplémentaires # Polices supplémentaires

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.officeSuite && flags.graphical) { mkIf (flags.officeSuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.conception-assistee && flags.graphical) { mkIf (flags.conception-assistee && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.cartographie && flags.graphical) { mkIf (flags.cartographie && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: ménage # TODO: ménage
mkIf (flags.internetSuite && flags.graphical) { mkIf (flags.internetSuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (true && flags.graphical) { mkIf (true && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.developpement-elm && flags.graphical) { mkIf (flags.developpement-elm && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.developpement-haskell && flags.graphical) { mkIf (flags.developpement-haskell && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.developpement-java && flags.graphical) { mkIf (flags.developpement-java && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.jetbrains-licensed && flags.graphical) { mkIf (flags.jetbrains-licensed && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.developpement-rust && flags.graphical) { mkIf (flags.developpement-rust && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.developpement && flags.graphical) { mkIf (flags.developpement && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.edition-musique && flags.graphical) { mkIf (flags.edition-musique && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.edition-photo && flags.graphical) { mkIf (flags.edition-photo && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.edition-video && flags.graphical) { mkIf (flags.edition-video && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.jeux && flags.graphical) { mkIf (flags.jeux && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO ranger le spécifique pulseaudio # TODO ranger le spécifique pulseaudio

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf; inherit (lib) mkIf;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (true && flags.graphical) { mkIf (true && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf (flags.securitySuite && flags.graphical) { mkIf (flags.securitySuite && flags.graphical) {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.officeSuite { mkIf flags.officeSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.conception-assistee { mkIf flags.conception-assistee {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.cartographie { mkIf flags.cartographie {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: ménage # TODO: ménage
mkIf flags.internetSuite { mkIf flags.internetSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement-elm { mkIf flags.developpement-elm {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement-haskell { mkIf flags.developpement-haskell {
@@ -18,17 +18,17 @@ mkIf flags.developpement-haskell {
stack # pour les paquets en LTS de stackage stack # pour les paquets en LTS de stackage
] ++ (with pkgs.haskellPackages; [ ] ++ (with pkgs.haskellPackages; [
# Haskell lib # Haskell lib
autoproc # ? procmail autoproc # ? procmail
darcs # Gestionnaire de version éponyme darcs # gestionnaire de version éponyme
ghc-mod ghc-mod # outil d'analyse de code haskell utilisé par IDE
hindent # indentation code hindent # indentation code
hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc postgrest # mapper HTTP <-> PostgreSQL
#postgrest # mapper HTTP <-> PostgreSQL stylish-haskell # qualité de code
stylish-haskell # qualité de code turtle # genre shell-scripting
turtle # genre shell-scripting
# Application perso # Application perso
hahp hahp
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
]); ]);
} }

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement-java { mkIf flags.developpement-java {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.jetbrains-licensed { mkIf flags.jetbrains-licensed {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement-rust { mkIf flags.developpement-rust {

View File

@@ -4,13 +4,17 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement { mkIf flags.developpement {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Base de données
pg_top # monitoring de PostgreSQL
sqlite # le moteur de base de données
# C / C++ # C / C++
gcc # pour les appels depuis les scripts gcc # pour les appels depuis les scripts

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.edition-musique { mkIf flags.edition-musique {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.edition-photo { mkIf flags.edition-photo {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.edition-video { mkIf flags.edition-video {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.jeux { mkIf flags.jeux {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.multimediaSuite { mkIf flags.multimediaSuite {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf; inherit (lib) mkIf;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.securitySuite { mkIf flags.securitySuite {

View File

@@ -8,28 +8,20 @@ let
host = config.networking.hostName; host = config.networking.hostName;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {
# TODO camel case partout # TODO camel case partout
# TODO everything in english # TODO everything in english
# TODO sortir ce qui est privé # TODO sortir ce qui est privé
# TODO portage du système d'annuaire de machines de capgemini
###### interface ###### interface
options = { options = {
#* Utilisé pour avoir des raccourcis de machine #* Utilisé pour avoir des raccourcis de machine
r6d.computers = { r6d.computers = {
isHydra = mkEnableOption "Identification du nom de machine.";
isLatitude = mkEnableOption "Identification du nom de machine.";
isMonstre = mkEnableOption "Identification du nom de machine.";
isNeoNomade = mkEnableOption "Identification du nom de machine."; isNeoNomade = mkEnableOption "Identification du nom de machine.";
isNomade = mkEnableOption "Identification du nom de machine."; isNomade = mkEnableOption "Identification du nom de machine.";
isOcean = mkEnableOption "Identification du nom de machine.";
isPedro = mkEnableOption "Identification du nom de machine.";
isPhenom = mkEnableOption "Identification du nom de machine.";
isRadx = mkEnableOption "Identification du nom de machine.";
isRollo = mkEnableOption "Identification du nom de machine."; isRollo = mkEnableOption "Identification du nom de machine.";
}; };
}; };
@@ -40,16 +32,6 @@ in
config = mkMerge config = mkMerge
[ [
## Définition des profils génériques ## Définition des profils génériques
(mkIf pfl.isDesktopEnvironment {
r6d.config-generator = {
awesome = true;
internetSuite = true;
multimediaSuite = true;
officeSuite = true;
pulseaudio = true;
securitySuite = true;
};
})
(mkIf (pfl.isServer && !comp.isMonstre) { (mkIf (pfl.isServer && !comp.isMonstre) {
r6d.config-generator = { r6d.config-generator = {
#database_postgres = true; #database_postgres = true;
@@ -68,118 +50,8 @@ in
dns_resolveur = true; dns_resolveur = true;
}; };
}) })
(mkIf pfl.isWorkstation {
r6d.profiles.isDesktopEnvironment = true;
r6d.config-generator = {
docker = true;
graphical = true;
};
})
## Profils liés à Dubronetwork
(mkIf pfl.isDubronetwork {
r6d.config-generator = {
auto-upgrade = true;
locate = true;
print = true;
};
})
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
r6d.config-generator = {
cartographie = true;
conception-assistee = true;
docker = true;
developpement = true;
developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
edition-musique = true;
edition-photo = true;
edition-video = true;
scanner = true;
virtualbox = true;
xmonad = true;
};
})
## Profils liés à Prunetwork
(mkIf pfl.isPrunetwork {
r6d.config-generator = {
auto-upgrade = true;
docker = true;
locate = true;
fail2ban = true;
smokeping = true;
swap = true;
};
})
(mkIf (pfl.isPrunetwork && pfl.isWorkstation) {
r6d.config-generator = {
cartographie = true;
conception-assistee = true;
docker = true;
developpement = true;
#developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
edition-musique = true;
edition-photo = true;
edition-video = true;
hydra-core = false; # DO NOT ENABLE ON WORKSTATION, YOU CAN CRASH YOUR SYSTEM
print = true;
scanner = true;
#virtualbox = true;
#xmonad = true;
};
})
## Affectation des profils aux machines ## Affectation des profils aux machines
(mkIf comp.isOcean {
networking.hostName = "ocean.prunetwork.fr"; # Define your hostname.
r6d.profiles = {
isPrunetwork = true;
isServer = true;
};
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
'';
};
})
(mkIf comp.isLatitude {
networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = 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
'';
};
})
(mkIf comp.isNeoNomade{ (mkIf comp.isNeoNomade{
networking.hostName = "neo-nomade.dubronetwork.fr"; # Define your hostname. networking.hostName = "neo-nomade.dubronetwork.fr"; # Define your hostname.
@@ -211,38 +83,6 @@ in
laptop = true; laptop = true;
}; };
}) })
(mkIf comp.isPedro {
r6d.profiles = {
isDubronetwork = true;
isServer = true;
};
r6d.config-generator = {
fail2ban = true;
};
})
(mkIf comp.isPhenom {
networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = true;
isWorkstation = true;
};
r6d.config-generator = {
jetbrains-licensed = true;
#hydra-core = true;
nix-serve-client = true;
nix-serve-server = true;
edition-photo = true;
tincAddress = "192.168.12.1/24";
tincExtraConfig = ''
ConnectTo = monstre_dubronetwork_fr
ConnectTo = rollo_dubronetwork_fr
ConnectTo = hydra_prunetwork_fr
ConnectTo = ocean_prunetwork_fr
'';
};
})
(mkIf comp.isRollo { (mkIf comp.isRollo {
networking.hostName = "rollo.dubronetwork.fr"; # Define your hostname. networking.hostName = "rollo.dubronetwork.fr"; # Define your hostname.
r6d.profiles = { r6d.profiles = {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.auto-upgrade { mkIf flags.auto-upgrade {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: rc.lua par défaut (système) # TODO: rc.lua par défaut (système)

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: ménage # TODO: ménage

View File

@@ -20,6 +20,7 @@
# Logs # Logs
lol = log --graph --decorate --pretty=oneline --abbrev-commit lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
not-pushed = log --branches --not --remotes
[push] [push]
default = simple default = simple
[core] [core]

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.laptop { mkIf flags.laptop {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.swap { mkIf flags.swap {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf false { mkIf false {

50
lib.nix Normal file
View File

@@ -0,0 +1,50 @@
let
lib = with import <nixpkgs> {}; pkgs.lib;
profiles = {
isDesktopEnvironment = {
awesome = true;
internetSuite = true;
graphical = true;
multimediaSuite = true;
officeSuite = true;
pulseaudio = true;
securitySuite = true;
};
isWorkstation = {
docker = true;
developpement = true;
developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
};
#isServer = {
#};
};
in
with lib; rec{
# Apply the profiles (pre-defined + custom) to the whole directory
applyProfilesToDirectory = customProfiles: directory:
lib.mapAttrs (applyProfilesToMachine customProfiles) directory;
# Apply the profiles (pre-defined + custom) to a machine
applyProfilesToMachine = customProfiles: machineName: machineOptions:
{ configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
configurationOptions = machineOptions.configurationOptions;
profiles = machineOptions.profiles;
};
# Generate a set of configuration flags based on profiles
generateFlagsSet = customProfiles: machineProfiles:
let
allProfiles = recursiveUpdate profiles customProfiles;
conditionalFlags = name: value:
if machineProfiles.${name}
then value
else {};
in
foldr (a: b: a // b) {} (mapAttrsToList conditionalFlags allProfiles);
}

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -6,7 +6,7 @@ let
machineOptions = types.submodule { machineOptions = types.submodule {
options = { options = {
configuration-flags = { configurationFlags = {
#enable = mkEnableOption "Génération de la configuration d'une machine."; #enable = mkEnableOption "Génération de la configuration d'une machine.";
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome."; awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques."; auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
@@ -38,7 +38,9 @@ let
locate = mkEnableOption "Profil pour activer la fonction locate."; locate = mkEnableOption "Profil pour activer la fonction locate.";
mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres."; mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres.";
multimediaSuite = mkEnableOption "Profil pour la suite multimédia."; multimediaSuite = mkEnableOption "Profil pour la suite multimédia.";
munin = mkEnableOption "Profil pour activer la supervision par Munin";
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)"; murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
nixos-manual = mkEnableOption "Profil pour activer la documentation nixos en local sur un TTY";
nix-serve-server = 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.";
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store"; nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
officeSuite = mkEnableOption "Profil pour la suite bureautique"; officeSuite = mkEnableOption "Profil pour la suite bureautique";
@@ -56,15 +58,7 @@ let
znc = mkEnableOption "Profil pour activer le relais IRC ZNC."; znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
}; };
profiles = { configurationOptions = {
# Domaine
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
# Utilisation machine
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.";
};
ipAddress = mkOption { ipAddress = mkOption {
description = "Adresse IP"; description = "Adresse IP";
@@ -127,11 +121,26 @@ let
}; };
}; };
}; };
profiles = {
# Domaine
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
isDubronetworkServer = mkEnableOption "Pour distinguer les machines dubronetwork avec Server.";
isDubronetworkWorkstation = mkEnableOption "Pour distinguer les machines dubronetwork avec Workstation.";
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
isPrunetworkServer = mkEnableOption "Pour distinguer les machines prunetwork avec Server.";
isPrunetworkWorkstation = mkEnableOption "Pour distinguer les machines prunetwork avec Workstation.";
# Utilisation machine
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.";
};
};
}; };
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {
@@ -150,10 +159,15 @@ in
*/ */
assertions = [ assertions = [
{ {
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.profiles.isDesktopEnvironment == true)) assertion = (currentMachine.profiles.isWorkstation && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isWorkstation); || (!currentMachine.profiles.isWorkstation);
message = "A workstation requires a graphical environement."; message = "A workstation requires a graphical environement.";
} }
{
assertion = (currentMachine.profiles.isDesktopEnvironment && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isDesktopEnvironment);
message = "A desktop station requires a graphical environement.";
}
{ {
assertion = (currentMachine.profiles.isDesktopEnvironment && (config.services.xserver.enable == true)) assertion = (currentMachine.profiles.isDesktopEnvironment && (config.services.xserver.enable == true))
|| (!currentMachine.profiles.isDesktopEnvironment); || (!currentMachine.profiles.isDesktopEnvironment);

View File

@@ -4,7 +4,7 @@ let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
{ {
@@ -26,6 +26,7 @@ in
./kibana.nix # service de visualisation de données stockées dans elasticsearch ./kibana.nix # service de visualisation de données stockées dans elasticsearch
# TODO: réactiver locate # TODO: réactiver locate
#./locate.nix # service locate #./locate.nix # service locate
./nixos-manual.nix # documentation nixos sur TTY
./virtualbox.nix # activer virtualbox ./virtualbox.nix # activer virtualbox
./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad ./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.docker { mkIf flags.docker {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.elasticsearch { mkIf flags.elasticsearch {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.developpement-haskell { mkIf flags.developpement-haskell {

View File

@@ -4,29 +4,39 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: ménage # TODO: ménage
mkIf flags.hydra-builder { mkIf flags.hydra-builder {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
qemu
kvm kvm
qemu
virtualbox
]; ];
# Services # Services
## Services de virtualisation utilisé pour les tests hydra ## Services de virtualisation utilisé pour les tests hydra
virtualisation.docker.enable = true; virtualisation = {
virtualisation.libvirtd.enable = true; docker.enable = true;
virtualisation.libvirtd.enableKVM = true; libvirtd = {
#virtualisation.virtualbox.guest.enable = true; enable = true;
virtualisation.virtualbox.host.enable = true; enableKVM = true;
virtualisation.virtualbox.host.headless = true; };
virtualbox = {
#guest.enable = true;
host.enable = true;
host.headless = true;
};
};
## Ménage automatique tous les jours ## Ménage automatique tous les jours - Frequent garbage collection is a good idea for build machines.
nix.gc.automatic = true; nix.gc = {
automatic = true;
dates = "*:0/30";
};
# users.users."hydrabld" = { # users.users."hydrabld" = {
# description = "Execution des jobs hydra"; # description = "Execution des jobs hydra";

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
#### https://github.com/NixOS/hydra/issues/413 #### https://github.com/NixOS/hydra/issues/413

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.kibana { mkIf flags.kibana {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.locate { mkIf flags.locate {

View File

@@ -4,12 +4,11 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
# TODO: ajouter option
# TODO: changer adresse mail # TODO: changer adresse mail
mkIf true { mkIf flags.munin {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

33
services/nixos-manual.nix Normal file
View File

@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configurationFlags;
in
mkIf flags.nixos-manual {
# Paquets
environment.systemPackages = with pkgs; [
bc
mailutils
];
# Services
## documentation sur ctrl + alt + F8
services.nixosManual = {
enable = true;
showManual = true;
};
# Réseau
networking.firewall = {
allowedTCPPorts = [
];
allowedUDPPorts = [
];
};
}

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.print { mkIf flags.print {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.pulseaudio { mkIf flags.pulseaudio {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.scanner { mkIf flags.scanner {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.virtualbox { mkIf flags.virtualbox {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
/** /**

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf flags.xmonad { mkIf flags.xmonad {

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}"; currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags; flags = currentMachine.configurationFlags;
in in
mkIf true { mkIf true {