regroupement des options éparses en configurationOptions et renommage

nixos-19.09 2017-05-31-phenom
Yves Dubromelle 8 years ago
parent c43adc80cb
commit ac91ce4492

@ -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 {

@ -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 {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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
{ {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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) {

@ -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

@ -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) {

@ -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) {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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
{ {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 { mkIf flags.developpement {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -8,7 +8,7 @@ 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
{ {

@ -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 {

@ -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)

@ -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
{ {

@ -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

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -5,13 +5,13 @@ let
isDesktopEnvironment = { isDesktopEnvironment = {
awesome = true; awesome = true;
internetSuite = true; internetSuite = true;
graphical = true;
multimediaSuite = true; multimediaSuite = true;
officeSuite = true; officeSuite = true;
pulseaudio = true; pulseaudio = true;
securitySuite = true; securitySuite = true;
}; };
isWorkstation = { isWorkstation = {
graphical = true;
docker = true; docker = true;
}; };
#isServer = { #isServer = {
@ -27,9 +27,8 @@ with lib; rec{
# Apply the profiles (pre-defined + custom) to a machine # Apply the profiles (pre-defined + custom) to a machine
applyProfilesToMachine = customProfiles: machineName: machineOptions: applyProfilesToMachine = customProfiles: machineName: machineOptions:
{ configuration-flags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configuration-flags; { configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
ipAddress = machineOptions.ipAddress; configurationOptions = machineOptions.configurationOptions;
tinc = machineOptions.tinc;
profiles = machineOptions.profiles; profiles = machineOptions.profiles;
}; };

@ -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 {

@ -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.";
@ -57,15 +57,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";
@ -128,11 +120,22 @@ let
}; };
}; };
}; };
profiles = {
# 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.";
};
};
}; };
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
{ {
@ -151,8 +154,8 @@ in
*/ */
assertions = [ assertions = [
{ {
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.profiles.isDesktopEnvironment == true)) assertion = (currentMachine.profiles.isDesktopEnvironment && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isWorkstation); || (!currentMachine.profiles.isDesktopEnvironment);
message = "A workstation requires a graphical environement."; message = "A workstation requires a graphical environement.";
} }
{ {

@ -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
{ {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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.hydra-builder { mkIf flags.hydra-builder {

@ -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

@ -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 {

@ -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 {

@ -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: changer adresse mail # TODO: changer adresse mail

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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 {

@ -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
/** /**

@ -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 {

@ -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 {

Loading…
Cancel
Save