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

View file

@ -4,8 +4,6 @@ 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,7 +27,6 @@ in
prismLauncher
steam
zed
vsCode
feishin
obsidian
libreOffice

View file

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

View file

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

View file

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

View file

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