Compare commits
18 Commits
2017-01-26
...
2017-01-29
| Author | SHA1 | Date | |
|---|---|---|---|
| 65a21c197c | |||
|
|
c11cd5d456 | ||
|
|
805ef707f5 | ||
|
|
1ee426f50a | ||
|
|
0bcd327679 | ||
| 04c3397ff3 | |||
| 5f86c78e1b | |||
| 715a3519f4 | |||
| 0b08c7dbd0 | |||
| 0dab828682 | |||
| b4786c8fdf | |||
| 11a69418a7 | |||
| d7f2b4fd38 | |||
|
|
ce1cae293c | ||
|
|
1c58705adf | ||
|
|
1cc773c034 | ||
|
|
58c32c79fb | ||
| d1a5228a92 |
@@ -27,7 +27,7 @@ in
|
|||||||
|
|
||||||
#* Utilisé dans les fichiers .nix
|
#* Utilisé dans les fichiers .nix
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
enable = mkEnableOption "Génération de la configuration d'une machine.";
|
#enable = mkEnableOption "Génération de la configuration d'une machine.";
|
||||||
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
|
awesome = mkEnableOption "Profil pour activer le gestionnaire de fenêtre awesome.";
|
||||||
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
auto-upgrade = mkEnableOption "Profil pour activer les mises à jour automatiques.";
|
||||||
cartographie = mkEnableOption "Profil pour activer les outils de gestion de données géographiques.";
|
cartographie = mkEnableOption "Profil pour activer les outils de gestion de données géographiques.";
|
||||||
@@ -85,6 +85,7 @@ in
|
|||||||
};
|
};
|
||||||
#* Utilisé pour avoir des raccourcis de machine
|
#* Utilisé pour avoir des raccourcis de machine
|
||||||
r6d.computers = {
|
r6d.computers = {
|
||||||
|
isHydra = mkEnableOption "Identification du nom de machine.";
|
||||||
isLatitude = mkEnableOption "Identification du nom de machine.";
|
isLatitude = mkEnableOption "Identification du nom de machine.";
|
||||||
isMonstre = mkEnableOption "Identification du nom de machine.";
|
isMonstre = mkEnableOption "Identification du nom de machine.";
|
||||||
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
||||||
@@ -103,18 +104,19 @@ in
|
|||||||
config = mkMerge
|
config = mkMerge
|
||||||
[ # Unconditional stuff.
|
[ # Unconditional stuff.
|
||||||
{
|
{
|
||||||
r6d.config-generator.enable = true;
|
#r6d.config-generator.enable = true;
|
||||||
r6d.computers = {
|
# r6d.computers = {
|
||||||
isLatitude = host == "latitude.dubronetwork.fr";
|
# isHydra = host == "hydra.prunetwork.fr";
|
||||||
isMonstre = host == "monstre.dubronetwork.fr";
|
# isLatitude = host == "latitude.dubronetwork.fr";
|
||||||
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
# isMonstre = host == "monstre.dubronetwork.fr";
|
||||||
isNomade = host == "nomade.dubronetwork.fr";
|
# isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
||||||
isOcean = host == "ocean.prunetwork.fr";
|
# isNomade = host == "nomade.dubronetwork.fr";
|
||||||
isPedro = host == "pedro.dubronetwork.fr";
|
# isOcean = host == "ocean.prunetwork.fr";
|
||||||
isPhenom = host == "phenom.dubronetwork.fr";
|
# isPedro = host == "pedro.dubronetwork.fr";
|
||||||
isRadx = host == "radx.prunetwork.fr";
|
# isPhenom = host == "phenom.dubronetwork.fr";
|
||||||
isRollo = host == "rollo.dubronetwork.fr";
|
# isRadx = host == "radx.prunetwork.fr";
|
||||||
};
|
# isRollo = host == "rollo.dubronetwork.fr";
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|
||||||
# Conditional stuff
|
# Conditional stuff
|
||||||
@@ -207,7 +209,25 @@ in
|
|||||||
|
|
||||||
|
|
||||||
## Affectation des profils aux machines
|
## Affectation des profils aux machines
|
||||||
|
(mkIf comp.isHydra {
|
||||||
|
networking.hostName = "hydra.prunetwork.fr"; # Define your hostname.
|
||||||
|
r6d.profiles = {
|
||||||
|
isPrunetwork = true;
|
||||||
|
isServer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
r6d.config-generator = {
|
||||||
|
docker = true;
|
||||||
|
hydra-builder = true;
|
||||||
|
hydra-core = true;
|
||||||
|
#tincAddress = "192.168.12.6/24";
|
||||||
|
#tincExtraConfig = ''
|
||||||
|
# ConnectTo = rollo_dubronetwork_fr
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
})
|
||||||
(mkIf comp.isOcean {
|
(mkIf comp.isOcean {
|
||||||
|
networking.hostName = "ocean.prunetwork.fr"; # Define your hostname.
|
||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
isPrunetwork = true;
|
isPrunetwork = true;
|
||||||
isServer = true;
|
isServer = true;
|
||||||
@@ -223,6 +243,7 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf comp.isRadx {
|
(mkIf comp.isRadx {
|
||||||
|
networking.hostName = "radx.prunetwork.fr"; # Define your hostname.
|
||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
isHome = true;
|
isHome = true;
|
||||||
isPrunetwork = true;
|
isPrunetwork = true;
|
||||||
@@ -316,6 +337,7 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf comp.isPhenom {
|
(mkIf comp.isPhenom {
|
||||||
|
networking.hostName = "phenom.dubronetwork.fr"; # Define your hostname.
|
||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
isDubronetwork = true;
|
isDubronetwork = true;
|
||||||
isHome = true;
|
isHome = true;
|
||||||
@@ -324,7 +346,7 @@ in
|
|||||||
|
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
jetbrains-licensed = true;
|
jetbrains-licensed = true;
|
||||||
hydra-core = true;
|
#hydra-core = true;
|
||||||
nix-serve-server = true;
|
nix-serve-server = true;
|
||||||
edition-photo = true;
|
edition-photo = true;
|
||||||
tincAddress = "192.168.12.1/24";
|
tincAddress = "192.168.12.1/24";
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ mkIf true {
|
|||||||
exfat # Pour monter les FAT avec Fuse
|
exfat # Pour monter les FAT avec Fuse
|
||||||
hubicfuse # montage hubic
|
hubicfuse # montage hubic
|
||||||
ntfs3g # ntfs
|
ntfs3g # ntfs
|
||||||
|
squashfsTools # squashfs
|
||||||
sshfsFuse # ssh
|
sshfsFuse # ssh
|
||||||
|
|
||||||
## Gestion de FS
|
## Gestion de FS
|
||||||
@@ -43,6 +44,7 @@ mkIf true {
|
|||||||
|
|
||||||
## Exploitation FS
|
## Exploitation FS
|
||||||
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.
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -22,5 +22,10 @@ mkIf cfg.developpement-haskell {
|
|||||||
|
|
||||||
# Application perso
|
# Application perso
|
||||||
haskellPackages.hahp
|
haskellPackages.hahp
|
||||||
|
|
||||||
|
# Application
|
||||||
|
haskellPackages.autoproc # ? procmail
|
||||||
|
haskellPackages.darcs # Gestionnaire de version éponyme
|
||||||
|
haskellPackages.turtle # genre shell-scripting
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ in
|
|||||||
#./network-ipv6.nix
|
#./network-ipv6.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./service-haveged.nix
|
./service-haveged.nix
|
||||||
./service-monitoring.nix
|
./service-monitoring-munin.nix
|
||||||
|
./service-monitoring-smokeping.nix
|
||||||
./service-ssh.nix
|
./service-ssh.nix
|
||||||
./udev.nix
|
./udev.nix
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ mkIf cfg.hydra-core {
|
|||||||
### Machines connues
|
### Machines connues
|
||||||
|
|
||||||
programs.ssh.knownHosts = {
|
programs.ssh.knownHosts = {
|
||||||
|
"hydra.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMhXFlj2oyArVyEwEwDxNXthB/JljHkq+UhTLxbekkMB";
|
||||||
"monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc";
|
"monstre.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTTrLhq1Cwm0rpnwEIxSLqVrJWZnt+/9dt+SKd8NiIc";
|
||||||
"pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD";
|
"pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD";
|
||||||
"ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA";
|
"ocean.prunetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINCaRuTl8iCTUE4XInOpkSlwQj5Re4w4Iq+gNIlJe8pA";
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ mkIf true {
|
|||||||
services.munin-node = {
|
services.munin-node = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
|
systemd.services.munin-node = {
|
||||||
|
path = [ pkgs.munin pkgs.lm_sensors ];
|
||||||
|
serviceConfig.TimeoutStartSec = "3min";
|
||||||
|
};
|
||||||
|
|
||||||
## Munin server -- generate /var/www/munin
|
## Munin server -- generate /var/www/munin
|
||||||
services.munin-cron = {
|
services.munin-cron = {
|
||||||
194
public/service-monitoring-smokeping.nix
Normal file
194
public/service-monitoring-smokeping.nix
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
{ 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 {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
bind
|
||||||
|
];
|
||||||
|
|
||||||
|
security.setuidPrograms = [ "fping" ];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
services.smokeping = {
|
||||||
|
enable = true;
|
||||||
|
probeConfig = ''
|
||||||
|
+ FPing
|
||||||
|
#binary = ${pkgs.fping}/bin/fping
|
||||||
|
binary = ${config.security.wrapperDir}/fping
|
||||||
|
|
||||||
|
+DNS
|
||||||
|
#binary = ${pkgs.bind}/bin/dig
|
||||||
|
binary = /run/current-system/sw/bin/dig
|
||||||
|
forks = 5
|
||||||
|
offset = 50%
|
||||||
|
step = 300
|
||||||
|
timeout = 15
|
||||||
|
'';
|
||||||
|
targetConfig = ''
|
||||||
|
probe = FPing
|
||||||
|
menu = Top
|
||||||
|
title = Suivi de la latence reseau
|
||||||
|
remark = Monitoring de la latence reseau. \
|
||||||
|
Here you will learn all about the latency of our network.
|
||||||
|
+ Local
|
||||||
|
probe = FPing
|
||||||
|
menu = Local
|
||||||
|
title = Local Network
|
||||||
|
++ LocalMachine
|
||||||
|
menu = Local Machine
|
||||||
|
title = This host
|
||||||
|
host = localhost
|
||||||
|
|
||||||
|
+ Grudu_Tinc
|
||||||
|
probe = FPing
|
||||||
|
title = Grudu_Tinc
|
||||||
|
menu = Grudu.net - Tinc
|
||||||
|
|
||||||
|
++ Hydra
|
||||||
|
menu = hydra.grudu.net
|
||||||
|
title = hydra.grudu.net
|
||||||
|
host = hydra.grudu.net
|
||||||
|
|
||||||
|
++ Monstre
|
||||||
|
menu = monstre.grudu.net
|
||||||
|
title = monstre.grudu.net
|
||||||
|
host = monstre.grudu.net
|
||||||
|
|
||||||
|
++ Rollo
|
||||||
|
menu = rollo.grudu.net
|
||||||
|
title = rollo.grudu.net
|
||||||
|
host = rollo.grudu.net
|
||||||
|
|
||||||
|
++ Ocean
|
||||||
|
menu = ocean.grudu.net
|
||||||
|
title = ocean.grudu.net
|
||||||
|
host = ocean.grudu.net
|
||||||
|
|
||||||
|
++ MultiHost
|
||||||
|
menu = Multihost
|
||||||
|
title = Ensemble de mesures de latence
|
||||||
|
host = /Grudu_Tinc/Monstre /Grudu_Tinc/Rollo /Grudu_Tinc/Ocean /Grudu_Tinc/Hydra
|
||||||
|
|
||||||
|
+ Grudu_DNS
|
||||||
|
title = Grudu_DNS
|
||||||
|
menu = Grudu.net - DNS
|
||||||
|
probe = DNS
|
||||||
|
pings = 5
|
||||||
|
++ Ocean
|
||||||
|
title = ocean
|
||||||
|
menu = serveur ocean
|
||||||
|
server = ocean.prunetwork.fr
|
||||||
|
+++ ocean
|
||||||
|
host = ocean.grudu.net
|
||||||
|
lookup = ocean.grudu.net
|
||||||
|
+++ rollo
|
||||||
|
host = rollo.grudu.net
|
||||||
|
lookup = rollo.grudu.net
|
||||||
|
++ Rollo
|
||||||
|
title = rollo
|
||||||
|
menu = serveur rollo
|
||||||
|
server = rollo.dubronetwork.fr
|
||||||
|
+++ ocean
|
||||||
|
host = ocean.grudu.net
|
||||||
|
lookup = ocean.grudu.net
|
||||||
|
+++ rollo
|
||||||
|
host = rollo.grudu.net
|
||||||
|
lookup = rollo.grudu.net
|
||||||
|
++ MultiHost
|
||||||
|
menu = Multihost
|
||||||
|
title = Ensemble de mesures DNS
|
||||||
|
host = /Grudu_DNS/Ocean/ocean /Grudu_DNS/Ocean/rollo /Grudu_DNS/Rollo/ocean /Grudu_DNS/Rollo/rollo
|
||||||
|
+ France
|
||||||
|
probe = FPing
|
||||||
|
title = France
|
||||||
|
menu = Operateur francais
|
||||||
|
|
||||||
|
++ Atos
|
||||||
|
menu = Atos
|
||||||
|
title = www.atos.fr
|
||||||
|
host = www.atos.fr
|
||||||
|
|
||||||
|
++ Axialys
|
||||||
|
menu = Axialys
|
||||||
|
title = www.axialys.fr
|
||||||
|
host = www.axialys.fr
|
||||||
|
|
||||||
|
++ Azurtel
|
||||||
|
menu = azurtel
|
||||||
|
title = www.azurtel.fr
|
||||||
|
host = www.azurtel.fr
|
||||||
|
|
||||||
|
++ Bouygues-Telecom
|
||||||
|
menu = Bouygues-Telecom
|
||||||
|
title = www.bouygues-telecom.fr
|
||||||
|
host = www.bouygues-telecom.fr
|
||||||
|
|
||||||
|
++ Colt
|
||||||
|
menu = Colt
|
||||||
|
title = www.colt.fr
|
||||||
|
host = www.colt.fr
|
||||||
|
|
||||||
|
++ Completel
|
||||||
|
menu = completel
|
||||||
|
title = www.completel.fr
|
||||||
|
host = www.completel.fr
|
||||||
|
|
||||||
|
++ Free
|
||||||
|
menu = Free
|
||||||
|
title = www.free.fr
|
||||||
|
host = www.free.fr
|
||||||
|
|
||||||
|
++ Kosmos
|
||||||
|
menu = Kosmos
|
||||||
|
title = www.kosmos.fr
|
||||||
|
host = www.kosmos.fr
|
||||||
|
|
||||||
|
++ Orange
|
||||||
|
menu = Orange
|
||||||
|
title = www.orange.fr
|
||||||
|
host = www.orange.fr
|
||||||
|
|
||||||
|
++ Renater
|
||||||
|
menu = Renater
|
||||||
|
title = www.renater.fr
|
||||||
|
host = www.renater.fr
|
||||||
|
|
||||||
|
++ SFR
|
||||||
|
menu = SFR
|
||||||
|
title = www.sfr.fr
|
||||||
|
host = www.sfr.fr
|
||||||
|
|
||||||
|
++ MultiHost
|
||||||
|
menu = Multihost
|
||||||
|
title = Ensemble de mesures DNS
|
||||||
|
host = /France/Atos /France/Axialys /France/Azurtel \
|
||||||
|
/France/Bouygues-Telecom \
|
||||||
|
/France/Completel \
|
||||||
|
/France/Free \
|
||||||
|
/France/Kosmos \
|
||||||
|
/France/Orange \
|
||||||
|
/France/Renater \
|
||||||
|
/France/SFR
|
||||||
|
|
||||||
|
# /France/Colt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Réseau
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
#8081 # accès depuis localhost uniquement ou à travers un proxy nginx
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ mkIf profiles.isDesktop {
|
|||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
support32Bit = true;
|
support32Bit = true;
|
||||||
|
daemon.config = { flat-volumes = "no"; };
|
||||||
};
|
};
|
||||||
environment.etc."pulse/daemon.conf".text = "flat-volumes = no";
|
#environment.etc."pulse/daemon.conf".text = "flat-volumes = no";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user