-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{config, ...}: { | ||
# First, run calibre-server with auth disabled | ||
# Then, generate a users database | ||
# calibre-server --userdb ./calibre-users.sqlite --manage-users | ||
# Finally, encrypt the binary as a secret | ||
# to encrypt a binary: sops -e ./calibre-users.sqlite > hosts/tiny1/services/calibre-users.sqlite | ||
|
||
sops.secrets.calibre-userdb = { | ||
owner = config.services.calibre-server.user; | ||
group = "mediacenter"; | ||
format = "binary"; | ||
sopsFile = ./calibre-users.sqlite; | ||
}; | ||
|
||
services.calibre-server = { | ||
enable = true; | ||
group = "mediacenter"; | ||
port = 8083; | ||
# Need to listen on local and docker interfaces for Readarr | ||
#host = "127.0.0.1"; | ||
auth = { | ||
mode = "basic"; | ||
enable = true; | ||
userDb = config.sops.secrets.calibre-userdb.path; | ||
}; | ||
libraries = [ | ||
"/mnt/storage/mediacenter/media/books" | ||
]; | ||
}; | ||
|
||
# Open port to sync with koreader | ||
networking.firewall.allowedTCPPorts = [8083 8084]; | ||
services.calibre-web = { | ||
enable = true; | ||
group = "mediacenter"; | ||
listen = { | ||
ip = "0.0.0.0"; | ||
port = 8084; | ||
}; | ||
options = { | ||
enableBookConversion = true; | ||
enableBookUploading = true; | ||
calibreLibrary = "/mnt/storage/mediacenter/media/books"; | ||
reverseProxyAuth.enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
imports = [ | ||
./calibre.nix | ||
#./ddclient.nix | ||
./docker.nix | ||
./glances.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters