Compare commits
89 Commits
2018-02-15
...
2022-08-13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0c7a106bf | ||
|
f01bda8781
|
|||
|
fe50587190
|
|||
|
c1b40f9d07
|
|||
|
|
06d73c9519
|
||
|
|
f7264ae434 | ||
|
|
4fd9d0d7f8 | ||
|
|
963b0b9d4b | ||
|
|
51b98cda4f | ||
|
|
f751e24839 | ||
|
|
1b1aebd0a0 | ||
|
|
812bc511e0 | ||
|
|
e55568d1c6 | ||
|
|
d4f2298518 | ||
|
|
2fad38532f | ||
|
|
28cf2d2071 | ||
|
|
f6f3befe2f | ||
|
|
257f59054d | ||
|
|
518054fd0a | ||
|
|
03bcc056c1 | ||
|
|
7679f865b0 | ||
|
|
2d63aae5a1 | ||
|
|
48a257405a | ||
|
|
30e2f31255 | ||
|
|
0364ea9b29 | ||
|
|
b2505f45c4 | ||
|
|
962c052b29 | ||
|
|
032d7e8e1a | ||
|
|
af35de1639 | ||
|
|
c8ae50be5b | ||
|
|
9310d01af6 | ||
|
|
ea33bac49b | ||
|
|
204fb83207 | ||
|
|
cf3c3c3603 | ||
|
|
edad20c5c0 | ||
|
|
ed937ba5bc | ||
|
|
3de6332c3e | ||
|
|
e26453fc7e | ||
|
|
67b9f5b0f7 | ||
|
|
8f4f8ef953 | ||
|
|
c33f0f9c50 | ||
|
|
2064606f18 | ||
|
|
4a5f0ba1a7 | ||
|
|
9ed945bba8 | ||
| 65e5776f86 | |||
|
|
235e636451 | ||
|
|
e849c55297 | ||
|
|
1e51d11778 | ||
|
|
f39f486f51 | ||
|
|
2a5809c3de | ||
|
|
7681f7774e | ||
|
|
fe0ea31e30 | ||
| f7de6a69bd | |||
| 9151b4dfc5 | |||
|
|
209b1b3e47 | ||
|
|
8355abcbfc | ||
|
|
9150a37969 | ||
|
|
59d243bb9d | ||
|
|
c7a1a433ef | ||
|
|
da750b9c33 | ||
|
|
0ff5f2934e | ||
|
|
f0d5881c80 | ||
|
|
16b0a5b617 | ||
| de02b42953 | |||
| 25275ec0dd | |||
| 19258654cf | |||
| 7a7bcc99f2 | |||
| dddc3e79e0 | |||
| 1e8b78d720 | |||
| 366eebee8a | |||
| 5ecdc764ac | |||
|
|
a5e03f769b | ||
|
|
c642afb7e6 | ||
|
|
1127daa925 | ||
|
|
328eabc735 | ||
| 5d2219ba0a | |||
|
|
f2247b6e3e | ||
|
|
0073763f32 | ||
| e2ba892109 | |||
| 0c47de1cb1 | |||
| 8dcdea29c1 | |||
| cffcd9bd3e | |||
| 3f80d6be6e | |||
| e94b16fce7 | |||
| 3f038be64a | |||
| 76fce51cf0 | |||
| 023857ba73 | |||
| af4c0b313e | |||
|
|
8ca891e79b |
19
Makefile
19
Makefile
@@ -3,6 +3,7 @@ TIME=time
|
|||||||
|
|
||||||
CHRONY_STATUS=chronyc tracking
|
CHRONY_STATUS=chronyc tracking
|
||||||
CHRONY_STATS=chronyc sources -v
|
CHRONY_STATS=chronyc sources -v
|
||||||
|
CHRONY_STATS_SOURCES=chronyc sourcestats
|
||||||
|
|
||||||
all: rebuild-switch
|
all: rebuild-switch
|
||||||
date
|
date
|
||||||
@@ -24,10 +25,17 @@ clean-log:
|
|||||||
full-auto: submodules-update upgrade clean optimise
|
full-auto: submodules-update upgrade clean optimise
|
||||||
@date
|
@date
|
||||||
|
|
||||||
|
list-installed-packages:
|
||||||
|
@# source : https://functor.tokyo/blog/2018-02-20-show-packages-installed-on-nixos
|
||||||
|
@# https://www.domenkozar.com/2014/01/02/getting-started-with-nix-package-manager/
|
||||||
|
@#nixos-option environment.systemPackages
|
||||||
|
nixos-option environment.systemPackages | head -2 | tail -1 | sed -e 's/ /\n/g' | cut -d- -f2- | sort | uniq| sed -e 's/"$$//'
|
||||||
|
|
||||||
optimise:
|
optimise:
|
||||||
$(TIME) nix-store --optimise
|
$(TIME) nix store optimise
|
||||||
|
|
||||||
rebuild-build:
|
rebuild-build:
|
||||||
|
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
$(TIME) time nixos-rebuild build --fallback --show-trace
|
$(TIME) time nixos-rebuild build --fallback --show-trace
|
||||||
|
|
||||||
rebuild-switch:
|
rebuild-switch:
|
||||||
@@ -43,14 +51,14 @@ show-roots:
|
|||||||
nix-store --gc --print-roots
|
nix-store --gc --print-roots
|
||||||
|
|
||||||
show-time:
|
show-time:
|
||||||
-@$(CHRONY_STATUS)
|
-@$(CHRONY_STATUS) && $(CHRONY_STATS)
|
||||||
#CHRONY_STATUS='chronyc tracking' CHRONY_STATS='chronyc sources -v' ${CHRONY_STATS} && watch -d -n 20 "${CHRONY_STATUS} && echo "--" && ${CHRONY_STATS}"
|
-@watch -d -n 2 "$(CHRONY_STATUS) && echo "-- Statistiques générales :" && $(CHRONY_STATS) && echo "-- Statistiques sur les sources :" && $(CHRONY_STATS_SOURCES) && echo "-- Statistiques sur les clients :" && chronyc clients"
|
||||||
-@watch -d -n 20 "$(CHRONY_STATUS) && echo "--" && $(CHRONY_STATS)"
|
|
||||||
|
|
||||||
store-repair:
|
store-repair:
|
||||||
$(TIME) nix-store --verify --check-contents --repair
|
$(TIME) nix-store --verify --check-contents --repair
|
||||||
|
|
||||||
upgrade:
|
upgrade:
|
||||||
|
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
$(TIME) nixos-rebuild switch --upgrade --fallback --show-trace
|
$(TIME) nixos-rebuild switch --upgrade --fallback --show-trace
|
||||||
|
|
||||||
##--------- Commandes spécifiques pour NixOS -- Opérations non courantes
|
##--------- Commandes spécifiques pour NixOS -- Opérations non courantes
|
||||||
@@ -105,3 +113,6 @@ tmpfs-umount:
|
|||||||
tmpfs-destroy: tmpfs-umount
|
tmpfs-destroy: tmpfs-umount
|
||||||
rmdir /mnt/tmpfs
|
rmdir /mnt/tmpfs
|
||||||
|
|
||||||
|
##- Test awesome
|
||||||
|
test-awesome:
|
||||||
|
Xephyr :5 & sleep 1; DISPLAY=:5 awesome
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Ce dépôt stocke une configuration générique des machines.
|
|||||||
~~Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.~~
|
~~Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.~~
|
||||||
|
|
||||||
# Liens
|
# Liens
|
||||||
* http://howoldis.herokuapp.com/ pour savoir de quand datent les différentes releases de NixOS
|
* https://status.nixos.org/ 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
|
* https://repology.org/repository/nix_unstable/problems pour lister les paquets avec problèmes
|
||||||
|
|
||||||
# Notes de mise-à-jour
|
# Notes de mise-à-jour
|
||||||
@@ -22,6 +22,7 @@ Ce dépôt stocke une configuration générique des machines.
|
|||||||
* 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 `services.xserver.enable = true;` pour les machines avec interface graphique
|
||||||
* vérifier que `configuration.nix` contient le nom de la machine `networking.hostName = "<X>";`
|
* vérifier que `configuration.nix` contient le nom de la machine `networking.hostName = "<X>";`
|
||||||
|
* vérifier que `configuration.nix` contient le nom de domaine `networking.domain = "<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` )
|
||||||
* lorsque tout semble bon, vérifier :
|
* lorsque tout semble bon, vérifier :
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -27,10 +27,10 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
|
|||||||
#kde5.dolphin # gestionnaire de fichiers graphique
|
#kde5.dolphin # gestionnaire de fichiers graphique
|
||||||
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
|
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
|
||||||
pcmanfm # gestionnaire de fichiers graphique
|
pcmanfm # gestionnaire de fichiers graphique
|
||||||
spaceFM # gestionnaire de fichiers graphique
|
|
||||||
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
kitty # terminal avec rendu par GPU
|
||||||
sakura # terminal
|
sakura # terminal
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -39,16 +39,18 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
|
|||||||
fira # police créée pour Firefox
|
fira # police créée pour Firefox
|
||||||
fira-code # idem fira-mono + ligatures pour la programmation
|
fira-code # idem fira-mono + ligatures pour la programmation
|
||||||
fira-mono # dérivée de fira en monospace
|
fira-mono # dérivée de fira en monospace
|
||||||
|
font-awesome_5 # Jeux de police, utilisé avec Latex
|
||||||
hack-font # police monospace créée explicitement pour coder
|
hack-font # police monospace créée explicitement pour coder
|
||||||
hasklig # police dérivée de source-code-pro mais avec des ligatures
|
hasklig # police dérivée de source-code-pro mais avec des ligatures
|
||||||
|
jetbrains-mono # police spécial développeurs par Jetbrains
|
||||||
];
|
];
|
||||||
|
fonts.fontconfig.defaultFonts = {
|
||||||
|
monospace = [ "JetBrains Mono" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Paquets avec setuid root
|
programs = {
|
||||||
security.wrappers = {
|
slock.enable = true;
|
||||||
# pour le montage des media amovibles
|
spacefm.enable = true;
|
||||||
devmon.source = "${pkgs.udevil}/bin/devmon";
|
udevil.enable = true;
|
||||||
udevil.source = "${pkgs.udevil}/bin/udevil"; # utilisé par spacefm
|
|
||||||
# vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root
|
|
||||||
slock.source = "${pkgs.slock}/bin/slock";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ mkIf (flags.officeSuite && flags.graphical) {
|
|||||||
|
|
||||||
## Visionneuse
|
## Visionneuse
|
||||||
#kde5.okular # pdf
|
#kde5.okular # pdf
|
||||||
mcomix # livres (cbr, liste d'images), gestion d'une bibliothèque
|
#mcomix # livres (cbr, liste d'images), gestion d'une bibliothèque # Supprimé dans NixOS 20.03
|
||||||
pdfpc # pdf
|
pdfpc # pdf
|
||||||
qpdfview # pdf
|
qpdfview # pdf
|
||||||
gqview # visionneuse image & gestion basique de collection
|
gqview # visionneuse image & gestion basique de collection
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ environment.systemPackages = with pkgs; [
|
|||||||
firefox
|
firefox
|
||||||
|
|
||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
clawsMail
|
claws-mail
|
||||||
hexchat
|
hexchat
|
||||||
quasselClient
|
quasselClient
|
||||||
mumble
|
mumble
|
||||||
@@ -27,7 +27,7 @@ environment.systemPackages = with pkgs; [
|
|||||||
|
|
||||||
# Transfert de fichier
|
# Transfert de fichier
|
||||||
filezilla
|
filezilla
|
||||||
transmission_gtk
|
transmission-gtk
|
||||||
transmission_remote_gtk
|
transmission-remote-gtk
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -13,6 +13,6 @@ mkIf (flags.developpement-haskell && flags.graphical) {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
] ++ (with pkgs.haskellPackages; [
|
] ++ (with pkgs.haskellPackages; [
|
||||||
# Haskell lib
|
# Haskell lib
|
||||||
threadscope # visualisation des threads (<bidule>.eventlog)
|
#threadscope # visualisation des threads (<bidule>.eventlog)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -12,6 +12,6 @@ mkIf (flags.developpement-java && flags.graphical) {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# IDE
|
# IDE
|
||||||
idea.idea-community # IntelliJ IDEA
|
jetbrains.idea-community # IntelliJ IDEA
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -11,9 +11,9 @@ mkIf (flags.jetbrains-licensed && flags.graphical) {
|
|||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
idea.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
idea.clion
|
jetbrains.clion
|
||||||
idea.datagrip
|
jetbrains.datagrip
|
||||||
idea.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ mkIf (flags.developpement && flags.graphical) {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Base de données
|
# Base de données
|
||||||
pgadmin # interface d'administration de postgres
|
#pgadmin # interface d'administration de postgres ***plus à jour, version openssl dépréciée***
|
||||||
#sqlitebrowser # interface d'administration de sqlite
|
#sqlitebrowser # interface d'administration de sqlite
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
@@ -21,7 +21,6 @@ mkIf (flags.developpement && flags.graphical) {
|
|||||||
# Gestion des sources
|
# Gestion des sources
|
||||||
#gitg # interface pour utiliser git (historique, commit)
|
#gitg # interface pour utiliser git (historique, commit)
|
||||||
gitstats # génère un site web statique avec des statistiques
|
gitstats # génère un site web statique avec des statistiques
|
||||||
gitAndTools.gitFull # pour gitk
|
|
||||||
git-cola # interface pour utiliser git (historique, commit)
|
git-cola # interface pour utiliser git (historique, commit)
|
||||||
|
|
||||||
## Visualisation & outils de diff
|
## Visualisation & outils de diff
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,19 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf (true && flags.graphical) {
|
mkIf (true && flags.graphical) {
|
||||||
|
|
||||||
|
# Diagnostic réseau Wireshark (droits fins par le groupe wireshark)
|
||||||
|
programs.wireshark = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wireshark;
|
||||||
|
};
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
## Diagnostic
|
|
||||||
wireshark
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -12,15 +12,16 @@ mkIf (flags.radio && flags.graphical) {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
## GUI
|
## GUI
|
||||||
gqrx # GUI
|
chirp # Configuration de radios portatives
|
||||||
#gnuradio # Software Defined Radio (SDR) software
|
gqrx # GUI
|
||||||
gnuradio-with-packages
|
cubicsdr # Another GUI
|
||||||
|
gnuradio-with-packages # Software Defined Radio (SDR) software
|
||||||
|
|
||||||
## A Trier
|
## A Trier
|
||||||
#
|
#inspectrum # Tool for analysing captured signals from sdr receivers
|
||||||
#gnuradio-osmosdr # Gnuradio block for OsmoSDR and rtl-sdr
|
];
|
||||||
|
|
||||||
inspectrum # Tool for analysing captured signals from sdr receivers
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
kalibrate-rtl # Calculate local oscillator frequency offset in RTL-SDR devices
|
"python2.7-Pillow-6.2.2"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
clawsMail = pkgs.clawsMail.override {
|
claws-mail = pkgs.claws-mail.override {
|
||||||
enablePgp = true;
|
enablePgp = true;
|
||||||
enablePluginArchive = true;
|
enablePluginArchive = true;
|
||||||
enablePluginFancy = false; # nécessite wekitgtk qui est troué
|
#enablePluginFancy = false; # nécessite wekitgtk qui est troué # Option supprimée dans NixOS 20.03
|
||||||
enablePluginPdf = true;
|
enablePluginPdf = true;
|
||||||
enablePluginRavatar = true;
|
enablePluginRavatar = true;
|
||||||
enablePluginSmime = true;
|
enablePluginSmime = true;
|
||||||
@@ -29,13 +29,13 @@ mkIf true {
|
|||||||
# bug connu : https://nixos.org/nix-dev/2014-December/015225.html
|
# bug connu : https://nixos.org/nix-dev/2014-December/015225.html
|
||||||
# find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"
|
# find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"
|
||||||
# Commande pour générer le path : find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"|paste -d: -s -
|
# Commande pour générer le path : find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"|paste -d: -s -
|
||||||
gnuradio-with-packages = pkgs.gnuradio-with-packages.override {
|
gnuradio-with-packages = pkgs.gnuradio3_8.override {
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs.gnuradio3_8Packages; [
|
||||||
gnuradio-ais
|
ais
|
||||||
gnuradio-gsm
|
#gsm
|
||||||
gnuradio-nacl
|
#nacl
|
||||||
gnuradio-osmosdr # support des dongle Realtek
|
osmosdr # support des dongle Realtek
|
||||||
gnuradio-rds # support du décodage de RDS sur les radio FM
|
rds # support du décodage de RDS sur les radio FM
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ mkIf true {
|
|||||||
powerline-fonts
|
powerline-fonts
|
||||||
powertop
|
powertop
|
||||||
#ansible
|
#ansible
|
||||||
python36Packages.glances
|
glances
|
||||||
pv # afficher le débit d'un flux dd if=/dev/zero | pv | dd of=/dev/null
|
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
|
||||||
@@ -44,7 +44,7 @@ mkIf true {
|
|||||||
ntfs3g # ntfs
|
ntfs3g # ntfs
|
||||||
samba # partages windows
|
samba # partages windows
|
||||||
squashfsTools # squashfs
|
squashfsTools # squashfs
|
||||||
sshfsFuse # ssh
|
sshfs-fuse # ssh
|
||||||
|
|
||||||
## Gestion de FS
|
## Gestion de FS
|
||||||
nfs-utils
|
nfs-utils
|
||||||
@@ -53,6 +53,6 @@ mkIf true {
|
|||||||
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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ mkIf flags.officeSuite {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Bureautique
|
# Bureautique
|
||||||
aspell aspellDicts.fr # correction d'ortographe
|
aspell aspellDicts.fr # correction d'ortographe
|
||||||
python36Packages.grammalecte # correction gramatical
|
python39Packages.grammalecte # correction gramatical
|
||||||
|
|
||||||
# Gestion de tâche
|
# Gestion de tâche
|
||||||
taskwarrior # gestionnaire de tâches en console
|
taskwarrior # gestionnaire de tâches en console
|
||||||
@@ -24,7 +24,7 @@ mkIf flags.officeSuite {
|
|||||||
#jekyll # générateur statique de site web
|
#jekyll # générateur statique de site web
|
||||||
#odpdown # conversion md -> presentation ODP : https://github.com/thorstenb/odpdown
|
#odpdown # conversion md -> presentation ODP : https://github.com/thorstenb/odpdown
|
||||||
pandoc
|
pandoc
|
||||||
haskellPackages.pandoc-citeproc
|
#haskellPackages.pandoc-citeproc # ***BROKEN***
|
||||||
texlive.combined.scheme-full # distribution LaTeX
|
texlive.combined.scheme-full # distribution LaTeX
|
||||||
#texLive # distribution LaTeX de base
|
#texLive # distribution LaTeX de base
|
||||||
#texLiveBeamer # paquets et extensions pour Beamer
|
#texLiveBeamer # paquets et extensions pour Beamer
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ environment.systemPackages = with pkgs; [
|
|||||||
|
|
||||||
## Réseaux sociaux
|
## Réseaux sociaux
|
||||||
#turses # client twitter en ncurse
|
#turses # client twitter en ncurse
|
||||||
#python36Packages.rainbowstream # client twitter en console
|
#python39Packages.rainbowstream # client twitter en console
|
||||||
#rtv # client reddit en console
|
#rtv # client reddit en console
|
||||||
|
|
||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ mkIf true {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
byobu # permet de se déconnecter d'un terminal sans l'arréter
|
byobu # permet de se déconnecter d'un terminal sans l'arréter
|
||||||
git gitAndTools.tig gti # outil de gestion de version
|
tig gti lazygit # 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
|
||||||
htop # monitoring
|
htop # monitoring
|
||||||
@@ -25,12 +25,49 @@ mkIf true {
|
|||||||
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
|
||||||
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
|
||||||
usbutils
|
usbutils
|
||||||
(import ./vim.nix)
|
|
||||||
wget # client HTTP console
|
wget # client HTTP console
|
||||||
which # pour connaitre le chemin d'un exécutable
|
which # pour connaitre le chemin d'un exécutable
|
||||||
];
|
];
|
||||||
|
programs = {
|
||||||
|
fish.enable = true;
|
||||||
|
gnupg.agent.enable = true;
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitFull;
|
||||||
|
config = {
|
||||||
|
# http://www.git-attitude.fr/2014/09/15/30-options-git-qui-gagnent-a-etre-connues/
|
||||||
|
color = {
|
||||||
|
diff = "auto";
|
||||||
|
branch = "auto";
|
||||||
|
interactive = "auto";
|
||||||
|
pager = true;
|
||||||
|
showbranch = "auto";
|
||||||
|
status = "auto";
|
||||||
|
};
|
||||||
|
alias = {
|
||||||
|
a = "add -p";
|
||||||
|
br = "for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short)\t%(authorname)\t%(refname:short)'";
|
||||||
|
ci = "commit";
|
||||||
|
co = "checkout";
|
||||||
|
ff = "pull --ff-only";
|
||||||
|
oops = "commit --amend --no-edit";
|
||||||
|
# Show files ignored by git
|
||||||
|
ignored = "ls-files -o -i --exclude-standard";
|
||||||
|
ls = "ls-files";
|
||||||
|
st = "status";
|
||||||
|
# Logs
|
||||||
|
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||||
|
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||||
|
not-pushed = "log --branches --not --remotes";
|
||||||
|
};
|
||||||
|
push.default = "simple";
|
||||||
|
code.editor = "${pkgs.vim_configurable}/bin/vim";
|
||||||
|
};
|
||||||
|
lfs.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ in
|
|||||||
./edition-video.nix # modifier les vidéos
|
./edition-video.nix # modifier les vidéos
|
||||||
./jeux.nix # jouer, tout simplement ;)
|
./jeux.nix # jouer, tout simplement ;)
|
||||||
./radio.nix # outils pour faire de la radio SDR
|
./radio.nix # outils pour faire de la radio SDR
|
||||||
|
./vim.nix # vim avec plugins
|
||||||
|
|
||||||
## if isDesktop
|
## if isDesktop
|
||||||
./adminsys.nix # pour gérer le système dans son ensemble et les services
|
./adminsys.nix # pour gérer le système dans son ensemble et les services
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -19,9 +19,10 @@ mkIf flags.developpement-haskell {
|
|||||||
] ++ (with pkgs.haskellPackages; [
|
] ++ (with pkgs.haskellPackages; [
|
||||||
# Haskell lib
|
# Haskell lib
|
||||||
autoproc # ? procmail
|
autoproc # ? procmail
|
||||||
darcs # gestionnaire de version éponyme
|
#brittany # formatteur de code
|
||||||
ghc-mod # outil d'analyse de code haskell utilisé par IDE
|
#darcs # gestionnaire de version éponyme
|
||||||
hindent # indentation code
|
#ghc-mod # outil d'analyse de code haskell utilisé par IDE
|
||||||
|
#hindent # indentation code ***BROKEN***
|
||||||
hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques
|
hlint # qualite de code, analyse statique de code + astuces & bonnes pratiques
|
||||||
#postgrest # mapper HTTP <-> PostgreSQL
|
#postgrest # mapper HTTP <-> PostgreSQL
|
||||||
servant # génération d'API REST
|
servant # génération d'API REST
|
||||||
@@ -29,7 +30,7 @@ mkIf flags.developpement-haskell {
|
|||||||
turtle # genre shell-scripting
|
turtle # genre shell-scripting
|
||||||
|
|
||||||
# Application perso
|
# Application perso
|
||||||
hahp
|
#hahp
|
||||||
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
|
#pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc ***BROKEN***
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,19 +3,22 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.developpement-java {
|
mkIf flags.developpement-java {
|
||||||
|
|
||||||
|
# Installe le paquet + JAVA_HOME
|
||||||
|
programs.java = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Java
|
# Systèmes de build autour de java
|
||||||
|
ant
|
||||||
maven
|
maven
|
||||||
openjdk
|
gradle
|
||||||
];
|
];
|
||||||
environment.variables = {
|
|
||||||
JAVA_HOME = "${pkgs.openjdk}";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -14,5 +14,7 @@ mkIf flags.developpement-rust {
|
|||||||
# Rust
|
# Rust
|
||||||
cargo # récupération des dépendances + compilation projet rust
|
cargo # récupération des dépendances + compilation projet rust
|
||||||
rustc # pour les appels depuis les scripts
|
rustc # pour les appels depuis les scripts
|
||||||
|
rustup # outil de configuration de toolchain rust
|
||||||
|
crate2nix # génère les fichiers de build Nix dans un projet Rust
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -25,7 +25,6 @@ mkIf flags.developpement {
|
|||||||
|
|
||||||
# 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 gitAndTools.gitSVN # git et git-svn
|
|
||||||
mercurial
|
mercurial
|
||||||
subversion
|
subversion
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ mkIf true {
|
|||||||
iperf # outil de mesure de la qualité du réseau
|
iperf # outil de mesure de la qualité du réseau
|
||||||
iptraf-ng # outil de mesure de la qualité du réseau
|
iptraf-ng # outil de mesure de la qualité du réseau
|
||||||
nload # affichage de statisques d'utilisation instantannées du réseau
|
nload # affichage de statisques d'utilisation instantannées du réseau
|
||||||
telnet
|
inetutils
|
||||||
|
|
||||||
## Diagnostic
|
## Diagnostic
|
||||||
arp-scan
|
arp-scan
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -22,10 +22,8 @@ mkIf flags.radio {
|
|||||||
gnss-sdr # Global Navigation Satellite Systems software-defined receiver
|
gnss-sdr # Global Navigation Satellite Systems software-defined receiver
|
||||||
liquid-dsp # Digital signal processing library for software-defined radios
|
liquid-dsp # Digital signal processing library for software-defined radios
|
||||||
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
||||||
|
dump1090 # Listen to planes ADS-B and view them on a map
|
||||||
];
|
];
|
||||||
|
|
||||||
# Configuration matérielle
|
hardware.rtl-sdr.enable = true;
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
"dvb_usb_rtl28xxu"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,28 @@
|
|||||||
with import <nixpkgs> {};
|
{pkgs, ... }:
|
||||||
|
|
||||||
vim_configurable.customize {
|
let
|
||||||
# Specifies the vim binary name.
|
myVim = pkgs.vim_configurable.customize {
|
||||||
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
|
# Specifies the vim binary name.
|
||||||
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
|
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
|
||||||
name = "vim";
|
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
|
||||||
vimrcConfig.customRC = builtins.readFile ./vimrc;
|
name = "vim";
|
||||||
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
|
vimrcConfig.customRC = builtins.readFile ./vimrc;
|
||||||
vimrcConfig.vam.pluginDictionaries = [
|
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
{ names = [
|
start = [
|
||||||
# Here you can place all your vim plugins
|
wombat256-vim
|
||||||
# They are installed managed by `vam` (a vim plugin manager)
|
];
|
||||||
#"vim-addon-nix"
|
opt = [
|
||||||
"elm-vim"
|
elm-vim
|
||||||
"vim-nix"
|
vim-fish
|
||||||
"wombat256-vim"
|
vim-nix
|
||||||
]; }
|
vimwiki
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
programs.vim = {
|
||||||
|
defaultEditor = true;
|
||||||
|
package = myVim;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
" This must be first, because it changes other options as a side effect.
|
" This must be first, because it changes other options as a side effect.
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
|
filetype plugin on
|
||||||
|
syntax on
|
||||||
|
|
||||||
" allow backspacing over everything in insert mode
|
" allow backspacing over everything in insert mode
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
@@ -32,3 +35,10 @@ if &t_Co > 8
|
|||||||
let &colorcolumn="80,".join(range(120,999),",")
|
let &colorcolumn="80,".join(range(120,999),",")
|
||||||
highlight ColorColumn ctermbg=235 guibg=#2c2d27
|
highlight ColorColumn ctermbg=235 guibg=#2c2d27
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" vim hardcodes background color erase even if the terminfo file does
|
||||||
|
" not contain bce (not to mention that libvte based terminals
|
||||||
|
" incorrectly contain bce in their terminfo files). This causes
|
||||||
|
" incorrect background rendering when using a color theme with a
|
||||||
|
" background color.
|
||||||
|
let &t_ut=''
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ let
|
|||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
pfl = config.r6d.profiles;
|
pfl = config.r6d.profiles;
|
||||||
comp = config.r6d.computers;
|
comp = config.r6d.computers;
|
||||||
host = config.networking.hostName;
|
host = config.networking.fqdn;
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -43,7 +43,8 @@ in
|
|||||||
#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"; # Define your hostname.
|
||||||
|
networking.domain = "dubronetwork.fr";
|
||||||
r6d.profiles.isDubronetwork = true;
|
r6d.profiles.isDubronetwork = true;
|
||||||
|
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
|
||||||
annuaire = config.r6d.machines;
|
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
|
||||||
flags = currentMachine.configurationFlags;
|
|
||||||
in
|
|
||||||
|
|
||||||
mkIf flags.auto-upgrade {
|
|
||||||
|
|
||||||
# Automatic update & automatic clean
|
|
||||||
|
|
||||||
system.autoUpgrade.enable = true;
|
|
||||||
nix.gc.automatic = true;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
# Définition des couleurs du prompt
|
# Git information in prompt
|
||||||
|
. /run/current-system/sw/share/bash-completion/completions/git-prompt.sh
|
||||||
|
|
||||||
|
# Prompt colors
|
||||||
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
|
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
|
||||||
PS1_USER='\[$(tput setaf 27)\]'
|
PS1_USER='\[$(tput setaf 27)\]'
|
||||||
PS1_HOST='\[$(tput setaf 37)\]'
|
PS1_HOST='\[$(tput setaf 37)\]'
|
||||||
@@ -18,10 +21,12 @@ fi
|
|||||||
BOLD='\[$(tput bold)\]'
|
BOLD='\[$(tput bold)\]'
|
||||||
RESET='\[$(tput sgr0)\]'
|
RESET='\[$(tput sgr0)\]'
|
||||||
|
|
||||||
# Définition du prompt
|
# Username or red color if root
|
||||||
if [ $UID = 0 ]; then
|
if [ $UID = 0 ]; then
|
||||||
PS1_ID=$PS1_ROOT
|
PS1_ID=$PS1_ROOT
|
||||||
else
|
else
|
||||||
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
|
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prompt definition
|
||||||
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET
|
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -20,9 +20,9 @@ in
|
|||||||
|
|
||||||
# commandées par config-generator
|
# commandées par config-generator
|
||||||
## option de configuration spécifique
|
## option de configuration spécifique
|
||||||
./auto-upgrade.nix # mise à jour automatique du système
|
|
||||||
./awesome.nix # pour le gestionaire de fenêtres awesome
|
./awesome.nix # pour le gestionaire de fenêtres awesome
|
||||||
./laptop.nix # appli & configuration adaptée pour un PC portable
|
./laptop.nix # appli & configuration adaptée pour un PC portable
|
||||||
|
./nix-options.nix # options de Nix (update, gc, optimisation)
|
||||||
./swap.nix # définition de l'utilisation du swap
|
./swap.nix # définition de l'utilisation du swap
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,13 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
# Nombre de process d'installation en parrallèle effectués par Nix
|
|
||||||
nix.buildCores = 0;
|
|
||||||
|
|
||||||
# The NixOS release to be compatible with for stateful data such as databases.
|
# The NixOS release to be compatible with for stateful data such as databases.
|
||||||
system.stateVersion = "18.03";
|
system.stateVersion = "19.09";
|
||||||
|
|
||||||
# copies the NixOS configuration file (usually /etc/nixos/configuration.nix) and links it from the resulting system (getting to /run/current-system/configuration.nix)
|
# copies the NixOS configuration file (usually /etc/nixos/configuration.nix) and links it from the resulting system (getting to /run/current-system/configuration.nix)
|
||||||
system.copySystemConfiguration = true;
|
system.copySystemConfiguration = true;
|
||||||
@@ -27,7 +24,8 @@ in
|
|||||||
boot.cleanTmpDir = true;
|
boot.cleanTmpDir = true;
|
||||||
|
|
||||||
# Activation des pages de manuel
|
# Activation des pages de manuel
|
||||||
programs.man.enable = true;
|
documentation.man.enable = true;
|
||||||
|
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment = {
|
environment = {
|
||||||
@@ -45,7 +43,6 @@ in
|
|||||||
vi = "vim";
|
vi = "vim";
|
||||||
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
|
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
|
||||||
};
|
};
|
||||||
etc.gitconfig.text = builtins.readFile ./gitconfig;
|
|
||||||
};
|
};
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
# http://www.git-attitude.fr/2014/09/15/30-options-git-qui-gagnent-a-etre-connues/
|
|
||||||
[color]
|
|
||||||
diff = auto
|
|
||||||
branch = auto
|
|
||||||
interactive = auto
|
|
||||||
pager = true
|
|
||||||
showbranch = auto
|
|
||||||
status = auto
|
|
||||||
[alias]
|
|
||||||
a = add -p
|
|
||||||
br = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short)\t%(authorname)\t%(refname:short)'
|
|
||||||
ci = commit
|
|
||||||
co = checkout
|
|
||||||
ff = pull --ff-only
|
|
||||||
oops = commit --amend --no-edit
|
|
||||||
# Show files ignored by git
|
|
||||||
ignored = ls-files -o -i --exclude-standard
|
|
||||||
ls = ls-files
|
|
||||||
st = status
|
|
||||||
# Logs
|
|
||||||
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
|
||||||
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
|
||||||
not-pushed = log --branches --not --remotes
|
|
||||||
[push]
|
|
||||||
default = simple
|
|
||||||
[core]
|
|
||||||
editor = /usr/bin/env vim
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -12,22 +12,29 @@ mkIf flags.laptop {
|
|||||||
# Gestion spécifique pour PC portable
|
# Gestion spécifique pour PC portable
|
||||||
|
|
||||||
## Gestion de l'énergie
|
## Gestion de l'énergie
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
services.tlp.enable = true;
|
||||||
|
|
||||||
## Activation d'un gestionnaire de réseau
|
## Activation d'un gestionnaire de réseau
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Gestion graphique du réseau dans la barre système
|
||||||
|
programs.nm-applet.enable = true;
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
networkmanagerapplet # gestionnaire réseau graphique + console (nm-applet + nmtui)
|
|
||||||
wirelesstools # fournis iwconfig
|
wirelesstools # fournis iwconfig
|
||||||
|
blueman # outils bluetooth (manager, system tray)
|
||||||
|
cbatticon # status de la batterie dans le system tray
|
||||||
];
|
];
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
services.xserver.synaptics = {
|
services.blueman.enable = true;
|
||||||
|
services.xserver.libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
twoFingerScroll = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,18 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "fr";
|
||||||
|
};
|
||||||
i18n = {
|
i18n = {
|
||||||
consoleFont = "Lat2-Terminus16";
|
|
||||||
consoleKeyMap = "fr";
|
|
||||||
defaultLocale = "fr_FR.UTF-8";
|
defaultLocale = "fr_FR.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ mkIf true {
|
|||||||
# Il s'avère que hostname vérifie la validité du FQDN et du reverse.
|
# Il s'avère que hostname vérifie la validité du FQDN et du reverse.
|
||||||
# Fixer ces paramètres dans les hosts permet de faire tomber en marche
|
# Fixer ces paramètres dans les hosts permet de faire tomber en marche
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 ${config.networking.hostName}
|
127.0.0.1 ${config.networking.fqdn} ${config.networking.hostName}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Activation du routage
|
# Activation du routage
|
||||||
|
|||||||
30
configuration/nix-options.nix
Normal file
30
configuration/nix-options.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
annuaire = config.r6d.machines;
|
||||||
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
|
flags = currentMachine.configurationFlags;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
# Automatic update & automatic clean
|
||||||
|
|
||||||
|
system.autoUpgrade.enable = flags.auto-upgrade;
|
||||||
|
nix = {
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
# Nombre de process d'installation en parrallèle effectués par Nix
|
||||||
|
cores = 0;
|
||||||
|
};
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ mkIf true {
|
|||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="audio", MODE="0666", SYMLINK+="rtl_sdr"
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="audio", MODE="0666", SYMLINK+="rtl_sdr"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.pam.enableU2F = true;
|
security.pam.u2f.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libu2f-host
|
libu2f-host
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -19,5 +19,6 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
environment.shellAliases = { nixos-generate-custom-config = "cd /iso/custom/ && make";};
|
environment.shellAliases = { nixos-generate-custom-config = "cd /iso/custom/ && make";};
|
||||||
networking.hostName = "nixos-livecd.corp.capgemini.com";
|
networking.hostName = "nixos-livecd";
|
||||||
|
networking.domain = "grudu.net";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -22,4 +22,11 @@ mkIf true {
|
|||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
} // {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = true;
|
||||||
|
message = "Assetion toujours valide.";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
23
options.nix
23
options.nix
@@ -44,6 +44,7 @@ let
|
|||||||
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";
|
||||||
|
pipewire = mkEnableOption "Profil pour activer pipewire.";
|
||||||
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
||||||
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
|
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
|
||||||
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
||||||
@@ -62,10 +63,10 @@ let
|
|||||||
configurationOptions = {
|
configurationOptions = {
|
||||||
|
|
||||||
ipAddress = mkOption {
|
ipAddress = mkOption {
|
||||||
description = "Adresse IP";
|
description = "Adresse IP.";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
nix-serve-server = mkEnableOption "nix-serve server";
|
nix-serve-server = mkEnableOption "nix-serve server.";
|
||||||
nix-serve-client = {
|
nix-serve-client = {
|
||||||
enable = mkEnableOption "nix-serve client";
|
enable = mkEnableOption "nix-serve client";
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
@@ -76,22 +77,22 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
tinc = {
|
tinc = {
|
||||||
enable = mkEnableOption "Enable tinc service";
|
enable = mkEnableOption "Enable tinc service.";
|
||||||
dnsFQDN = mkOption {
|
dnsFQDN = mkOption {
|
||||||
example = "device.example.net.";
|
example = "device.example.net.";
|
||||||
description = "DNS name of host pointing to tunnel IP.";
|
description = "DNS name of host pointing to tunnel IP.";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
connectToAddress = mkOption {
|
connectToAddress = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "192.168.1.1";
|
example = "192.168.1.1";
|
||||||
description = "External address to connect from another node.";
|
description = "External address to connect from another node.";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
vpnAddress = mkOption {
|
vpnAddress = mkOption {
|
||||||
example = "192.168.69.69/24";
|
example = "192.168.69.69/24";
|
||||||
description = "VPN local node IP address.";
|
description = "VPN local node IP address.";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
vpnCidrLength = mkOption {
|
vpnCidrLength = mkOption {
|
||||||
default = 24;
|
default = 24;
|
||||||
@@ -106,7 +107,7 @@ let
|
|||||||
ConnecTo = bar
|
ConnecTo = bar
|
||||||
'';
|
'';
|
||||||
description = "Configuration supplémentaire pour tinc.";
|
description = "Configuration supplémentaire pour tinc.";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ let
|
|||||||
enable = mkEnableOption "Activation du démarrage de Windows par Grub";
|
enable = mkEnableOption "Activation du démarrage de Windows par Grub";
|
||||||
drive = mkOption {
|
drive = mkOption {
|
||||||
description = "Lecteur sur lequel est présent le système Windows (au format GRUB)";
|
description = "Lecteur sur lequel est présent le système Windows (au format GRUB)";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
default = "hd0,1";
|
default = "hd0,1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -137,7 +138,7 @@ let
|
|||||||
enable = mkEnableOption "Montage de la partition data Windows";
|
enable = mkEnableOption "Montage de la partition data Windows";
|
||||||
device = mkOption {
|
device = mkOption {
|
||||||
description = "Lecteur sur lequel est présent le disque de data Windows";
|
description = "Lecteur sur lequel est présent le disque de data Windows";
|
||||||
type = lib.types.string;
|
type = lib.types.str;
|
||||||
default = "/dev/sda2";
|
default = "/dev/sda2";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -160,7 +161,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
annuaire = config.r6d.machines;
|
annuaire = config.r6d.machines;
|
||||||
currentMachine = annuaire."${config.networking.hostName}";
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -413,7 +413,8 @@ globalkeys = awful.util.table.join(
|
|||||||
awful.key({ modkey, "Shift" }, "F1", function () awful.util.spawn("claws-mail") end, {description = "Lance claws", group = "Lanceurs personnels"}),
|
awful.key({ modkey, "Shift" }, "F1", function () awful.util.spawn("claws-mail") end, {description = "Lance claws", group = "Lanceurs personnels"}),
|
||||||
awful.key({ modkey, "Shift" }, "F3", function () awful.util.spawn("pcmanfm") end, {description = "Lance pcmanfm", group = "Lanceurs personnels"}),
|
awful.key({ modkey, "Shift" }, "F3", function () awful.util.spawn("pcmanfm") end, {description = "Lance pcmanfm", group = "Lanceurs personnels"}),
|
||||||
awful.key({ modkey, "Shift" }, "F6", function () awful.util.spawn("clementine") end, {description = "Lance clementine", group = "Lanceurs personnels"}),
|
awful.key({ modkey, "Shift" }, "F6", function () awful.util.spawn("clementine") end, {description = "Lance clementine", group = "Lanceurs personnels"}),
|
||||||
awful.key({ modkey, "Shift" }, "F11", function () awful.util.spawn("xrandr-auto-2") end, {description = "Lance le script xrandr-auto-2", group = "Lanceurs personnels"})
|
awful.key({ modkey, "Shift" }, "F11", function () awful.util.spawn("xrandr-auto-2") end, {description = "Lance le script xrandr-auto-2", group = "Lanceurs personnels"}),
|
||||||
|
awful.key({ modkey }, "l", function () awful.util.spawn("slock systemctl suspend -i") end, {description = "Verouille la session avec slock", group = "Lanceurs personnels"})
|
||||||
-- awful.key({ modkey, "Shift" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-left") end),
|
-- awful.key({ modkey, "Shift" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-left") end),
|
||||||
-- awful.key({ modkey, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end),
|
-- awful.key({ modkey, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
}
|
|
||||||
@@ -3,14 +3,13 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# installées systématiquement
|
# installées systématiquement
|
||||||
./dbus.nix
|
|
||||||
./gpm.nix
|
./gpm.nix
|
||||||
./haveged.nix
|
./haveged.nix
|
||||||
./monitoring-munin.nix
|
./monitoring-munin.nix
|
||||||
@@ -34,6 +33,7 @@ in
|
|||||||
|
|
||||||
## if isDesktop
|
## if isDesktop
|
||||||
./pulseaudio.nix # activation du serveur audio
|
./pulseaudio.nix # activation du serveur audio
|
||||||
|
./pipewire.nix # activation du serveur audio
|
||||||
./scanner.nix # utilisation d'un scanner
|
./scanner.nix # utilisation d'un scanner
|
||||||
./x11.nix # activation du serveur graphique X
|
./x11.nix # activation du serveur graphique X
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -13,7 +13,8 @@ mkIf flags.docker {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Ecosystème Docker
|
# Ecosystème Docker
|
||||||
docker
|
docker
|
||||||
python36Packages.docker_compose
|
docker-compose
|
||||||
|
lazydocker
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
# TODO: ménage
|
# TODO: ménage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
|
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ mkIf flags.hydra-core {
|
|||||||
|
|
||||||
services.hydra = {
|
services.hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hydraURL = "http://hydra.${config.networking.hostName}";
|
hydraURL = "http://hydra.${config.networking.fqdn}";
|
||||||
notificationSender = "hydra@${config.networking.hostName}";
|
notificationSender = "hydra@${config.networking.fqdn}";
|
||||||
listenHost = "localhost";
|
listenHost = "localhost";
|
||||||
minimumDiskFree = 50; # Go
|
minimumDiskFree = 50; # Go
|
||||||
smtpHost = "localhost";
|
smtpHost = "localhost";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -30,6 +30,14 @@ mkIf flags.munin {
|
|||||||
ignore_file ^sensors_-wrapped$
|
ignore_file ^sensors_-wrapped$
|
||||||
ignore_file ^.sensors_-wrapped$
|
ignore_file ^.sensors_-wrapped$
|
||||||
'';
|
'';
|
||||||
|
extraPlugins = {
|
||||||
|
chrony = /etc/nixos/base/services/munin-chrony;
|
||||||
|
chrony_tracking_stratum = /etc/nixos/base/services/munin-chrony-tracking-stratum;
|
||||||
|
chrony_tracking_ppm = /etc/nixos/base/services/munin-chrony-tracking-ppm;
|
||||||
|
chrony_tracking_time_ = /etc/nixos/base/services/munin-chrony-tracking-time;
|
||||||
|
chrony_tracking_time_root = /etc/nixos/base/services/munin-chrony-tracking-time-root;
|
||||||
|
chrony_tracking_update_time = /etc/nixos/base/services/munin-chrony-tracking-update-time;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
systemd.services.munin-node = {
|
systemd.services.munin-node = {
|
||||||
path = with pkgs; [ munin lm_sensors ];
|
path = with pkgs; [ munin lm_sensors ];
|
||||||
@@ -46,11 +54,24 @@ mkIf flags.munin {
|
|||||||
services.munin-cron = {
|
services.munin-cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hosts = ''
|
hosts = ''
|
||||||
[${config.networking.hostName}]
|
[${config.networking.fqdn}]
|
||||||
address 127.0.0.1
|
address 127.0.0.1
|
||||||
|
df._dev_sda2.warning 35
|
||||||
|
use_node_name yes
|
||||||
|
#contacts syslog
|
||||||
|
contacts email
|
||||||
'';
|
'';
|
||||||
|
# http://sametmax.com/monitorez-vos-serveurs-avec-munin-et-notifications-par-email/
|
||||||
|
# http://guide.munin-monitoring.org/en/latest/tutorial/alert.html#syntax-of-warning-and-critical
|
||||||
extraGlobalConfig = ''
|
extraGlobalConfig = ''
|
||||||
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/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 ${config.networking.fqdn}" root@ocean.prunetwork.fr
|
||||||
|
contact.email.command /run/current-system/sw/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.fqdn}" root@ocean.prunetwork.fr
|
||||||
|
contact.syslog.command /run/current-system/sw/bin/logger -p user.crit -t "Munin notification for ${config.networking.fqdn}"
|
||||||
|
|
||||||
|
#---
|
||||||
|
contact.email.always_send ok,warning,critical,unknown
|
||||||
|
contact.syslog.always_send ok,warning,critical,unknown
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
123
services/munin-chrony
Executable file
123
services/munin-chrony
Executable file
@@ -0,0 +1,123 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="stratum 1 ^Stratum Stratum
|
||||||
|
systime 1000000 ^System.time System Time (us)
|
||||||
|
offsetlast 1000000 ^Last.offset Last Offset (us)
|
||||||
|
offsetrms 1000000 ^RMS.offset RMS Offset (us)
|
||||||
|
frequency 1 ^Frequency Frequency (ppm)
|
||||||
|
residualfreq 1 ^Residual.freq Residual Freq (ppm)
|
||||||
|
skew 1 ^Skew Skew (ppm)
|
||||||
|
rootdelay 1000000 ^Root.delay Root Delay (us)
|
||||||
|
rootdispersion 1000000 ^Root.dispersion Root Dispersion (us)
|
||||||
|
updateinterval 1 ^Update.interval Update Interval (s)"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (time,ppm)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
116
services/munin-chrony-tracking-ppm
Executable file
116
services/munin-chrony-tracking-ppm
Executable file
@@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="frequency 1 ^Frequency Local Clock Frequency Drift (ppm)
|
||||||
|
residualfreq 1 ^Residual.freq Residual Freq (ppm)
|
||||||
|
skew 1 ^Skew Skew (ppm)"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats - Frequencies stability'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (ppm)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
116
services/munin-chrony-tracking-stratum
Executable file
116
services/munin-chrony-tracking-stratum
Executable file
@@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="stratum 1 ^Stratum Stratum"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats - Stratum'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (stratum)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo 'stratum.warning 8'
|
||||||
|
echo 'stratum.critical 11'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
118
services/munin-chrony-tracking-time
Executable file
118
services/munin-chrony-tracking-time
Executable file
@@ -0,0 +1,118 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="systime 1000000 ^System.time System Time (us)
|
||||||
|
offsetlast 1000000 ^Last.offset Last Offset (us)
|
||||||
|
offsetrms 1000000 ^RMS.offset RMS Offset (us)
|
||||||
|
rootdelay 1000000 ^Root.delay Root Delay (us)
|
||||||
|
rootdispersion 1000000 ^Root.dispersion Root Dispersion (us)"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats - Time'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (time)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
115
services/munin-chrony-tracking-time-root
Normal file
115
services/munin-chrony-tracking-time-root
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="rootdelay 1000000 ^Root.delay Root Delay (us)
|
||||||
|
rootdispersion 1000000 ^Root.dispersion Root Dispersion (us)"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats - Root Time'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (time)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
114
services/munin-chrony-tracking-update-time
Executable file
114
services/munin-chrony-tracking-update-time
Executable file
@@ -0,0 +1,114 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: <<=cut
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
parse Chrony Tracking output for timeserver status information
|
||||||
|
|
||||||
|
=head1 APPLICABLE SYSTEMS
|
||||||
|
|
||||||
|
Any system with a local chronyd service.
|
||||||
|
|
||||||
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
|
No configuration.
|
||||||
|
|
||||||
|
=head1 MAGIC MARKERS
|
||||||
|
|
||||||
|
#%# family=auto
|
||||||
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
=head1 VERSION
|
||||||
|
|
||||||
|
Revision 0.1 2008/08/23 13:06:00 joti
|
||||||
|
|
||||||
|
First version only chronyc tracking, autodetection included.
|
||||||
|
|
||||||
|
Revision 0.2 2008/10/11 16:09:00 joti
|
||||||
|
|
||||||
|
Added scaling of other values to match with frequency, added more description to fields
|
||||||
|
|
||||||
|
Revision 0.3 2014/02/16 zjttoefs
|
||||||
|
|
||||||
|
reduce forking by using awk
|
||||||
|
do not limit output precision
|
||||||
|
add stratum monitoring
|
||||||
|
detect slow/fast time or freqency and adjust sign of value accordingly
|
||||||
|
remove commented out code
|
||||||
|
|
||||||
|
Revision 0.4 2016/11/10 Lars Kruse
|
||||||
|
|
||||||
|
rewrite field handling
|
||||||
|
use "which" for "chronyc" location
|
||||||
|
switch from "bash" to "sh"
|
||||||
|
fix exit code of failing "autoconf"
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
joti
|
||||||
|
zjttoefs
|
||||||
|
Lars Kruse <devel@sumpfralle.de>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
CHRONYC="$(which chronyc | head -1)"
|
||||||
|
|
||||||
|
# Frequency has extremely higher values than other. Therefore they are fitted by scaling via suitable factors.
|
||||||
|
# field definitions:
|
||||||
|
# - munin fieldname
|
||||||
|
# - factor for graph visualization (all values are supposed to reach a similar dimension)
|
||||||
|
# - regular expression of the chrony output line (may not contain whitespace, case insensitive)
|
||||||
|
# - label (may include "%d" for including the factor; may contain whitespace)
|
||||||
|
fields="updateinterval 1 ^Update.interval Update Interval (s)"
|
||||||
|
|
||||||
|
# chrony example output (v2.4.1):
|
||||||
|
# Reference ID : 131.188.3.221 (ntp1.rrze.uni-erlangen.de)
|
||||||
|
# Stratum : 2
|
||||||
|
# Ref time (UTC) : Thu Nov 10 22:39:50 2016
|
||||||
|
# System time : 0.000503798 seconds slow of NTP time
|
||||||
|
# Last offset : +0.000254355 seconds
|
||||||
|
# RMS offset : 0.002186779 seconds
|
||||||
|
# Frequency : 17.716 ppm slow
|
||||||
|
# Residual freq : +0.066 ppm
|
||||||
|
# Skew : 4.035 ppm
|
||||||
|
# Root delay : 0.042980 seconds
|
||||||
|
# Root dispersion : 0.005391 seconds
|
||||||
|
# Update interval : 258.4 seconds
|
||||||
|
# Leap status : Normal
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "autoconf" ]; then
|
||||||
|
if [ -n "$CHRONYC" ] && [ -x "$CHRONYC" ]; then
|
||||||
|
echo yes
|
||||||
|
else
|
||||||
|
echo "no (missing 'chronyc' executable)"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
echo 'graph_title Chrony Tracking Stats - Update interval'
|
||||||
|
echo 'graph_args --base 1000 -l 0'
|
||||||
|
echo 'graph_vlabel (time)'
|
||||||
|
echo 'graph_category time'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
# insert the factor, if "%d" is part of the label
|
||||||
|
printf "${fieldname}.label $label\n" "$factor"
|
||||||
|
echo "${fieldname}.type GAUGE"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrony_status="$("$CHRONYC" tracking)"
|
||||||
|
echo "$fields" | while read fieldname factor regex label; do
|
||||||
|
status_line="$(echo "$chrony_status" | grep -i -- "$regex " | cut -d ":" -f 2-)"
|
||||||
|
if [ -z "$status_line" ]; then
|
||||||
|
value="U"
|
||||||
|
else
|
||||||
|
# the keyword "slow" indicates negative values
|
||||||
|
value="$(echo "$status_line" | awk '{ /slow/ ? SIGN=-1 : SIGN=1; print $1 * SIGN * '"$factor"' }')"
|
||||||
|
fi
|
||||||
|
echo "${fieldname}.value $value"
|
||||||
|
done
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -18,9 +18,8 @@ mkIf flags.nixos-manual {
|
|||||||
# Services
|
# Services
|
||||||
|
|
||||||
## documentation sur ctrl + alt + F8
|
## documentation sur ctrl + alt + F8
|
||||||
services.nixosManual = {
|
documentation.nixos = {
|
||||||
enable = true;
|
enable = true;
|
||||||
showManual = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Réseau
|
# Réseau
|
||||||
|
|||||||
35
services/pipewire.nix
Normal file
35
services/pipewire.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
annuaire = config.r6d.machines;
|
||||||
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
|
flags = currentMachine.configurationFlags;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf flags.pipewire {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
helvum # patchbay pipewire
|
||||||
|
paprefs # préferences pulseaudio
|
||||||
|
pavucontrol # mixer pulseaudio
|
||||||
|
pa_applet # status et contrôle dans le system tray
|
||||||
|
];
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,18 +3,25 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.print {
|
mkIf flags.print {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
samba
|
||||||
|
python310Packages.pysmbc
|
||||||
|
];
|
||||||
|
services.samba.enable = true;
|
||||||
# Services
|
# Services
|
||||||
## Enable CUPS to print documents.
|
## Enable CUPS to print documents.
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [
|
drivers = [
|
||||||
pkgs.samsung-unified-linux-driver
|
pkgs.samsung-unified-linux-driver
|
||||||
|
pkgs.fxlinuxprint
|
||||||
|
pkgs.gutenprint
|
||||||
];
|
];
|
||||||
# Suppression automatique des fichiers temporaires.
|
# Suppression automatique des fichiers temporaires.
|
||||||
# Par défaut, cups conserve une copie de ce qui a été imprimé
|
# Par défaut, cups conserve une copie de ce qui a été imprimé
|
||||||
@@ -24,4 +31,6 @@ mkIf flags.print {
|
|||||||
PreserveJobFiles No
|
PreserveJobFiles No
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
services.avahi.enable = true;
|
||||||
|
services.avahi.nssmdns = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ mkIf flags.pulseaudio {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
paprefs # préferences pulseaudio
|
paprefs # préferences pulseaudio
|
||||||
pavucontrol # mixer pulseaudio
|
pavucontrol # mixer pulseaudio
|
||||||
|
pa_applet # status et contrôle dans le system tray
|
||||||
];
|
];
|
||||||
|
|
||||||
# Pulse Audio
|
# Pulse Audio
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -11,11 +11,20 @@ mkIf flags.scanner {
|
|||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Driver
|
||||||
|
hplip # Scanner HP
|
||||||
|
python39Packages.pyqt4 # dépendance hplip
|
||||||
|
|
||||||
|
# Outils pour exploiter les scanners
|
||||||
simple-scan
|
simple-scan
|
||||||
];
|
];
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
hardware.sane.enable = true;
|
hardware.sane.enable = true;
|
||||||
|
services.saned = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = "192.168.0.0/24";
|
||||||
|
};
|
||||||
|
|
||||||
# Réseau
|
# Réseau
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -26,6 +26,9 @@ mkIf true {
|
|||||||
# Use kernel sandbox mechanisms where possible in unprivilegied processes
|
# Use kernel sandbox mechanisms where possible in unprivilegied processes
|
||||||
# Systrace on OpenBSD, Seccomp on Linux, seatbelt on MacOSX/Darwin, rlimit elsewhere.
|
# Systrace on OpenBSD, Seccomp on Linux, seatbelt on MacOSX/Darwin, rlimit elsewhere.
|
||||||
UsePrivilegeSeparation sandbox
|
UsePrivilegeSeparation sandbox
|
||||||
|
|
||||||
|
# Permet de gérer le nombre de connexions multiplexées en simultané
|
||||||
|
MaxSessions 200
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -3,26 +3,18 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.xmonad {
|
mkIf flags.xmonad {
|
||||||
|
services.dbus.packages = with pkgs; [ dconf ];
|
||||||
# Paquets
|
programs.dconf.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
haskellPackages.xmobar
|
|
||||||
trayer
|
|
||||||
];
|
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
services.xserver.windowManager.xmonad = {
|
services.xserver.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
extraPackages = haskellPackages: [
|
|
||||||
haskellPackages.xmobar
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
let
|
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.fqdn}";
|
||||||
flags = currentMachine.configurationFlags;
|
flags = currentMachine.configurationFlags;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ mkIf true {
|
|||||||
gnupg opensc pcsctools libu2f-host yubikey-personalization
|
gnupg opensc pcsctools libu2f-host yubikey-personalization
|
||||||
];
|
];
|
||||||
|
|
||||||
security.pam.enableU2F = true;
|
security.pam.u2f.enable = true;
|
||||||
|
|
||||||
/*users.extraUsers.joko = {
|
/*users.extraUsers.joko = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user