diff --git a/hosts/common/configs/user/console/yazi/default.nix b/hosts/common/configs/user/console/yazi/default.nix index 0dfc84f..2624c0a 100644 --- a/hosts/common/configs/user/console/yazi/default.nix +++ b/hosts/common/configs/user/console/yazi/default.nix @@ -24,19 +24,18 @@ in }; opener = { - edit = - [ - { - run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\""; - desc = "nvim"; - block = true; - } - ] - ++ lib.lists.optional hmConfig.programs.vscode.enable { - run = "${hmConfig.programs.vscode.package}/bin/code \"$@\""; - desc = "code"; - orphan = true; - }; + edit = [ + { + run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\""; + desc = "nvim"; + block = true; + } + ] + ++ lib.lists.optional hmConfig.programs.vscode.enable { + run = "${hmConfig.programs.vscode.package}/bin/code \"$@\""; + desc = "code"; + orphan = true; + }; open = [ { run = "uwsm app -- xdg-open \"$1\""; diff --git a/hosts/common/configs/user/gui/gtk/default.nix b/hosts/common/configs/user/gui/gtk/default.nix index dea4d53..0619ee7 100644 --- a/hosts/common/configs/user/gui/gtk/default.nix +++ b/hosts/common/configs/user/gui/gtk/default.nix @@ -37,16 +37,15 @@ in home = { pointerCursor.gtk.enable = true; - file = - { - ".icons/default/index.theme".enable = false; - } - // builtins.listToAttrs ( - builtins.map (name: { - name = ".icons/${name}"; - value.enable = false; - }) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names) - ); + file = { + ".icons/default/index.theme".enable = false; + } + // builtins.listToAttrs ( + builtins.map (name: { + name = ".icons/${name}"; + value.enable = false; + }) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names) + ); }; theme.template = { diff --git a/hosts/common/configs/user/gui/hyprland/default.nix b/hosts/common/configs/user/gui/hyprland/default.nix index 29dfce6..39f59ec 100644 --- a/hosts/common/configs/user/gui/hyprland/default.nix +++ b/hosts/common/configs/user/gui/hyprland/default.nix @@ -9,9 +9,7 @@ nixpkgs.overlays = [ (final: prev: { hyprland = prev.hyprland.overrideAttrs (oldAttrs: { - patches = oldAttrs.patches or [ ] ++ [ - ./fix-maxwidth-resolution-mode.patch - ]; + patches = oldAttrs.patches or [ ] ++ [ ./fix-maxwidth-resolution-mode.patch ]; }); }) ]; diff --git a/hosts/jupiter/users/storm/configs/console/podman/media/jellyseerr/default.nix b/hosts/jupiter/users/storm/configs/console/podman/media/jellyseerr/default.nix index 1f1cb49..a07e0e6 100644 --- a/hosts/jupiter/users/storm/configs/console/podman/media/jellyseerr/default.nix +++ b/hosts/jupiter/users/storm/configs/console/podman/media/jellyseerr/default.nix @@ -29,119 +29,118 @@ in "jellyseerr/authelia/digest".sopsFile = ../../../../../../../secrets/secrets.yaml; }; - templates = - { - jellyseerr-env.content = '' - JELLYFIN_ADMIN_PASSWORD=${hmConfig.sops.placeholder."jellyfin/admin"} - ''; + templates = { + jellyseerr-env.content = '' + JELLYFIN_ADMIN_PASSWORD=${hmConfig.sops.placeholder."jellyfin/admin"} + ''; - jellyseerr.content = builtins.readFile ( - (pkgs.formats.json { }).generate "setings.json" { - main = { - applicationTitle = "Jellyseerr"; - applicationUrl = "https://request.karaolidis.com"; - cacheImages = true; - # https://github.com/fallenbagel/jellyseerr/blob/d53ffca5db9b09bd1055936c2472d54a78f937b8/server/lib/permissions.ts#L7 - # REQUEST | CREATE_ISSUES | RECENT_VIEW - # 32 | 4194304 | 67108864 - defaultPermissions = 71303200; - localLogin = false; - mediaServerLogin = false; - oidcLogin = true; - newPlexLogin = false; - mediaServerType = 2; - partialRequestsEnabled = true; - enableSpecialEpisodes = true; + jellyseerr.content = builtins.readFile ( + (pkgs.formats.json { }).generate "setings.json" { + main = { + applicationTitle = "Jellyseerr"; + applicationUrl = "https://request.karaolidis.com"; + cacheImages = true; + # https://github.com/fallenbagel/jellyseerr/blob/d53ffca5db9b09bd1055936c2472d54a78f937b8/server/lib/permissions.ts#L7 + # REQUEST | CREATE_ISSUES | RECENT_VIEW + # 32 | 4194304 | 67108864 + defaultPermissions = 71303200; + localLogin = false; + mediaServerLogin = false; + oidcLogin = true; + newPlexLogin = false; + mediaServerType = 2; + partialRequestsEnabled = true; + enableSpecialEpisodes = true; + }; + + jellyfin = { + name = "jupiter"; + ip = "jellyfin"; + port = 8096; + externalHostname = "https://media.karaolidis.com"; + jellyfinForgotPasswordUrl = "https://id.karaolidis.com/reset-password/step1"; + }; + + oidc.providers = [ + { + slug = "authelia"; + name = "Authelia"; + issuerUrl = "https://id.karaolidis.com"; + clientId = jellyseerrAutheliaClientId; + clientSecret = hmConfig.sops.placeholder."jellyseerr/authelia/password"; + scopes = lib.strings.concatStringsSep " " [ + "openid" + "profile" + "email" + "groups" + ]; + newUserLogin = true; + } + ]; + + radarr = [ ]; + + sonarr = [ ]; + + public.initialized = true; + + notifications.agents.email = { + enabled = true; + options = { + emailFrom = "jupiter@karaolidis.com"; + smtpHost = "smtp.protonmail.ch"; + smtpPort = 587; + authUser = "jupiter@karaolidis.com"; + authPass = hmConfig.sops.placeholder."jellyseerr/smtp"; + senderName = "Jellyseerr"; }; + }; - jellyfin = { - name = "jupiter"; - ip = "jellyfin"; - port = 8096; - externalHostname = "https://media.karaolidis.com"; - jellyfinForgotPasswordUrl = "https://id.karaolidis.com/reset-password/step1"; - }; + network.trustProxy = true; + } + ); - oidc.providers = [ - { - slug = "authelia"; - name = "Authelia"; - issuerUrl = "https://id.karaolidis.com"; - clientId = jellyseerrAutheliaClientId; - clientSecret = hmConfig.sops.placeholder."jellyseerr/authelia/password"; - scopes = lib.strings.concatStringsSep " " [ - "openid" - "profile" - "email" - "groups" - ]; - newUserLogin = true; - } - ]; - - radarr = [ ]; - - sonarr = [ ]; - - public.initialized = true; - - notifications.agents.email = { - enabled = true; - options = { - emailFrom = "jupiter@karaolidis.com"; - smtpHost = "smtp.protonmail.ch"; - smtpPort = 587; - authUser = "jupiter@karaolidis.com"; - authPass = hmConfig.sops.placeholder."jellyseerr/smtp"; - senderName = "Jellyseerr"; - }; - }; - - network.trustProxy = true; - } - ); - - authelia-jellyseerr.content = builtins.readFile ( - (pkgs.formats.yaml { }).generate "jellyseerr.yaml" { - identity_providers.oidc = { - authorization_policies.jellyseerr = { - default_policy = "deny"; - rules = [ - { - policy = "one_factor"; - subject = "group:jellyfin"; - } - ]; - }; - - clients = [ + authelia-jellyseerr.content = builtins.readFile ( + (pkgs.formats.yaml { }).generate "jellyseerr.yaml" { + identity_providers.oidc = { + authorization_policies.jellyseerr = { + default_policy = "deny"; + rules = [ { - client_id = jellyseerrAutheliaClientId; - client_name = "jellyseerr"; - client_secret = hmConfig.sops.placeholder."jellyseerr/authelia/digest"; - redirect_uris = [ "https://request.karaolidis.com/login?provider=authelia&callback=true" ]; - authorization_policy = "jellyseerr"; - scopes = [ - "openid" - "email" - "profile" - "groups" - ]; - token_endpoint_auth_method = "client_secret_post"; + policy = "one_factor"; + subject = "group:jellyfin"; } ]; }; - } - ); - } - // builtins.listToAttrs ( - builtins.map (arr: { - name = "jellyseerr-${arr.hostName}"; - value.content = builtins.readFile ( - (pkgs.formats.json { }).generate "${arr.hostName}.json" arr.jellyseerrConfig - ); - }) arrs + + clients = [ + { + client_id = jellyseerrAutheliaClientId; + client_name = "jellyseerr"; + client_secret = hmConfig.sops.placeholder."jellyseerr/authelia/digest"; + redirect_uris = [ "https://request.karaolidis.com/login?provider=authelia&callback=true" ]; + authorization_policy = "jellyseerr"; + scopes = [ + "openid" + "email" + "profile" + "groups" + ]; + token_endpoint_auth_method = "client_secret_post"; + } + ]; + }; + } ); + } + // builtins.listToAttrs ( + builtins.map (arr: { + name = "jellyseerr-${arr.hostName}"; + value.content = builtins.readFile ( + (pkgs.formats.json { }).generate "${arr.hostName}.json" arr.jellyseerrConfig + ); + }) arrs + ); }; virtualisation.quadlet = { diff --git a/hosts/jupiter/users/storm/configs/console/podman/media/prowlarr/default.nix b/hosts/jupiter/users/storm/configs/console/podman/media/prowlarr/default.nix index 67381a8..ba578d6 100644 --- a/hosts/jupiter/users/storm/configs/console/podman/media/prowlarr/default.nix +++ b/hosts/jupiter/users/storm/configs/console/podman/media/prowlarr/default.nix @@ -22,20 +22,19 @@ in sops = { secrets."prowlarr/apiKey".sopsFile = ../../../../../../../secrets/secrets.yaml; - templates = - { - prowlarr-env.content = '' - API_KEY=${hmConfig.sops.placeholder."prowlarr/apiKey"} - ''; - } - // builtins.listToAttrs ( - builtins.map (arr: { - name = "prowlarr-${arr.hostName}"; - value.content = builtins.readFile ( - (pkgs.formats.json { }).generate "${arr.hostName}.json" arr.prowlarrConfig - ); - }) arrs - ); + templates = { + prowlarr-env.content = '' + API_KEY=${hmConfig.sops.placeholder."prowlarr/apiKey"} + ''; + } + // builtins.listToAttrs ( + builtins.map (arr: { + name = "prowlarr-${arr.hostName}"; + value.content = builtins.readFile ( + (pkgs.formats.json { }).generate "${arr.hostName}.json" arr.prowlarrConfig + ); + }) arrs + ); }; virtualisation.quadlet = { diff --git a/hosts/jupiter/users/storm/configs/console/podman/media/radarr/apps/common.nix b/hosts/jupiter/users/storm/configs/console/podman/media/radarr/apps/common.nix index 29e86dc..e4f86ba 100644 --- a/hosts/jupiter/users/storm/configs/console/podman/media/radarr/apps/common.nix +++ b/hosts/jupiter/users/storm/configs/console/podman/media/radarr/apps/common.nix @@ -51,7 +51,8 @@ rec { api_key = apiKey; delete_old_custom_formats = true; replace_existing_custom_formats = true; - } // extraConfig; + } + // extraConfig; }; mkJellyseerrConfig = diff --git a/hosts/jupiter/users/storm/configs/console/podman/media/sonarr/apps/common.nix b/hosts/jupiter/users/storm/configs/console/podman/media/sonarr/apps/common.nix index 4a009e0..4160ac8 100644 --- a/hosts/jupiter/users/storm/configs/console/podman/media/sonarr/apps/common.nix +++ b/hosts/jupiter/users/storm/configs/console/podman/media/sonarr/apps/common.nix @@ -51,7 +51,8 @@ rec { api_key = apiKey; delete_old_custom_formats = true; replace_existing_custom_formats = true; - } // extraConfig; + } + // extraConfig; }; mkJellyseerrConfig = diff --git a/lib/scripts/remove-host.sh b/lib/scripts/remove-host.sh index eb8263d..3126d0e 100755 --- a/lib/scripts/remove-host.sh +++ b/lib/scripts/remove-host.sh @@ -19,7 +19,7 @@ find . -type f -name "sops.yaml" | while IFS= read -r sops_file; do done sed -i "/$host = mkNixosConfiguration/d" flake.nix -sed -i "/`$host`/d" ./README.md +sed -i "/\`$host\`/d" ./README.md rm -rf "./hosts/$host"