Compare commits

..

25 Commits

Author SHA1 Message Date
cc2f1c33af lien howoldis pour dater les releases NixOS 2017-08-12 09:45:22 +00:00
19bd8fbfbc migration config rollo sur annuaire 2017-07-15 12:44:26 +02:00
Yves Dubromelle
630217ce02 ghc-mod fonctionne à nouveau 2017-07-14 17:03:47 +02:00
Yves Dubromelle
dcdaf91f8b voir les différences entre la configuration actuelle et /etc/nixos/configuration.nix 2017-07-05 22:51:29 +02:00
Yves Dubromelle
5803fdbbff configuration awesome par défaut linkée dans /etc 2017-07-05 22:50:26 +02:00
Yves Dubromelle
dcae05d4c0 ménage (suite) 2017-07-05 22:50:02 +02:00
Yves Dubromelle
196cc008c8 +service gpm pour la souris en console 2017-07-05 22:02:33 +02:00
Yves Dubromelle
fcc1cba9fb déplacement de dérivations dans les fichiers adéquats 2017-07-05 22:02:20 +02:00
f8a687be52 migration de neo-nomade à l'annuaire 2017-07-01 14:50:46 +02:00
28fc448e0c Mettre à jour 'README.md' 2017-07-01 12:45:28 +00:00
Yves Dubromelle
195f5e35a1 +plantuml dans les paquets de développement& 2017-06-23 23:16:02 +02:00
ad0799f08d indentation 2017-06-22 19:46:55 +02:00
Yves Dubromelle
4dbcc8ddc0 git alias to show commits not pushed to remotes 2017-06-03 18:06:03 +02:00
Yves Dubromelle
3a5ae68f3a migrated machines cleanup (latitude, monstre, pedro, phenom) 2017-06-03 17:44:49 +02:00
772cab2253 nsp 2017-06-03 13:10:00 +02:00
92bf72c7bf indentation 2017-06-03 13:08:50 +02:00
60f466a887 add sqlite to dev profile 2017-06-03 13:05:14 +02:00
eca3d77610 add option to build nixos documentation 2017-06-03 12:58:10 +02:00
78ece5641d add server options 2017-05-31 17:18:17 +02:00
cc851a7946 add assertion 2017-05-31 15:46:27 +02:00
aa22c6337d migrated into profile 2017-05-31 15:43:42 +02:00
acacc94903 add development packages to workstation profile 2017-05-31 15:41:12 +02:00
1f480bbbff add option to identify Workstations 2017-05-31 14:45:39 +02:00
Yves Dubromelle
ac91ce4492 regroupement des options éparses en configurationOptions et renommage 2017-05-31 00:23:10 +02:00
Yves Dubromelle
c43adc80cb utilisation des profils pour modifier les flags :) 2017-05-30 23:21:33 +02:00
80 changed files with 252 additions and 275 deletions

View File

@@ -29,6 +29,9 @@ rebuild-build:
rebuild-switch:
$(TIME) time nixos-rebuild switch --fallback --show-trace
show-diff-with-current:
-diff /run/current-system/configuration.nix /etc/nixos/configuration.nix
show-roots:
nix-store --gc --print-roots

View File

@@ -1,7 +1,6 @@
# nixos-template-base
Versions de NixOS supportées :
* NixOS 16.09
* NixOS unstable
Ce dépôt stocke une configuration générique des machines.
@@ -9,6 +8,9 @@ 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.
# Liens
* http://howoldis.herokuapp.com/ pour savoir de quand datent les différentes releases de NixOS
# Notes de mise-à-jour
## pour l'utilisation de l'annuaire (2017-04-28)
@@ -16,9 +18,10 @@ Actuellement, les scripts contiennent un peu de configuration spécifique pour l
* 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`
* vérifier que `configuration.nix` contient `services.xserver.enable = true;` pour les machines avec interface graphique
* vérifier que `configuration.nix` contient le nom de la machine `networking.hostName = "<X>";`
* tester la configuration : `nixos-rebuild build`
* corriger et ajouter les éléments manquant (notamment dans `private/annuaire.nix` )
* vérifier que `configuration.nix` contient `services.xserver.enable = true;` pour les machines avec interface graphique
* 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)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,9 +4,9 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
mkIf (flags.internetSuite && flags.graphical) {
# Paquets
@@ -20,7 +20,6 @@ environment.systemPackages = with pkgs; [
## Mail & Discussion (texte, audio)
clawsMail
hexchat
quassel
quasselClient
mumble
pidgin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,18 +4,13 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO ranger le spécifique pulseaudio
mkIf (flags.multimediaSuite && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
## Audio
paprefs # préferences pulseaudio
pavucontrol # mixer pulseaudio
## Video
smplayer # lecteur vidéo
vlc # lecteur vidéo

View File

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

View File

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

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {
@@ -12,7 +12,9 @@ mkIf true {
# Paquets
environment.systemPackages = with pkgs; [
# Adminsys
bind # utilisé pour les utilitaires comme dig
cowsay # pour ansible & 4lulz
dhcp # client dhcp
iotop
lm_sensors
lshw
@@ -27,6 +29,7 @@ mkIf true {
# Backup
duplicity # création de sauvegarde chiffrées (GPG)
par2cmdline # outil de récupération de fichiers corrompus - .par2
# Compression
lz4
@@ -47,7 +50,7 @@ mkIf true {
## Exploitation FS
inotify-tools # être notifié lorsque le contenu d'un répertoire change
detox # The detox utility renames files to make them easier to work with.
detox # The detox utility renames files to make them easier to work with.
duff # outil de recherche de fichiers en doublons
rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
];

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,9 +4,9 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
mkIf flags.internetSuite {
# Paquets
@@ -15,13 +15,16 @@ environment.systemPackages = with pkgs; [
## Réseaux sociaux
#python27Packages.turses # client twitter en ncurse
python27Packages.rainbowstream # client twitter en console
rtv # client reddit en console
#python27Packages.rainbowstream # client twitter en console
#rtv # client reddit en console
## Mail & Discussion (texte, audio)
mutt
## Sauvegarde nuagique (cloud storage)
rclone
#rclone
## P2P
rtorrent # outil de téléchargement de torrent & magnet
];
}

View File

@@ -4,34 +4,27 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf true {
# Paquets
environment.systemPackages = with pkgs; [
bind # utilisé pour les utilitaires comme dig
byobu # permet de se déconnecter d'un terminal sans l'aréter
dhcp # client dhcp
git gitAndTools.gitSVN gitAndTools.tig gti # outil de gestion de version
byobu # permet de se déconnecter d'un terminal sans l'arréter
git gitAndTools.tig gti # outil de gestion de version
gnumake # pour décrire les recettes de compilation
gnupg # GPG
gpm # prise en charge de la souris en console
htop # monitoring
lsb-release # pour les scripts qui utilisent cet outil
lsb-release # pour les scripts qui utilisent cet outil (dont byobu)
#libressl # librairie pour faire du TLS et les algorithmes de crypto par OpenBSD
ncdu # outil pour voir l'espace utilisé
par2cmdline # outil de récupération de fichiers corrompus - .par2
p7zip # compression de fichier
parted # partitionnement de disque
pciutils
pinentry # pour taper les mots de passe gpg
psmisc # fournis les utilitaires comme killall, fuser, pstree
python # python -- python -m SimpleHTTPServer 8000
#python34Packages.glances # monitoring
pwgen # générateur de mot de passe
rtorrent # TODO outil de téléchargement de torrent & magnet
#python # python -- python -m SimpleHTTPServer 8000
shared_mime_info # MIME info
tmux # nécessaire pour byobu
tree # affiche une arborescence de fichiers et dossiers

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,26 +4,33 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement {
# Paquets
environment.systemPackages = with pkgs; [
# Base de données
pg_top # monitoring de PostgreSQL
sqlite # le moteur de base de données
# C / C++
gcc # pour les appels depuis les scripts
gcc # pour les appels depuis les scripts
# Gestion des sources
cloc # outil pour compter les lignes de code source
git # déjà présent dans "base"
cloc # outil pour compter les lignes de code source
git gitAndTools.gitSVN # git et git-svn
mercurial
subversion
# spécification
plantuml # diagrammes UML et plus si affinité
# Mono
#mono46 # interpréteur .NET
#mono46 # interpréteur .NET
## Visualisation & outils de diff
#vbindiff # diff de fichier hexadecimaux avec vim
#vbindiff # diff de fichier hexadecimaux avec vim
];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -8,26 +8,19 @@ let
host = config.networking.hostName;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{
# TODO camel case partout
# TODO everything in english
# TODO sortir ce qui est privé
# TODO portage du système d'annuaire de machines de capgemini
###### interface
options = {
#* Utilisé pour avoir des raccourcis de machine
r6d.computers = {
isLatitude = mkEnableOption "Identification du nom de machine.";
isMonstre = mkEnableOption "Identification du nom de machine.";
isNeoNomade = mkEnableOption "Identification du nom de machine.";
isNomade = mkEnableOption "Identification du nom de machine.";
isPedro = mkEnableOption "Identification du nom de machine.";
isPhenom = mkEnableOption "Identification du nom de machine.";
isRollo = mkEnableOption "Identification du nom de machine.";
};
};
@@ -37,18 +30,6 @@ in
config = mkMerge
[
## Définition des profils génériques
(mkIf (pfl.isServer && !comp.isMonstre) {
r6d.config-generator = {
#database_postgres = true;
dns_autorite = true;
#dns_resolveur = true;
# inutile d'exposer la conf complète du serveur par le store tant qu'il n'y a pas de protection complémentaire - utilisation SSH ?
#nix-serve-server = true;
smokeping = true;
#rabbitmq = true;
};
})
# /!\ PAS un serveur
(mkIf (!pfl.isServer || comp.isMonstre) {
r6d.config-generator = {
@@ -56,72 +37,11 @@ in
};
})
## Profils liés à Dubronetwork
(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;
};
})
## Affectation des profils aux machines
(mkIf comp.isLatitude {
networking.hostName = "latitude.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = true;
isWorkstation = true;
};
r6d.config-generator = {
jetbrains-licensed = true;
laptop = true;
nix-serve-client = true;
nix-serve-server = true;
tincAddress = "192.168.12.2/24";
tincExtraConfig = ''
ConnectTo = monstre_dubronetwork_fr
ConnectTo = rollo_dubronetwork_fr
ConnectTo = hydra_prunetwork_fr
ConnectTo = ocean_prunetwork_fr
'';
};
})
(mkIf comp.isNeoNomade{
networking.hostName = "neo-nomade.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = true;
isDesktopEnvironment = true;
};
r6d.config-generator = {
laptop = true;
graphical = true;
scanner = true;
tincAddress = "192.168.12.7/24";
tincExtraConfig = ''
ConnectTo = monstre_dubronetwork_fr
ConnectTo = rollo_dubronetwork_fr
ConnectTo = hydra_prunetwork_fr
ConnectTo = ocean_prunetwork_fr
'';
};
})
# Dubro Vivo - St Malo
#tincAddress = "192.168.12.8/24";
(mkIf comp.isNomade{
networking.hostName = "nomade.dubronetwork.fr"; # Define your hostname.
r6d.profiles.isDubronetwork = true;
@@ -130,60 +50,5 @@ in
laptop = true;
};
})
(mkIf comp.isPedro {
r6d.profiles = {
isDubronetwork = true;
isServer = true;
};
r6d.config-generator = {
fail2ban = true;
};
})
(mkIf comp.isPhenom {
networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = true;
isWorkstation = true;
};
r6d.config-generator = {
jetbrains-licensed = true;
#hydra-core = true;
nix-serve-client = true;
nix-serve-server = true;
edition-photo = true;
tincAddress = "192.168.12.1/24";
tincExtraConfig = ''
ConnectTo = monstre_dubronetwork_fr
ConnectTo = rollo_dubronetwork_fr
ConnectTo = hydra_prunetwork_fr
ConnectTo = ocean_prunetwork_fr
'';
};
})
(mkIf comp.isRollo {
networking.hostName = "rollo.dubronetwork.fr"; # Define your hostname.
r6d.profiles = {
isDubronetwork = true;
isServer = true;
};
r6d.config-generator = {
dovecot = true;
fail2ban = true;
mailboxes = true;
murmur = true;
nix-serve-client = true;
nix-serve-server = true;
tincAddress = "192.168.12.5/24";
tincExtraConfig = ''
ConnectTo = hydra_prunetwork_fr
ConnectTo = ocean_prunetwork_fr
'';
virtualbox = true;
znc = true;
};
})
];
}

View File

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

View File

@@ -4,7 +4,7 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: rc.lua par défaut (système)
@@ -19,5 +19,7 @@ mkIf flags.awesome {
# beautiful.init(config.dir .. "/share/awesome//themes/zenburn/theme.lua")
#
AWESOME_CONFIG_DIR = "${pkgs.awesome}";
};
};
environment.etc."xdg/awesome/rc.lua".text = builtins.readFile ./../public/config-awesome-4-rc.lua;
}

View File

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

View File

@@ -4,10 +4,9 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
# TODO: ménage
{
# Nombre de process d'installation en parrallèle effectués par Nix
nix.buildCores = 0;
@@ -21,9 +20,6 @@ in
# On autorise les paquets non-libres
nixpkgs.config.allowUnfree = true;
# Lancement de dbus pour les utilisateurs
services.dbus.socketActivated = true;
# NixOS Hardening
#security.grsecurity.enable = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

32
lib.nix
View File

@@ -5,26 +5,46 @@ let
isDesktopEnvironment = {
awesome = true;
internetSuite = true;
graphical = true;
multimediaSuite = true;
officeSuite = true;
pulseaudio = true;
securitySuite = true;
};
isWorkstation = {
graphical = true;
docker = true;
developpement = true;
developpement-elm = true;
developpement-haskell = true;
developpement-java = true;
developpement-rust = true;
};
isServer = {
};
#isServer = {
#};
};
in
rec {
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:
machineOptions;
#lib.recursiveUpdate {} machineOptions;
{ configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
configurationOptions = machineOptions.configurationOptions;
profiles = machineOptions.profiles;
};
# Generate a set of configuration flags based on profiles
generateFlagsSet = customProfiles: machineProfiles:
let
allProfiles = recursiveUpdate profiles customProfiles;
conditionalFlags = name: value:
if machineProfiles.${name}
then value
else {};
in
foldr (a: b: a // b) {} (mapAttrsToList conditionalFlags allProfiles);
}

View File

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

View File

@@ -6,7 +6,7 @@ let
machineOptions = types.submodule {
options = {
configuration-flags = {
configurationFlags = {
#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.";
@@ -40,6 +40,7 @@ let
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)";
nixos-manual = mkEnableOption "Profil pour activer la documentation nixos en local sur un TTY";
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
officeSuite = mkEnableOption "Profil pour la suite bureautique";
@@ -57,15 +58,7 @@ let
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.";
};
configurationOptions = {
ipAddress = mkOption {
description = "Adresse IP";
@@ -128,11 +121,26 @@ let
};
};
};
profiles = {
# Domaine
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
isDubronetworkServer = mkEnableOption "Pour distinguer les machines dubronetwork avec Server.";
isDubronetworkWorkstation = mkEnableOption "Pour distinguer les machines dubronetwork avec Workstation.";
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
isPrunetworkServer = mkEnableOption "Pour distinguer les machines prunetwork avec Server.";
isPrunetworkWorkstation = mkEnableOption "Pour distinguer les machines prunetwork avec Workstation.";
# Utilisation machine
isDesktopEnvironment = mkEnableOption "Pour indiquer une machine avec interface graphique.";
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
};
};
};
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
{
@@ -151,10 +159,15 @@ in
*/
assertions = [
{
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.profiles.isDesktopEnvironment == true))
|| (!currentMachine.profiles.isWorkstation);
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.configurationFlags.graphical == true))
|| (!currentMachine.profiles.isWorkstation);
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))
|| (!currentMachine.profiles.isDesktopEnvironment);

13
services/dbus.nix Normal file
View File

@@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configurationFlags;
in
mkIf true {
# Lancement de dbus pour les utilisateurs
services.dbus.socketActivated = true;
}

View File

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

View File

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

View File

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

14
services/gpm.nix Normal file
View File

@@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configurationFlags;
in
mkIf true {
# prise en charge de la souris en console
services.gpm.enable = true;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

View File

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

View File

@@ -4,11 +4,17 @@ let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
flags = currentMachine.configuration-flags;
flags = currentMachine.configurationFlags;
in
mkIf flags.pulseaudio {
# Paquets
environment.systemPackages = with pkgs; [
paprefs # préferences pulseaudio
pavucontrol # mixer pulseaudio
];
# Pulse Audio
hardware.pulseaudio = {
enable = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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