diff --git a/cachix.nix b/cachix.nix index cce90a3..88b2f08 100644 --- a/cachix.nix +++ b/cachix.nix @@ -11,4 +11,3 @@ in { inherit imports; nix.binaryCaches = ["https://cache.nixos.org/"]; } - \ No newline at end of file diff --git a/cachix/ropfuscator.nix b/cachix/ropfuscator.nix index f91cdad..53ea723 100644 --- a/cachix/ropfuscator.nix +++ b/cachix/ropfuscator.nix @@ -9,4 +9,3 @@ ]; }; } - \ No newline at end of file diff --git a/hosts/architect/calibre.nix b/hosts/architect/calibre.nix new file mode 100644 index 0000000..cfd8944 --- /dev/null +++ b/hosts/architect/calibre.nix @@ -0,0 +1,35 @@ +{ lib, ... }: + +let + domain = "books.giugl.io"; + network = import ./network.nix; +in { + services = { + calibre-web = { + enable = true; + group = "media"; + options = { + enableBookConversion = true; + enableBookUploading = true; + }; + }; + + nginx.virtualHosts.${domain} = { + locations."/" = { + proxyPass = "http://localhost:8083"; + extraConfig = '' + allow 10.0.0.0/24; + allow 10.3.0.0/24; + deny all; + ''; + }; + }; + }; + + networking.extraHosts = '' + ${network.architect-lan} ${domain} + ${network.architect-wg} ${domain} + ''; + + users.groups.media.members = [ "calibre-web" ]; +} diff --git a/hosts/architect/default.nix b/hosts/architect/default.nix index 0dcb765..e04a625 100644 --- a/hosts/architect/default.nix +++ b/hosts/architect/default.nix @@ -25,7 +25,7 @@ in { ./dns.nix #./minecraft.nix ./prowlarr.nix - ./plex.nix +# ./plex.nix ./githubrunner.nix ./libreddit.nix ./invidious.nix @@ -36,6 +36,8 @@ in { ./jellyfin.nix ./prosody.nix ./deluge.nix +# ./calibre.nix + ../../cachix.nix ]; time.timeZone = "Europe/Rome";