Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-07-23 15:53:46 +01:00
parent 13f24c6880
commit 53e2f3106b
8 changed files with 143 additions and 147 deletions

View File

@@ -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\"";

View File

@@ -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 = {

View File

@@ -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 ];
});
})
];

View File

@@ -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 = {

View File

@@ -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 = {

View File

@@ -51,7 +51,8 @@ rec {
api_key = apiKey;
delete_old_custom_formats = true;
replace_existing_custom_formats = true;
} // extraConfig;
}
// extraConfig;
};
mkJellyseerrConfig =

View File

@@ -51,7 +51,8 @@ rec {
api_key = apiKey;
delete_old_custom_formats = true;
replace_existing_custom_formats = true;
} // extraConfig;
}
// extraConfig;
};
mkJellyseerrConfig =

View File

@@ -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"