Compare commits
13 Commits
2017-05-19
...
2017-05-31
| Author | SHA1 | Date | |
|---|---|---|---|
| cc851a7946 | |||
| aa22c6337d | |||
| acacc94903 | |||
| 1f480bbbff | |||
|
|
ac91ce4492 | ||
|
|
c43adc80cb | ||
|
|
745d2cd171 | ||
|
|
259a1a0aa6 | ||
|
|
854eed9227 | ||
| 8ee09217cb | |||
| b15672c3ad | |||
| ab1d364327 | |||
| 67eadfab97 |
3
Makefile
3
Makefile
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -21,15 +21,12 @@ in
|
|||||||
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.";
|
isLatitude = mkEnableOption "Identification du nom de machine.";
|
||||||
isMonstre = 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.";
|
isPedro = mkEnableOption "Identification du nom de machine.";
|
||||||
isPhenom = 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 +37,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,96 +55,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 {
|
(mkIf comp.isLatitude {
|
||||||
networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname.
|
networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname.
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
50
lib.nix
Normal file
50
lib.nix
Normal 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);
|
||||||
|
}
|
||||||
@@ -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 {
|
||||||
|
|||||||
37
options.nix
37
options.nix
@@ -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,6 +38,7 @@ 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)";
|
||||||
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";
|
||||||
@@ -56,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";
|
||||||
@@ -127,11 +120,24 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
profiles = {
|
||||||
|
# Domaine
|
||||||
|
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
|
||||||
|
isDubronetworkWorkstation = mkEnableOption "Pour distinguer les machines dubronetwork avec Workstation.";
|
||||||
|
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
|
||||||
|
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 +156,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);
|
||||||
|
|||||||
@@ -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,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";
|
||||||
|
|||||||
@@ -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,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; [
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user