Compare commits
48 Commits
2017-05-21
...
2017-11-11
| Author | SHA1 | Date | |
|---|---|---|---|
| 99eac99e81 | |||
| 7ca303303c | |||
| 5453b6bdcd | |||
| b26bc099c8 | |||
| 29b388ee95 | |||
| 10937423fc | |||
|
|
38cf4631dd | ||
|
|
88fa40fde3 | ||
|
|
99b3b11bd2 | ||
| eabecd5b69 | |||
| 73b9eab551 | |||
| 7329e54d04 | |||
| fc18c2a6c5 | |||
| 1458c750f3 | |||
| 0b6968338f | |||
| dc24c48cfd | |||
| 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 | ||
|
|
745d2cd171 | ||
|
|
259a1a0aa6 | ||
|
|
854eed9227 | ||
| 8ee09217cb |
7
Makefile
7
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
|
||||||
@@ -23,9 +24,15 @@ full-auto: submodules-update upgrade clean optimise
|
|||||||
optimise:
|
optimise:
|
||||||
$(TIME) nix-store --optimise
|
$(TIME) nix-store --optimise
|
||||||
|
|
||||||
|
rebuild-build:
|
||||||
|
$(TIME) time nixos-rebuild build --fallback --show-trace
|
||||||
|
|
||||||
rebuild-switch:
|
rebuild-switch:
|
||||||
$(TIME) time nixos-rebuild switch --fallback --show-trace
|
$(TIME) time nixos-rebuild switch --fallback --show-trace
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|||||||
51
README.md
51
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)
|
||||||
@@ -107,13 +112,13 @@ Pour résoudre les soucis d'upgrade, il est conseillé :
|
|||||||
* se connecter à la machine
|
* se connecter à la machine
|
||||||
* passer en root
|
* passer en root
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
sudo su -
|
sudo su -
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* formater les partitions
|
* formater les partitions
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
mkfs.ext4 -L nixos /dev/sda1
|
mkfs.ext4 -L nixos /dev/sda1
|
||||||
swapoff -a
|
swapoff -a
|
||||||
mkswap /dev/sda2
|
mkswap /dev/sda2
|
||||||
@@ -122,24 +127,28 @@ swapon -a
|
|||||||
|
|
||||||
* monter les partitions dans /mnt
|
* monter les partitions dans /mnt
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
mount /dev/sda1 /mnt/
|
mount /dev/sda1 /mnt/
|
||||||
mkdir /mnt/etc/
|
mkdir /mnt/etc/
|
||||||
|
mkdir /mnt/etc/nixos
|
||||||
mkdir /etc/nixos
|
mkdir /etc/nixos
|
||||||
mkdir /mnt/nix
|
mkdir /mnt/nix
|
||||||
|
mkdir /nix
|
||||||
mount --bind /mnt/nix/ /nix
|
mount --bind /mnt/nix/ /nix
|
||||||
|
mkdir /mnt/tmp
|
||||||
|
mount --bind /mnt/tmp /tmp
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
* installer les paquets nécessaires
|
* installer les paquets nécessaires
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
apt-get install bzip2 git byobu htop glances
|
apt-get install bzip2 git byobu htop glances
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* création d'utilisateur (n'importe quil mot de passe)
|
* création d'utilisateur (n'importe quil mot de passe)
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
adduser nix
|
adduser nix
|
||||||
groupadd -r nixbld
|
groupadd -r nixbld
|
||||||
for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" nixbld$n; done
|
for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" nixbld$n; done
|
||||||
@@ -147,14 +156,14 @@ for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld
|
|||||||
|
|
||||||
* mise-à-jour des certificats
|
* mise-à-jour des certificats
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* installer nix
|
* installer nix
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
chown -R nix /nix
|
chown -R nix /nix /tmp
|
||||||
su - nix
|
su - nix
|
||||||
bash <(curl https://nixos.org/nix/install)
|
bash <(curl https://nixos.org/nix/install)
|
||||||
exit
|
exit
|
||||||
@@ -162,22 +171,22 @@ exit
|
|||||||
|
|
||||||
* créer un profil nix pour root & un channel
|
* créer un profil nix pour root & un channel
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
. ~nix/.nix-profile/etc/profile.d/nix.sh
|
. ~nix/.nix-profile/etc/profile.d/nix.sh
|
||||||
nix-channel --remove nixpkgs
|
nix-channel --remove nixpkgs
|
||||||
nix-channel --add http://nixos.org/channels/nixos-unstable nixos
|
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
nix-channel --update
|
nix-channel --update
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* installer un editeur de texte
|
* installer un editeur de texte
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
nix-env -i vim_configurable
|
nix-env -i vim_configurable
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* installation de nixos-install
|
* installation de nixos-install
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
cat <<EOF > /root/configuration.nix
|
cat <<EOF > /root/configuration.nix
|
||||||
{ fileSystems."/" = {};
|
{ fileSystems."/" = {};
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
@@ -196,7 +205,7 @@ nix-env -i -A config.system.build.nixos-install \
|
|||||||
si la machine existe déjà, cloner le dépôt dans /mnt/etc/nixos
|
si la machine existe déjà, cloner le dépôt dans /mnt/etc/nixos
|
||||||
pour cela, créer clef ssh et l'ajouter sur la forge
|
pour cela, créer clef ssh et l'ajouter sur la forge
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
ssh-keygen -t ed25519
|
ssh-keygen -t ed25519
|
||||||
cp ~/.ssh/id_ed25519* /mnt/etc/nixos/
|
cp ~/.ssh/id_ed25519* /mnt/etc/nixos/
|
||||||
|
|
||||||
@@ -207,13 +216,13 @@ git submodule update
|
|||||||
|
|
||||||
* monter /etc/nixos vers /mnt/etc/nixos pour que la config clonée fonctionne
|
* monter /etc/nixos vers /mnt/etc/nixos pour que la config clonée fonctionne
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
mount --bind /mnt/etc/nixos/ /etc/nixos/
|
mount --bind /mnt/etc/nixos/ /etc/nixos/
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* mettre à jour la configuration matérielle
|
* mettre à jour la configuration matérielle
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
export NIX_PATH=nixpkgs=/root/.nix-defexpr/channels/nixos:nixos=/root/.nix-defexpr/channels/nixos/nixos
|
export NIX_PATH=nixpkgs=/root/.nix-defexpr/channels/nixos:nixos=/root/.nix-defexpr/channels/nixos/nixos
|
||||||
nixos-generate-config --root /mnt
|
nixos-generate-config --root /mnt
|
||||||
~~~
|
~~~
|
||||||
@@ -224,7 +233,7 @@ notamment le périphérique utilisé par grub
|
|||||||
|
|
||||||
* installer le système sur le disque
|
* installer le système sur le disque
|
||||||
|
|
||||||
~~~
|
~~~bash
|
||||||
unset NIXOS_CONFIG
|
unset NIXOS_CONFIG
|
||||||
nixos-install
|
nixos-install
|
||||||
~~~
|
~~~
|
||||||
|
|||||||
@@ -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) {
|
||||||
@@ -24,7 +24,7 @@ mkIf (flags.officeSuite && flags.graphical) {
|
|||||||
## Editeur de texte
|
## Editeur de texte
|
||||||
#lyx # surcouche WISIWIM à LaTeX
|
#lyx # surcouche WISIWIM à LaTeX
|
||||||
#focuswriter # outil pour l'écriture
|
#focuswriter # outil pour l'écriture
|
||||||
textadept # un éditeur de texte facile pour copier-coller graphique
|
#textadept # un éditeur de texte facile pour copier-coller graphique
|
||||||
#zim # outil de prise de notes, wiki de bureau
|
#zim # outil de prise de notes, wiki de bureau
|
||||||
|
|
||||||
## Visionneuse
|
## Visionneuse
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
54
applications/radio.nix
Normal file
54
applications/radio.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
annuaire = config.r6d.machines;
|
||||||
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
|
flags = currentMachine.configurationFlags;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
|
# pour que ça marche
|
||||||
|
# sudo rmmod dvb_usb_rtl28xxu
|
||||||
|
|
||||||
|
# lecture radio FM
|
||||||
|
# rtl_fm -f 96.9e6 -M wbfm -s 440000 -r 44100 - | aplay -r 44100 -f S16_LE
|
||||||
|
# rtl_fm -f 96.95e6 -M wbfm -s 441000 -r 44100 - | aplay -r 44100 -f S16_LE -t raw -c 1
|
||||||
|
# rtl_fm -f 96.95e6 -M wbfm -s 441000 -r 44100 -E deemp - |pv| aplay -r 44100 -f S16_LE -t raw -c 1
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
## TERMINAL
|
||||||
|
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
||||||
|
|
||||||
|
## GUI
|
||||||
|
#gnuradio
|
||||||
|
gnuradio-with-packages
|
||||||
|
|
||||||
|
## A Trier
|
||||||
|
gnss-sdr # Global Navigation Satellite Systems software-defined receiver
|
||||||
|
#gnuradio # Software Defined Radio (SDR) software
|
||||||
|
#gnuradio-osmosdr # Gnuradio block for OsmoSDR and rtl-sdr
|
||||||
|
gqrx # GUI
|
||||||
|
inspectrum # Tool for analysing captured signals from sdr receivers
|
||||||
|
kalibrate-rtl # Calculate local oscillator frequency offset in RTL-SDR devices
|
||||||
|
|
||||||
|
|
||||||
|
# Inutile
|
||||||
|
#hackrf # An open source SDR platform
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
gnuradio-with-packages = pkgs.gnuradio-with-packages.override {
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
gnuradio-ais
|
||||||
|
gnuradio-gsm
|
||||||
|
gnuradio-nacl
|
||||||
|
gnuradio-osmosdr
|
||||||
|
gnuradio-rds
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -20,13 +22,15 @@ mkIf true {
|
|||||||
ntp
|
ntp
|
||||||
powerline-fonts
|
powerline-fonts
|
||||||
powertop
|
powertop
|
||||||
python27Packages.ansible2
|
#python27Packages.ansible2
|
||||||
python27Packages.glances
|
python27Packages.glances
|
||||||
|
pv # afficher le débit d'un flux dd if=/dev/zero | pv | dd of=/dev/null
|
||||||
sysstat # pour la commande "iostat -x -1" de monitoring d'activité disque
|
sysstat # pour la commande "iostat -x -1" de monitoring d'activité disque
|
||||||
usbutils
|
usbutils
|
||||||
|
|
||||||
# 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 +51,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,18 @@ 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
|
servant # génération d'API REST
|
||||||
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 {
|
||||||
|
|||||||
50
lib.nix
Normal file
50
lib.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
let
|
||||||
|
lib = with import <nixpkgs> {}; pkgs.lib;
|
||||||
|
|
||||||
|
profiles = {
|
||||||
|
isDesktopEnvironment = {
|
||||||
|
awesome = true;
|
||||||
|
internetSuite = true;
|
||||||
|
graphical = true;
|
||||||
|
multimediaSuite = true;
|
||||||
|
officeSuite = true;
|
||||||
|
pulseaudio = true;
|
||||||
|
securitySuite = true;
|
||||||
|
};
|
||||||
|
isWorkstation = {
|
||||||
|
docker = true;
|
||||||
|
developpement = true;
|
||||||
|
developpement-elm = true;
|
||||||
|
developpement-haskell = true;
|
||||||
|
developpement-java = true;
|
||||||
|
developpement-rust = true;
|
||||||
|
};
|
||||||
|
#isServer = {
|
||||||
|
#};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
with lib; rec{
|
||||||
|
# Apply the profiles (pre-defined + custom) to the whole directory
|
||||||
|
applyProfilesToDirectory = customProfiles: directory:
|
||||||
|
lib.mapAttrs (applyProfilesToMachine customProfiles) directory;
|
||||||
|
|
||||||
|
# Apply the profiles (pre-defined + custom) to a machine
|
||||||
|
applyProfilesToMachine = customProfiles: machineName: machineOptions:
|
||||||
|
{ configurationFlags = lib.recursiveUpdate (generateFlagsSet customProfiles machineOptions.profiles) machineOptions.configurationFlags;
|
||||||
|
configurationOptions = machineOptions.configurationOptions;
|
||||||
|
profiles = machineOptions.profiles;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate a set of configuration flags based on profiles
|
||||||
|
generateFlagsSet = customProfiles: machineProfiles:
|
||||||
|
let
|
||||||
|
allProfiles = recursiveUpdate profiles customProfiles;
|
||||||
|
conditionalFlags = name: value:
|
||||||
|
if machineProfiles.${name}
|
||||||
|
then value
|
||||||
|
else {};
|
||||||
|
in
|
||||||
|
foldr (a: b: a // b) {} (mapAttrsToList conditionalFlags allProfiles);
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|||||||
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,29 +4,39 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
# TODO: ménage
|
# TODO: ménage
|
||||||
mkIf flags.hydra-builder {
|
mkIf flags.hydra-builder {
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
qemu
|
|
||||||
kvm
|
kvm
|
||||||
|
qemu
|
||||||
|
virtualbox
|
||||||
];
|
];
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
|
|
||||||
## Services de virtualisation utilisé pour les tests hydra
|
## Services de virtualisation utilisé pour les tests hydra
|
||||||
virtualisation.docker.enable = true;
|
virtualisation = {
|
||||||
virtualisation.libvirtd.enable = true;
|
docker.enable = true;
|
||||||
virtualisation.libvirtd.enableKVM = true;
|
libvirtd = {
|
||||||
#virtualisation.virtualbox.guest.enable = true;
|
enable = true;
|
||||||
virtualisation.virtualbox.host.enable = true;
|
enableKVM = true;
|
||||||
virtualisation.virtualbox.host.headless = true;
|
};
|
||||||
|
virtualbox = {
|
||||||
|
#guest.enable = true;
|
||||||
|
host.enable = true;
|
||||||
|
host.headless = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
## Ménage automatique tous les jours
|
## Ménage automatique tous les jours - Frequent garbage collection is a good idea for build machines.
|
||||||
nix.gc.automatic = true;
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "*:0/30";
|
||||||
|
};
|
||||||
|
|
||||||
# users.users."hydrabld" = {
|
# users.users."hydrabld" = {
|
||||||
# description = "Execution des jobs hydra";
|
# description = "Execution des jobs hydra";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.hostName}";
|
||||||
flags = currentMachine.configuration-flags;
|
flags = currentMachine.configurationFlags;
|
||||||
|
|
||||||
|
|
||||||
#### https://github.com/NixOS/hydra/issues/413
|
#### https://github.com/NixOS/hydra/issues/413
|
||||||
@@ -76,7 +76,7 @@ mkIf flags.hydra-core {
|
|||||||
### Machines connues
|
### Machines connues
|
||||||
|
|
||||||
programs.ssh.knownHosts = {
|
programs.ssh.knownHosts = {
|
||||||
"hydra.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHqja/yYsQeS5amZKPUG+EKSIkjEN6fYW54Fzvj1pFaP";
|
"hydra.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYrZu31+/ybhel7LNPNgsALEoMHwTc1OiTcmJnXZ3He";
|
||||||
"monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc";
|
"monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc";
|
||||||
"pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD";
|
"pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD";
|
||||||
"ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA";
|
"ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA";
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -21,6 +21,15 @@ mkIf flags.munin {
|
|||||||
## Noeud de supervision munin = pas de stockage des données locales
|
## Noeud de supervision munin = pas de stockage des données locales
|
||||||
services.munin-node = {
|
services.munin-node = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
# Ignore the apc_nis plugin, as it throws errors as I don't have an UPS.
|
||||||
|
# It's there because munin-node-configure is called with the contrib group,
|
||||||
|
# and the plugin has no method to check whether there's a compatible UPS available.
|
||||||
|
ignore_file ^apc_nis$
|
||||||
|
|
||||||
|
ignore_file ^sensors_-wrapped$
|
||||||
|
ignore_file ^.sensors_-wrapped$
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
systemd.services.munin-node = {
|
systemd.services.munin-node = {
|
||||||
path = with pkgs; [ munin lm_sensors ];
|
path = with pkgs; [ munin lm_sensors ];
|
||||||
@@ -41,7 +50,7 @@ mkIf flags.munin {
|
|||||||
address 127.0.0.1
|
address 127.0.0.1
|
||||||
'';
|
'';
|
||||||
extraGlobalConfig = ''
|
extraGlobalConfig = ''
|
||||||
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/public/services/munin-muttrc -s "Munin notification for ''${var:host}" root@prunetwork.fr
|
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ''${var:host}" root@prunetwork.fr
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
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,20 @@ 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 {
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
# commande pour lister les cartes son : pacmd list-cards
|
||||||
|
|
||||||
|
# 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