Compare commits
60 Commits
2021-05-18
...
flakes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dd2698082 | ||
|
|
9d5db185b3 | ||
|
|
3fcc75fc55 | ||
|
|
66f27557f7 | ||
|
|
d237134bcd | ||
|
|
1abecd8f8a | ||
|
|
f6a58ed4e4 | ||
|
|
e2cb3422bd | ||
|
|
cb013ea75f | ||
|
|
542ae88339 | ||
|
|
cbb90ffad0 | ||
|
|
1064756989 | ||
|
|
cc2199054b | ||
|
|
9f9cb0cf94 | ||
|
|
a44decfa44 | ||
|
|
cadee242a0 | ||
|
|
342ccbf143 | ||
|
|
2270cf730d | ||
|
|
589f090d6f | ||
|
|
838d1f4895 | ||
|
|
280eb0714a | ||
|
|
b0c7a106bf | ||
|
f01bda8781
|
|||
|
fe50587190
|
|||
|
c1b40f9d07
|
|||
|
|
06d73c9519
|
||
|
|
f7264ae434 | ||
|
|
4fd9d0d7f8 | ||
|
|
963b0b9d4b | ||
|
|
51b98cda4f | ||
|
|
f751e24839 | ||
|
|
1b1aebd0a0 | ||
|
|
812bc511e0 | ||
|
|
e55568d1c6 | ||
|
|
d4f2298518 | ||
|
|
2fad38532f | ||
|
|
28cf2d2071 | ||
|
|
f6f3befe2f | ||
|
|
257f59054d | ||
|
|
518054fd0a | ||
|
|
03bcc056c1 | ||
|
|
7679f865b0 | ||
|
|
2d63aae5a1 | ||
|
|
48a257405a | ||
|
|
30e2f31255 | ||
|
|
0364ea9b29 | ||
|
|
b2505f45c4 | ||
|
|
962c052b29 | ||
|
|
032d7e8e1a | ||
|
|
af35de1639 | ||
|
|
c8ae50be5b | ||
|
|
9310d01af6 | ||
|
|
ea33bac49b | ||
|
|
204fb83207 | ||
|
|
cf3c3c3603 | ||
|
|
edad20c5c0 | ||
| 5d2219ba0a | |||
| 023857ba73 | |||
| af4c0b313e | |||
|
|
8ca891e79b |
2
Makefile
2
Makefile
@@ -32,7 +32,7 @@ list-installed-packages:
|
|||||||
nixos-option environment.systemPackages | head -2 | tail -1 | sed -e 's/ /\n/g' | cut -d- -f2- | sort | uniq| sed -e 's/"$$//'
|
nixos-option environment.systemPackages | head -2 | tail -1 | sed -e 's/ /\n/g' | cut -d- -f2- | sort | uniq| sed -e 's/"$$//'
|
||||||
|
|
||||||
optimise:
|
optimise:
|
||||||
$(TIME) nix optimise-store
|
$(TIME) nix store optimise
|
||||||
|
|
||||||
rebuild-build:
|
rebuild-build:
|
||||||
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Ce dépôt stocke une configuration générique des machines.
|
|||||||
~~Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.~~
|
~~Actuellement, les scripts contiennent un peu de configuration spécifique pour les machines des mainteneurs.~~
|
||||||
|
|
||||||
# Liens
|
# Liens
|
||||||
* http://howoldis.herokuapp.com/ pour savoir de quand datent les différentes releases de NixOS
|
* https://status.nixos.org/ pour savoir de quand datent les différentes releases de NixOS
|
||||||
* https://repology.org/repository/nix_unstable/problems pour lister les paquets avec problèmes
|
* https://repology.org/repository/nix_unstable/problems pour lister les paquets avec problèmes
|
||||||
|
|
||||||
# Notes de mise-à-jour
|
# Notes de mise-à-jour
|
||||||
|
|||||||
@@ -21,35 +21,36 @@ mkIf currentMachine.profiles.isDesktopEnvironment {
|
|||||||
xorg.xkill # pour 'tuer une application'
|
xorg.xkill # pour 'tuer une application'
|
||||||
|
|
||||||
## Gestionnaire de fenêtre & Thème
|
## 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
|
## Manipulation de fichier
|
||||||
#kde5.dolphin # gestionnaire de fichiers graphique
|
#kde5.dolphin # gestionnaire de fichiers graphique
|
||||||
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
|
#kde5.dolphin-plugins # gestionnaire de fichiers graphique
|
||||||
pcmanfm # gestionnaire de fichiers graphique
|
pcmanfm # gestionnaire de fichiers graphique
|
||||||
spaceFM # gestionnaire de fichiers graphique
|
|
||||||
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
#vifm # gestionnaire de fichiers basé sur VIM (console)
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
kitty # terminal avec rendu par GPU
|
||||||
sakura # terminal
|
sakura # terminal
|
||||||
];
|
];
|
||||||
|
|
||||||
# Polices supplémentaires
|
# Polices supplémentaires
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
fira # police créée pour Firefox
|
fira # police créée pour Firefox
|
||||||
fira-code # idem fira-mono + ligatures pour la programmation
|
fira-code # idem fira-mono + ligatures pour la programmation
|
||||||
fira-mono # dérivée de fira en monospace
|
fira-mono # dérivée de fira en monospace
|
||||||
font-awesome_5 # Jeux de police, utilisé avec Latex
|
font-awesome_5 # Jeux de police, utilisé avec Latex
|
||||||
hack-font # police monospace créée explicitement pour coder
|
hack-font # police monospace créée explicitement pour coder
|
||||||
hasklig # police dérivée de source-code-pro mais avec des ligatures
|
hasklig # police dérivée de source-code-pro mais avec des ligatures
|
||||||
|
jetbrains-mono # police spécial développeurs par Jetbrains
|
||||||
];
|
];
|
||||||
|
fonts.fontconfig.defaultFonts = {
|
||||||
|
monospace = [ "JetBrains Mono" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Paquets avec setuid root
|
programs = {
|
||||||
security.wrappers = {
|
slock.enable = true;
|
||||||
# pour le montage des media amovibles
|
spacefm.enable = true;
|
||||||
devmon.source = "${pkgs.udevil}/bin/devmon";
|
udevil.enable = true;
|
||||||
udevil.source = "${pkgs.udevil}/bin/udevil"; # utilisé par spacefm
|
|
||||||
# vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root
|
|
||||||
slock.source = "${pkgs.slock}/bin/slock";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ environment.systemPackages = with pkgs; [
|
|||||||
firefox
|
firefox
|
||||||
|
|
||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
clawsMail
|
claws-mail
|
||||||
hexchat
|
hexchat
|
||||||
quasselClient
|
quasselClient
|
||||||
mumble
|
mumble
|
||||||
@@ -27,7 +27,8 @@ environment.systemPackages = with pkgs; [
|
|||||||
|
|
||||||
# Transfert de fichier
|
# Transfert de fichier
|
||||||
filezilla
|
filezilla
|
||||||
transmission_gtk
|
transmission-gtk
|
||||||
transmission_remote_gtk
|
transmission-qt
|
||||||
|
transgui
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ mkIf (flags.developpement-java && flags.graphical) {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# IDE
|
# IDE
|
||||||
idea.idea-community # IntelliJ IDEA
|
jetbrains.idea-community # IntelliJ IDEA
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ mkIf (flags.jetbrains-licensed && flags.graphical) {
|
|||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
idea.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
idea.clion
|
jetbrains.clion
|
||||||
idea.datagrip
|
jetbrains.datagrip
|
||||||
idea.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ mkIf (flags.radio && flags.graphical) {
|
|||||||
chirp # Configuration de radios portatives
|
chirp # Configuration de radios portatives
|
||||||
gqrx # GUI
|
gqrx # GUI
|
||||||
cubicsdr # Another GUI
|
cubicsdr # Another GUI
|
||||||
|
sdrpp
|
||||||
|
sdrangel
|
||||||
gnuradio-with-packages # Software Defined Radio (SDR) software
|
gnuradio-with-packages # Software Defined Radio (SDR) software
|
||||||
|
|
||||||
## A Trier
|
## A Trier
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ mkIf (flags.securitySuite && flags.graphical) {
|
|||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
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
|
#yubikey-personalization-gui # utilisation de la clef Yubikey
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
mkIf true {
|
mkIf true {
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
clawsMail = pkgs.clawsMail.override {
|
claws-mail = pkgs.claws-mail.override {
|
||||||
enablePgp = true;
|
enablePgp = true;
|
||||||
enablePluginArchive = true;
|
enablePluginArchive = true;
|
||||||
#enablePluginFancy = false; # nécessite wekitgtk qui est troué # Option supprimée dans NixOS 20.03
|
#enablePluginFancy = false; # nécessite wekitgtk qui est troué # Option supprimée dans NixOS 20.03
|
||||||
@@ -29,13 +29,13 @@ mkIf true {
|
|||||||
# bug connu : https://nixos.org/nix-dev/2014-December/015225.html
|
# bug connu : https://nixos.org/nix-dev/2014-December/015225.html
|
||||||
# find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"
|
# find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"
|
||||||
# Commande pour générer le path : find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"|paste -d: -s -
|
# Commande pour générer le path : find /nix/store/ -maxdepth 1 -type d -name "*gnuradio-*"|paste -d: -s -
|
||||||
gnuradio-with-packages = pkgs.gnuradio-with-packages.override {
|
gnuradio-with-packages = pkgs.gnuradio3_8.override {
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs.gnuradio3_8Packages; [
|
||||||
gnuradio-ais
|
ais
|
||||||
gnuradio-gsm
|
#gsm
|
||||||
gnuradio-nacl
|
#nacl
|
||||||
gnuradio-osmosdr # support des dongle Realtek
|
osmosdr # support des dongle Realtek
|
||||||
gnuradio-rds # support du décodage de RDS sur les radio FM
|
rds # support du décodage de RDS sur les radio FM
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ mkIf true {
|
|||||||
# Adminsys
|
# Adminsys
|
||||||
bind # utilisé pour les utilitaires comme dig
|
bind # utilisé pour les utilitaires comme dig
|
||||||
cowsay # pour ansible & 4lulz
|
cowsay # pour ansible & 4lulz
|
||||||
dhcp # client dhcp
|
|
||||||
iotop
|
iotop
|
||||||
lm_sensors
|
lm_sensors
|
||||||
lshw
|
lshw
|
||||||
@@ -44,7 +43,7 @@ mkIf true {
|
|||||||
ntfs3g # ntfs
|
ntfs3g # ntfs
|
||||||
samba # partages windows
|
samba # partages windows
|
||||||
squashfsTools # squashfs
|
squashfsTools # squashfs
|
||||||
sshfsFuse # ssh
|
sshfs-fuse # ssh
|
||||||
|
|
||||||
## Gestion de FS
|
## Gestion de FS
|
||||||
nfs-utils
|
nfs-utils
|
||||||
@@ -53,6 +52,6 @@ mkIf true {
|
|||||||
inotify-tools # être notifié lorsque le contenu d'un répertoire change
|
inotify-tools # être notifié lorsque le contenu d'un répertoire change
|
||||||
detox # The detox utility renames files to make them easier to work with.
|
detox # The detox utility renames files to make them easier to work with.
|
||||||
duff # outil de recherche de fichiers en doublons
|
duff # outil de recherche de fichiers en doublons
|
||||||
rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
|
#rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ mkIf true {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
byobu # permet de se déconnecter d'un terminal sans l'arréter
|
byobu # permet de se déconnecter d'un terminal sans l'arréter
|
||||||
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
|
gnumake # pour décrire les recettes de compilation
|
||||||
gnupg # GPG
|
gnupg # GPG
|
||||||
htop # monitoring
|
htop # monitoring
|
||||||
@@ -25,13 +25,52 @@ mkIf true {
|
|||||||
pinentry # pour taper les mots de passe gpg
|
pinentry # pour taper les mots de passe gpg
|
||||||
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
psmisc # fournis les utilitaires comme killall, fuser, pstree
|
||||||
#python # python -- python -m SimpleHTTPServer 8000
|
#python # python -- python -m SimpleHTTPServer 8000
|
||||||
shared_mime_info # MIME info
|
shared-mime-info # MIME info
|
||||||
tmux # nécessaire pour byobu
|
tmux # nécessaire pour byobu
|
||||||
tree # affiche une arborescence de fichiers et dossiers
|
tree # affiche une arborescence de fichiers et dossiers
|
||||||
usbutils
|
usbutils
|
||||||
(import ./vim.nix)
|
|
||||||
wget # client HTTP console
|
wget # client HTTP console
|
||||||
which # pour connaitre le chemin d'un exécutable
|
which # pour connaitre le chemin d'un exécutable
|
||||||
|
helix # Éditeur post-moderne
|
||||||
|
nil # LSP pour Nix
|
||||||
|
nodePackages.bash-language-server # LSP pour Bash
|
||||||
|
delta # visionneur de différences
|
||||||
];
|
];
|
||||||
programs.gnupg.agent.enable = true;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ in
|
|||||||
./edition-video.nix # modifier les vidéos
|
./edition-video.nix # modifier les vidéos
|
||||||
./jeux.nix # jouer, tout simplement ;)
|
./jeux.nix # jouer, tout simplement ;)
|
||||||
./radio.nix # outils pour faire de la radio SDR
|
./radio.nix # outils pour faire de la radio SDR
|
||||||
|
./vim.nix # vim avec plugins
|
||||||
|
|
||||||
## if isDesktop
|
## if isDesktop
|
||||||
./adminsys.nix # pour gérer le système dans son ensemble et les services
|
./adminsys.nix # pour gérer le système dans son ensemble et les services
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ mkIf flags.developpement-java {
|
|||||||
# Installe le paquet + JAVA_HOME
|
# Installe le paquet + JAVA_HOME
|
||||||
programs.java = {
|
programs.java = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.jdk11;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Paquets
|
# Paquets
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ mkIf flags.developpement-rust {
|
|||||||
# Paquets
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Rust
|
# Rust
|
||||||
cargo # récupération des dépendances + compilation projet rust
|
rustup # outil de configuration de toolchain rust
|
||||||
rustc # pour les appels depuis les scripts
|
crate2nix # génère les fichiers de build Nix dans un projet Rust
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ mkIf true {
|
|||||||
iperf # outil de mesure de la qualité du réseau
|
iperf # outil de mesure de la qualité du réseau
|
||||||
iptraf-ng # outil de mesure de la qualité du réseau
|
iptraf-ng # outil de mesure de la qualité du réseau
|
||||||
nload # affichage de statisques d'utilisation instantannées du réseau
|
nload # affichage de statisques d'utilisation instantannées du réseau
|
||||||
telnet
|
inetutils
|
||||||
|
|
||||||
## Diagnostic
|
## Diagnostic
|
||||||
arp-scan
|
arp-scan
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ mkIf flags.radio {
|
|||||||
liquid-dsp # Digital signal processing library for software-defined radios
|
liquid-dsp # Digital signal processing library for software-defined radios
|
||||||
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
||||||
dump1090 # Listen to planes ADS-B and view them on a map
|
dump1090 # Listen to planes ADS-B and view them on a map
|
||||||
|
rtl_433 # Read sensors on 433 MHz
|
||||||
];
|
];
|
||||||
|
|
||||||
# Configuration matérielle
|
hardware.rtl-sdr.enable = true;
|
||||||
boot.blacklistedKernelModules = [
|
|
||||||
"dvb_usb_rtl28xxu"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,28 @@
|
|||||||
with import <nixpkgs> {};
|
{pkgs, ... }:
|
||||||
|
|
||||||
vim_configurable.customize {
|
let
|
||||||
# Specifies the vim binary name.
|
myVim = pkgs.vim_configurable.customize {
|
||||||
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
|
# Specifies the vim binary name.
|
||||||
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
|
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
|
||||||
name = "vim";
|
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
|
||||||
vimrcConfig.customRC = builtins.readFile ./vimrc;
|
name = "vim";
|
||||||
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
|
vimrcConfig.customRC = builtins.readFile ./vimrc;
|
||||||
vimrcConfig.vam.pluginDictionaries = [
|
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
{ names = [
|
start = [
|
||||||
# Here you can place all your vim plugins
|
wombat256-vim
|
||||||
# They are installed managed by `vam` (a vim plugin manager)
|
ale
|
||||||
#"vim-addon-nix"
|
];
|
||||||
"elm-vim"
|
opt = [
|
||||||
"vim-nix"
|
elm-vim
|
||||||
"wombat256-vim"
|
vim-fish
|
||||||
]; }
|
vimwiki
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
programs.vim = {
|
||||||
|
defaultEditor = true;
|
||||||
|
package = myVim;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
" This must be first, because it changes other options as a side effect.
|
" This must be first, because it changes other options as a side effect.
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
||||||
|
filetype plugin on
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
" Réglages ALE
|
||||||
|
let g:ale_completion_enabled = 1
|
||||||
|
|
||||||
" allow backspacing over everything in insert mode
|
" allow backspacing over everything in insert mode
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
@@ -32,3 +38,10 @@ if &t_Co > 8
|
|||||||
let &colorcolumn="80,".join(range(120,999),",")
|
let &colorcolumn="80,".join(range(120,999),",")
|
||||||
highlight ColorColumn ctermbg=235 guibg=#2c2d27
|
highlight ColorColumn ctermbg=235 guibg=#2c2d27
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" vim hardcodes background color erase even if the terminfo file does
|
||||||
|
" not contain bce (not to mention that libvte based terminals
|
||||||
|
" incorrectly contain bce in their terminfo files). This causes
|
||||||
|
" incorrect background rendering when using a color theme with a
|
||||||
|
" background color.
|
||||||
|
let &t_ut=''
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkMerge mkThenElse;
|
|
||||||
annuaire = config.r6d.machines;
|
|
||||||
currentMachine = annuaire."${config.networking.fqdn}";
|
|
||||||
flags = currentMachine.configurationFlags;
|
|
||||||
in
|
|
||||||
|
|
||||||
mkIf flags.auto-upgrade {
|
|
||||||
|
|
||||||
# Automatic update & automatic clean
|
|
||||||
|
|
||||||
system.autoUpgrade.enable = true;
|
|
||||||
nix.gc.automatic = true;
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
# Définition des couleurs du prompt
|
# Git information in prompt
|
||||||
|
. /run/current-system/sw/share/bash-completion/completions/git-prompt.sh
|
||||||
|
|
||||||
|
# Prompt colors
|
||||||
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
|
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
|
||||||
PS1_USER='\[$(tput setaf 27)\]'
|
PS1_USER='\[$(tput setaf 27)\]'
|
||||||
PS1_HOST='\[$(tput setaf 37)\]'
|
PS1_HOST='\[$(tput setaf 37)\]'
|
||||||
@@ -18,10 +21,12 @@ fi
|
|||||||
BOLD='\[$(tput bold)\]'
|
BOLD='\[$(tput bold)\]'
|
||||||
RESET='\[$(tput sgr0)\]'
|
RESET='\[$(tput sgr0)\]'
|
||||||
|
|
||||||
# Définition du prompt
|
# Username or red color if root
|
||||||
if [ $UID = 0 ]; then
|
if [ $UID = 0 ]; then
|
||||||
PS1_ID=$PS1_ROOT
|
PS1_ID=$PS1_ROOT
|
||||||
else
|
else
|
||||||
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
|
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prompt definition
|
||||||
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET
|
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ in
|
|||||||
|
|
||||||
# commandées par config-generator
|
# commandées par config-generator
|
||||||
## option de configuration spécifique
|
## option de configuration spécifique
|
||||||
./auto-upgrade.nix # mise à jour automatique du système
|
|
||||||
./awesome.nix # pour le gestionaire de fenêtres awesome
|
./awesome.nix # pour le gestionaire de fenêtres awesome
|
||||||
./laptop.nix # appli & configuration adaptée pour un PC portable
|
./laptop.nix # appli & configuration adaptée pour un PC portable
|
||||||
|
./nix-options.nix # options de Nix (update, gc, optimisation)
|
||||||
./swap.nix # définition de l'utilisation du swap
|
./swap.nix # définition de l'utilisation du swap
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,12 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
# Nombre de process d'installation en parrallèle effectués par Nix
|
|
||||||
nix.buildCores = 0;
|
|
||||||
|
|
||||||
# The NixOS release to be compatible with for stateful data such as databases.
|
# The NixOS release to be compatible with for stateful data such as databases.
|
||||||
system.stateVersion = "19.09";
|
#system.stateVersion = "19.09";
|
||||||
|
|
||||||
# copies the NixOS configuration file (usually /etc/nixos/configuration.nix) and links it from the resulting system (getting to /run/current-system/configuration.nix)
|
# copies the NixOS configuration file (usually /etc/nixos/configuration.nix) and links it from the resulting system (getting to /run/current-system/configuration.nix)
|
||||||
system.copySystemConfiguration = true;
|
# https://github.com/NixOS/nixpkgs/issues/97252
|
||||||
|
#system.copySystemConfiguration = true;
|
||||||
|
|
||||||
# On autorise les paquets non-libres
|
# On autorise les paquets non-libres
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@@ -24,7 +22,7 @@ in
|
|||||||
#security.grsecurity.enable = true;
|
#security.grsecurity.enable = true;
|
||||||
|
|
||||||
# Ménage de /tmp au boot
|
# Ménage de /tmp au boot
|
||||||
boot.cleanTmpDir = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
# Activation des pages de manuel
|
# Activation des pages de manuel
|
||||||
documentation.man.enable = true;
|
documentation.man.enable = true;
|
||||||
@@ -46,13 +44,24 @@ in
|
|||||||
vi = "vim";
|
vi = "vim";
|
||||||
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
|
byobu-adminsys = "/etc/nixos/base/byobu-adminsys";
|
||||||
};
|
};
|
||||||
etc.gitconfig.text = builtins.readFile ./gitconfig;
|
|
||||||
};
|
};
|
||||||
programs.bash = {
|
programs = {
|
||||||
enableCompletion = true;
|
fish.enable = true;
|
||||||
promptInit = builtins.readFile ./bash-prompt.sh;
|
bash = {
|
||||||
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
|
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
|
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern
|
||||||
programs.ssh.extraConfig = ''
|
programs.ssh.extraConfig = ''
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -33,6 +33,7 @@ mkIf flags.laptop {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
|
services.blueman.enable = true;
|
||||||
services.xserver.libinput = {
|
services.xserver.libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
39
configuration/nix-options.nix
Normal file
39
configuration/nix-options.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ 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 = {
|
||||||
|
package = pkgs.nixUnstable;
|
||||||
|
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"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659981942,
|
||||||
|
"narHash": "sha256-uCFiP/B/NXOWzhN6TKfMbSxtVMk1bVnCrnJRjCF6RmU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "39d7f929fbcb1446ad7aa7441b04fb30625a4190",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
9
flake.nix
Normal file
9
flake.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
description = "Module NixOS de base Grudunet";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ... }: {
|
||||||
|
nixosModules.default = import ./base.nix ;
|
||||||
|
};
|
||||||
|
}
|
||||||
4
lib.nix
4
lib.nix
@@ -1,5 +1,7 @@
|
|||||||
|
{pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
lib = with import <nixpkgs> {}; pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
isDesktopEnvironment = {
|
isDesktopEnvironment = {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ let
|
|||||||
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
nix-serve-server = mkEnableOption "Profil pour que la machine soit un serveur de cache nix.";
|
||||||
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
|
nixStoreProxyCache = mkEnableOption "Profil pour activer le proxy cahce nginx pour le nix store";
|
||||||
officeSuite = mkEnableOption "Profil pour la suite bureautique";
|
officeSuite = mkEnableOption "Profil pour la suite bureautique";
|
||||||
|
pipewire = mkEnableOption "Profil pour activer pipewire.";
|
||||||
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
||||||
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
|
pulseaudio = mkEnableOption "Profil pour activer pulseaudio.";
|
||||||
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ in
|
|||||||
|
|
||||||
## if isDesktop
|
## if isDesktop
|
||||||
./pulseaudio.nix # activation du serveur audio
|
./pulseaudio.nix # activation du serveur audio
|
||||||
|
./pipewire.nix # activation du serveur audio
|
||||||
./scanner.nix # utilisation d'un scanner
|
./scanner.nix # utilisation d'un scanner
|
||||||
./x11.nix # activation du serveur graphique X
|
./x11.nix # activation du serveur graphique X
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ mkIf flags.docker {
|
|||||||
# Ecosystème Docker
|
# Ecosystème Docker
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
|
lazydocker
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|||||||
35
services/pipewire.nix
Normal file
35
services/pipewire.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
annuaire = config.r6d.machines;
|
||||||
|
currentMachine = annuaire."${config.networking.fqdn}";
|
||||||
|
flags = currentMachine.configurationFlags;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf flags.pipewire {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
helvum # patchbay pipewire
|
||||||
|
paprefs # préferences pulseaudio
|
||||||
|
pavucontrol # mixer pulseaudio
|
||||||
|
pa_applet # status et contrôle dans le system tray
|
||||||
|
];
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,12 +9,18 @@ in
|
|||||||
|
|
||||||
mkIf flags.print {
|
mkIf flags.print {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
samba
|
||||||
|
python310Packages.pysmbc
|
||||||
|
];
|
||||||
|
services.samba.enable = true;
|
||||||
# Services
|
# Services
|
||||||
## Enable CUPS to print documents.
|
## Enable CUPS to print documents.
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [
|
drivers = [
|
||||||
pkgs.samsung-unified-linux-driver
|
pkgs.samsung-unified-linux-driver
|
||||||
|
pkgs.gutenprint
|
||||||
];
|
];
|
||||||
# Suppression automatique des fichiers temporaires.
|
# Suppression automatique des fichiers temporaires.
|
||||||
# Par défaut, cups conserve une copie de ce qui a été imprimé
|
# Par défaut, cups conserve une copie de ce qui a été imprimé
|
||||||
@@ -24,4 +30,6 @@ mkIf flags.print {
|
|||||||
PreserveJobFiles No
|
PreserveJobFiles No
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
services.avahi.enable = true;
|
||||||
|
services.avahi.nssmdns = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ mkIf flags.scanner {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Driver
|
# Driver
|
||||||
hplip # Scanner HP
|
hplip # Scanner HP
|
||||||
python39Packages.pyqt4 # dépendance hplip
|
|
||||||
|
|
||||||
# Outils pour exploiter les scanners
|
# Outils pour exploiter les scanners
|
||||||
simple-scan
|
simple-scan
|
||||||
|
|||||||
@@ -8,21 +8,13 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
mkIf flags.xmonad {
|
mkIf flags.xmonad {
|
||||||
|
services.dbus.packages = with pkgs; [ dconf ];
|
||||||
# Paquets
|
programs.dconf.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
haskellPackages.xmobar
|
|
||||||
trayer
|
|
||||||
];
|
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
services.xserver.windowManager.xmonad = {
|
services.xserver.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
extraPackages = haskellPackages: [
|
|
||||||
haskellPackages.xmobar
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
|||||||
Reference in New Issue
Block a user