Merge nixos-21.05-preparation fixes #9

nixos-unstable
Yves Dubromelle 3 years ago
commit fe50587190
Signed by: taeradan
GPG Key ID: 3870F3C4CC46AD2E

@ -32,10 +32,10 @@ list-installed-packages:
nixos-option environment.systemPackages | head -2 | tail -1 | sed -e 's/ /\n/g' | cut -d- -f2- | sort | uniq| sed -e 's/"$$//'
optimise:
$(TIME) nix optimise-store
$(TIME) nix store optimise
rebuild-build:
nix-channel --add https://nixos.org/channels/nixos-19.09 nixos
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
$(TIME) time nixos-rebuild build --fallback --show-trace
rebuild-switch:
@ -58,7 +58,7 @@ store-repair:
$(TIME) nix-store --verify --check-contents --repair
upgrade:
nix-channel --add https://nixos.org/channels/nixos-19.09 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

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

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

@ -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,10 +27,10 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
#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
];
@ -42,14 +42,15 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
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;
};
}

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

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

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

@ -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,7 +18,7 @@ environment.systemPackages = with pkgs; [
firefox
## Mail & Discussion (texte, audio)
clawsMail
claws-mail
hexchat
quasselClient
mumble
@ -27,7 +27,7 @@ environment.systemPackages = with pkgs; [
# Transfert de fichier
filezilla
transmission_gtk
transmission_remote_gtk
transmission-gtk
transmission-remote-gtk
];
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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,4 +20,8 @@ mkIf (flags.radio && flags.graphical) {
## A Trier
#inspectrum # Tool for analysing captured signals from sdr receivers
];
nixpkgs.config.permittedInsecurePackages = [
"python2.7-Pillow-6.2.2"
];
}

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

@ -3,14 +3,14 @@
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é # Option supprimée dans NixOS 20.03

@ -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
@ -23,7 +23,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
@ -44,7 +44,7 @@ mkIf true {
ntfs3g # ntfs
samba # partages windows
squashfsTools # squashfs
sshfsFuse # ssh
sshfs-fuse # ssh
## Gestion de FS
nfs-utils
@ -53,6 +53,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
];
}

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

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

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

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

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

@ -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
gitAndTools.gitFull 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,49 @@ 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
];
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
#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

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

@ -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,7 +22,7 @@ mkIf flags.developpement-haskell {
#brittany # formatteur de code
#darcs # gestionnaire de version éponyme
#ghc-mod # outil d'analyse de code haskell utilisé par IDE
hindent # indentation code
#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
@ -31,6 +31,6 @@ mkIf flags.developpement-haskell {
# Application perso
#hahp
pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc
#pandoc-filter-graphviz # filtre pour utiliser graphviz à partir de pandoc ***BROKEN***
]);
}

@ -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,6 @@ mkIf flags.developpement-java {
# Installe le paquet + JAVA_HOME
programs.java = {
enable = true;
package = pkgs.jdk11;
};
# Paquets

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

@ -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,5 +14,7 @@ mkIf flags.developpement-rust {
# 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
];
}

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

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

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

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

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

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

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

@ -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,8 +25,5 @@ mkIf flags.radio {
dump1090 # Listen to planes ADS-B and view them on a map
];
# Configuration matérielle
boot.blacklistedKernelModules = [
"dvb_usb_rtl28xxu"
];
hardware.rtl-sdr.enable = true;
}

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

@ -1,20 +1,28 @@
with import <nixpkgs> {};
{pkgs, ... }:
vim_configurable.customize {
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.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"
]; }
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [
wombat256-vim
];
opt = [
elm-vim
vim-fish
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.
set nocompatible
filetype plugin on
syntax on
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
@ -32,3 +35,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=''

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

@ -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
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
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
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

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

@ -3,14 +3,11 @@
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 = "19.09";
@ -46,7 +43,6 @@ in
vi = "vim";
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
};
etc.gitconfig.text = builtins.readFile ./gitconfig;
};
programs.bash = {
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
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
@ -33,6 +33,7 @@ mkIf flags.laptop {
];
# Services
services.blueman.enable = true;
services.xserver.libinput = {
enable = true;
};

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

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

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

@ -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
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in

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

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

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

@ -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.";
@ -160,7 +161,7 @@ let
};
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.hostName}";
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in

@ -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
#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
];

@ -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,6 +14,7 @@ mkIf flags.docker {
# Ecosystème Docker
docker
docker-compose
lazydocker
];
virtualisation.docker.enable = true;

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

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

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

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

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

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

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

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

@ -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
@ -54,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
@ -65,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

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

@ -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
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.fxlinuxprint
pkgs.gutenprint
];
# Suppression automatique des fichiers temporaires.
# Par défaut, cups conserve une copie de ce qui a été imprimé
@ -24,4 +31,6 @@ mkIf flags.print {
PreserveJobFiles No
'';
};
services.avahi.enable = true;
services.avahi.nssmdns = true;
}

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

@ -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.scanner {
environment.systemPackages = with pkgs; [
# Driver
hplip # Scanner HP
python27Packages.pyqt4 # dépendance hplip
python39Packages.pyqt4 # dépendance hplip
# Outils pour exploiter les scanners
simple-scan

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

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

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

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

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

Loading…
Cancel
Save