sombrero: Add calibre-web module
This commit is contained in:
@@ -77,7 +77,6 @@
|
|||||||
443
|
443
|
||||||
1122 # ssh
|
1122 # ssh
|
||||||
8384 # syncthing
|
8384 # syncthing
|
||||||
8083 # calibre-web
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -92,15 +91,6 @@
|
|||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
virtualHosts."books.sombrero.a2x.se" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:8083";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."syncthing.sombrero.a2x.se" = {
|
virtualHosts."syncthing.sombrero.a2x.se" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
@@ -279,23 +269,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
calibre-web = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
user = "alex";
|
|
||||||
group = "users";
|
|
||||||
|
|
||||||
listen = {
|
|
||||||
ip = "127.0.0.1";
|
|
||||||
port = 8083;
|
|
||||||
};
|
|
||||||
|
|
||||||
options = {
|
|
||||||
calibreLibrary = "/home/alex/backup/books";
|
|
||||||
enableBookUploading = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
@@ -323,7 +296,6 @@
|
|||||||
git
|
git
|
||||||
tig
|
tig
|
||||||
transmission
|
transmission
|
||||||
calibre-web
|
|
||||||
unar
|
unar
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
@@ -337,6 +309,7 @@
|
|||||||
mod = {
|
mod = {
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
plex.enable = true;
|
plex.enable = true;
|
||||||
|
calibre-web.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
|||||||
51
hosts/sombrero/modules/calibre-web/default.nix
Normal file
51
hosts/sombrero/modules/calibre-web/default.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.calibre-web.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
mod.calibre-web = {
|
||||||
|
enable = lib.mkEnableOption "add calibre-web module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf enabled {
|
||||||
|
services = {
|
||||||
|
calibre-web = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
user = "alex";
|
||||||
|
group = "users";
|
||||||
|
|
||||||
|
listen = {
|
||||||
|
ip = "127.0.0.1";
|
||||||
|
port = 8083;
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
calibreLibrary = "/home/alex/backup/books";
|
||||||
|
enableBookUploading = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [ 8083 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
nginx = {
|
||||||
|
virtualHosts."books.sombrero.a2x.se" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8083";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user