diff --git a/flake.nix b/flake.nix index 6ce377d3..fe59ae42 100644 --- a/flake.nix +++ b/flake.nix @@ -83,6 +83,10 @@ "SunVox" "renoise" ]; + # config.permittedInsecurePackages = [ + # "python3.10-django-3.1.14" # Needed for archivebox deployments on curve + # # Check when archive box updates it's dependeny + # ]; overlays = [ rust-overlay.overlays.default tidalcycles.overlays.default diff --git a/hosts/box/default.nix b/hosts/box/default.nix index 1e9104ec..aea4f9f7 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -18,7 +18,7 @@ ../profiles/calibre ../profiles/wallabag ../profiles/finance - ../profiles/archivebox + # ../profiles/archivebox ]; # For some reason this doesn't work in the profile, but does over here?? diff --git a/hosts/profiles/archivebox/default.nix b/hosts/profiles/archivebox/default.nix index e5d53ae1..e5ddaaff 100644 --- a/hosts/profiles/archivebox/default.nix +++ b/hosts/profiles/archivebox/default.nix @@ -7,6 +7,22 @@ let port = "8123"; in { + nixpkgs.config.permittedInsecurePackages = [ + "python3.10-django-3.1.14" + ]; + + services.nginx.virtualHosts."archive.mossnet.lan" = { + enableACME = false; + forceSSL = false; + + locations."/" = { + extraConfig = '' + proxy_pass http://localhost:${port}/; + proxy_set_header X-Forwarded-Host $host; + ''; + }; + }; + systemd.services.archivebox-install = { description = "archivebox install service"; wantedBy = [ "multi-user.target" ]; @@ -25,7 +41,7 @@ in ''; script = '' - echo "Setting up wallabag files in ${dataDir} ..." + echo "Setting up archivebox files in ${dataDir} ..." cd "${dataDir}" archivebox init diff --git a/hosts/profiles/dns/default.nix b/hosts/profiles/dns/default.nix index 178b3b45..bfa48374 100644 --- a/hosts/profiles/dns/default.nix +++ b/hosts/profiles/dns/default.nix @@ -25,6 +25,7 @@ "fin.mossnet.lan" "paper.mossnet.lan" "cal.mossnet.lan" + "archive.mossnet.lan" ]; "192.168.1.226" = [ "df-web.lan" diff --git a/hosts/profiles/mossnet-hosts/default.nix b/hosts/profiles/mossnet-hosts/default.nix index ec95ab80..d8835864 100644 --- a/hosts/profiles/mossnet-hosts/default.nix +++ b/hosts/profiles/mossnet-hosts/default.nix @@ -11,6 +11,7 @@ 192.168.1.240 fin.mossnet.lan 192.168.1.240 paper.mossnet.lan 192.168.1.240 books.mossnet.lan + 192.168.1.240 archive.mossnet.lan ''; # 10.0.69.4 mossnet.lan # 10.0.69.4 links.mossnet.lan