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"; user0Name = "Nick";
user1Name = "Garnet"; user1Name = "Garnet";
synologyName = "synology"; synologyName = "synology";
synologyIP = "192.168.50.210"; synologyIP = "192.168.50.209";
in in
{ {
label = "Synology"; 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 }: { instancesFunctions }:
let let
inherit (instancesFunctions) inherit (instancesFunctions)
jellyfinLabel
jellyfinName
servicePath
sopsPath sopsPath
; ;
@ -17,9 +14,6 @@ in
path0 = "${sopsPath}/${sambaName}"; path0 = "${sopsPath}/${sambaName}";
}; };
paths = { paths = {
path0 = "${servicePath}/${jellyfinLabel}";
path1 = jellyfinName;
path2 = "";
}; };
ports = { ports = {
port0 = 445; # Samba port0 = 445; # Samba

View file

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

View file

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

View file

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

View file

@ -31,5 +31,7 @@ in
"editor.fontLigatures" = true; "editor.fontLigatures" = true;
"elmLS.disableElmLSDiagnostics" = true; "elmLS.disableElmLSDiagnostics" = true;
"elmLS.elmReviewDiagnostics" = "warning"; "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; enable = true;
package = pkgs.vscode; package = pkgs.vscode;
keybindings = keybindingsPath; profiles.default = {
extensions = extensionsPath; keybindings = keybindingsPath;
userSettings = userSettingsPath; extensions = extensionsPath;
userSettings = userSettingsPath;
};
}; };
}; };
} }

View file

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

View file

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

View file

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

View file

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