Compare commits

...

6 commits

Author SHA1 Message Date
414be4c06a pr-autobot: migration 18.09 -> 19.03 2019-04-26 00:04:44 +02:00
ad7cf64959 update 19.03 2019-04-21 11:07:27 +02:00
34ea855049 vsftpd: fix 19.03 -> SSL activé par défaut 2019-04-21 11:07:27 +02:00
74e9983200 update 2019-04-21 11:07:27 +02:00
d9c0013502 nat: config de test 2019-04-21 11:05:45 +02:00
35e0d8da56 riot: dimension t2bot 2019-04-21 11:04:42 +02:00
6 changed files with 14 additions and 47 deletions

View file

@ -5,9 +5,6 @@
config =
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
(import ../overlays/vsftpd.nix)
];
services.vsftpd = {
enable = true;
forceLocalLoginsSSL = true;

View file

@ -6,7 +6,11 @@ self: super:
"default_hs_url": "https://matrix.nyanlout.re",
"default_is_url": "https://vector.im",
"brand": "Nyanloutre",
"default_theme": "dark"
"default_theme": "dark",
"integrations_ui_url": "https://dimension.t2bot.io/riot",
"integrations_rest_url": "https://dimension.t2bot.io/api/v1/scalar",
"integrations_widgets_urls": ["https://dimension.t2bot.io/widgets"],
"integrations_jitsi_widget_url": "https://dimension.t2bot.io/widgets/jitsi"
}
'';
};

View file

@ -1,6 +0,0 @@
self: super:
{
vsftpd = super.vsftpd.override {
sslEnable = true;
};
}

View file

@ -27,7 +27,7 @@ in
ignoreCollisions = true;
};
in "${pkgs.writeShellScriptBin "run.sh" ''
${env}/bin/python ${pkgs.writeScript "pr-autobot.py" "${readFile ./pr-autobot.py}"} --private-key /var/lib/auto-pr-bot/private-key.pem --app-id 19565 --installation-id 407088 --repo nyanloutre/nixpkgs --cache-dir /var/cache/auto-pr-bot
${env}/bin/python ${pkgs.writeScript "pr-autobot.py" "${readFile ./pr-autobot.py}"} --private-key /var/lib/auto-pr-bot/private-key.pem --app-id 19565 --installation-id 407088 --repo nyanloutre/nixpkgs --cache-dir /var/cache/auto-pr-bot --version 19.03
''}/bin/run.sh";
};
};

View file

@ -11,9 +11,10 @@ parser.add_argument('--app-id')
parser.add_argument('--installation-id')
parser.add_argument('--repo')
parser.add_argument('--cache-dir')
parser.add_argument('--version')
args = vars(parser.parse_args())
channel_req = urllib.request.Request(url='https://nixos.org/channels/nixos-18.09/git-revision')
channel_req = urllib.request.Request(url='https://nixos.org/channels/nixos-' + args["version"] + '/git-revision')
latest_commit = urllib.request.urlopen(channel_req).read().decode('utf-8')
try:
previous_commit = open(args['cache_dir'] + '/git-revision', 'r').read()
@ -57,7 +58,7 @@ if latest_commit != previous_commit:
- [ ] Fusionner la branche
""")
pr = repo.create_pull(title=branch, body=pr_message, base='nixos-18.09', head=branch)
pr = repo.create_pull(title=branch, body=pr_message, base='nixos-' + args["version"], head=branch)
print("Pull request numéro " + str(pr.number) + " créée")
print("URL : " + pr.html_url)

View file

@ -5,7 +5,7 @@
{ config, pkgs, ... }:
let
gitRev = "afca3f977175280668aaed92112eb42a171510d2";
gitRev = "91cb80e4397d55b19b0beba3fa3846f1a02d0342";
nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz";
in
{
@ -42,20 +42,13 @@ in
# eno1 -> VLAN100 -> Internet
# eno2 -> LAN
# eno3 -> accès serveur
# eno4 -> Wifi ?
# eno3 -> Legacy client DHCP
# eno4 -> Pas utilisé
networking = {
hostName = "loutreos"; # Define your hostname.
hostId = "7e66e347";
# firewall.trustedInterfaces = [ "eno3" ];
# interface.eno3 = {
# ipv4.addresses = [
# { address = "10.30.0.5"; prefixLength = 24; }
# ];
# };
vlans.bouyges = {
id = 100;
interface = "eno1";
@ -76,32 +69,10 @@ in
# NAT bouyges <-> eno2
nat = {
enable = true;
externalInterface = "bouyges";
# À remplacer par bouyges
externalInterface = "eno3";
# Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE
# externalIP = "0.0.0.0";
forwardPorts = [
# FTP
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 20; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 21; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = "64000:65535"; }
# SSH
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22; }
# Mails
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 25; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 143; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 587; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 4190; }
# HAProxy
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 80; }
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 443; }
# Matrix
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 8448; }
# Syncthing
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22000; }
# Transmission
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 51413; }
{ destination = "10.30.0.5"; proto = "udp"; sourcePort = 51413; }
];
internalIPs = [ "10.30.0.0/16" ];
internalInterfaces = [ "eno2" ];
};