Compare commits
31 Commits
2016-08-12
...
2016-09-01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65e1c6ff0e | ||
| b42c8e3080 | |||
| adaa4eeb61 | |||
| 56d2c04cd6 | |||
| ebe63ea5e0 | |||
| ea69ceba37 | |||
|
|
e8521880e1 | ||
|
|
313457be31 | ||
| df0951ce65 | |||
| 1323e6dee1 | |||
|
|
d16271c61e | ||
| 6c45e0bfa2 | |||
| c2d3bb8cb4 | |||
| d5c79218fa | |||
| e7ef51ecbe | |||
| 6c02c2200c | |||
| c8592c769e | |||
| 7b298ac8a3 | |||
| 9190d21a65 | |||
|
|
b4c960d3d3 | ||
| 516976ccf9 | |||
| 634af07219 | |||
| 91d414d3e1 | |||
| ca0171b70e | |||
| 48361328dd | |||
| ee34e1a138 | |||
| ea307cc5dc | |||
| 1cce1ec034 | |||
| 32a05e2124 | |||
|
|
23cb4c79a9 | ||
|
|
160ec79b0f |
37
Makefile
37
Makefile
@@ -1,5 +1,6 @@
|
|||||||
all: rebuild-switch
|
all: rebuild-switch
|
||||||
date
|
date
|
||||||
|
##--------- Commandes spécifiques pour NixOS
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
nix-collect-garbage -d --delete-older-than 15d
|
nix-collect-garbage -d --delete-older-than 15d
|
||||||
@@ -14,20 +15,26 @@ clean-log:
|
|||||||
journalctl --vacuum-size=1G
|
journalctl --vacuum-size=1G
|
||||||
|
|
||||||
full-auto: submodules-update upgrade clean optimise
|
full-auto: submodules-update upgrade clean optimise
|
||||||
|
@date
|
||||||
|
|
||||||
optimise:
|
optimise:
|
||||||
nix-store --optimise
|
nix-store --optimise
|
||||||
|
|
||||||
push: submodules-push
|
|
||||||
git push --all
|
|
||||||
git push --tags
|
|
||||||
|
|
||||||
rebuild-switch:
|
rebuild-switch:
|
||||||
nixos-rebuild switch --fallback --show-trace
|
nixos-rebuild switch --fallback --show-trace
|
||||||
|
|
||||||
store-repair:
|
store-repair:
|
||||||
nix-store --verify --check-contents --repair
|
nix-store --verify --check-contents --repair
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
nixos-rebuild switch --upgrade --fallback --show-trace
|
||||||
|
|
||||||
|
##--------- Commandes spécifiques pour GIT
|
||||||
|
|
||||||
|
push: submodules-push
|
||||||
|
git push --all
|
||||||
|
git push --tags
|
||||||
|
|
||||||
submodules-update:
|
submodules-update:
|
||||||
#git submodule update --remote
|
#git submodule update --remote
|
||||||
git submodule foreach git co master
|
git submodule foreach git co master
|
||||||
@@ -40,9 +47,27 @@ submodules-push:
|
|||||||
submodules-tag:
|
submodules-tag:
|
||||||
git submodule foreach git tag -f "$$(date +%F)-$$(hostname -s)"
|
git submodule foreach git tag -f "$$(date +%F)-$$(hostname -s)"
|
||||||
|
|
||||||
|
template:
|
||||||
|
find . -name "*.nix" -exec meld /etc/nixos/base/module-template.nix {} \;
|
||||||
|
|
||||||
tag: submodules-tag
|
tag: submodules-tag
|
||||||
git tag -f "$$(date +%F)-$$(hostname -s)"
|
git tag -f "$$(date +%F)-$$(hostname -s)"
|
||||||
|
|
||||||
upgrade:
|
##--------- Munin
|
||||||
nixos-rebuild switch --upgrade --fallback --show-trace
|
|
||||||
|
munin:
|
||||||
|
pushd /var/www/munin/ ; python -m SimpleHTTPServer 8000
|
||||||
|
##--------- Gestion d'un système de fichier monté en mémoire
|
||||||
|
|
||||||
|
tmpfs-create:
|
||||||
|
mkdir -p /mnt/tmpfs
|
||||||
|
|
||||||
|
tmpfs-mount: tmpfs-create
|
||||||
|
mount -t tmpfs -o size=10G tmpfs /mnt/tmpfs
|
||||||
|
|
||||||
|
tmpfs-umount:
|
||||||
|
umount /mnt/tmpfs
|
||||||
|
|
||||||
|
tmpfs-destroy: tmpfs-umount
|
||||||
|
rmdir /mnt/tmpfs
|
||||||
|
|
||||||
|
|||||||
9
base.nix
9
base.nix
@@ -1,4 +1,11 @@
|
|||||||
{ ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkMerge;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
profiles = config.r6d.profiles;
|
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf cfg.nix-serve-client {
|
mkIf cfg.nix-serve-client {
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
# Cache http pour le store
|
# Cache http pour le store
|
||||||
requireSignedBinaryCaches = false;
|
requireSignedBinaryCaches = false;
|
||||||
binaryCaches = [
|
binaryCaches = [
|
||||||
"https://cache.nixos.org/"
|
(mkIf (profiles.isDubronetwork && (! computers.isPedro) && (! computers.isRollo)) "http://nix-cache.dubronetwork.fr:5001")
|
||||||
|
|
||||||
(mkIf (profiles.isDubronetwork && (! computers.isRollo)) "http://nix-cache.dubronetwork.fr:5001")
|
(mkIf profiles.isPrunetwork "https://cache.nixos.org/")
|
||||||
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
||||||
];
|
];
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
|
|||||||
@@ -1,12 +1,27 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs.lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
in {
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.nix-serve-server {
|
||||||
|
|
||||||
# Cache http pour le store
|
# Cache http pour le store
|
||||||
|
|
||||||
services.nix-serve.enable = cfg.nix-serve-server;
|
# Services
|
||||||
networking.firewall.allowedTCPPorts = mkIf cfg.nix-serve-server [ 5000 ];
|
services.nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Réseau
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
5000
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,28 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs.lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
|
||||||
ignoreip = "pedro.dubronetwork.fr cube.dubronetwork.fr voyage.prunetwork.fr xray.prunetwork.fr 192.168.0.0/16 172.16.0.0/16";
|
ignoreip = "pedro.dubronetwork.fr cube.dubronetwork.fr voyage.prunetwork.fr xray.prunetwork.fr 192.168.0.0/16 172.16.0.0/16";
|
||||||
destemail = "admins@dubronetwork.fr";
|
destemail = "admins@dubronetwork.fr";
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.fail2ban {
|
||||||
|
|
||||||
in {
|
|
||||||
# Gestion de fail2ban
|
# Gestion de fail2ban
|
||||||
|
|
||||||
services = mkIf cfg.fail2ban {
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mailutils
|
||||||
|
whois
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
# Services
|
||||||
|
services = {
|
||||||
fail2ban = {
|
fail2ban = {
|
||||||
enable = true;
|
enable = true;
|
||||||
jails = {
|
jails = {
|
||||||
@@ -27,13 +38,27 @@ in {
|
|||||||
maxretry = 3
|
maxretry = 3
|
||||||
|
|
||||||
destemail = ${destemail}
|
destemail = ${destemail}
|
||||||
|
|
||||||
|
# https://github.com/Baughn/nixpkgs/blob/master/nixos/modules/services/security/fail2ban.nix
|
||||||
|
findtime = 600
|
||||||
|
maxretry = 3
|
||||||
|
backend = systemd
|
||||||
|
enabled = true
|
||||||
'';
|
'';
|
||||||
ssh-route = ''
|
ssh-route = ''
|
||||||
filter = sshd
|
filter = sshd
|
||||||
action = route[blocktype=blackhole]
|
action = route[blocktype=blackhole]
|
||||||
maxretry = 3
|
|
||||||
'';
|
'';
|
||||||
|
# désactivation car souci de PATH avec les commandes mail ou sendmail. Nécessite un path motifiable
|
||||||
|
# ticket à ouvrir
|
||||||
|
#ssh-mail = ''
|
||||||
|
# filter = sshd
|
||||||
|
# action = sendmail[sendername=Fail2ban @${config.networking.hostName}]
|
||||||
|
#'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/8437
|
||||||
|
services.fail2ban.jails.ssh-iptables = "enabled = true";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
{
|
|
||||||
# Définition des domaines utilisés lorsque un identifiant non-FQDN est donné (ping, nslookup)
|
# Définition des domaines utilisés lorsque un identifiant non-FQDN est donné (ping, nslookup)
|
||||||
networking = {
|
networking = {
|
||||||
search = [
|
search = [
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
# exemple utilisé pour commencer bird.nix
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkEnableOption mkIf mkMerge mkOption singleton types;
|
inherit (lib) mkEnableOption mkIf mkMerge mkOption singleton types;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
@@ -107,7 +106,7 @@ in
|
|||||||
(mkIf pfl.isHome {
|
(mkIf pfl.isHome {
|
||||||
r6d.profiles.isDesktop = true;
|
r6d.profiles.isDesktop = true;
|
||||||
})
|
})
|
||||||
(mkIf pfl.isServer {
|
(mkIf (pfl.isServer && !comp.isMonstre) {
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
#database_postgres = true;
|
#database_postgres = true;
|
||||||
dns_autorite = true;
|
dns_autorite = true;
|
||||||
@@ -119,7 +118,7 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
# /!\ PAS un serveur
|
# /!\ PAS un serveur
|
||||||
(mkIf (!pfl.isServer) {
|
(mkIf (!pfl.isServer || comp.isMonstre) {
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
dns_resolveur = true;
|
dns_resolveur = true;
|
||||||
};
|
};
|
||||||
@@ -145,9 +144,6 @@ in
|
|||||||
print = true;
|
print = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf (pfl.isDubronetwork && pfl.isServer) {
|
|
||||||
r6d.config-generator.nix-serve-server = true;
|
|
||||||
})
|
|
||||||
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
|
(mkIf (pfl.isDubronetwork && pfl.isWorkstation) {
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
conception-assistee = true;
|
conception-assistee = true;
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
in mkIf cfg.xmonad {
|
mkIf cfg.xmonad {
|
||||||
# Paquets spécifiques pour xmonad
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;[
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
dmenu
|
dmenu
|
||||||
haskellPackages.xmobar
|
haskellPackages.xmobar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
services.xserver.windowManager.xmonad = {
|
services.xserver.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ in
|
|||||||
./activation-manuelle/xmonad/xmonad.nix # gestionnaire de fenêtres xmonad
|
./activation-manuelle/xmonad/xmonad.nix # gestionnaire de fenêtres xmonad
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; mkIf profiles.isDesktop [
|
environment.systemPackages = with pkgs; mkIf profiles.isDesktop [
|
||||||
# Environement de bureau
|
# Environement de bureau
|
||||||
arandr # interface graphique pour xrandr
|
arandr # interface graphique pour xrandr
|
||||||
@@ -54,4 +55,6 @@ in
|
|||||||
clawsMail = pkgs.clawsMail.override { enablePluginFancy = true; };
|
clawsMail = pkgs.clawsMail.override { enablePluginFancy = true; };
|
||||||
mumble = pkgs.mumble.override { pulseSupport = true; };
|
mumble = pkgs.mumble.override { pulseSupport = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.setuidPrograms = [ "udevil" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,25 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf true {
|
mkIf true {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
# Réseau
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
pushd /var/www/munin/ && python -m SimpleHTTPServer 8000
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf true {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Adminsys
|
# Adminsys
|
||||||
iotop
|
iotop
|
||||||
@@ -22,22 +23,30 @@ mkIf profiles.isDesktop {
|
|||||||
python27Packages.glances
|
python27Packages.glances
|
||||||
usbutils
|
usbutils
|
||||||
|
|
||||||
# DNS
|
|
||||||
unbound
|
|
||||||
|
|
||||||
# Compression
|
# Compression
|
||||||
lz4
|
lz4
|
||||||
lzop
|
lzop
|
||||||
|
|
||||||
# Système de fichier
|
# Système de fichier
|
||||||
curlftpfs
|
## Montage de filesystem
|
||||||
gparted
|
curlftpfs # ftp
|
||||||
inotify-tools
|
ntfs3g # ntfs
|
||||||
nfs-utils
|
sshfsFuse # ssh
|
||||||
ntfs3g
|
|
||||||
sshfsFuse
|
|
||||||
|
|
||||||
#
|
## Gestion de FS
|
||||||
unetbootin # création de clefs USB bootables
|
nfs-utils
|
||||||
|
|
||||||
|
## Exploitation FS
|
||||||
|
inotify-tools # être notifié lorsque le contenu d'un répertoire change
|
||||||
|
duff # outil de recherche de fichiers en doublons
|
||||||
|
rdfind # recherche de fichiers doublons pour remplacement par hard/soft link
|
||||||
|
|
||||||
|
(mkIf profiles.isDesktop
|
||||||
|
## Gestion de FS
|
||||||
|
gparted # Gestion graphique de partitions
|
||||||
|
)
|
||||||
|
(mkIf profiles.isDesktop
|
||||||
|
unetbootin # création de clefs USB bootables
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Bureautique
|
# Bureautique
|
||||||
aspell aspellDicts.fr
|
aspell aspellDicts.fr
|
||||||
@@ -34,6 +35,7 @@ mkIf profiles.isDesktop {
|
|||||||
gnuplot # générateur de graphes à partir de données numériques
|
gnuplot # générateur de graphes à partir de données numériques
|
||||||
graphviz # dot, neato : traçage de graphes (carré, rond)
|
graphviz # dot, neato : traçage de graphes (carré, rond)
|
||||||
jekyll # générateur statique de site web
|
jekyll # générateur statique de site web
|
||||||
|
odpdown # conversion md -> presentation ODP : https://github.com/thorstenb/odpdown
|
||||||
pandoc
|
pandoc
|
||||||
texLiveFull # distribution LaTeX
|
texLiveFull # distribution LaTeX
|
||||||
#texLive # distribution LaTeX de base
|
#texLive # distribution LaTeX de base
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,7 +9,8 @@ in
|
|||||||
|
|
||||||
mkIf cfg.conception-assistee {
|
mkIf cfg.conception-assistee {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
# CAO
|
# CAO
|
||||||
## Modélisation 3D
|
## Modélisation 3D
|
||||||
freecad # modélisation de pièces en 3D
|
freecad # modélisation de pièces en 3D
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf cfg.cartographie {
|
mkIf cfg.cartographie {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Gestion de données géographiques
|
# Gestion de données géographiques
|
||||||
expat
|
expat
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Clients Internet
|
# Clients Internet
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,36 +9,40 @@ in
|
|||||||
|
|
||||||
mkIf cfg.developpement {
|
mkIf cfg.developpement {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Base de données
|
# Base de données
|
||||||
pgadmin
|
pgadmin # interface d'administration de postgres
|
||||||
sqlitebrowser
|
sqlitebrowser # interface d'administration de sqlite
|
||||||
|
|
||||||
# Développement
|
# Développement
|
||||||
cloc
|
cloc
|
||||||
idea.idea-community
|
idea.idea-community # IntelliJ IDEA
|
||||||
gcc # pour les appels depuis les scripts
|
gcc # pour les appels depuis les scripts
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
zeal
|
zeal # consulter la documentation hors ligne
|
||||||
|
|
||||||
## Gestion des sources
|
## Gestion des sources
|
||||||
# git # déjà présent dans "base"
|
# git # déjà présent dans "base"
|
||||||
git-cola
|
# 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)
|
||||||
mercurial
|
mercurial
|
||||||
subversion
|
subversion
|
||||||
|
|
||||||
## Haskell
|
## Haskell
|
||||||
ghc
|
ghc # pour les appels depuis les scripts
|
||||||
stack
|
stack
|
||||||
|
|
||||||
## Rust
|
## Rust
|
||||||
cargo # récupération des dépendances + compilation projet rust
|
cargo # récupération des dépendances + compilation projet rust
|
||||||
rustPlatform.rustc
|
rustPlatform.rustc # pour les appels depuis les scripts
|
||||||
|
|
||||||
## Visualisation & outils de diff
|
## Visualisation & outils de diff
|
||||||
gource
|
gource # visualisation en mouvement de l'historique git
|
||||||
meld
|
meld # outil de comparaison graphique
|
||||||
vbindiff # diff de fichier hexadecimaux avec vim
|
vbindiff # diff de fichier hexadecimaux avec vim
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf cfg.docker {
|
mkIf cfg.docker {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Ecosystème Docker
|
# Ecosystème Docker
|
||||||
docker
|
docker
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,7 +9,8 @@ in
|
|||||||
|
|
||||||
mkIf cfg.edition-musique {
|
mkIf cfg.edition-musique {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
#
|
#
|
||||||
audacity # montage audio
|
audacity # montage audio
|
||||||
easytag # gestion des métadonnées des fichiers musicaux
|
easytag # gestion des métadonnées des fichiers musicaux
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf cfg.edition-photo {
|
mkIf cfg.edition-photo {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Méta données
|
# Méta données
|
||||||
exif
|
exif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,7 +9,8 @@ in
|
|||||||
|
|
||||||
mkIf cfg.edition-video {
|
mkIf cfg.edition-video {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
# Vidéo
|
# Vidéo
|
||||||
#cinelerra # editeur video
|
#cinelerra # editeur video
|
||||||
pitivi # montage vidéo
|
pitivi # montage vidéo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf cfg.jeux {
|
mkIf cfg.jeux {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Jeux
|
# Jeux
|
||||||
urbanterror
|
urbanterror
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Multimedia
|
# Multimedia
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Outils réseau
|
# Outils réseau
|
||||||
iperf # outil de mesure de la qualité du réseau
|
iperf # outil de mesure de la qualité du réseau
|
||||||
@@ -23,7 +24,11 @@ mkIf profiles.isDesktop {
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [5201]; # iperf
|
allowedTCPPorts = [
|
||||||
allowedUDPPorts = [5201]; # iperf
|
5201 # iperf
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
5201 # iperf
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf profiles.isDesktop {
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Securité
|
# Securité
|
||||||
gnome3.seahorse # gestionnaire graphique de clef GPG
|
gnome3.seahorse # gestionnaire graphique de clef GPG
|
||||||
@@ -17,4 +18,5 @@ mkIf profiles.isDesktop {
|
|||||||
slock # vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root
|
slock # vérouiller l''écran. "cannot disable the out-of-memory killer for this process (make sure to suid or sgid slock)" --> en root
|
||||||
yubikey-personalization-gui # utilisation de la clef Yubikey
|
yubikey-personalization-gui # utilisation de la clef Yubikey
|
||||||
];
|
];
|
||||||
|
security.setuidPrograms = [ "slock" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,10 +9,19 @@ in
|
|||||||
|
|
||||||
mkIf cfg.virtualbox {
|
mkIf cfg.virtualbox {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
linuxPackages.virtualbox
|
linuxPackages.virtualbox
|
||||||
linuxPackages.virtualboxGuestAdditions
|
linuxPackages.virtualboxGuestAdditions
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# À décommenter pour activer le pack d'extension
|
||||||
|
#boot.kernelPackages = pkgs.linuxPackages // {
|
||||||
|
# virtualbox = pkgs.linuxPackages.virtualbox.override {
|
||||||
|
# enableExtensionPack = true;
|
||||||
|
# pulseSupport = true;
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
virtualisation.virtualbox.host.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf cfg.auto-upgrade {
|
mkIf cfg.auto-upgrade {
|
||||||
|
|
||||||
# Automatic update & automatic clean
|
# Automatic update & automatic clean
|
||||||
|
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
# Nombre de process d'installation en parrallèle effectués par Nix
|
# Nombre de process d'installation en parrallèle effectués par Nix
|
||||||
@@ -10,8 +17,7 @@
|
|||||||
# On autorise les paquets non-libres
|
# On autorise les paquets non-libres
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search by name, run:
|
# Paquets
|
||||||
# $ nix-env -qaP | grep wget
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
bind # utilisé pour les utilitaires comme dig
|
bind # utilisé pour les utilitaires comme dig
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -19,6 +19,7 @@ mkIf cfg.laptop {
|
|||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
# Paquets
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
{
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n = {
|
i18n = {
|
||||||
consoleFont = "Lat2-Terminus16";
|
consoleFont = "Lat2-Terminus16";
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
{
|
|
||||||
# Utilisation d'adresse IPv6 temporaire
|
# Utilisation d'adresse IPv6 temporaire
|
||||||
|
|
||||||
## https://blog.linitx.com/control-privacy-addressing-ipv6-linux/
|
## https://blog.linitx.com/control-privacy-addressing-ipv6-linux/
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf cfg.print {
|
mkIf cfg.print {
|
||||||
# Enable CUPS to print documents.
|
|
||||||
|
# Services
|
||||||
|
## Enable CUPS to print documents.
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [
|
drivers = [
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
#inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,6 +13,7 @@
|
|||||||
./environment.nix
|
./environment.nix
|
||||||
./localisation.nix
|
./localisation.nix
|
||||||
#./network-ipv6.nix
|
#./network-ipv6.nix
|
||||||
|
./sudo.nix
|
||||||
./service-haveged.nix
|
./service-haveged.nix
|
||||||
./service-monitoring.nix
|
./service-monitoring.nix
|
||||||
./service-ssh.nix
|
./service-ssh.nix
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
# Sécurité & Acces distant
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
|
# Sécurité & Accès distant
|
||||||
|
# Services
|
||||||
|
|
||||||
## Augmentation de l'entropie du système par un générateur de nombres aléatoires
|
## Augmentation de l'entropie du système par un générateur de nombres aléatoires
|
||||||
## cat /proc/sys/kernel/random/entropy_avail
|
## cat /proc/sys/kernel/random/entropy_avail
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -11,6 +11,7 @@ mkIf cfg.laptop {
|
|||||||
|
|
||||||
# Gestion spécifique pour PC portable
|
# Gestion spécifique pour PC portable
|
||||||
|
|
||||||
|
# Services
|
||||||
services.xserver.synaptics = {
|
services.xserver.synaptics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
twoFingerScroll = true;
|
twoFingerScroll = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
@@ -9,6 +9,7 @@ in
|
|||||||
|
|
||||||
mkIf cfg.locate {
|
mkIf cfg.locate {
|
||||||
|
|
||||||
|
# Services
|
||||||
services.locate = {
|
services.locate = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interval = "hourly";
|
interval = "hourly";
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
# Monitoring
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
# Noeud de supervision munin = pas de stockage des données locales
|
mkIf true {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mailutils
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
## Noeud de supervision munin = pas de stockage des données locales
|
||||||
services.munin-node = {
|
services.munin-node = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Munin server -- generate /var/www/munin
|
## Munin server -- generate /var/www/munin
|
||||||
services.munin-cron = {
|
services.munin-cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hosts = ''
|
hosts = ''
|
||||||
@@ -20,12 +33,12 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
# Réseau
|
||||||
# TODO configurer les bon ports lors de l'ouverture du service
|
networking.firewall = {
|
||||||
8000
|
allowedTCPPorts = [
|
||||||
];
|
8000
|
||||||
|
];
|
||||||
## Documentation
|
allowedUDPPorts = [
|
||||||
# * https://nixos.org/wiki/Create_and_debug_nix_packages
|
];
|
||||||
# * http://chriswarbo.net/essays/nixos/developing_on_nixos.html
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
mkIf = pkgs.lib.mkIf;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
# Pulse Audio
|
# Pulse Audio
|
||||||
hardware.pulseaudio = mkIf profiles.isDesktop {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
support32Bit = true;
|
support32Bit = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
# OpenSSH daemon
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
|
# Services
|
||||||
|
## OpenSSH daemon
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern_.28OpenSSH_6.7.2B.29
|
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH#Modern_.28OpenSSH_6.7.2B.29
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
mkIf = pkgs.lib.mkIf;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
mkIf profiles.isDesktop {
|
||||||
|
|
||||||
|
# Services
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = mkIf profiles.isDesktop {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
layout = "fr";
|
layout = "fr";
|
||||||
xkbOptions = "eurosign:e";
|
xkbOptions = "eurosign:e";
|
||||||
|
|||||||
18
public/sudo.nix
Normal file
18
public/sudo.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
|
||||||
|
# Authorisation de certaines applications par sudo sans mot de passe
|
||||||
|
|
||||||
|
security.sudo.extraConfig = ''
|
||||||
|
%users ALL = NOPASSWD: ${pkgs.mtr}/bin/mtr
|
||||||
|
%users ALL = NOPASSWD: ${pkgs.slock}/bin/slock
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkIf cfg.swap {
|
mkIf cfg.swap {
|
||||||
|
|
||||||
# Gestion du swap
|
# Gestion du swap
|
||||||
|
|
||||||
# https://en.wikipedia.org/wiki/Swappiness
|
# https://en.wikipedia.org/wiki/Swappiness
|
||||||
|
|||||||
Reference in New Issue
Block a user