Compare commits
6 commits
b735eb4b98
...
929c8ea9b0
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 929c8ea9b0 | ||
Bruno BELANYI | 2dedb41a47 | ||
Bruno BELANYI | 7ebbb10568 | ||
Bruno BELANYI | 5df0574f41 | ||
Bruno BELANYI | c18054cad7 | ||
Bruno BELANYI | f9db06a6d4 |
24
flake.lock
24
flake.lock
|
@ -136,11 +136,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712390667,
|
"lastModified": 1713809191,
|
||||||
"narHash": "sha256-ebq+fJZfobqpsAdGDGpxNWSySbQejRwW9cdiil6krCo=",
|
"narHash": "sha256-9Tb5JKcacjxNF1f7gsu/4l4Gxa2qflq9x1hhdl10iwM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b787726a8413e11b074cde42704b4af32d95545c",
|
"rev": "e866aae5bbbcfe6798ca05d3004a4e62f1828954",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -152,11 +152,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712439257,
|
"lastModified": 1713714899,
|
||||||
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
|
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
|
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -168,11 +168,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712485930,
|
"lastModified": 1713810384,
|
||||||
"narHash": "sha256-Gx1kXJYnYENoJKWdZpTSDj9fAbnhSzp/cTpFFIXre/M=",
|
"narHash": "sha256-ze9APypWwgcNXvtc+Y/In/PCGmIzm/VefrwQKG7ge7E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "e4dfbd7eb86b3ac1bf5b7d5c4ca200dba5cbb5a9",
|
"rev": "5d454967f1d978fe45956d25ed7ee15b9910da18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -197,11 +197,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712055707,
|
"lastModified": 1713775815,
|
||||||
"narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=",
|
"narHash": "sha256-Wu9cdYTnGQQwtT20QQMg7jzkANKQjwBD9iccfGKkfls=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "e35aed5fda3cc79f88ed7f1795021e559582093a",
|
"rev": "2ac4dcbf55ed43f3be0bae15e181f08a57af24a4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -10,6 +10,11 @@ in
|
||||||
adblock = {
|
adblock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
# Audiobook and podcast library
|
||||||
|
audiobookshelf = {
|
||||||
|
enable = true;
|
||||||
|
port = 9599;
|
||||||
|
};
|
||||||
# Backblaze B2 backup
|
# Backblaze B2 backup
|
||||||
backup = {
|
backup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -134,6 +139,7 @@ in
|
||||||
podgrab = {
|
podgrab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
passwordFile = secrets."podgrab/password".path;
|
passwordFile = secrets."podgrab/password".path;
|
||||||
|
dataDir = "/data/media/podcasts";
|
||||||
port = 9598;
|
port = 9598;
|
||||||
};
|
};
|
||||||
# Regular backups
|
# Regular backups
|
||||||
|
|
39
modules/nixos/services/audiobookshelf/default.nix
Normal file
39
modules/nixos/services/audiobookshelf/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# Audiobook and podcast library
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.services.audiobookshelf;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.audiobookshelf = with lib; {
|
||||||
|
enable = mkEnableOption "Audiobookshelf, a self-hosted podcast manager";
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 8000;
|
||||||
|
example = 4242;
|
||||||
|
description = "The port on which Audiobookshelf will listen for incoming HTTP traffic.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.audiobookshelf = {
|
||||||
|
enable = true;
|
||||||
|
inherit (cfg) port;
|
||||||
|
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set-up media group
|
||||||
|
users.groups.media = { };
|
||||||
|
|
||||||
|
my.services.nginx.virtualHosts = {
|
||||||
|
audiobookshelf = {
|
||||||
|
inherit (cfg) port;
|
||||||
|
# Proxy websockets for RPC
|
||||||
|
extraConfig = {
|
||||||
|
locations."/".proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./adblock
|
./adblock
|
||||||
./aria
|
./aria
|
||||||
|
./audiobookshelf
|
||||||
./backup
|
./backup
|
||||||
./blog
|
./blog
|
||||||
./calibre-web
|
./calibre-web
|
||||||
|
|
|
@ -17,6 +17,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dataDir = mkOption {
|
||||||
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "/mnt/podgrab";
|
||||||
|
description = ''
|
||||||
|
Path to the directory to store the podcasts. Use default if null
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
default = 8080;
|
default = 8080;
|
||||||
|
@ -29,8 +38,14 @@ in
|
||||||
services.podgrab = {
|
services.podgrab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit (cfg) passwordFile port;
|
inherit (cfg) passwordFile port;
|
||||||
|
|
||||||
|
group = "media";
|
||||||
|
dataDirectory = lib.mkIf (cfg.dataDir != null) cfg.dataDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Set-up media group
|
||||||
|
users.groups.media = { };
|
||||||
|
|
||||||
my.services.nginx.virtualHosts = {
|
my.services.nginx.virtualHosts = {
|
||||||
podgrab = {
|
podgrab = {
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
|
|
Loading…
Reference in a new issue