Compare commits
18 Commits
2016-08-10
...
2016-08-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bc50b35dd | ||
|
|
1c649a9b04 | ||
|
|
7cb371510b | ||
|
|
b38e5a87bb | ||
|
|
50326127d3 | ||
|
|
02a8b96e61 | ||
|
|
5e6586d403 | ||
|
|
b65ffa4d8f | ||
|
|
744ebec05b | ||
| d1113bec00 | |||
| ef2733675d | |||
| 63902d313c | |||
| 0dc2561017 | |||
|
|
953021f306 | ||
|
|
c2da568c30 | ||
| bbfd76a4a1 | |||
|
|
e1e30f4ce0 | ||
| 4c3e1abfcb |
@@ -5,20 +5,20 @@ let
|
|||||||
profiles = config.r6d.profiles;
|
profiles = config.r6d.profiles;
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
computers = config.r6d.computers;
|
computers = config.r6d.computers;
|
||||||
in {
|
in
|
||||||
nix = mkIf config.r6d.config-generator.nix-serve-client {
|
|
||||||
|
mkIf cfg.nix-serve-client {
|
||||||
|
nix = {
|
||||||
# Cache http pour le store
|
# Cache http pour le store
|
||||||
requireSignedBinaryCaches = false;
|
requireSignedBinaryCaches = false;
|
||||||
binaryCaches = [
|
binaryCaches = [
|
||||||
("https://cache.nixos.org/")
|
"https://cache.nixos.org/"
|
||||||
(mkIf (profiles.isDubronetwork && (! computers.isMonstre)) "http://192.168.10.169:5000")
|
|
||||||
(mkIf profiles.isDubronetwork "http://192.168.10.252:5000")
|
|
||||||
|
|
||||||
|
(mkIf (profiles.isDubronetwork && (! computers.isRollo)) "http://nix-cache.dubronetwork.fr:5001")
|
||||||
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
||||||
];
|
];
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
connect-timeout = 5
|
connect-timeout = 5
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ with pkgs.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.r6d.config-generator;
|
cfg = config.r6d.config-generator;
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
# Gestion de fail2ban
|
# Gestion de fail2ban
|
||||||
|
|
||||||
@@ -13,18 +17,16 @@ in {
|
|||||||
jails = {
|
jails = {
|
||||||
DEFAULT = ''
|
DEFAULT = ''
|
||||||
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
|
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
|
||||||
ignoreip = 127.0.0.1/8 pedro.dubronetwork.fr cube.dubronetwork.fr voyage.prunetwork.fr xray.prunetwork.fr 192.168.0.0/16 172.16.0.0/16
|
ignoreip = 127.0.0.1/8 ${ignoreip}
|
||||||
|
|
||||||
# 1 jour
|
# 1 jour
|
||||||
# bantime = 86400
|
# bantime = 86400
|
||||||
# 5 jours
|
# 5 jours
|
||||||
bantime = 432000
|
bantime = 432000
|
||||||
|
|
||||||
maxretry = 3
|
maxretry = 3
|
||||||
|
|
||||||
#
|
destemail = ${destemail}
|
||||||
# Destination email address used solely for the interpolations in
|
|
||||||
# jail.{conf,local} configuration files.
|
|
||||||
destemail = admins@dubronetwork.fr
|
|
||||||
'';
|
'';
|
||||||
ssh-route = ''
|
ssh-route = ''
|
||||||
filter = sshd
|
filter = sshd
|
||||||
@@ -23,13 +23,13 @@ in {
|
|||||||
users.extraUsers.root = {
|
users.extraUsers.root = {
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
radxJPierre03
|
radxJPierre03
|
||||||
|
radxRoot
|
||||||
|
phenomTaeradan
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.jpierre03 = mkIf profiles.isPrunetwork {
|
users.extraUsers.jpierre03 = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
createHome = true;
|
|
||||||
home = "/home/jpierre03";
|
|
||||||
description = "jpierre03";
|
description = "jpierre03";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"docker"
|
"docker"
|
||||||
@@ -46,10 +46,10 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.taeradan = mkIf profiles.isDubronetwork {
|
users.extraUsers.taeradan = {
|
||||||
description = "Yves Dubromelle";
|
description = "Yves Dubromelle";
|
||||||
|
initialHashedPassword = "$6$yOBwZ.ijA$.eDknYZBxiGie88EUC8fYdpnSchKa8fMmjLglVk8c1gr23oAeb6rSBe8ID07frG5KlVSBqeMTuSoa/aONNp7b1";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
#uid = 1000;
|
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"audio"
|
"audio"
|
||||||
"docker"
|
"docker"
|
||||||
@@ -63,12 +63,33 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.lothy = mkIf (profiles.isDubronetwork && profiles.isDesktop) {
|
users.extraUsers.lothy = mkIf ( (cfg.mailboxes && profiles.isDubronetwork)
|
||||||
|
|| (profiles.isDesktop && profiles.isDubronetwork)
|
||||||
|
) {
|
||||||
description = "Ophélie Dubromelle-Lacroix";
|
description = "Ophélie Dubromelle-Lacroix";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"audio"
|
"audio"
|
||||||
];
|
];
|
||||||
|
hashedPassword = "$6$vcZSVwQFcGg1xt$xuMiCmlozhgyFFGEw3rRnIrhVcglMlWY1lfJG17QoKE4KzrQfc9YAaJYgf.clc3ouFC/yLtEs18Q0DVGixTEt0";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
users.extraUsers.alain = mkIf (cfg.mailboxes && profiles.isDubronetwork) {
|
||||||
|
description = "Alain Dubromelle";
|
||||||
|
isNormalUser = true;
|
||||||
|
hashedPassword = "$6$wGd7Inli$p4Q8BrkUSNCKfqloHtehFKKHQqVKVxul/oHWBY2BdqlFNt7N9MXuvVJZ2BOD747vQvAc2f07N8I8kD0n7x/o61";
|
||||||
|
uid = 1101;
|
||||||
|
};
|
||||||
|
users.extraUsers.dubromelle = mkIf (cfg.mailboxes && profiles.isDubronetwork) {
|
||||||
|
description = "Alain & Véro Dubromelle";
|
||||||
|
isNormalUser = true;
|
||||||
|
hashedPassword = "$6$Aa7rTIL7$M8zhtVsjPhkbNsY571K6bb04Y6cS04Z8RYKTIF3HoslelXplkphckauNep9gnc9mAp0p7o2lnQEVSoPw2UwT7/";
|
||||||
|
uid = 1102;
|
||||||
|
};
|
||||||
|
users.extraUsers.michele = mkIf (cfg.mailboxes && profiles.isDubronetwork) {
|
||||||
|
description = "Michele Dubromelle";
|
||||||
|
isNormalUser = true;
|
||||||
|
hashedPassword = "$6$RuwEVVml$JnSb62qFrtBJY1CfC9uE0YK2qd2TpnNmlXNeQ62ludb3mkV8AMUVEj3R9jTKtOfLt/ap6jGVmakotGtHczBHL/";
|
||||||
|
uid = 1103;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
./network-dns.nix
|
./network-dns.nix
|
||||||
|
|
||||||
# inclusion conditionnelle
|
# inclusion conditionnelle
|
||||||
./activation-manuelle/fail2ban.nix
|
./activation-manuelle/service-fail2ban.nix
|
||||||
./activation-manuelle/nix-serve-client.nix
|
./activation-manuelle/nix-serve-client.nix
|
||||||
./activation-manuelle/nix-serve-server.nix
|
./activation-manuelle/nix-serve-server.nix
|
||||||
./activation-manuelle/users.nix
|
./activation-manuelle/users.nix
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ in
|
|||||||
database_postgres=mkEnableOption "Profil pour activer le SGBD PostgreSQL.";
|
database_postgres=mkEnableOption "Profil pour activer le SGBD PostgreSQL.";
|
||||||
developpement = mkEnableOption "Profil pour activer les outils de développement";
|
developpement = mkEnableOption "Profil pour activer les outils de développement";
|
||||||
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
|
docker = mkEnableOption "Profil pour l'utilisation de Docker.";
|
||||||
|
dovecot = mkEnableOption "Profil pour activer le serveur Dovecot.";
|
||||||
dns_autorite = mkEnableOption "Profil pour servir les fichiers de zone DNS.";
|
dns_autorite = mkEnableOption "Profil pour servir les fichiers de zone DNS.";
|
||||||
dns_resolveur = mkEnableOption "Profil pour activer un résolveur DNS local.";
|
dns_resolveur = mkEnableOption "Profil pour activer un résolveur DNS local.";
|
||||||
edition-musique = mkEnableOption "Profil pour la création/édition de musique.";
|
edition-musique = mkEnableOption "Profil pour la création/édition de musique.";
|
||||||
@@ -45,9 +46,11 @@ in
|
|||||||
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
jeux = mkEnableOption "Profil pour les jeux vidéos.";
|
||||||
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
|
||||||
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
locate = mkEnableOption "Profil pour activer la fonction locate.";
|
||||||
|
mailboxes = mkEnableOption "Profil pour stocker les mails dans des boîtes aux lettres.";
|
||||||
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
|
murmur = mkEnableOption "Profil pour activer un serveur Mumble (murmur)";
|
||||||
nix-serve-client= mkEnableOption "Profil pour que la machine soit un client de cache nix.";
|
nix-serve-client= mkEnableOption "Profil pour que la machine soit un client de cache nix.";
|
||||||
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";
|
||||||
online-ipv6 = mkEnableOption "Profil pour activer l'IPv6 de online.net";
|
online-ipv6 = mkEnableOption "Profil pour activer l'IPv6 de online.net";
|
||||||
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
print = mkEnableOption "Profil pour activer cups & pouvoir imprimer.";
|
||||||
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
rabbitmq = mkEnableOption "Profil pour activer le service de messagerie AMQP.";
|
||||||
@@ -63,6 +66,7 @@ in
|
|||||||
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
isNeoNomade = mkEnableOption "Identification du nom de machine.";
|
||||||
isNomade = mkEnableOption "Identification du nom de machine.";
|
isNomade = mkEnableOption "Identification du nom de machine.";
|
||||||
isOcean = mkEnableOption "Identification du nom de machine.";
|
isOcean = mkEnableOption "Identification du nom de machine.";
|
||||||
|
isPedro = mkEnableOption "Identification du nom de machine.";
|
||||||
isPhenom = mkEnableOption "Identification du nom de machine.";
|
isPhenom = mkEnableOption "Identification du nom de machine.";
|
||||||
isRadx = mkEnableOption "Identification du nom de machine.";
|
isRadx = mkEnableOption "Identification du nom de machine.";
|
||||||
isRollo = mkEnableOption "Identification du nom de machine.";
|
isRollo = mkEnableOption "Identification du nom de machine.";
|
||||||
@@ -83,6 +87,7 @@ in
|
|||||||
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
isNeoNomade = host == "neo-nomade.dubronetwork.fr";
|
||||||
isNomade = host == "nomade.dubronetwork.fr";
|
isNomade = host == "nomade.dubronetwork.fr";
|
||||||
isOcean = host == "ocean.prunetwork.fr";
|
isOcean = host == "ocean.prunetwork.fr";
|
||||||
|
isPedro = host == "pedro.dubronetwork.fr";
|
||||||
isPhenom = host == "phenom.dubronetwork.fr";
|
isPhenom = host == "phenom.dubronetwork.fr";
|
||||||
isRadx = host == "radx.prunetwork.fr";
|
isRadx = host == "radx.prunetwork.fr";
|
||||||
isRollo = host == "rollo.dubronetwork.fr";
|
isRollo = host == "rollo.dubronetwork.fr";
|
||||||
@@ -140,9 +145,6 @@ in
|
|||||||
print = true;
|
print = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf (pfl.isDubronetwork && pfl.isHome) {
|
|
||||||
r6d.config-generator.jeux = true;
|
|
||||||
})
|
|
||||||
(mkIf (pfl.isDubronetwork && pfl.isServer) {
|
(mkIf (pfl.isDubronetwork && pfl.isServer) {
|
||||||
r6d.config-generator.nix-serve-server = true;
|
r6d.config-generator.nix-serve-server = true;
|
||||||
})
|
})
|
||||||
@@ -179,12 +181,10 @@ in
|
|||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
isHome = true;
|
isHome = true;
|
||||||
isPrunetwork = true;
|
isPrunetwork = true;
|
||||||
isServer = true;
|
|
||||||
isWorkstation = true;
|
isWorkstation = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
nix-serve-server = true;
|
|
||||||
virtualbox = true;
|
virtualbox = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
@@ -212,7 +212,11 @@ in
|
|||||||
isServer = true;
|
isServer = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
r6d.config-generator.fail2ban = true;
|
r6d.config-generator = {
|
||||||
|
fail2ban = true;
|
||||||
|
nix-serve-client = true;
|
||||||
|
nixStoreProxyCache = true;
|
||||||
|
};
|
||||||
})
|
})
|
||||||
(mkIf comp.isNeoNomade{
|
(mkIf comp.isNeoNomade{
|
||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
@@ -231,6 +235,17 @@ in
|
|||||||
laptop = true;
|
laptop = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
(mkIf comp.isPedro {
|
||||||
|
r6d.profiles = {
|
||||||
|
isDubronetwork = true;
|
||||||
|
isServer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
r6d.config-generator = {
|
||||||
|
fail2ban = true;
|
||||||
|
online-ipv6 = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
(mkIf comp.isPhenom {
|
(mkIf comp.isPhenom {
|
||||||
r6d.profiles = {
|
r6d.profiles = {
|
||||||
isDubronetwork = true;
|
isDubronetwork = true;
|
||||||
@@ -249,7 +264,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
r6d.config-generator = {
|
r6d.config-generator = {
|
||||||
|
dovecot = true;
|
||||||
fail2ban = true;
|
fail2ban = true;
|
||||||
|
mailboxes = true;
|
||||||
murmur = true;
|
murmur = true;
|
||||||
online-ipv6 = true;
|
online-ipv6 = true;
|
||||||
znc = true;
|
znc = true;
|
||||||
|
|||||||
11
module-template.nix
Normal file
11
module-template.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf true {
|
||||||
|
}
|
||||||
3
munin-www.sh
Executable file
3
munin-www.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pushd /var/www/munin/ && python -m SimpleHTTPServer 8000
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# installées systématiquement
|
# installées systématiquement
|
||||||
./environment.nix
|
./environment.nix
|
||||||
./localisation.nix
|
./localisation.nix
|
||||||
./network-ipv6.nix
|
#./network-ipv6.nix
|
||||||
./service-haveged.nix
|
./service-haveged.nix
|
||||||
./service-monitoring.nix
|
./service-monitoring.nix
|
||||||
./service-ssh.nix
|
./service-ssh.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user