diff --git a/containers/vsftpd.nix b/containers/vsftpd.nix index 77fceae..02fab55 100644 --- a/containers/vsftpd.nix +++ b/containers/vsftpd.nix @@ -5,6 +5,9 @@ config = { config, pkgs, ... }: { + nixpkgs.overlays = [ + (import ../overlays/vsftpd.nix) + ]; services.vsftpd = { enable = true; forceLocalLoginsSSL = true; diff --git a/overlays/riot-web.nix b/overlays/riot-web.nix index c92dfa5..74539b1 100644 --- a/overlays/riot-web.nix +++ b/overlays/riot-web.nix @@ -6,11 +6,7 @@ self: super: "default_hs_url": "https://matrix.nyanlout.re", "default_is_url": "https://vector.im", "brand": "Nyanloutre", - "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" + "default_theme": "dark" } ''; }; diff --git a/overlays/vsftpd.nix b/overlays/vsftpd.nix new file mode 100644 index 0000000..9475490 --- /dev/null +++ b/overlays/vsftpd.nix @@ -0,0 +1,6 @@ +self: super: +{ + vsftpd = super.vsftpd.override { + sslEnable = true; + }; +} diff --git a/services/auto-pr.nix b/services/auto-pr.nix index 228f7a9..0ac765c 100644 --- a/services/auto-pr.nix +++ b/services/auto-pr.nix @@ -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 --version 19.03 + ${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 ''}/bin/run.sh"; }; }; diff --git a/services/pr-autobot.py b/services/pr-autobot.py index c97a2c9..a1ad4b1 100755 --- a/services/pr-autobot.py +++ b/services/pr-autobot.py @@ -11,10 +11,9 @@ 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-' + args["version"] + '/git-revision') +channel_req = urllib.request.Request(url='https://nixos.org/channels/nixos-18.09/git-revision') latest_commit = urllib.request.urlopen(channel_req).read().decode('utf-8') try: previous_commit = open(args['cache_dir'] + '/git-revision', 'r').read() @@ -58,7 +57,7 @@ if latest_commit != previous_commit: - [ ] Fusionner la branche """) - pr = repo.create_pull(title=branch, body=pr_message, base='nixos-' + args["version"], head=branch) + pr = repo.create_pull(title=branch, body=pr_message, base='nixos-18.09', head=branch) print("Pull request numéro " + str(pr.number) + " créée") print("URL : " + pr.html_url) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index a6d4124..6415262 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -5,7 +5,7 @@ { config, pkgs, ... }: let - gitRev = "91cb80e4397d55b19b0beba3fa3846f1a02d0342"; + gitRev = "afca3f977175280668aaed92112eb42a171510d2"; nixpkgs = fetchTarball "https://github.com/nyanloutre/nixpkgs/archive/${gitRev}.tar.gz"; in { @@ -42,13 +42,20 @@ in # eno1 -> VLAN100 -> Internet # eno2 -> LAN - # eno3 -> Legacy client DHCP - # eno4 -> Pas utilisé + # eno3 -> accès serveur + # eno4 -> Wifi ? 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"; @@ -69,10 +76,32 @@ in # NAT bouyges <-> eno2 nat = { enable = true; - # À remplacer par bouyges - externalInterface = "eno3"; + externalInterface = "bouyges"; # 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" ]; };