Compare commits
28 Commits
2017-05-28
...
2017-08-19
| Author | SHA1 | Date | |
|---|---|---|---|
| b1a19b811d | |||
| dfe2bde371 | |||
| b8106deb18 | |||
| cc2f1c33af | |||
| 19bd8fbfbc | |||
|
|
630217ce02 | ||
|
|
dcdaf91f8b | ||
|
|
5803fdbbff | ||
|
|
dcae05d4c0 | ||
|
|
196cc008c8 | ||
|
|
fcc1cba9fb | ||
| f8a687be52 | |||
| 28fc448e0c | |||
|
|
195f5e35a1 | ||
| ad0799f08d | |||
|
|
4dbcc8ddc0 | ||
|
|
3a5ae68f3a | ||
| 772cab2253 | |||
| 92bf72c7bf | |||
| 60f466a887 | |||
| eca3d77610 | |||
| 78ece5641d | |||
| cc851a7946 | |||
| aa22c6337d | |||
| acacc94903 | |||
| 1f480bbbff | |||
|
|
ac91ce4492 | ||
|
|
c43adc80cb |
4
Makefile
4
Makefile
@@ -15,6 +15,7 @@ clean-total:
|
|||||||
$(TIME) nix-collect-garbage -d
|
$(TIME) nix-collect-garbage -d
|
||||||
|
|
||||||
clean-log:
|
clean-log:
|
||||||
|
journalctl --flush --rotate
|
||||||
journalctl --vacuum-size=1G
|
journalctl --vacuum-size=1G
|
||||||
|
|
||||||
full-auto: submodules-update upgrade clean optimise
|
full-auto: submodules-update upgrade clean optimise
|
||||||
@@ -29,6 +30,9 @@ rebuild-build:
|
|||||||
rebuild-switch:
|
rebuild-switch:
|
||||||
$(TIME) time nixos-rebuild switch --fallback --show-trace
|
$(TIME) time nixos-rebuild switch --fallback --show-trace
|
||||||
|
|
||||||
|
show-diff-with-current:
|
||||||
|
-diff /run/current-system/configuration.nix /etc/nixos/configuration.nix
|
||||||
|
|
||||||
show-roots:
|
show-roots:
|
||||||
nix-store --gc --print-roots
|
nix-store --gc --print-roots
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -1,24 +1,29 @@
|
|||||||
# nixos-template-base
|
# nixos-template-base
|
||||||
|
|
||||||
Versions de NixOS supportées :
|
Versions de NixOS supportées :
|
||||||
* NixOS 16.09
|
|
||||||
* NixOS unstable
|
* NixOS unstable
|
||||||
|
|
||||||
Ce dépôt stocke une configuration générique des machines.
|
Ce dépôt stocke une configuration générique des machines.
|
||||||
Une recette dite "config-generator" adapte la configuration selon le nom de la machine (FQDN).
|
|
||||||
|
|
||||||
Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.
|
~~Une recette dite "config-generator" adapte la configuration selon le nom de la machine (FQDN).~~
|
||||||
|
|
||||||
|
~~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
|
||||||
|
* https://repology.org/repository/nix_unstable/problems pour lister les paquets avec problèmes
|
||||||
|
|
||||||
# Notes de mise-à-jour
|
# Notes de mise-à-jour
|
||||||
|
|
||||||
## pour l'utilisation de l'annuaire (2017-04-28)
|
## pour l'utilisation de l'annuaire (à partir de 2017-04-28)
|
||||||
|
|
||||||
* faire les mises à jour de l'OS
|
* 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`
|
* 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`
|
* 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`
|
* tester la configuration : `nixos-rebuild build`
|
||||||
* corriger et ajouter les éléments manquant (notamment dans `private/annuaire.nix` )
|
* 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 :
|
* lorsque tout semble bon, vérifier :
|
||||||
* qu'il y a toujours des utilisateurs dans la configuration
|
* 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)
|
* que le moyen d'accéder à la machine n'a pas été supprimé (surtout les machines distantes)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.graphical {
|
mkIf flags.graphical {
|
||||||
@@ -14,5 +14,8 @@ mkIf flags.graphical {
|
|||||||
# Gestion de FS
|
# Gestion de FS
|
||||||
gparted # Gestion graphique de partitions
|
gparted # Gestion graphique de partitions
|
||||||
unetbootin # création de clefs USB bootables
|
unetbootin # création de clefs USB bootables
|
||||||
|
|
||||||
|
# visualisation de log
|
||||||
|
#logstalgia
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf currentMachine.profiles.isDesktopEnvironment {
|
mkIf currentMachine.profiles.isDesktopEnvironment {
|
||||||
@@ -24,12 +24,14 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
|
|||||||
gnome3.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM
|
gnome3.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM
|
||||||
|
|
||||||
## Manipulation de fichier
|
## Manipulation de fichier
|
||||||
pcmanfm # gestionnaire de fichiers graphique
|
#kde5.dolphin # gestionnaire de fichiers graphique
|
||||||
spaceFM # gestionnaire de fichiers graphique
|
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
|
||||||
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
pcmanfm # gestionnaire de fichiers graphique
|
||||||
|
spaceFM # gestionnaire de fichiers graphique
|
||||||
|
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
sakura # terminal
|
sakura # terminal
|
||||||
];
|
];
|
||||||
|
|
||||||
# Polices supplémentaires
|
# Polices supplémentaires
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.officeSuite && flags.graphical) {
|
mkIf (flags.officeSuite && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.conception-assistee && flags.graphical) {
|
mkIf (flags.conception-assistee && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.cartographie && flags.graphical) {
|
mkIf (flags.cartographie && flags.graphical) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
# TODO: ménage
|
|
||||||
mkIf (flags.internetSuite && flags.graphical) {
|
mkIf (flags.internetSuite && flags.graphical) {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
@@ -20,7 +20,6 @@ environment.systemPackages = with pkgs; [
|
|||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
clawsMail
|
clawsMail
|
||||||
hexchat
|
hexchat
|
||||||
quassel
|
|
||||||
quasselClient
|
quasselClient
|
||||||
mumble
|
mumble
|
||||||
pidgin
|
pidgin
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (true && flags.graphical) {
|
mkIf (true && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
#inherit (lib) mkIf mkMerge mkThenElse;
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.developpement-elm && flags.graphical) {
|
mkIf (flags.developpement-elm && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.developpement-haskell && flags.graphical) {
|
mkIf (flags.developpement-haskell && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.developpement-java && flags.graphical) {
|
mkIf (flags.developpement-java && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.jetbrains-licensed && flags.graphical) {
|
mkIf (flags.jetbrains-licensed && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.developpement-rust && flags.graphical) {
|
mkIf (flags.developpement-rust && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.developpement && flags.graphical) {
|
mkIf (flags.developpement && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.edition-musique && flags.graphical) {
|
mkIf (flags.edition-musique && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.edition-photo && flags.graphical) {
|
mkIf (flags.edition-photo && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.edition-video && flags.graphical) {
|
mkIf (flags.edition-video && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.jeux && flags.graphical) {
|
mkIf (flags.jeux && flags.graphical) {
|
||||||
|
|||||||
@@ -4,18 +4,13 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
# TODO ranger le spécifique pulseaudio
|
|
||||||
mkIf (flags.multimediaSuite && flags.graphical) {
|
mkIf (flags.multimediaSuite && flags.graphical) {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
## Audio
|
|
||||||
paprefs # préferences pulseaudio
|
|
||||||
pavucontrol # mixer pulseaudio
|
|
||||||
|
|
||||||
## Video
|
## Video
|
||||||
smplayer # lecteur vidéo
|
smplayer # lecteur vidéo
|
||||||
vlc # lecteur vidéo
|
vlc # lecteur vidéo
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (true && flags.graphical) {
|
mkIf (true && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (flags.securitySuite && flags.graphical) {
|
mkIf (flags.securitySuite && flags.graphical) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
@@ -12,7 +12,9 @@ mkIf true {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Adminsys
|
# Adminsys
|
||||||
|
bind # utilisé pour les utilitaires comme dig
|
||||||
cowsay # pour ansible & 4lulz
|
cowsay # pour ansible & 4lulz
|
||||||
|
dhcp # client dhcp
|
||||||
iotop
|
iotop
|
||||||
lm_sensors
|
lm_sensors
|
||||||
lshw
|
lshw
|
||||||
@@ -27,6 +29,7 @@ mkIf true {
|
|||||||
|
|
||||||
# Backup
|
# Backup
|
||||||
duplicity # création de sauvegarde chiffrées (GPG)
|
duplicity # création de sauvegarde chiffrées (GPG)
|
||||||
|
par2cmdline # outil de récupération de fichiers corrompus - .par2
|
||||||
|
|
||||||
# Compression
|
# Compression
|
||||||
lz4
|
lz4
|
||||||
@@ -47,7 +50,7 @@ mkIf true {
|
|||||||
|
|
||||||
## Exploitation FS
|
## Exploitation FS
|
||||||
inotify-tools # être notifié lorsque le contenu d'un répertoire change
|
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
|
duff # outil de recherche de fichiers en doublons
|
||||||
rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
|
rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.officeSuite {
|
mkIf flags.officeSuite {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.conception-assistee {
|
mkIf flags.conception-assistee {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.cartographie {
|
mkIf flags.cartographie {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
# TODO: ménage
|
|
||||||
mkIf flags.internetSuite {
|
mkIf flags.internetSuite {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
@@ -15,13 +15,16 @@ environment.systemPackages = with pkgs; [
|
|||||||
|
|
||||||
## Réseaux sociaux
|
## Réseaux sociaux
|
||||||
#python27Packages.turses # client twitter en ncurse
|
#python27Packages.turses # client twitter en ncurse
|
||||||
python27Packages.rainbowstream # client twitter en console
|
#python27Packages.rainbowstream # client twitter en console
|
||||||
rtv # client reddit en console
|
#rtv # client reddit en console
|
||||||
|
|
||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
mutt
|
mutt
|
||||||
|
|
||||||
## Sauvegarde nuagique (cloud storage)
|
## Sauvegarde nuagique (cloud storage)
|
||||||
rclone
|
#rclone
|
||||||
|
|
||||||
|
## P2P
|
||||||
|
rtorrent # outil de téléchargement de torrent & magnet
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,34 +4,27 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
bind # utilisé pour les utilitaires comme dig
|
byobu # permet de se déconnecter d'un terminal sans l'arréter
|
||||||
byobu # permet de se déconnecter d'un terminal sans l'aréter
|
git gitAndTools.tig gti # outil de gestion de version
|
||||||
dhcp # client dhcp
|
|
||||||
git gitAndTools.gitSVN gitAndTools.tig gti # outil de gestion de version
|
|
||||||
gnumake # pour décrire les recettes de compilation
|
gnumake # pour décrire les recettes de compilation
|
||||||
gnupg # GPG
|
gnupg # GPG
|
||||||
gpm # prise en charge de la souris en console
|
|
||||||
htop # monitoring
|
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
|
#libressl # librairie pour faire du TLS et les algorithmes de crypto par OpenBSD
|
||||||
ncdu # outil pour voir l'espace utilisé
|
ncdu # outil pour voir l'espace utilisé
|
||||||
par2cmdline # outil de récupération de fichiers corrompus - .par2
|
|
||||||
p7zip # compression de fichier
|
p7zip # compression de fichier
|
||||||
parted # partitionnement de disque
|
parted # partitionnement de disque
|
||||||
pciutils
|
pciutils
|
||||||
pinentry # pour taper les mots de passe gpg
|
pinentry # pour taper les mots de passe gpg
|
||||||
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
||||||
python # python -- python -m SimpleHTTPServer 8000
|
#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
|
|
||||||
shared_mime_info # MIME info
|
shared_mime_info # MIME info
|
||||||
tmux # nécessaire pour byobu
|
tmux # nécessaire pour byobu
|
||||||
tree # affiche une arborescence de fichiers et dossiers
|
tree # affiche une arborescence de fichiers et dossiers
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
#inherit (lib) mkIf mkMerge mkThenElse;
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-elm {
|
mkIf flags.developpement-elm {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-haskell {
|
mkIf flags.developpement-haskell {
|
||||||
@@ -18,17 +18,17 @@ mkIf flags.developpement-haskell {
|
|||||||
stack # pour les paquets en LTS de stackage
|
stack # pour les paquets en LTS de stackage
|
||||||
] ++ (with pkgs.haskellPackages; [
|
] ++ (with pkgs.haskellPackages; [
|
||||||
# Haskell lib
|
# Haskell lib
|
||||||
autoproc # ? procmail
|
autoproc # ? procmail
|
||||||
darcs # Gestionnaire de version éponyme
|
darcs # gestionnaire de version éponyme
|
||||||
ghc-mod
|
ghc-mod # outil d'analyse de code haskell utilisé par IDE
|
||||||
hindent # indentation code
|
hindent # indentation code
|
||||||
hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques
|
hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques
|
||||||
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
|
postgrest # mapper HTTP <-> PostgreSQL
|
||||||
#postgrest # mapper HTTP <-> PostgreSQL
|
stylish-haskell # qualité de code
|
||||||
stylish-haskell # qualité de code
|
turtle # genre shell-scripting
|
||||||
turtle # genre shell-scripting
|
|
||||||
|
|
||||||
# Application perso
|
# Application perso
|
||||||
hahp
|
hahp
|
||||||
|
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-java {
|
mkIf flags.developpement-java {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.jetbrains-licensed {
|
mkIf flags.jetbrains-licensed {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-rust {
|
mkIf flags.developpement-rust {
|
||||||
|
|||||||
@@ -4,26 +4,33 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement {
|
mkIf flags.developpement {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Base de données
|
||||||
|
pg_top # monitoring de PostgreSQL
|
||||||
|
sqlite # le moteur de base de données
|
||||||
|
|
||||||
# C / C++
|
# C / C++
|
||||||
gcc # pour les appels depuis les scripts
|
gcc # pour les appels depuis les scripts
|
||||||
|
|
||||||
# Gestion des sources
|
# Gestion des sources
|
||||||
cloc # outil pour compter les lignes de code source
|
cloc # outil pour compter les lignes de code source
|
||||||
git # déjà présent dans "base"
|
git gitAndTools.gitSVN # git et git-svn
|
||||||
mercurial
|
mercurial
|
||||||
subversion
|
subversion
|
||||||
|
|
||||||
|
# spécification
|
||||||
|
plantuml # diagrammes UML et plus si affinité
|
||||||
|
|
||||||
# Mono
|
# Mono
|
||||||
#mono46 # interpréteur .NET
|
#mono46 # interpréteur .NET
|
||||||
|
|
||||||
## Visualisation & outils de diff
|
## Visualisation & outils de diff
|
||||||
#vbindiff # diff de fichier hexadecimaux avec vim
|
#vbindiff # diff de fichier hexadecimaux avec vim
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.edition-musique {
|
mkIf flags.edition-musique {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.edition-photo {
|
mkIf flags.edition-photo {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.edition-video {
|
mkIf flags.edition-video {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.jeux {
|
mkIf flags.jeux {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.multimediaSuite {
|
mkIf flags.multimediaSuite {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.securitySuite {
|
mkIf flags.securitySuite {
|
||||||
|
|||||||
@@ -8,26 +8,19 @@ let
|
|||||||
host = config.networking.hostName;
|
host = config.networking.hostName;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
# TODO camel case partout
|
# TODO camel case partout
|
||||||
# TODO everything in english
|
# TODO everything in english
|
||||||
# TODO sortir ce qui est privé
|
# TODO sortir ce qui est privé
|
||||||
# TODO portage du système d'annuaire de machines de capgemini
|
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
#* Utilisé pour avoir des raccourcis de machine
|
#* Utilisé pour avoir des raccourcis de machine
|
||||||
r6d.computers = {
|
r6d.computers = {
|
||||||
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.";
|
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
|
config = mkMerge
|
||||||
[
|
[
|
||||||
## Définition des profils génériques
|
## 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
|
# /!\ PAS un serveur
|
||||||
(mkIf (!pfl.isServer || comp.isMonstre) {
|
(mkIf (!pfl.isServer || comp.isMonstre) {
|
||||||
r6d.config-generator = {
|
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
|
## 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
|
# Dubro Vivo - St Malo
|
||||||
#tincAddress = "192.168.12.8/24";
|
#tincAddress = "192.168.12.8/24";
|
||||||
|
|
||||||
(mkIf comp.isNomade{
|
(mkIf comp.isNomade{
|
||||||
networking.hostName = "nomade.dubronetwork.fr"; # Define your hostname.
|
networking.hostName = "nomade.dubronetwork.fr"; # Define your hostname.
|
||||||
r6d.profiles.isDubronetwork = true;
|
r6d.profiles.isDubronetwork = true;
|
||||||
@@ -130,60 +50,5 @@ in
|
|||||||
laptop = true;
|
laptop = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf comp.isPedro {
|
|
||||||
r6d.profiles = {
|
|
||||||
isDubronetwork = true;
|
|
||||||
isServer = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
r6d.config-generator = {
|
|
||||||
fail2ban = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(mkIf comp.isPhenom {
|
|
||||||
networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname.
|
|
||||||
r6d.profiles = {
|
|
||||||
isDubronetwork = true;
|
|
||||||
isWorkstation = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
r6d.config-generator = {
|
|
||||||
jetbrains-licensed = true;
|
|
||||||
#hydra-core = true;
|
|
||||||
nix-serve-client = true;
|
|
||||||
nix-serve-server = true;
|
|
||||||
edition-photo = true;
|
|
||||||
tincAddress = "192.168.12.1/24";
|
|
||||||
tincExtraConfig = ''
|
|
||||||
ConnectTo = monstre_dubronetwork_fr
|
|
||||||
ConnectTo = rollo_dubronetwork_fr
|
|
||||||
ConnectTo = hydra_prunetwork_fr
|
|
||||||
ConnectTo = ocean_prunetwork_fr
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(mkIf comp.isRollo {
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.auto-upgrade {
|
mkIf flags.auto-upgrade {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
# TODO: rc.lua par défaut (système)
|
# TODO: rc.lua par défaut (système)
|
||||||
@@ -19,5 +19,7 @@ mkIf flags.awesome {
|
|||||||
# beautiful.init(config.dir .. "/share/awesome//themes/zenburn/theme.lua")
|
# beautiful.init(config.dir .. "/share/awesome//themes/zenburn/theme.lua")
|
||||||
#
|
#
|
||||||
AWESOME_CONFIG_DIR = "${pkgs.awesome}";
|
AWESOME_CONFIG_DIR = "${pkgs.awesome}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.etc."xdg/awesome/rc.lua".text = builtins.readFile ./../public/config-awesome-4-rc.lua;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
#inherit (lib) mkIf mkMerge mkThenElse;
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
# TODO: ménage
|
|
||||||
{
|
{
|
||||||
# Nombre de process d'installation en parrallèle effectués par Nix
|
# Nombre de process d'installation en parrallèle effectués par Nix
|
||||||
nix.buildCores = 0;
|
nix.buildCores = 0;
|
||||||
@@ -21,9 +20,6 @@ in
|
|||||||
# On autorise les paquets non-libres
|
# On autorise les paquets non-libres
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Lancement de dbus pour les utilisateurs
|
|
||||||
services.dbus.socketActivated = true;
|
|
||||||
|
|
||||||
# NixOS Hardening
|
# NixOS Hardening
|
||||||
#security.grsecurity.enable = true;
|
#security.grsecurity.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
# Logs
|
# Logs
|
||||||
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||||
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
||||||
|
not-pushed = log --branches --not --remotes
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
[core]
|
[core]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.laptop {
|
mkIf flags.laptop {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
@@ -23,6 +23,7 @@ mkIf true {
|
|||||||
"net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure
|
"net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure
|
||||||
"net.ipv6.conf.default.use_tempaddr" = 2; # activé
|
"net.ipv6.conf.default.use_tempaddr" = 2; # activé
|
||||||
|
|
||||||
|
# Activation du routage
|
||||||
"net.ipv6.conf.all.forwarding" = true;
|
"net.ipv6.conf.all.forwarding" = true;
|
||||||
"net.ipv6.conf.default.forwarding" = true;
|
"net.ipv6.conf.default.forwarding" = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
@@ -16,6 +16,7 @@ mkIf true {
|
|||||||
127.0.0.1 ${config.networking.hostName}
|
127.0.0.1 ${config.networking.hostName}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Activation du routage
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.conf.all.forwarding" = true;
|
"net.ipv4.conf.all.forwarding" = true;
|
||||||
"net.ipv4.conf.default.forwarding" = true;
|
"net.ipv4.conf.default.forwarding" = true;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.swap {
|
mkIf flags.swap {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf false {
|
mkIf false {
|
||||||
|
|||||||
32
lib.nix
32
lib.nix
@@ -5,26 +5,46 @@ let
|
|||||||
isDesktopEnvironment = {
|
isDesktopEnvironment = {
|
||||||
awesome = true;
|
awesome = true;
|
||||||
internetSuite = true;
|
internetSuite = true;
|
||||||
|
graphical = true;
|
||||||
multimediaSuite = true;
|
multimediaSuite = true;
|
||||||
officeSuite = true;
|
officeSuite = true;
|
||||||
pulseaudio = true;
|
pulseaudio = true;
|
||||||
securitySuite = true;
|
securitySuite = true;
|
||||||
};
|
};
|
||||||
isWorkstation = {
|
isWorkstation = {
|
||||||
graphical = true;
|
|
||||||
docker = true;
|
docker = true;
|
||||||
|
developpement = true;
|
||||||
|
developpement-elm = true;
|
||||||
|
developpement-haskell = true;
|
||||||
|
developpement-java = true;
|
||||||
|
developpement-rust = true;
|
||||||
};
|
};
|
||||||
isServer = {
|
#isServer = {
|
||||||
};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
rec {
|
with lib; rec{
|
||||||
|
# Apply the profiles (pre-defined + custom) to the whole directory
|
||||||
applyProfilesToDirectory = customProfiles: directory:
|
applyProfilesToDirectory = customProfiles: directory:
|
||||||
lib.mapAttrs (applyProfilesToMachine customProfiles) directory;
|
lib.mapAttrs (applyProfilesToMachine customProfiles) directory;
|
||||||
|
|
||||||
|
# Apply the profiles (pre-defined + custom) to a machine
|
||||||
applyProfilesToMachine = customProfiles: machineName: machineOptions:
|
applyProfilesToMachine = customProfiles: machineName: machineOptions:
|
||||||
machineOptions;
|
{ configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
|
||||||
#lib.recursiveUpdate {} machineOptions;
|
configurationOptions = machineOptions.configurationOptions;
|
||||||
|
profiles = machineOptions.profiles;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate a set of configuration flags based on profiles
|
||||||
|
generateFlagsSet = customProfiles: machineProfiles:
|
||||||
|
let
|
||||||
|
allProfiles = recursiveUpdate profiles customProfiles;
|
||||||
|
conditionalFlags = name: value:
|
||||||
|
if machineProfiles.${name}
|
||||||
|
then value
|
||||||
|
else {};
|
||||||
|
in
|
||||||
|
foldr (a: b: a // b) {} (mapAttrsToList conditionalFlags allProfiles);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
39
options.nix
39
options.nix
@@ -6,7 +6,7 @@ let
|
|||||||
machineOptions = types.submodule {
|
machineOptions = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
configuration-flags = {
|
configurationFlags = {
|
||||||
#enable = mkEnableOption "Génération de la configuration d'une machine.";
|
#enable = mkEnableOption "Génération de la configuration d'une machine.";
|
||||||
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
|
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
|
||||||
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
||||||
@@ -40,6 +40,7 @@ let
|
|||||||
multimediaSuite = mkEnableOption "Profil pour la suite multimédia.";
|
multimediaSuite = mkEnableOption "Profil pour la suite multimédia.";
|
||||||
munin = mkEnableOption "Profil pour activer la supervision par Munin";
|
munin = mkEnableOption "Profil pour activer la supervision par Munin";
|
||||||
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
|
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
|
||||||
|
nixos-manual = mkEnableOption "Profil pour activer la documentation nixos en local sur un TTY";
|
||||||
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
||||||
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
|
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
|
||||||
officeSuite = mkEnableOption "Profil pour la suite bureautique";
|
officeSuite = mkEnableOption "Profil pour la suite bureautique";
|
||||||
@@ -57,15 +58,7 @@ let
|
|||||||
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
|
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles = {
|
configurationOptions = {
|
||||||
# Domaine
|
|
||||||
isDubronetwork = mkEnableOption "Pour distinguer les machines dubronetwork.";
|
|
||||||
isPrunetwork = mkEnableOption "Pour distinguer les machines prunetwork.";
|
|
||||||
# Utilisation machine
|
|
||||||
isDesktopEnvironment = mkEnableOption "Pour indiquer une machine avec interface graphique.";
|
|
||||||
isServer = mkEnableOption "Pour indiquer qu'il s'agit d'un serveur.";
|
|
||||||
isWorkstation = mkEnableOption "Pour indiquer que la machine sert à travailler.";
|
|
||||||
};
|
|
||||||
|
|
||||||
ipAddress = mkOption {
|
ipAddress = mkOption {
|
||||||
description = "Adresse IP";
|
description = "Adresse IP";
|
||||||
@@ -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;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -151,10 +159,15 @@ in
|
|||||||
*/
|
*/
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.profiles.isDesktopEnvironment == true))
|
assertion = (currentMachine.profiles.isWorkstation && (currentMachine.configurationFlags.graphical == true))
|
||||||
|| (!currentMachine.profiles.isWorkstation);
|
|| (!currentMachine.profiles.isWorkstation);
|
||||||
message = "A workstation requires a graphical environement.";
|
message = "A workstation requires a graphical environement.";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
assertion = (currentMachine.profiles.isDesktopEnvironment && (currentMachine.configurationFlags.graphical == true))
|
||||||
|
|| (!currentMachine.profiles.isDesktopEnvironment);
|
||||||
|
message = "A desktop station requires a graphical environement.";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
assertion = (currentMachine.profiles.isDesktopEnvironment && (config.services.xserver.enable == true))
|
assertion = (currentMachine.profiles.isDesktopEnvironment && (config.services.xserver.enable == true))
|
||||||
|| (!currentMachine.profiles.isDesktopEnvironment);
|
|| (!currentMachine.profiles.isDesktopEnvironment);
|
||||||
|
|||||||
13
services/dbus.nix
Normal file
13
services/dbus.nix
Normal 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;
|
||||||
|
}
|
||||||
@@ -4,12 +4,14 @@ let
|
|||||||
#inherit (lib) mkIf mkMerge mkThenElse;
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# installées systématiquement
|
# installées systématiquement
|
||||||
|
./dbus.nix
|
||||||
|
./gpm.nix
|
||||||
./haveged.nix
|
./haveged.nix
|
||||||
./monitoring-munin.nix
|
./monitoring-munin.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
@@ -26,6 +28,7 @@ in
|
|||||||
./kibana.nix # service de visualisation de données stockées dans elasticsearch
|
./kibana.nix # service de visualisation de données stockées dans elasticsearch
|
||||||
# TODO: réactiver locate
|
# TODO: réactiver locate
|
||||||
#./locate.nix # service locate
|
#./locate.nix # service locate
|
||||||
|
./nixos-manual.nix # documentation nixos sur TTY
|
||||||
./virtualbox.nix # activer virtualbox
|
./virtualbox.nix # activer virtualbox
|
||||||
./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad
|
./xmonad/xmonad.nix # pour le gestionaire de fenêtre xmonad
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.docker {
|
mkIf flags.docker {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.elasticsearch {
|
mkIf flags.elasticsearch {
|
||||||
|
|||||||
14
services/gpm.nix
Normal file
14
services/gpm.nix
Normal 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;
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-haskell {
|
mkIf flags.developpement-haskell {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
# TODO: ménage
|
# TODO: ménage
|
||||||
mkIf flags.hydra-builder {
|
mkIf flags.hydra-builder {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
|
|
||||||
|
|
||||||
#### https://github.com/NixOS/hydra/issues/413
|
#### https://github.com/NixOS/hydra/issues/413
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.kibana {
|
mkIf flags.kibana {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.locate {
|
mkIf flags.locate {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
# TODO: changer adresse mail
|
# TODO: changer adresse mail
|
||||||
|
|||||||
33
services/nixos-manual.nix
Normal file
33
services/nixos-manual.nix
Normal 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 = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.print {
|
mkIf flags.print {
|
||||||
|
|||||||
@@ -4,11 +4,17 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.pulseaudio {
|
mkIf flags.pulseaudio {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
paprefs # préferences pulseaudio
|
||||||
|
pavucontrol # mixer pulseaudio
|
||||||
|
];
|
||||||
|
|
||||||
# Pulse Audio
|
# Pulse Audio
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.scanner {
|
mkIf flags.scanner {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.virtualbox {
|
mkIf flags.virtualbox {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.xmonad {
|
mkIf flags.xmonad {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
Reference in New Issue
Block a user