Compare commits

..

104 Commits

Author SHA1 Message Date
c8f8107989 suppression hubicfuse 2026-01-10 14:43:55 +01:00
Yves Dubromelle
7feb101a90 terminfo pour kity et rio 2025-08-06 09:50:25 +02:00
Yves Dubromelle
6e013d37dd formateurs nix 2025-08-06 09:50:17 +02:00
Yves Dubromelle
b6fe23623d nil -> nixd 2025-08-06 09:50:07 +02:00
Yves Dubromelle
b2fd46917d ajout media-downloader 2023-12-25 12:50:49 +01:00
Yves Dubromelle
d52b1a3d9c atom supprimé de nixpkgs 2023-10-16 19:31:35 +02:00
Yves Dubromelle
04cfe12f34 qucs -> qucs-s 2023-10-16 19:31:20 +02:00
Yves Dubromelle
66f27557f7 -pyqt4: plus dans les paquets 2023-09-07 09:49:58 +02:00
Yves Dubromelle
d237134bcd client dhcp supprimé des paquets 2023-08-20 19:09:40 +02:00
Yves Dubromelle
1abecd8f8a écouteur de capteurs sur 433 MHz 2023-08-15 23:36:18 +02:00
Yves Dubromelle
f6a58ed4e4 ajout de logiciels SDR 2023-08-15 19:49:21 +02:00
Yves Dubromelle
e2cb3422bd upstream: fonts -> packages 2023-08-15 19:49:05 +02:00
Yves Dubromelle
cb013ea75f affichage dans le terminal des maj/ajout/suppression 2023-08-05 14:57:18 +02:00
Yves Dubromelle
542ae88339 transmission-qt fait du remote également (plus récent que transgui) 2023-08-05 14:55:11 +02:00
Yves Dubromelle
cbb90ffad0 transmission-remote est mort, on passe à transgui 2023-07-30 22:30:46 +02:00
Yves Dubromelle
1064756989 upstream: chmt clean /tmp on boot 2023-07-27 13:36:43 +02:00
Yves Dubromelle
cc2199054b activation du super prompt starfish 2023-07-25 00:34:41 +02:00
Yves Dubromelle
9f9cb0cf94 fish a sa place à côté de bash 2023-07-25 00:34:17 +02:00
Yves Dubromelle
a44decfa44 fxlinuxprint ne semble plus dispo en ligne 2023-07-24 22:39:07 +02:00
Yves Dubromelle
cadee242a0 rust: il est conseillé de faire tout passer par rustup 2023-07-24 22:34:56 +02:00
Yves Dubromelle
342ccbf143 ajout de delta 2023-07-01 22:26:37 +02:00
Yves Dubromelle
2270cf730d vim: ajout client LSP ALE 2023-07-01 21:35:19 +02:00
Yves Dubromelle
589f090d6f LSP pour nix et bash 2023-07-01 15:29:17 +02:00
Yves Dubromelle
838d1f4895 éditeur helix 2023-07-01 15:29:07 +02:00
Yves Dubromelle
280eb0714a gnome3 -> gnome 2022-10-04 09:43:55 +02:00
Yves Dubromelle
b0c7a106bf rustine pour gnuradio 3.8 avec les modules externes restant dans nixpkgs 2022-08-13 15:26:23 +02:00
f01bda8781 Merge branch 'nixos-unstable' 2022-08-13 12:38:30 +02:00
fe50587190 Merge nixos-21.05-preparation fixes #9 2022-08-13 12:29:49 +02:00
c1b40f9d07 nouveau site pour vérifier le status de NixOS 2022-08-12 15:31:51 +02:00
Yves Dubromelle
06d73c9519 lancement auto des plugins vim selon le type de fichier 2022-08-12 15:31:51 +02:00
Yves Dubromelle
f7264ae434 vim: nouvelle façon d'appeler les plugins, reorga du code 2022-08-05 16:03:14 +02:00
Yves Dubromelle
4fd9d0d7f8 config git au format Nix 2022-08-05 14:52:06 +02:00
Yves Dubromelle
963b0b9d4b configuration gnome active pour xmonad 2022-06-10 15:27:40 +02:00
Yves Dubromelle
51b98cda4f nettoyage paquets xmonad inutiles 2022-06-10 15:27:15 +02:00
Yves Dubromelle
f751e24839 outil pour générer une dérivation Nix dans un projet Rust 2022-06-08 15:52:09 +02:00
Yves Dubromelle
1b1aebd0a0 ajout du plugin vim-wiki 2022-06-08 15:51:30 +02:00
Yves Dubromelle
812bc511e0 impression vers des imprimantes Samba 2022-06-08 15:51:06 +02:00
Yves Dubromelle
e55568d1c6 rdfind cassé dans les paquets 2022-05-07 12:21:28 +02:00
Yves Dubromelle
d4f2298518 fix: mauvaise couleur de fond dans vim dans certains cas 2022-04-25 10:00:11 +02:00
Yves Dubromelle
2fad38532f nouvelle syntaxe pour l'optimisation du store 2022-03-14 09:21:37 +01:00
Yves Dubromelle
28cf2d2071 lot de renommages dans nixpkgs 2022-03-03 11:57:10 +01:00
Yves Dubromelle
f6f3befe2f activation des sous-commandes nix et des flakes 2022-03-02 17:36:54 +01:00
Yves Dubromelle
257f59054d renommage d'options Nix 2022-03-01 22:06:12 +01:00
Yves Dubromelle
518054fd0a gestionnaire graphique bluetooth 2022-03-01 20:55:11 +01:00
Yves Dubromelle
03bcc056c1 ajout d'un module pipewire en prévision de remplacement de pulseaudio 2022-03-01 20:35:28 +01:00
Yves Dubromelle
7679f865b0 lazydocker pour controller les imgaes et containers dans le terminal 2022-03-01 20:20:42 +01:00
Yves Dubromelle
2d63aae5a1 syntaxe fish pour vim 2022-03-01 20:13:16 +01:00
Yves Dubromelle
48a257405a préconisations des devs d'OpenJDK : utilisons la dernière version disponible 2022-03-01 20:11:25 +01:00
Yves Dubromelle
30e2f31255 ajout de kitty : terminal virtuel rendu par GPU 2022-01-27 23:39:05 +01:00
Yves Dubromelle
0364ea9b29 ajout de lazygit ; interface terminal sympa pour git 2022-01-27 23:36:07 +01:00
Yves Dubromelle
b2505f45c4 prise en compte globale de fish 2022-01-27 23:33:34 +01:00
Yves Dubromelle
962c052b29 seule la maj auto a besoin d'être conditionnelle; nom de fichier 2021-11-06 15:21:27 +01:00
Yves Dubromelle
032d7e8e1a auto-optimisation du store, options du ramasse-miettes 2021-11-06 14:59:51 +01:00
Yves Dubromelle
af35de1639 jetbrains mono en police mono par défaut (pour uniformiser avec Intellij) 2021-10-12 12:29:32 +02:00
Yves Dubromelle
c8ae50be5b ajout de rustup pour faciliter l'installation de toolchain rust 2021-10-11 22:52:08 +02:00
Yves Dubromelle
9310d01af6 option dédiée au matériel rtl-sdr 2021-10-11 22:50:13 +02:00
Yves Dubromelle
ea33bac49b options dédiées pour slock, spacefm et udevil 2021-10-11 22:38:42 +02:00
Yves Dubromelle
204fb83207 git a son option dédiée 2021-10-11 22:24:56 +02:00
Yves Dubromelle
cf3c3c3603 fix: infos git dans le prompt 2021-10-11 22:24:09 +02:00
Yves Dubromelle
edad20c5c0 prompt: commentaires 2021-10-11 22:23:51 +02:00
Yves Dubromelle
ed937ba5bc activation par défaut de l'agent gnupg 2021-05-18 09:55:00 +02:00
Yves Dubromelle
3de6332c3e pgadmin commenté, plus mis à jour, tire un openssl déprécié 2021-05-09 18:58:30 +02:00
Yves Dubromelle
e26453fc7e gnuradio tire un vieux paquet python, Pilllow 6.2.2, marqué insecure 2021-05-08 00:16:32 +02:00
Yves Dubromelle
67b9f5b0f7 dbus est désormais tout le temps actif par défaut 2021-05-07 23:49:44 +02:00
Yves Dubromelle
8f4f8ef953 déplacement d'options et paquets upstream 2021-05-07 22:28:44 +02:00
Yves Dubromelle
c33f0f9c50 mise à jour paquets python en 3.9 2021-05-07 07:15:30 +02:00
Yves Dubromelle
2064606f18 paquets marqués comme cassés dans nixpkgs 2021-05-07 07:14:24 +02:00
Yves Dubromelle
4a5f0ba1a7 utilisation de networking.fqdn (hostName + domain)
Les nouvelles règles dans NixOS obligent à avoir dans networking.hostName
un label DNS strict, il faut donc préciser le domaine à part dans
networking.domain.
networking.fqdn est une facilité pour concaténer les deux, en lecture
seule.
2021-05-06 23:50:07 +02:00
Yves Dubromelle
9ed945bba8 channel nixos-unstable 2021-05-06 23:23:57 +02:00
65e5776f86 ménage appli pour préparation migration NixOS 20.03 2020-06-30 18:58:17 +02:00
Yves Dubromelle
235e636451 client mumble à nouveau fréquentable (build sans broncher) 2020-04-16 01:19:06 +02:00
Yves Dubromelle
e849c55297 radio: dump1090 écoute ADB-S des avions et placement sur une carte 2020-04-16 01:19:06 +02:00
Yves Dubromelle
1e51d11778 radio: CubicSDR comme alternative à gqrx 2020-04-16 01:19:06 +02:00
Yves Dubromelle
f39f486f51 awesome: meta+l pour slock et suspend combinés 2020-04-16 01:19:06 +02:00
Yves Dubromelle
2a5809c3de radio: chirp pour programmer les radios portatives 2020-04-16 01:19:06 +02:00
Yves Dubromelle
7681f7774e nixos: 19.03 -> 19.09 2019-11-19 22:38:25 +01:00
Yves Dubromelle
fe0ea31e30 les variantes de git se catapultent -> git full par défaut 2019-08-21 00:11:09 +02:00
f7de6a69bd oops 2019-07-09 19:53:00 +02:00
9151b4dfc5 radio : ménage dans les paquets 2019-07-09 02:21:18 +02:00
Yves Dubromelle
209b1b3e47 outils dans le system tray pour : batterie, volume, bluetooth 2019-06-23 19:13:23 +02:00
Yves Dubromelle
8355abcbfc le bluetooth peut être éteint par défaut (ça consomme) 2019-06-23 19:12:47 +02:00
Yves Dubromelle
9150a37969 gestion de l'énergie : TLP fait bien le job 2019-06-19 09:51:46 +02:00
Yves Dubromelle
59d243bb9d wireshark: package -> option (gestion fine des droits) 2019-06-10 17:22:56 +02:00
Yves Dubromelle
c7a1a433ef nm-applet: package -> option (activation automatique) 2019-06-10 17:21:00 +02:00
Yves Dubromelle
da750b9c33 java 11 est la LTS officielle, autant l'utiliser 2019-06-10 12:53:08 +02:00
Yves Dubromelle
0ff5f2934e synaptics est dépcrécié -> libinput 2019-06-10 12:53:08 +02:00
Yves Dubromelle
f0d5881c80 ajout de ant et gradle en plus de maven, pas de jaloux :) 2019-06-10 12:53:08 +02:00
Yves Dubromelle
16b0a5b617 nixpkgs a une nouvelle option pour gérer java + JAVA_HOME 2019-06-10 12:53:08 +02:00
de02b42953 munin : ajout de monitoring pout chrony 2019-06-06 23:32:51 +02:00
25275ec0dd make : ajustement statistiques ntp 2019-06-01 19:56:37 +02:00
19258654cf nixos-manual : ajustement clef de config suite migration NixOS 19.03 2019-05-26 13:07:20 +02:00
7a7bcc99f2 EXP désactivation de darcs 2019-05-18 12:15:09 +02:00
dddc3e79e0 ajout font awesome 2019-05-18 12:14:23 +02:00
1e8b78d720 make: ajout cible 'list-installed-packages' 2019-05-18 12:14:23 +02:00
366eebee8a radio : compilation ok gnu-radio 2019-05-18 12:14:23 +02:00
5ecdc764ac make: commande lancer awesome en mode de test 2019-05-18 12:14:23 +02:00
Yves Dubromelle
a5e03f769b /!\ migration à nixos 19.03 (18.03 plus mis à jour) 2019-05-09 12:30:21 +02:00
Yves Dubromelle
c642afb7e6 formater de code haskell en vogue 2019-05-09 08:24:26 +02:00
Yves Dubromelle
1127daa925 désactivation de paquets haskell qui ne build plus 2019-05-09 08:23:44 +02:00
Jean-Pierre PRUNARET
328eabc735 ssh: augmentation du nombre de connexions simultanées en mode proxy 2018-12-31 14:17:45 +01:00
5d2219ba0a Merge remote-tracking branch 'origin/nixos-unstable' 2018-05-05 22:20:27 +02:00
023857ba73 Merge remote-tracking branch 'origin/nixos-unstable' 2017-03-29 23:03:28 +02:00
af4c0b313e Merge branch 'master' of es006/nixos-template-base into master 2017-03-04 11:13:23 +00:00
es006
8ca891e79b le script byobu va chercher la liste des sous modules 2017-03-04 11:03:04 +00:00
96 changed files with 1132 additions and 288 deletions

View File

@@ -3,6 +3,7 @@ TIME=time
CHRONY_STATUS=chronyc tracking
CHRONY_STATS=chronyc sources -v
CHRONY_STATS_SOURCES=chronyc sourcestats
all: rebuild-switch
date
@@ -24,11 +25,17 @@ clean-log:
full-auto: submodules-update upgrade clean optimise
@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:
$(TIME) nix-store --optimise
$(TIME) nix store optimise
rebuild-build:
nix-channel --add https://nixos.org/channels/nixos-18.03 nixos
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
$(TIME) time nixos-rebuild build --fallback --show-trace
rebuild-switch:
@@ -45,13 +52,13 @@ show-roots:
show-time:
-@$(CHRONY_STATUS) && $(CHRONY_STATS)
-@watch -d -n 5 "$(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"
store-repair:
$(TIME) nix-store --verify --check-contents --repair
upgrade:
nix-channel --add https://nixos.org/channels/nixos-18.03 nixos
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
$(TIME) nixos-rebuild switch --upgrade --fallback --show-trace
##--------- Commandes spécifiques pour NixOS -- Opérations non courantes
@@ -106,3 +113,6 @@ tmpfs-umount:
tmpfs-destroy: tmpfs-umount
rmdir /mnt/tmpfs
##- Test awesome
test-awesome:
Xephyr :5 & sleep 1; DISPLAY=:5 awesome

View File

@@ -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.~~
# 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
# 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`
* 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 domaine `networking.domain = "<X>";`
* tester la configuration : `nixos-rebuild build`
* corriger et ajouter les éléments manquant (notamment dans `private/annuaire.nix` )
* lorsque tout semble bon, vérifier :

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -21,34 +21,36 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
xorg.xkill # pour 'tuer une application'
## Gestionnaire de fenêtre & Thème
gnome3.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM
gnome.adwaita-icon-theme # thème d'icone - semble fonctionner avec spaceFM
## Manipulation de fichier
#kde5.dolphin # gestionnaire de fichiers graphique
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
pcmanfm # gestionnaire de fichiers graphique
spaceFM # gestionnaire de fichiers graphique
#vifm # gestionnaire de fichiers basé sur VIM (console)
## Terminal
kitty # terminal avec rendu par GPU
sakura # terminal
];
# Polices supplémentaires
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
fira # police créée pour Firefox
fira-code # idem fira-mono + ligatures pour la programmation
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
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
security.wrappers = {
# pour le montage des media amovibles
devmon.source = "${pkgs.udevil}/bin/devmon";
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";
programs = {
slock.enable = true;
spacefm.enable = true;
udevil.enable = true;
};
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -29,7 +29,7 @@ mkIf (flags.officeSuite && flags.graphical) {
## Visionneuse
#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
qpdfview # pdf
gqview # visionneuse image & gestion basique de collection

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -19,6 +19,6 @@ mkIf (flags.conception-assistee && flags.graphical) {
## Électricité & Électronique
fritzing # schéma de câblages "jolis"
kicad # ensemble d'outils de conception électronique
qucs # simulateur de circuits électroniques
qucs-s # simulateur de circuits électroniques
];
}

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -18,16 +18,20 @@ environment.systemPackages = with pkgs; [
firefox
## Mail & Discussion (texte, audio)
clawsMail
claws-mail
hexchat
quasselClient
#mumble
mumble
pidgin
thunderbird
# Transfert de fichier
filezilla
transmission_gtk
transmission_remote_gtk
transmission-gtk
transmission-qt
transgui
# Téléchargement de vidéos
media-downloader
];
}

View File

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -13,6 +13,6 @@ mkIf (flags.developpement-haskell && flags.graphical) {
environment.systemPackages = with pkgs; [
] ++ (with pkgs.haskellPackages; [
# Haskell lib
threadscope # visualisation des threads (<bidule>.eventlog)
#threadscope # visualisation des threads (<bidule>.eventlog)
]);
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,6 +12,6 @@ mkIf (flags.developpement-java && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
# IDE
idea.idea-community # IntelliJ IDEA
jetbrains.idea-community # IntelliJ IDEA
];
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -11,9 +11,9 @@ mkIf (flags.jetbrains-licensed && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
idea.idea-ultimate
idea.clion
idea.datagrip
idea.pycharm-professional
jetbrains.idea-ultimate
jetbrains.clion
jetbrains.datagrip
jetbrains.pycharm-professional
];
}

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,7 +12,7 @@ mkIf (flags.developpement && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
# 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
# Documentation
@@ -21,14 +21,10 @@ mkIf (flags.developpement && flags.graphical) {
# Gestion des sources
#gitg # interface pour utiliser git (historique, commit)
gitstats # génère un site web statique avec des statistiques
gitAndTools.gitFull # pour gitk
git-cola # interface pour utiliser git (historique, commit)
## Visualisation & outils de diff
#gource # visualisation en mouvement de l'historique git
meld # outil de comparaison graphique
# Editeur texte
atom
];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,15 +3,19 @@
let
inherit (lib) mkIf;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf (true && flags.graphical) {
# Diagnostic réseau Wireshark (droits fins par le groupe wireshark)
programs.wireshark = {
enable = true;
package = pkgs.wireshark;
};
# Paquets
environment.systemPackages = with pkgs; [
## Diagnostic
wireshark
];
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,15 +12,18 @@ mkIf (flags.radio && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
## GUI
gqrx # GUI
#gnuradio # Software Defined Radio (SDR) software
gnuradio-with-packages
chirp # Configuration de radios portatives
gqrx # GUI
cubicsdr # Another GUI
sdrpp
sdrangel
gnuradio-with-packages # Software Defined Radio (SDR) software
## A Trier
#
#gnuradio-osmosdr # Gnuradio block for OsmoSDR and rtl-sdr
#inspectrum # Tool for analysing captured signals from sdr receivers
];
inspectrum # Tool for analysing captured signals from sdr receivers
kalibrate-rtl # Calculate local oscillator frequency offset in RTL-SDR devices
nixpkgs.config.permittedInsecurePackages = [
"python2.7-Pillow-6.2.2"
];
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -11,7 +11,7 @@ mkIf (flags.securitySuite && flags.graphical) {
# Paquets
environment.systemPackages = with pkgs; [
gnome3.seahorse # gestionnaire graphique de clef GPG
gnome.seahorse # gestionnaire graphique de clef GPG
#yubikey-personalization-gui # utilisation de la clef Yubikey
];
}

View File

@@ -3,17 +3,17 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf true {
nixpkgs.config.packageOverrides = pkgs: {
clawsMail = pkgs.clawsMail.override {
claws-mail = pkgs.claws-mail.override {
enablePgp = 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;
enablePluginRavatar = true;
enablePluginSmime = true;
@@ -29,13 +29,13 @@ mkIf true {
# bug connu : https://nixos.org/nix-dev/2014-December/015225.html
# 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 -
gnuradio-with-packages = pkgs.gnuradio-with-packages.override {
extraPackages = with pkgs; [
gnuradio-ais
gnuradio-gsm
gnuradio-nacl
gnuradio-osmosdr # support des dongle Realtek
gnuradio-rds # support du décodage de RDS sur les radio FM
gnuradio-with-packages = pkgs.gnuradio3_8.override {
extraPackages = with pkgs.gnuradio3_8Packages; [
ais
#gsm
#nacl
osmosdr # support des dongle Realtek
rds # support du décodage de RDS sur les radio FM
];
};

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -14,7 +14,6 @@ mkIf true {
# Adminsys
bind # utilisé pour les utilitaires comme dig
cowsay # pour ansible & 4lulz
dhcp # client dhcp
iotop
lm_sensors
lshw
@@ -23,7 +22,7 @@ mkIf true {
powerline-fonts
powertop
#ansible
python36Packages.glances
glances
pv # afficher le débit d'un flux dd if=/dev/zero | pv | dd of=/dev/null
sysstat # pour la commande "iostat -x -1" de monitoring d'activité disque
usbutils
@@ -40,11 +39,10 @@ mkIf true {
## Montage de filesystem
curlftpfs # ftp
exfat # Pour monter les FAT avec Fuse
hubicfuse # montage hubic
ntfs3g # ntfs
samba # partages windows
squashfsTools # squashfs
sshfsFuse # ssh
sshfs-fuse # ssh
## Gestion de FS
nfs-utils
@@ -53,6 +51,6 @@ mkIf true {
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.
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
];
}

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -13,7 +13,7 @@ mkIf flags.officeSuite {
environment.systemPackages = with pkgs; [
# Bureautique
aspell aspellDicts.fr # correction d'ortographe
python36Packages.grammalecte # correction gramatical
python39Packages.grammalecte # correction gramatical
# Gestion de tâche
taskwarrior # gestionnaire de tâches en console
@@ -24,7 +24,7 @@ mkIf flags.officeSuite {
#jekyll # générateur statique de site web
#odpdown # conversion md -> presentation ODP : https://github.com/thorstenb/odpdown
pandoc
haskellPackages.pandoc-citeproc
#haskellPackages.pandoc-citeproc # ***BROKEN***
texlive.combined.scheme-full # distribution LaTeX
#texLive # distribution LaTeX de base
#texLiveBeamer # paquets et extensions pour Beamer

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -15,7 +15,7 @@ environment.systemPackages = with pkgs; [
## Réseaux sociaux
#turses # client twitter en ncurse
#python36Packages.rainbowstream # client twitter en console
#python39Packages.rainbowstream # client twitter en console
#rtv # client reddit en console
## Mail & Discussion (texte, audio)

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,7 +12,7 @@ mkIf true {
# Paquets
environment.systemPackages = with pkgs; [
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
gnupg # GPG
htop # monitoring
@@ -25,12 +25,58 @@ mkIf true {
pinentry # pour taper les mots de passe gpg
psmisc # fournis les utilitaires comme killall, fuser, pstree
#python # python -- python -m SimpleHTTPServer 8000
shared_mime_info # MIME info
shared-mime-info # MIME info
tmux # nécessaire pour byobu
tree # affiche une arborescence de fichiers et dossiers
usbutils
(import ./vim.nix)
wget # client HTTP console
which # pour connaitre le chemin d'un exécutable
helix # Éditeur post-moderne
# outils pour l'édition Nix
nixd # LSP pour Nix
nixfmt
nixfmt-tree
nodePackages.bash-language-server # LSP pour Bash
delta # visionneur de différences
kitty.terminfo
rio.terminfo
];
programs = {
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;
};
};
}

View File

@@ -3,7 +3,7 @@
let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -27,6 +27,7 @@ in
./edition-video.nix # modifier les vidéos
./jeux.nix # jouer, tout simplement ;)
./radio.nix # outils pour faire de la radio SDR
./vim.nix # vim avec plugins
## if isDesktop
./adminsys.nix # pour gérer le système dans son ensemble et les services

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -19,9 +19,10 @@ mkIf flags.developpement-haskell {
] ++ (with pkgs.haskellPackages; [
# Haskell lib
autoproc # ? procmail
darcs # gestionnaire de version éponyme
ghc-mod # outil d'analyse de code haskell utilisé par IDE
hindent # indentation code
#brittany # formatteur de code
#darcs # gestionnaire de version éponyme
#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
#postgrest # mapper HTTP <-> PostgreSQL
servant # génération d'API REST
@@ -29,7 +30,7 @@ mkIf flags.developpement-haskell {
turtle # genre shell-scripting
# Application perso
hahp
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
#hahp
#pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc ***BROKEN***
]);
}

View File

@@ -3,19 +3,22 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf flags.developpement-java {
# Installe le paquet + JAVA_HOME
programs.java = {
enable = true;
};
# Paquets
environment.systemPackages = with pkgs; [
# Java
# Systèmes de build autour de java
ant
maven
openjdk
gradle
];
environment.variables = {
JAVA_HOME = "${pkgs.openjdk}";
};
}

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,7 +12,7 @@ mkIf flags.developpement-rust {
# Paquets
environment.systemPackages = with pkgs; [
# Rust
cargo # récupération des dépendances + compilation projet rust
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
];
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -25,7 +25,6 @@ mkIf flags.developpement {
# Gestion des sources
cloc # outil pour compter les lignes de code source
git gitAndTools.gitSVN # git et git-svn
mercurial
subversion

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -15,7 +15,7 @@ mkIf true {
iperf # 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
telnet
inetutils
## Diagnostic
arp-scan

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -22,10 +22,9 @@ mkIf flags.radio {
gnss-sdr # Global Navigation Satellite Systems software-defined receiver
liquid-dsp # Digital signal processing library for software-defined radios
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
rtl_433 # Read sensors on 433 MHz
];
# Configuration matérielle
boot.blacklistedKernelModules = [
"dvb_usb_rtl28xxu"
];
hardware.rtl-sdr.enable = true;
}

View File

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

View File

@@ -1,20 +1,28 @@
with import <nixpkgs> {};
{pkgs, ... }:
vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = builtins.readFile ./vimrc;
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [
# Here you can place all your vim plugins
# They are installed managed by `vam` (a vim plugin manager)
#"vim-addon-nix"
"elm-vim"
"vim-nix"
"wombat256-vim"
]; }
];
let
myVim = pkgs.vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = builtins.readFile ./vimrc;
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [
wombat256-vim
ale
];
opt = [
elm-vim
vim-fish
vimwiki
];
};
};
in {
programs.vim = {
defaultEditor = true;
package = myVim;
};
}

View File

@@ -2,6 +2,12 @@
" This must be first, because it changes other options as a side effect.
set nocompatible
filetype plugin on
syntax on
" Réglages ALE
let g:ale_completion_enabled = 1
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
@@ -32,3 +38,10 @@ if &t_Co > 8
let &colorcolumn="80,".join(range(120,999),",")
highlight ColorColumn ctermbg=235 guibg=#2c2d27
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=''

View File

@@ -5,9 +5,9 @@ let
cfg = config.r6d.config-generator;
pfl = config.r6d.profiles;
comp = config.r6d.computers;
host = config.networking.hostName;
host = config.networking.fqdn;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -43,7 +43,8 @@ in
#tincAddress = "192.168.12.8/24";
(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.config-generator = {

View File

@@ -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;
}

View File

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

View File

@@ -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
PS1_USER='\[$(tput setaf 27)\]'
PS1_HOST='\[$(tput setaf 37)\]'
@@ -18,10 +21,12 @@ fi
BOLD='\[$(tput bold)\]'
RESET='\[$(tput sgr0)\]'
# Définition du prompt
# Username or red color if root
if [ $UID = 0 ]; then
PS1_ID=$PS1_ROOT
else
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
fi
# Prompt definition
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET

View File

@@ -3,7 +3,7 @@
let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -20,9 +20,9 @@ in
# commandées par config-generator
## option de configuration spécifique
./auto-upgrade.nix # mise à jour automatique du système
./awesome.nix # pour le gestionaire de fenêtres awesome
./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
];
}

View File

@@ -3,16 +3,13 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
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.
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)
system.copySystemConfiguration = true;
@@ -24,10 +21,10 @@ in
#security.grsecurity.enable = true;
# Ménage de /tmp au boot
boot.cleanTmpDir = true;
boot.tmp.cleanOnBoot = true;
# Activation des pages de manuel
programs.man.enable = true;
documentation.man.enable = true;
# Paquets
@@ -46,13 +43,24 @@ in
vi = "vim";
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
};
etc.gitconfig.text = builtins.readFile ./gitconfig;
};
programs.bash = {
enableCompletion = true;
promptInit = builtins.readFile ./bash-prompt.sh;
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
programs = {
fish.enable = true;
bash = {
enableCompletion = true;
promptInit = builtins.readFile ./bash-prompt.sh;
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
};
};
# Prompt rapide et plein de fonctionnalités
programs.starship = {
enable = true;
settings = {
time.disabled = false;
shell.disabled = false;
};
};
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern
programs.ssh.extraConfig = ''

View File

@@ -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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -12,22 +12,29 @@ mkIf flags.laptop {
# Gestion spécifique pour PC portable
## Gestion de l'énergie
powerManagement.cpuFreqGovernor = "powersave";
services.tlp.enable = true;
## Activation d'un gestionnaire de réseau
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
environment.systemPackages = with pkgs; [
networkmanagerapplet # gestionnaire réseau graphique + console (nm-applet + nmtui)
wirelesstools # fournis iwconfig
blueman # outils bluetooth (manager, system tray)
cbatticon # status de la batterie dans le system tray
];
# Services
services.xserver.synaptics = {
services.blueman.enable = true;
services.xserver.libinput = {
enable = true;
twoFingerScroll = true;
};
}

View File

@@ -3,16 +3,18 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf true {
# Select internationalisation properties.
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "fr";
defaultLocale = "fr_FR.UTF-8";
};

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -13,7 +13,7 @@ mkIf true {
# 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
networking.extraHosts = ''
127.0.0.1 ${config.networking.hostName}
127.0.0.1 ${config.networking.fqdn} ${config.networking.hostName}
'';
# Activation du routage

View File

@@ -0,0 +1,38 @@
{ 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";
};
};
# Affichage des modifications de profil (maj/ajout/suppression) dans le terminal
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
};
}

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -33,7 +33,7 @@ mkIf true {
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; [
libu2f-host

View File

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

View File

@@ -19,5 +19,6 @@
}
];
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";
}

View File

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

View File

@@ -44,6 +44,7 @@ let
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
officeSuite = mkEnableOption "Profil pour la suite bureautique";
pipewire = mkEnableOption "Profil pour activer pipewire.";
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
@@ -63,7 +64,7 @@ let
ipAddress = mkOption {
description = "Adresse IP.";
type = lib.types.string;
type = lib.types.str;
};
nix-serve-server = mkEnableOption "nix-serve server.";
nix-serve-client = {
@@ -80,18 +81,18 @@ let
dnsFQDN = mkOption {
example = "device.example.net.";
description = "DNS name of host pointing to tunnel IP.";
type = lib.types.string;
type = lib.types.str;
};
connectToAddress = mkOption {
default = "";
example = "192.168.1.1";
description = "External address to connect from another node.";
type = lib.types.string;
type = lib.types.str;
};
vpnAddress = mkOption {
example = "192.168.69.69/24";
description = "VPN local node IP address.";
type = lib.types.string;
type = lib.types.str;
};
vpnCidrLength = mkOption {
default = 24;
@@ -106,7 +107,7 @@ let
ConnecTo = bar
'';
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";
drive = mkOption {
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";
};
};
@@ -137,7 +138,7 @@ let
enable = mkEnableOption "Montage de la partition data Windows";
device = mkOption {
description = "Lecteur sur lequel est présent le disque de data Windows";
type = lib.types.string;
type = lib.types.str;
default = "/dev/sda2";
};
};
@@ -160,7 +161,7 @@ let
};
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in

View File

@@ -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" }, "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" }, "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, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end),
)

View File

@@ -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;
}

View File

@@ -3,14 +3,13 @@
let
#inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
{
imports = [
# installées systématiquement
./dbus.nix
./gpm.nix
./haveged.nix
./monitoring-munin.nix
@@ -34,6 +33,7 @@ in
## if isDesktop
./pulseaudio.nix # activation du serveur audio
./pipewire.nix # activation du serveur audio
./scanner.nix # utilisation d'un scanner
./x11.nix # activation du serveur graphique X
];

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -13,7 +13,8 @@ mkIf flags.docker {
environment.systemPackages = with pkgs; [
# Ecosystème Docker
docker
python36Packages.docker_compose
docker-compose
lazydocker
];
virtualisation.docker.enable = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
@@ -54,8 +54,8 @@ mkIf flags.hydra-core {
services.hydra = {
enable = true;
hydraURL = "http://hydra.${config.networking.hostName}";
notificationSender = "hydra@${config.networking.hostName}";
hydraURL = "http://hydra.${config.networking.fqdn}";
notificationSender = "hydra@${config.networking.fqdn}";
listenHost = "localhost";
minimumDiskFree = 50; # Go
smtpHost = "localhost";

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -30,6 +30,14 @@ mkIf flags.munin {
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 = {
path = with pkgs; [ munin lm_sensors ];
@@ -46,7 +54,7 @@ mkIf flags.munin {
services.munin-cron = {
enable = true;
hosts = ''
[${config.networking.hostName}]
[${config.networking.fqdn}]
address 127.0.0.1
df._dev_sda2.warning 35
use_node_name yes
@@ -57,9 +65,9 @@ mkIf flags.munin {
# http://guide.munin-monitoring.org/en/latest/tutorial/alert.html#syntax-of-warning-and-critical
extraGlobalConfig = ''
#---
#contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.hostName}" 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.hostName}" root@ocean.prunetwork.fr
contact.syslog.command /run/current-system/sw/bin/logger -p user.crit -t "Munin notification for ${config.networking.hostName}"
#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

123
services/munin-chrony Executable file
View 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

View 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

View 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

View 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

View 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

View 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

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -18,9 +18,8 @@ mkIf flags.nixos-manual {
# Services
## documentation sur ctrl + alt + F8
services.nixosManual = {
documentation.nixos = {
enable = true;
showManual = true;
};
# Réseau

35
services/pipewire.nix Normal file
View 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;
};
}

View File

@@ -3,18 +3,24 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf flags.print {
environment.systemPackages = with pkgs; [
samba
python310Packages.pysmbc
];
services.samba.enable = true;
# Services
## Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [
pkgs.samsung-unified-linux-driver
pkgs.gutenprint
];
# Suppression automatique des fichiers temporaires.
# Par défaut, cups conserve une copie de ce qui a été imprimé
@@ -24,4 +30,6 @@ mkIf flags.print {
PreserveJobFiles No
'';
};
services.avahi.enable = true;
services.avahi.nssmdns = true;
}

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -16,6 +16,7 @@ mkIf flags.pulseaudio {
environment.systemPackages = with pkgs; [
paprefs # préferences pulseaudio
pavucontrol # mixer pulseaudio
pa_applet # status et contrôle dans le system tray
];
# Pulse Audio

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -13,7 +13,6 @@ mkIf flags.scanner {
environment.systemPackages = with pkgs; [
# Driver
hplip # Scanner HP
python27Packages.pyqt4 # dépendance hplip
# Outils pour exploiter les scanners
simple-scan

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -26,6 +26,9 @@ mkIf true {
# Use kernel sandbox mechanisms where possible in unprivilegied processes
# Systrace on OpenBSD, Seccomp on Linux, seatbelt on MacOSX/Darwin, rlimit elsewhere.
UsePrivilegeSeparation sandbox
# Permet de gérer le nombre de connexions multiplexées en simultané
MaxSessions 200
'';
};
}

View File

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

View File

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

View File

@@ -3,26 +3,18 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf flags.xmonad {
# Paquets
environment.systemPackages = with pkgs; [
dmenu
haskellPackages.xmobar
trayer
];
services.dbus.packages = with pkgs; [ dconf ];
programs.dconf.enable = true;
# Services
services.xserver.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = haskellPackages: [
haskellPackages.xmobar
];
};
environment.variables = {
_JAVA_AWT_WM_NONREPARENTING = "1";

View File

@@ -3,7 +3,7 @@
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@@ -33,7 +33,7 @@ mkIf true {
gnupg opensc pcsctools libu2f-host yubikey-personalization
];
security.pam.enableU2F = true;
security.pam.u2f.enable = true;
/*users.extraUsers.joko = {
isNormalUser = true;