Compare commits

..

5 Commits

Author SHA1 Message Date
9d252f374c mise à jour LoutreOS 2019-10-04 22:50:30 +02:00
a06a8bebab wireguard: config serveur pour NAT 2019-10-04 22:50:30 +02:00
f621cb3a21 ajout bot mautrix-telegram 2019-10-04 22:50:30 +02:00
4ee31add54 ajout serveur Minecraft 2019-10-04 22:50:30 +02:00
1b16b40a79 ftp: ajout nico 2019-10-04 22:39:31 +02:00
3 changed files with 62 additions and 5 deletions

View File

@ -11,7 +11,7 @@
forceLocalDataSSL = true;
userlistDeny = false;
localUsers = true;
userlist = ["claire" "manu" "lakeu" "fusil" "stryxion"];
userlist = ["claire" "manu" "lakeu" "fusil" "stryxion" "nico"];
rsaCertFile = "/var/vsftpd/vsftpd.pem";
extraConfig = ''
pasv_min_port=64000
@ -50,6 +50,12 @@
hashedPassword = "$6$KZKwBLI6yGuvFg2Q$VCfSnhAacgxlxybTyuCDyNQ2InM8ppG3aa3Bw176TiNAX8tHWUpKesfI9YfcCoGAi1zSzA7b6uC8BmmfrQwg1.";
description = "Stryxion";
};
nico = {
isNormalUser = true;
hashedPassword = "$6$.sMznhhJ0fG2qx$XevsEqsjlLAnu/VMgeA6B5YfWY36dUZXtUGiEgPueHzRcfAEi2UXLWRHqcN6AsW1AozepeAP6/lZW3fDAyULA1";
description = "MAGENI";
};
};
};
bindMounts = {

View File

@ -5,7 +5,7 @@
{ config, pkgs, ... }:
let
gitRev = "91cb80e4397d55b19b0beba3fa3846f1a02d0342";
gitRev = "4c45e960e797d660358a11723e736afee3998261";
nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz";
in
{
@ -33,7 +33,7 @@ in
];
nixpkgs.config.allowUnfree = false;
nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (builtins.parseDrvName pkg.name).name [ "factorio-headless" "perl5.28.1-slimserver" ]);
nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (builtins.parseDrvName pkg.name).name [ "factorio-headless" "perl5.28.1-slimserver" "minecraft-server" ]);
services.zfs = {
autoSnapshot.enable = true;

View File

@ -307,6 +307,30 @@ in
disable_existing_loggers: False
'';
app_service_config_files = [
"/var/lib/matrix-synapse/mautrix-telegram-registration.yaml"
];
};
mautrix-telegram = {
enable = true;
settings = {
homeserver = {
address = "https://matrix.nyanlout.re";
domain = "nyanlout.re";
};
appservice = {
bot_username = "loutrebot";
};
bridge = {
relaybot.authless_portals = false;
permissions = {
"@nyanloutre:nyanlout.re" = "admin";
};
};
};
environmentFile = "/mnt/secrets/mautrix-telegram.env";
serviceDependencies = [ "matrix-synapse.service" ];
};
pgmanage = {
@ -419,6 +443,30 @@ in
enable = true;
maxMemory = 500;
};
minecraft-server = {
enable = true;
jvmOpts = "-Xms512m -Xmx3072m";
eula = true;
declarative = true;
openFirewall = true;
whitelist = {
nyanloutre = "db0669ea-e332-4ca3-8d50-f5d1458f5822";
Hautension = "f05677f4-be5a-47df-ad77-21c739180aa2";
LordDarkKiwi = "79290cfc-0b00-484f-9c94-ab0786402de6";
Madahin = "f5f747e3-fac2-43e8-9b9b-a67dc2f368ff";
Hopegcx = "4497f759-2210-48db-8764-307d33011442";
wyrd68 = "127a3021-cdc1-419f-9010-4651df9ae3af";
sparsyateloutre = "d2ff63c1-4e9f-4b21-9bfc-decce5d987b3";
};
serverProperties = {
difficulty = 2;
gamemode = 0;
max-players = 50;
motd = "Hi Mark !";
white-list = true;
};
};
};
systemd.services.dogetipbot-telegram = {
@ -454,16 +502,19 @@ in
ips = [ "192.168.20.1/24" ];
privateKeyFile = "/mnt/secrets/wireguard/wg0.privatekey";
listenPort = 51820;
allowedIPsAsRoutes = false;
allowedIPsAsRoutes = true;
peers = [
{
allowedIPs = [ "0.0.0.0/0" ];
allowedIPs = [ "192.168.20.2/32" ];
publicKey = "b/SXiqo+GPdNOc54lyEVeUBc6B5AbVMKh+g5EZPGzlE=";
}
];
};
};
nat.internalInterfaces = [ "wg0" ];
nat.internalIPs = [ "192.168.20.0/24" ];
firewall.allowedTCPPorts = [
51413 # Transmission
8448 # Matrix federation