Compare commits

...

20 commits

Author SHA1 Message Date
Nick
4d1a19edfd feat: added samba mount for audiobookshelf 2025-03-18 23:25:41 -05:00
Nick
eb63e130eb feat: audiobookshelf test 2025-03-18 23:05:15 -05:00
Nick
97ee6c4b24 feat: audiobookshelf test 2025-03-18 22:45:00 -05:00
Nick
1d77c1286f feat: audiobookshelf test 2025-03-18 22:36:05 -05:00
Nick
0fdd4f6fe9 feat: audiobookshelf test 2025-03-18 22:32:56 -05:00
Nick
f90168c12e feat: audiobookshelf test 2025-03-18 22:30:56 -05:00
Nick
38d26b947c feat: audiobookshelf test 2025-03-18 22:30:15 -05:00
Nick
c923300f82 feat: audiobookshelf test 2025-03-18 22:28:17 -05:00
Nick
637adca42f feat: audiobookshelf test 2025-03-18 22:22:24 -05:00
Nick
abdcb547da feat: audiobookshelf test 2025-03-18 22:04:33 -05:00
Nick
04317ca6d8 feat: readded printers 2025-03-18 21:57:43 -05:00
Nick
9066b98124 feat: changed binds 2025-03-18 21:57:36 -05:00
Nick
31f36102ee feat: updated elm-review path 2025-03-18 21:57:24 -05:00
Nick
b6b079e74f chore: removed global elm packages 2025-03-18 21:57:13 -05:00
Nick
47d338f0df feat: updated vsCode 2025-03-18 21:56:57 -05:00
Nick
3ed3bbde4c feat: readded vsCode 2025-03-18 21:56:36 -05:00
Nick
ca718a89ec feat: added wallpaper 2025-03-18 21:56:21 -05:00
Nick
31c2337c1d feat: added audiobookshelf 2025-03-18 21:56:10 -05:00
Nick
9d3ad35ef1 feat: added audiobookshelf 2025-03-18 21:55:38 -05:00
Nick
b6f45eb6d9 chore: updated IP 2025-03-18 21:54:30 -05:00
16 changed files with 160 additions and 54 deletions

View file

@ -11,7 +11,7 @@ let
user0Name = "Nick";
user1Name = "Garnet";
synologyName = "synology";
synologyIP = "192.168.50.210";
synologyIP = "192.168.50.209";
in
{
label = "Synology";

View file

@ -0,0 +1,30 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
audiobookshelfLabel
audiobookshelfName
domain0
servicePath
sslPath
sopsPath
;
audiobookshelfSubdomain = "books";
in
{
label = audiobookshelfLabel;
name = audiobookshelfName;
sops = {
path0 = "${sopsPath}/${audiobookshelfName}";
};
subdomain = audiobookshelfSubdomain;
paths = {
path0 = "${servicePath}/${audiobookshelfLabel}";
};
ports = {
port0 = 8000;
};
ssl = {
cert = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/key.pem";
};
}

View file

@ -1,9 +1,6 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
jellyfinLabel
jellyfinName
servicePath
sopsPath
;
@ -17,9 +14,6 @@ in
path0 = "${sopsPath}/${sambaName}";
};
paths = {
path0 = "${servicePath}/${jellyfinLabel}";
path1 = jellyfinName;
path2 = "";
};
ports = {
port0 = 445; # Samba

View file

@ -4,6 +4,8 @@ let
instancesFunctions = {
jellyfinLabel = "Jellyfin";
jellyfinName = "jellyfin";
audiobookshelfLabel = "Audiobookshelf";
audiobookshelfName = "audiobookshelf";
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";

View file

@ -5,11 +5,11 @@
{
home.packages = builtins.attrValues {
inherit (pkgs.elmPackages)
elm
elm-format
elm-land
elm-language-server
elm-review
# elm
# elm-format
# elm-land
# elm-language-server
# elm-review
# elm-test
;
};

View file

@ -27,6 +27,7 @@ in
prismLauncher
steam
zed
vsCode
feishin
obsidian
libreOffice

View file

@ -31,5 +31,7 @@ in
"editor.fontLigatures" = true;
"elmLS.disableElmLSDiagnostics" = true;
"elmLS.elmReviewDiagnostics" = "warning";
"elmLS.elmReviewPath" = "/etc/profiles/per-user/nick/bin/elm-review";
"elmLS.elmReviewPath" =
"/nix/store/ms3g9cnwjhd1adccxar3vxy1gj98zsba-elm-review-2.12.0/bin/elm-review";
"editor.formatOnSave" = true;
}

View file

@ -26,9 +26,11 @@
{
enable = true;
package = pkgs.vscode;
keybindings = keybindingsPath;
extensions = extensionsPath;
userSettings = userSettingsPath;
profiles.default = {
keybindings = keybindingsPath;
extensions = extensionsPath;
userSettings = userSettingsPath;
};
};
};
}

View file

@ -40,11 +40,7 @@ let
superShiftBinds = builtins.map (x: "SUPER SHIFT, " + x) [
# Super+shift binds
# Window Move
"C, movewindow, l"
"A, movewindow, u"
"E, movewindow, d"
"I, movewindow, r"
# Quick Action
"T, exec, ghostty"
"S, exec, flameshot gui"
@ -61,15 +57,21 @@ let
];
superCtrlBinds = builtins.map (x: "SUPER CTRL, " + x) [
# Super+shift binds
];
altBinds = builtins.map (x: "CTRL ALT, " + x) [
# Alt binds
"1, movetoworkspacesilent, 1"
"2, movetoworkspacesilent, 2"
"3, movetoworkspacesilent, 3"
"4, movetoworkspacesilent, 4"
"5, movetoworkspacesilent, 5"
];
altBinds = builtins.map (x: "ALT, " + x) [
# Alt binds
# Window Move
"C, movewindow, l"
"A, movewindow, u"
"E, movewindow, d"
"I, movewindow, r"
];
shiftBinds = builtins.map (x: "SHIFT, " + x) [

View file

@ -56,6 +56,7 @@ in
imports = builtins.attrValues {
inherit (modules)
acme
audiobookshelf
caddy
jellyfin
logrotate

View file

@ -22,29 +22,29 @@ in
};
};
# hardware.printers = {
# ensurePrinters = [
# {
# name = printer0.label;
# location = "Downstairs";
# deviceUri = "https://${printer0.ip.address0}";
# model = genericPPD;
# ppdOptions = {
# PageSize = pageSize;
# };
# }
# {
# name = printer1.label;
# location = "Upstairs";
# deviceUri = "https://${printer1.ip.address0}";
# model = genericPPD;
# ppdOptions = {
# PageSize = pageSize;
# };
# }
# ];
# ensureDefaultPrinter = printer1.label;
# };
hardware.printers = {
ensurePrinters = [
{
name = printer0.label;
location = "Downstairs";
deviceUri = "https://${printer0.ip.address0}";
model = genericPPD;
ppdOptions = {
PageSize = pageSize;
};
}
{
name = printer1.label;
location = "Upstairs";
deviceUri = "https://${printer1.ip.address0}";
model = genericPPD;
ppdOptions = {
PageSize = pageSize;
};
}
];
ensureDefaultPrinter = printer1.label;
};
networking = {
firewall = {

View file

@ -38,6 +38,7 @@ in
"syncthing"
"searx"
"vaultwarden"
"audiobookshelf"
]
)
++ (map

View file

@ -0,0 +1,58 @@
{ flake, config, ... }:
let
inherit (flake.config.services.instances) audiobookshelf web;
inherit (flake.config.machines.devices) ceres;
service = audiobookshelf;
host = "${service.subdomain}.${web.domains.url0}";
localhost = web.localhost.address0;
in
{
services = {
audiobookshelf = {
enable = true;
host = localhost;
port = service.ports.port0;
dataDir = service.name;
openFirewall = true;
};
caddy = {
virtualHosts = {
"${host}" = {
extraConfig = ''
redir /.well-known/carddav /remote.php/dav/ 301
redir /.well-known/caldav /remote.php/dav/ 301
reverse_proxy ${localhost}:${toString service.ports.port0}
tls ${service.ssl.cert} ${service.ssl.key}
encode gzip zstd
'';
};
};
};
};
fileSystems."/var/lib/${service.name}" = {
device = service.paths.path0;
fsType = "none";
options = [
"bind"
];
depends = [
ceres.storage0.mount
];
};
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"
];
networking = {
firewall = {
allowedTCPPorts = [
service.ports.port0
];
};
};
}

View file

@ -7,6 +7,7 @@ let
inherit (flake.config.services.instances)
samba
jellyfin
audiobookshelf
;
service = samba;
in
@ -19,10 +20,14 @@ in
enable = true;
openFirewall = true;
settings = {
${service.paths.path1} = {
${jellyfin.name} = {
path = jellyfin.paths.path0;
writable = "true";
};
${audiobookshelf.name} = {
path = audiobookshelf.paths.path0;
writable = "true";
};
};
};
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

View file

@ -15,8 +15,9 @@ let
;
inherit (flake.config.services.instances)
samba
jellyfin
audiobookshelf
;
synologySecrets = config.sops.secrets."network/synology".path;
ceresSecrets = config.sops.secrets."network/server".path;
in
@ -38,6 +39,11 @@ in
"samba0"
];
sambaFolders = [
audiobookshelf.name
jellyfin.name
];
synologyMounts = synologyDrive: {
name = "${synology.${synologyDrive}.mount}";
value = {
@ -58,10 +64,10 @@ in
};
};
sambaMounts = sambaDrive: {
name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
sambaMounts = sambaDrive: folder: {
name = "${ceres.${sambaDrive}.mount}/${folder}";
value = {
device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
device = "${ceres.${sambaDrive}.device}/${folder}";
fsType = "cifs";
options = ceres.${sambaDrive}.options ++ [
"credentials=${ceresSecrets}"
@ -82,7 +88,9 @@ in
}
// (builtins.listToAttrs (map synologyMounts synologyDrives))
// (builtins.listToAttrs (map storageMounts storageDrives))
// (builtins.listToAttrs (map sambaMounts sambaDrives));
// (builtins.listToAttrs (
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
));
swapDevices = [
{ device = "/dev/disk/by-uuid/8b1d43a7-baf8-4d15-a1ad-dc0c9dda6970"; }