diff --git a/modules/config/devices/config/synology.nix b/modules/config/devices/config/synology.nix index 04530a7..42037fb 100755 --- a/modules/config/devices/config/synology.nix +++ b/modules/config/devices/config/synology.nix @@ -11,7 +11,7 @@ let user0Name = "Nick"; user1Name = "Garnet"; synologyName = "synology"; - synologyIP = "192.168.50.210"; + synologyIP = "192.168.50.209"; in { label = "Synology"; diff --git a/modules/config/instances/config/audiobookshelf.nix b/modules/config/instances/config/audiobookshelf.nix new file mode 100755 index 0000000..0774a7f --- /dev/null +++ b/modules/config/instances/config/audiobookshelf.nix @@ -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"; + }; +} diff --git a/modules/config/instances/config/samba.nix b/modules/config/instances/config/samba.nix index 189042e..f364d9c 100755 --- a/modules/config/instances/config/samba.nix +++ b/modules/config/instances/config/samba.nix @@ -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 diff --git a/modules/config/instances/default.nix b/modules/config/instances/default.nix index aca3e82..bfd67c3 100755 --- a/modules/config/instances/default.nix +++ b/modules/config/instances/default.nix @@ -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"; diff --git a/modules/home/cli/development/tooling/elm/default.nix b/modules/home/cli/development/tooling/elm/default.nix index dfa6d45..dc3676c 100755 --- a/modules/home/cli/development/tooling/elm/default.nix +++ b/modules/home/cli/development/tooling/elm/default.nix @@ -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 ; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 22b2efe..8cc1307 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -27,6 +27,7 @@ in prismLauncher steam zed + vsCode feishin obsidian libreOffice diff --git a/modules/home/gui/apps/code/vsCode/config/userSettings.nix b/modules/home/gui/apps/code/vsCode/config/userSettings.nix index 451d0b9..a699e01 100755 --- a/modules/home/gui/apps/code/vsCode/config/userSettings.nix +++ b/modules/home/gui/apps/code/vsCode/config/userSettings.nix @@ -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; } diff --git a/modules/home/gui/apps/code/vsCode/default.nix b/modules/home/gui/apps/code/vsCode/default.nix index 0035ef5..c95445b 100755 --- a/modules/home/gui/apps/code/vsCode/default.nix +++ b/modules/home/gui/apps/code/vsCode/default.nix @@ -26,9 +26,11 @@ { enable = true; package = pkgs.vscode; - keybindings = keybindingsPath; - extensions = extensionsPath; - userSettings = userSettingsPath; + profiles.default = { + keybindings = keybindingsPath; + extensions = extensionsPath; + userSettings = userSettingsPath; + }; }; }; } diff --git a/modules/home/gui/desktop/hypr/land/config/bind-user0.nix b/modules/home/gui/desktop/hypr/land/config/bind-user0.nix index b7e9549..ec09490 100755 --- a/modules/home/gui/desktop/hypr/land/config/bind-user0.nix +++ b/modules/home/gui/desktop/hypr/land/config/bind-user0.nix @@ -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) [ diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 2aa44d5..db5df92 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -56,6 +56,7 @@ in imports = builtins.attrValues { inherit (modules) acme + audiobookshelf caddy jellyfin logrotate diff --git a/modules/nixos/hardware/printing/default.nix b/modules/nixos/hardware/printing/default.nix index d5d17c5..f5dc58a 100755 --- a/modules/nixos/hardware/printing/default.nix +++ b/modules/nixos/hardware/printing/default.nix @@ -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 = { diff --git a/modules/nixos/services/acme/default.nix b/modules/nixos/services/acme/default.nix index 2fa7914..0c23a31 100755 --- a/modules/nixos/services/acme/default.nix +++ b/modules/nixos/services/acme/default.nix @@ -38,6 +38,7 @@ in "syncthing" "searx" "vaultwarden" + "audiobookshelf" ] ) ++ (map diff --git a/modules/nixos/services/audiobookshelf/default.nix b/modules/nixos/services/audiobookshelf/default.nix new file mode 100755 index 0000000..3ac183b --- /dev/null +++ b/modules/nixos/services/audiobookshelf/default.nix @@ -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 + ]; + }; + }; +} diff --git a/modules/nixos/services/samba/default.nix b/modules/nixos/services/samba/default.nix index 30463c6..3a0e051 100755 --- a/modules/nixos/services/samba/default.nix +++ b/modules/nixos/services/samba/default.nix @@ -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"; + }; }; }; }; diff --git a/profiles/user0/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg b/profiles/user0/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg new file mode 100755 index 0000000..da57bcf Binary files /dev/null and b/profiles/user0/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg differ diff --git a/systems/mars/config/filesystem.nix b/systems/mars/config/filesystem.nix index 5574d13..4e6dcf2 100755 --- a/systems/mars/config/filesystem.nix +++ b/systems/mars/config/filesystem.nix @@ -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"; }