From 7d6143a83230298e85c45283435f702dd359e8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 20 Jan 2024 14:35:18 +0200 Subject: [PATCH] vm: add admin endpoint --- flake.nix | 1 + vm.nix | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index 81d2b87..0048fca 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ nixosConfigurations.vm = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + {nixpkgs.overlays = [overlay];} "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ./vm.nix self.nixosModules.e11sync diff --git a/vm.nix b/vm.nix index 34c80df..58ecd53 100644 --- a/vm.nix +++ b/vm.nix @@ -13,6 +13,10 @@ auto_https off debug ''; + virtualHosts."http://:8003".extraConfig = '' + redir / /admin/ + ${builtins.readFile "${pkgs.e11sync-caddyfile}"} + ''; }; environment.systemPackages = with pkgs; [ @@ -37,6 +41,11 @@ host.port = 8001; guest.port = 8001; } + { + from = "host"; + host.port = 8003; + guest.port = 8003; + } ]; }; security.sudo.wheelNeedsPassword = false;