36 lines
682 B
Nix
36 lines
682 B
Nix
|
{ 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" ];
|
||
|
}
|