more api
This commit is contained in:
@@ -138,18 +138,6 @@ in {
|
||||
--synchronize-users
|
||||
''}
|
||||
|
||||
PSQL="${pkgs.postgresql}/bin/psql -U postgres"
|
||||
TOKEN_STRING="$HOMEPAGE_VAR_GITEA_API"
|
||||
SALT=$(${pkgs.coreutils}/bin/cat /dev/urandom | ${pkgs.gnugrep}/bin/tr -dc 'a-zA-Z0-9' | ${pkgs.coreutils}/bin/head -c 10)
|
||||
COMBINED_STRING="''${SALT}''${TOKEN_STRING}"
|
||||
HASH=$(echo -n "$COMBINED_STRING" | ${pkgs.openssl}/bin/openssl dgst -sha256 | ${pkgs.coreutils}/bin/cut -d' ' -f2)
|
||||
LAST_8="''${TOKEN_STRING: -8}"
|
||||
NOW=$(${pkgs.coreutils}/bin/date +%s)
|
||||
$PSQL -d "gitea_db" -e \
|
||||
"INSERT INTO access_token (uid, name, token_hash, token_salt, token_last_eight, created_unix, updated_unix) \
|
||||
VALUES (1, 'homepage-dashboard', '$HASH', '$SALT', '$LAST_8', $NOW, $NOW);"
|
||||
|
||||
|
||||
echo "Completed Gitea Setup"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -76,11 +76,11 @@ let
|
||||
Gitea={
|
||||
icon = "gitea.png";
|
||||
href = "https://${serverCfg.containers.gitea.subdomain}.${serverCfg.domain}";
|
||||
widget = {
|
||||
type="gitea";
|
||||
url = "http://gitea-server:8080";
|
||||
key = "{{HOMEPAGE_VAR_GITEA_API}}";
|
||||
};
|
||||
# widget = {
|
||||
# type="gitea";
|
||||
# url = "http://gitea-server:8080";
|
||||
# key = "{{HOMEPAGE_VAR_GITEA_API}}";
|
||||
# };
|
||||
};
|
||||
})
|
||||
];}
|
||||
@@ -120,6 +120,48 @@ let
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.optional (serverCfg.containers?servarr) {
|
||||
Sonarr={
|
||||
icon = "sonarr.png";
|
||||
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/sonarr";
|
||||
widget = {
|
||||
type = "sonarr";
|
||||
url = "http://servarr-sonarr:8989";
|
||||
key = "{{HOMEPAGE_VAR_SONARR_API}}";
|
||||
|
||||
};
|
||||
};
|
||||
Radarr={
|
||||
icon = "radarr.png";
|
||||
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/radarr";
|
||||
widget = {
|
||||
type = "radarr";
|
||||
url = "http://servarr-radarr:8989";
|
||||
key = "{{HOMEPAGE_VAR_RADARR_API}}";
|
||||
|
||||
};
|
||||
};
|
||||
Lidarr={
|
||||
icon = "lidarr.png";
|
||||
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/lidarr";
|
||||
widget = {
|
||||
type = "lidarr";
|
||||
url = "http://servarr-lidarr:8989";
|
||||
key = "{{HOMEPAGE_VAR_LIDARR_API}}";
|
||||
|
||||
};
|
||||
};
|
||||
Prowlarr={
|
||||
icon = "prowlarr.png";
|
||||
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/prowlarr";
|
||||
widget = {
|
||||
type = "prowlarr";
|
||||
url = "http://servarr-prowlarr:8989";
|
||||
key = "{{HOMEPAGE_VAR_PROWLARR_API}}";
|
||||
|
||||
};
|
||||
};
|
||||
})
|
||||
];}
|
||||
];
|
||||
in {
|
||||
|
||||
@@ -187,7 +187,6 @@ in {
|
||||
|
||||
$OCC config:app:set serverinfo token --value="$HOMEPAGE_VAR_NEXTCLOUD_API"
|
||||
|
||||
|
||||
echo "Maintenance..."
|
||||
$OCC app:update --all
|
||||
$OCC maintenance:repair --include-expensive --no-interaction
|
||||
|
||||
Reference in New Issue
Block a user