diff --git a/coredns/ngp.computer.hosts b/coredns/ngp.computer.hosts index 0d0b52c..479303b 100644 --- a/coredns/ngp.computer.hosts +++ b/coredns/ngp.computer.hosts @@ -1,7 +1,9 @@ 192.168.1.3 img.ngp.computer 192.168.1.3 photos.ngp.computer 192.168.1.3 misaki.ngp.computer +192.168.1.3 files.ngp.computer fe80::9ab7:85ff:fe1e:dfe8 img.ngp.computer fe80::9ab7:85ff:fe1e:dfe8 photos.ngp.computer fe80::9ab7:85ff:fe1e:dfe8 misaki.ngp.computer +fe80::9ab7:85ff:fe1e:dfe8 files.ngp.computer diff --git a/flake.lock b/flake.lock index 02b4436..b1da67e 100644 --- a/flake.lock +++ b/flake.lock @@ -345,11 +345,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1766885793, - "narHash": "sha256-P6RVkrM9JLCW6xBjSwHfgTOQ1JwBUma5xe5LI8xAPC0=", + "lastModified": 1767047869, + "narHash": "sha256-tzYsEzXEVa7op1LTnrLSiPGrcCY6948iD0EcNLWcmzo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9ef261221d1e72399f2036786498d78c38185c46", + "rev": "89dbf01df72eb5ebe3b24a86334b12c27d68016a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f7205e2..aedc282 100644 --- a/flake.nix +++ b/flake.nix @@ -28,11 +28,9 @@ , ... }@inputs: let - name = "misaki"; system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; - }; unstable = import nixpkgs-unstable { inherit system; diff --git a/services.nix b/services.nix index 78e0d8a..33ca449 100644 --- a/services.nix +++ b/services.nix @@ -1,5 +1,4 @@ { config -, lib , pkgs , unstable , ... @@ -285,6 +284,11 @@ dnsProvider = "porkbun"; environmentFile = config.age.secrets.acme.path; }; + certs."files.ngp.computer" = { + group = "httpd"; + dnsProvider = "porkbun"; + environmentFile = config.age.secrets.acme.path; + }; certs."photos.ngp.computer" = { group = "httpd"; dnsProvider = "porkbun"; @@ -469,17 +473,24 @@ alias /srv/shokuhou/pictures/public/$1; ''; }; - # Don't use this unless you want the contents of this folder to be in the Nix - # Store and only updated when switching - #root = "/srv/shokuhou/pictures/public"; - #extraConfig = '' - # sendfile on; - # sendfile_max_chunk 1m; - # tcp_nopush on; - # root /srv/shokuhou/pictures/public; - # location ~ /.* { - # } - #''; + }; + virtualHosts."files.ngp.computer" = { + forceSSL = true; + enableACME = false; + useACMEHost = "files.ngp.computer"; + acmeRoot = null; + root = null; + extraConfig = '' + sendfile on; + tcp_nopush on; + ''; + locations."/books/" = { + extraConfig = '' + autoindex on; + autoindex_exact_size on; + alias /srv/shokuhou/books/sync/$1; + ''; + }; }; virtualHosts."jellyfin.packetlost.dev" = { forceSSL = true;