Compare commits

..

5 Commits

Author SHA1 Message Date
6bf53d872c nso 2017-04-13 22:44:51 +02:00
78c2e17328 ajout config 2017-04-13 22:30:10 +02:00
766b28e25a nsp 2017-04-11 16:27:25 +02:00
c9e664d353 nsp 2017-04-11 16:24:00 +02:00
b51b2588de essai build iso 2017-04-11 15:53:22 +02:00
76 changed files with 384 additions and 458 deletions

View File

@@ -10,20 +10,6 @@ Une recette dite "config-generator" adapte la configuration selon le nom de la m
Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs. Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.
# Notes de mise-à-jour # Notes de mise-à-jour
## pour l'utilisation de l'annuaire (2017-04-28)
* faire les mises à jour de l'OS
* commiter & pusher l'état des dépôts (au cas où). Pour les différents dépôts `git a`, `git commit` puis `make tag push`
* mettre à jour les dépôts avec les dernières versions, `make submodules-update`
* tester la configuration : `nixos-rebuild build`
* corriger et ajouter les éléments manquant (notamment dans `private/annuaire.nix` )
* vérifier que `configuration.nix` ne contient pas `services.xserver.enable = true;`
* lorsque tout semble bon, vérifier :
* qu'il y a toujours des utilisateurs dans la configuration
* que le moyen d'accéder à la machine n'a pas été supprimé (surtout les machines distantes)
* lancer la commande de build de l'os : `make` :)
## pour le passage de 16.09 à unstable ## pour le passage de 16.09 à unstable
* mettre à jour tous les dépôts * mettre à jour tous les dépôts
@@ -228,3 +214,4 @@ notamment le périphérique utilisé par grub
unset NIXOS_CONFIG unset NIXOS_CONFIG
nixos-install nixos-install
~~~ ~~~

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.graphical { mkIf cfg.graphical {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf currentMachine.profiles.isDesktopEnvironment { mkIf profiles.isDesktopEnvironment {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.officeSuite && flags.graphical) { mkIf (cfg.officeSuite && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.conception-assistee && flags.graphical) { mkIf (cfg.conception-assistee && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.cartographie && flags.graphical) { mkIf (cfg.cartographie && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: ménage # TODO: ménage
mkIf (flags.internetSuite && flags.graphical) { mkIf (cfg.internetSuite && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -32,7 +32,6 @@ environment.systemPackages = with pkgs; [
transmission_remote_gtk transmission_remote_gtk
]; ];
/* TODO: voir pour appliquer la personnalisation
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
clawsMail = pkgs.clawsMail.override { clawsMail = pkgs.clawsMail.override {
enablePluginFancy = false; # nécessite wekitgtk qui est troué enablePluginFancy = false; # nécessite wekitgtk qui est troué
@@ -44,7 +43,6 @@ environment.systemPackages = with pkgs; [
}; };
mumble = pkgs.mumble.override { pulseSupport = true; }; mumble = pkgs.mumble.override { pulseSupport = true; };
}; };
*/
#nixpkgs.config.permittedInsecurePackages = [ #nixpkgs.config.permittedInsecurePackages = [
# "webkitgtk-2.4.11" # pour que le plugin fancy de claws-mail fonctionne # "webkitgtk-2.4.11" # pour que le plugin fancy de claws-mail fonctionne

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (true && flags.graphical) { mkIf (true && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
{ {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.developpement-elm && flags.graphical) { mkIf (cfg.developpement-elm && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.developpement-haskell && flags.graphical) { mkIf (cfg.developpement-haskell && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.developpement-java && flags.graphical) { mkIf (cfg.developpement-java && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.jetbrains-licensed && flags.graphical) { mkIf (cfg.jetbrains-licensed && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.developpement-rust && flags.graphical) { mkIf (cfg.developpement-rust && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,18 +2,18 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.developpement && flags.graphical) { mkIf (cfg.developpement && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Base de données # Base de données
pgadmin # interface d'administration de postgres pgadmin # interface d'administration de postgres
#sqlitebrowser # interface d'administration de sqlite sqlitebrowser # interface d'administration de sqlite
# Documentation # Documentation
#zeal # consulter la documentation hors ligne #zeal # consulter la documentation hors ligne

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.edition-musique && flags.graphical) { mkIf (cfg.edition-musique && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.edition-photo && flags.graphical) { mkIf (cfg.edition-photo && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.edition-video && flags.graphical) { mkIf (cfg.edition-video && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.jeux && flags.graphical) { mkIf (cfg.jeux && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,13 +2,13 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO ranger le spécifique pulseaudio # TODO ranger le spécifique pulseaudio
mkIf (flags.multimediaSuite && flags.graphical) { mkIf (cfg.multimediaSuite && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf; inherit (lib) mkIf;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (true && flags.graphical) { mkIf (true && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf (flags.securitySuite && flags.graphical) { mkIf (cfg.securitySuite && cfg.graphical) {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.officeSuite { mkIf cfg.officeSuite {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.conception-assistee { mkIf cfg.conception-assistee {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.cartographie { mkIf cfg.cartographie {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: ménage # TODO: ménage
mkIf flags.internetSuite { mkIf cfg.internetSuite {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,9 +2,9 @@
let let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
{ {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement-elm { mkIf cfg.developpement-elm {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement-haskell { mkIf cfg.developpement-haskell {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -23,7 +23,6 @@ mkIf flags.developpement-haskell {
ghc-mod ghc-mod
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

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement-java { mkIf cfg.developpement-java {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.jetbrains-licensed { mkIf cfg.jetbrains-licensed {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement-rust { mkIf cfg.developpement-rust {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement { mkIf cfg.developpement {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.edition-musique { mkIf cfg.edition-musique {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.edition-photo { mkIf cfg.edition-photo {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,24 +2,22 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.edition-video { mkIf cfg.edition-video {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ffmpeg-full # assemblage de flux audio & video en ligne de commande ffmpeg-full # assemblage de flux audio & video en ligne de commande
]; ];
/* TODO: voir pour appliquer la personnalisation
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
ffmpeg-full = pkgs.ffmpeg-full.override { ffmpeg-full = pkgs.ffmpeg-full.override {
nonfreeLicensing = true; nonfreeLicensing = true;
nvenc = true; nvenc = true;
}; };
}; };
*/
} }

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.jeux { mkIf cfg.jeux {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.multimediaSuite { mkIf cfg.multimediaSuite {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf; inherit (lib) mkIf;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.securitySuite { mkIf cfg.securitySuite {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -1,10 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let
#inherit (lib) mkIf mkMerge mkThenElse;
cfg = config.r6d.config-generator;
computers = config.r6d.computers;
profiles = config.r6d.profiles;
in
{ {
imports = [ imports = [
# moulinette de configuration # moulinette de configuration
/*./config-generator.nix*/ ./config-generator.nix
./options.nix
# subfolders # subfolders
./applications/graphical/default.nix ./applications/graphical/default.nix

View File

@@ -6,9 +6,6 @@ let
pfl = config.r6d.profiles; pfl = config.r6d.profiles;
comp = config.r6d.computers; comp = config.r6d.computers;
host = config.networking.hostName; host = config.networking.hostName;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
in in
{ {
@@ -19,6 +16,84 @@ in
###### interface ###### interface
options = { options = {
#* Utilisé pour afecter des capacités aux machines
r6d.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.";
};
#* Utilisé dans les fichiers .nix
r6d.config-generator = {
#enable = mkEnableOption "Génération de la configuration d'une machine.";
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
cartographie = mkEnableOption "Profil pour activer les outils de gestion de données géographiques.";
conception-assistee = mkEnableOption "Profil pour activer les outils de conception électronique & modélisation 3D";
database_postgres = mkEnableOption "Profil pour activer le SGBD PostgreSQL.";
developpement = mkEnableOption "Profil pour activer les outils de développement";
developpement-elm = mkEnableOption "Profil pour activer les outils de développement Elm";
developpement-haskell = mkEnableOption "Profil pour activer les outils de développement Haskell";
developpement-java = mkEnableOption "Profil pour activer les outils de développement Java";
developpement-rust = mkEnableOption "Profil pour activer les outils de développement Rust";
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
dovecot = mkEnableOption "Profil pour activer le serveur Dovecot.";
dns_autorite = mkEnableOption "Profil pour servir les fichiers de zone DNS.";
dns_resolveur = mkEnableOption "Profil pour activer un résolveur DNS local.";
edition-musique = mkEnableOption "Profil pour la création/édition de musique.";
edition-photo = mkEnableOption "Profil pour la création/édition de photos.";
edition-video = mkEnableOption "Profil pour la création/édition de video.";
elasticsearch = mkEnableOption "Profil pour activer le service elasticsearch.";
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
graphical = mkEnableOption "Profil pour activer les applications graphgiques.";
hydra-builder = mkEnableOption "Profil pour une machine qui compile pour hydra.";
hydra-core = mkEnableOption "Profil pour un serveur hydra.";
kibana = mkEnableOption "Profil pour activer le service kibana.";
internetSuite = mkEnableOption "Profil pour la suite de logiciels pour Internet.";
jetbrains-licensed = mkEnableOption "Profil pour la suite de développement Jetbrains payante (sous-ensemble).";
jeux = mkEnableOption "Profil pour les jeux vidéos.";
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables.";
locate = mkEnableOption "Profil pour activer la fonction locate.";
mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres.";
multimediaSuite = mkEnableOption "Profil pour la suite multimédia.";
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
nix-serve-client = mkEnableOption "Profil pour que la machine soit un client de cache nix.";
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
officeSuite = mkEnableOption "Profil pour la suite bureautique";
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
radicale = mkEnableOption "Profil pour activer le service d'hébergement de calendrier + tâches & contacts.";
scanner = mkEnableOption "Profil pour que les scanners soient utilisable.";
securitySuite = mkEnableOption "Profil pour la suite de logiciels de sécurité.";
smokeping = mkEnableOption "Profil pour activer le monitoring réseau par smokeping.";
swap = mkEnableOption "Profil pour que le swap soit activé.";
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
tincAddress = mkOption {
default = "";
example = "192.168.1.1";
description = "Adresse du noeud tinc local";
type = lib.types.string;
};
tincExtraConfig = mkOption {
default = "";
example = ''
Mode = router
ConnecTo = bar
'';
description = "Configuration supplémentaire pour tinc";
type = lib.types.string;
};
};
#* 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."; isHydra = mkEnableOption "Identification du nom de machine.";
@@ -191,7 +266,7 @@ in
kibana = true; kibana = true;
nix-serve-client = true; nix-serve-client = true;
nix-serve-server = true; nix-serve-server = true;
#rabbitmq = true; rabbitmq = true;
tincAddress = "192.168.12.3/24"; tincAddress = "192.168.12.3/24";
tincExtraConfig = '' tincExtraConfig = ''
ConnectTo = monstre_dubronetwork_fr ConnectTo = monstre_dubronetwork_fr

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.auto-upgrade { mkIf cfg.auto-upgrade {
# Automatic update & automatic clean # Automatic update & automatic clean

View File

@@ -2,13 +2,13 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: rc.lua par défaut (système) # TODO: rc.lua par défaut (système)
mkIf flags.awesome { mkIf cfg.awesome {
environment.variables = { environment.variables = {
# Export the current path for the awesome derivation, useful for users rc.lua # Export the current path for the awesome derivation, useful for users rc.lua

View File

@@ -2,9 +2,9 @@
let let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
{ {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: ménage # TODO: ménage

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.laptop { mkIf cfg.laptop {
# Gestion spécifique pour PC portable # Gestion spécifique pour PC portable

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.swap { mkIf cfg.swap {
# Gestion du swap # Gestion du swap

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf false { mkIf false {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
EXCLUSION="~$|swp$|swo$"
while inotifywait --exclude $EXCLUSION -r -e modify .
do
$@
done

View File

@@ -1,142 +0,0 @@
{ config, lib, pkgs, r6d, ... }:
let
inherit (lib) mkEnableOption mkTextOption mkIf mkMerge mkOption singleton types;
# TODO: Anglish :)
machineOptions = types.submodule {
options = {
configuration-flags = {
#enable = mkEnableOption "Génération de la configuration d'une machine.";
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
cartographie = mkEnableOption "Profil pour activer les outils de gestion de données géographiques.";
conception-assistee = mkEnableOption "Profil pour activer les outils de conception électronique & modélisation 3D";
database_postgres = mkEnableOption "Profil pour activer le SGBD PostgreSQL.";
developpement = mkEnableOption "Profil pour activer les outils de développement";
developpement-elm = mkEnableOption "Profil pour activer les outils de développement Elm";
developpement-haskell = mkEnableOption "Profil pour activer les outils de développement Haskell";
developpement-java = mkEnableOption "Profil pour activer les outils de développement Java";
developpement-rust = mkEnableOption "Profil pour activer les outils de développement Rust";
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
dovecot = mkEnableOption "Profil pour activer le serveur Dovecot.";
dns_autorite = mkEnableOption "Profil pour servir les fichiers de zone DNS.";
dns_resolveur = mkEnableOption "Profil pour activer un résolveur DNS local.";
edition-musique = mkEnableOption "Profil pour la création/édition de musique.";
edition-photo = mkEnableOption "Profil pour la création/édition de photos.";
edition-video = mkEnableOption "Profil pour la création/édition de video.";
elasticsearch = mkEnableOption "Profil pour activer le service elasticsearch.";
fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
graphical = mkEnableOption "Profil pour activer les applications graphgiques.";
hydra-builder = mkEnableOption "Profil pour une machine qui compile pour hydra.";
hydra-core = mkEnableOption "Profil pour un serveur hydra.";
kibana = mkEnableOption "Profil pour activer le service kibana.";
internetSuite = mkEnableOption "Profil pour la suite de logiciels pour Internet.";
jetbrains-licensed = mkEnableOption "Profil pour la suite de développement Jetbrains payante (sous-ensemble).";
jeux = mkEnableOption "Profil pour les jeux vidéos.";
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables.";
locate = mkEnableOption "Profil pour activer la fonction locate.";
mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres.";
multimediaSuite = mkEnableOption "Profil pour la suite multimédia.";
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
officeSuite = mkEnableOption "Profil pour la suite bureautique";
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
radicale = mkEnableOption "Profil pour activer le service d'hébergement de calendrier + tâches & contacts.";
rmilter = mkEnableOption "Profil pour activer le filtrage de mails par postfix.";
scanner = mkEnableOption "Profil pour que les scanners soient utilisable.";
securitySuite = mkEnableOption "Profil pour la suite de logiciels de sécurité.";
smokeping = mkEnableOption "Profil pour activer le monitoring réseau par smokeping.";
swap = mkEnableOption "Profil pour que le swap soit activé.";
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
};
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.";
};
ipAddress = mkOption {
description = "Adresse IP";
type = lib.types.string;
};
nix-serve-server = mkEnableOption "nix-serve server";
nix-serve-client = {
enable = mkEnableOption "nix-serve client";
servers = mkOption {
default = [ https://cache.nixos.org/ ];
description = "List of nix-serve servers providing binary caches.";
type = types.listOf types.str;
};
};
tinc = {
enable = mkEnableOption "Enable tinc service";
connectToAddress = mkOption {
default = "";
example = "192.168.1.1";
description = "External address to connect from another node.";
type = lib.types.string;
};
vpnAddress = mkOption {
example = "192.168.69.69/24";
description = "VPN local node IP address.";
type = lib.types.string;
};
vpnCidrLength = mkOption {
default = 24;
example = 24;
description = "VPN netmask length.";
type = lib.types.int;
};
extraConfig = mkOption {
default = "";
example = ''
Mode = router
ConnecTo = bar
'';
description = "Configuration supplémentaire pour tinc";
type = lib.types.string;
};
};
windowsBoot = {
enable = mkEnableOption "Activation du démarrage de Windows par Grub";
drive = mkOption {
description = "Lecteur sur lequel est présent le système Windows (au format GRUB)";
type = lib.types.string;
default = "hd0,1";
};
};
windowsMount ={
enable = mkEnableOption "Montage de la partition data Windows";
device = mkOption {
description = "Lecteur sur lequel est présent le disque de data Windows";
type = lib.types.string;
default = "/dev/sda2";
};
};
};
};
in
{
options = {
r6d.machines = mkOption {
type = types.attrsOf machineOptions;
description = ''
Machines directory.
'';
};
};
}

17
release.nix Normal file
View File

@@ -0,0 +1,17 @@
{ supportedSystems ? [ "x86_64-linux" ]
, nixpkgs ? import <nixpkgs> {}
, config ? import ./config-generator.nix
, ...
}:
with (import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit supportedSystems; });
{
#r6d.base = import ./r6d-base.nix;
r6d = {
#= import ./iso-image/configuration.nix;
applications.terminal.cao = import ./applications/terminal/cao.nix {
config = self.config;
};
};
}

View File

@@ -2,9 +2,9 @@
let let
#inherit (lib) mkIf mkMerge mkThenElse; #inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
{ {
@@ -16,21 +16,20 @@ in
# commandées par config-generator # commandées par config-generator
## option de configuration spécifique ## option de configuration spécifique
./print.nix # configuration de base de cups ./print.nix # configuration de base de cups
./docker.nix # activer docker ./docker.nix # activer docker
./elasticsearch.nix # service de stockage et recher de données ./elasticsearch.nix # service de stockage et recher de données
./hoogle.nix # service hoogle pour haskell ./hoogle.nix # service hoogle pour haskell
./hydra-build.nix # service de construction de paquet. -> la machine compile des paquets ./hydra-build.nix # service de construction de paquet. -> la machine compile des paquets
./hydra-core.nix # service pour l'instance d'hydra ./hydra-core.nix # service pour l'instance d'hydra
./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 ./locate.nix # service locate
#./locate.nix # service locate ./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
## if isDesktop ## if isDesktop
./pulseaudio.nix # activation du serveur audio ./pulseaudio.nix # activation du serveur audio
./scanner.nix # utilisation d'un scanner ./scanner.nix # utilisation d'un scanner
./x11.nix # activation du serveur graphique X ./x11.nix # activation du serveur graphique X
]; ];
} }

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.docker { mkIf cfg.docker {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.elasticsearch { mkIf cfg.elasticsearch {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.developpement-haskell { mkIf cfg.developpement-haskell {
services.hoogle = { services.hoogle = {
enable = true; enable = true;

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: ménage # TODO: ménage
mkIf flags.hydra-builder { mkIf cfg.hydra-builder {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
#### https://github.com/NixOS/hydra/issues/413 #### https://github.com/NixOS/hydra/issues/413
@@ -23,7 +23,7 @@ let
# hydra-queue-runner --status | json_pp # hydra-queue-runner --status | json_pp
in in
# TODO: passe de ménage # TODO: passe de ménage
mkIf flags.hydra-core { mkIf cfg.hydra-core {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.kibana { mkIf cfg.kibana {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.locate { mkIf cfg.locate {
# Services # Services
services.locate = { services.locate = {

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
# TODO: ajouter option # TODO: ajouter option

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.print { mkIf cfg.print {
# Services # Services
## Enable CUPS to print documents. ## Enable CUPS to print documents.

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.pulseaudio { mkIf cfg.pulseaudio {
# Pulse Audio # Pulse Audio
hardware.pulseaudio = { hardware.pulseaudio = {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.scanner { mkIf cfg.scanner {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,9 +2,9 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf true { mkIf true {

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.virtualbox { mkIf cfg.virtualbox {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -2,20 +2,17 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
/** mkIf profiles.isDesktopEnvironment {
* Il faut activer `services.xserver.enable = true;` dans configuration.nix
*/
mkIf currentMachine.profiles.isDesktopEnvironment {
# Services # Services
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = { services.xserver = {
# enable = true; enable = true;
layout = "fr"; layout = "fr";
xkbOptions = "eurosign:e"; xkbOptions = "eurosign:e";
displayManager.lightdm.enable = true; displayManager.lightdm.enable = true;

View File

@@ -2,12 +2,12 @@
let let
inherit (lib) mkIf mkMerge mkThenElse; inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines; cfg = config.r6d.config-generator;
currentMachine = annuaire."${config.networking.hostName}"; computers = config.r6d.computers;
flags = currentMachine.configuration-flags; profiles = config.r6d.profiles;
in in
mkIf flags.xmonad { mkIf cfg.xmonad {
# Paquets # Paquets
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [