Compare commits

..

No commits in common. "4d1a19edfd41c116891c43413189df3655396831" and "879d7a45ccc50aaee65d1b79c389b6edfb86eac4" have entirely different histories.

16 changed files with 54 additions and 160 deletions

View file

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

View file

@ -1,30 +0,0 @@
{ 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,6 +1,9 @@
{ instancesFunctions }: { instancesFunctions }:
let let
inherit (instancesFunctions) inherit (instancesFunctions)
jellyfinLabel
jellyfinName
servicePath
sopsPath sopsPath
; ;
@ -14,6 +17,9 @@ 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,8 +4,6 @@ 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,7 +27,6 @@ in
prismLauncher prismLauncher
steam steam
zed zed
vsCode
feishin feishin
obsidian obsidian
libreOffice libreOffice

View file

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

View file

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

View file

@ -40,7 +40,11 @@ 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"
@ -57,21 +61,15 @@ 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"
"A, movewindow, u" altBinds = builtins.map (x: "ALT, " + x) [
"E, movewindow, d" # Alt binds
"I, movewindow, r"
]; ];
shiftBinds = builtins.map (x: "SHIFT, " + x) [ shiftBinds = builtins.map (x: "SHIFT, " + x) [

View file

@ -56,7 +56,6 @@ 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,7 +38,6 @@ in
"syncthing" "syncthing"
"searx" "searx"
"vaultwarden" "vaultwarden"
"audiobookshelf"
] ]
) )
++ (map ++ (map

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 KiB

View file

@ -15,9 +15,8 @@ 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
@ -39,11 +38,6 @@ in
"samba0" "samba0"
]; ];
sambaFolders = [
audiobookshelf.name
jellyfin.name
];
synologyMounts = synologyDrive: { synologyMounts = synologyDrive: {
name = "${synology.${synologyDrive}.mount}"; name = "${synology.${synologyDrive}.mount}";
value = { value = {
@ -64,10 +58,10 @@ in
}; };
}; };
sambaMounts = sambaDrive: folder: { sambaMounts = sambaDrive: {
name = "${ceres.${sambaDrive}.mount}/${folder}"; name = "${ceres.${sambaDrive}.mount}/${samba.paths.path1}";
value = { value = {
device = "${ceres.${sambaDrive}.device}/${folder}"; device = "${ceres.${sambaDrive}.device}/${samba.paths.path1}";
fsType = "cifs"; fsType = "cifs";
options = ceres.${sambaDrive}.options ++ [ options = ceres.${sambaDrive}.options ++ [
"credentials=${ceresSecrets}" "credentials=${ceresSecrets}"
@ -88,9 +82,7 @@ in
} }
// (builtins.listToAttrs (map synologyMounts synologyDrives)) // (builtins.listToAttrs (map synologyMounts synologyDrives))
// (builtins.listToAttrs (map storageMounts storageDrives)) // (builtins.listToAttrs (map storageMounts storageDrives))
// (builtins.listToAttrs ( // (builtins.listToAttrs (map sambaMounts sambaDrives));
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"; }