Compare commits
19 Commits
2016-08-09
...
2016-08-11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c649a9b04 | ||
|
|
7cb371510b | ||
|
|
b38e5a87bb | ||
|
|
50326127d3 | ||
|
|
02a8b96e61 | ||
|
|
5e6586d403 | ||
|
|
b65ffa4d8f | ||
|
|
744ebec05b | ||
| d1113bec00 | |||
| ef2733675d | |||
| 63902d313c | |||
| 0dc2561017 | |||
|
|
953021f306 | ||
|
|
c2da568c30 | ||
| bbfd76a4a1 | |||
|
|
e1e30f4ce0 | ||
| 4c3e1abfcb | |||
|
|
c5b9c97327 | ||
|
|
6b0689d336 |
@@ -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,15 +46,18 @@ 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.";
|
||||||
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
swap = mkEnableOption "Profil pour que le swap soit activé.";
|
||||||
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
virtualbox = mkEnableOption "Profil pour l'utilisation de VirtualBox.";
|
||||||
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
|
xmonad = mkEnableOption "Profil pour activer le gestionnaire de fenêtres xmonad.";
|
||||||
|
znc = mkEnableOption "Profil pour activer le relais IRC ZNC.";
|
||||||
};
|
};
|
||||||
#* Utilisé pour avoir des raccourcis de machine
|
#* Utilisé pour avoir des raccourcis de machine
|
||||||
r6d.computers = {
|
r6d.computers = {
|
||||||
@@ -139,9 +143,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;
|
||||||
})
|
})
|
||||||
@@ -178,12 +179,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;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
@@ -211,7 +210,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 = {
|
||||||
@@ -248,9 +251,12 @@ 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;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|||||||
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
|
||||||
@@ -19,9 +19,11 @@ environment.systemPackages = with pkgs; [
|
|||||||
## Réseaux sociaux
|
## Réseaux sociaux
|
||||||
python27Packages.turses # client twitter en ncurse
|
python27Packages.turses # client twitter en ncurse
|
||||||
python27Packages.rainbowstream # client twitter en console
|
python27Packages.rainbowstream # client twitter en console
|
||||||
|
rtv # client reddit en console
|
||||||
|
|
||||||
## Mail & Discussion (texte, audio)
|
## Mail & Discussion (texte, audio)
|
||||||
clawsMail
|
clawsMail
|
||||||
|
hexchat
|
||||||
kde5.quasselClient
|
kde5.quasselClient
|
||||||
mumble
|
mumble
|
||||||
mutt
|
mutt
|
||||||
|
|||||||
@@ -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