Compare commits

..

11 Commits

10 changed files with 75 additions and 15 deletions
+8 -4
View File
@@ -42,17 +42,21 @@
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
gen = import ./generator.nix { inherit inputs; }; gen = import ./generator.nix { inherit inputs; };
systemsDir = ./systems; systemsDir = ./systems;
isIgnoredSystemDir = name: lib.hasPrefix "_" name || lib.hasPrefix "." name;
systemNames = lib.attrNames (lib.filterAttrs systemNames = lib.attrNames (lib.filterAttrs
(name: type: type == "directory" && builtins.pathExists (systemsDir + "/${name}/cfg.nix")) (name: type:
type == "directory"
&& !isIgnoredSystemDir name
&& builtins.pathExists (systemsDir + "/${name}/cfg.nix"))
(builtins.readDir systemsDir)); (builtins.readDir systemsDir));
hostsByType = systemType: hostsByType = systemType:
lib.filter lib.filter
(host: (import (systemsDir + "/${host}/cfg.nix")).syscfg.type == systemType) (host: (import (systemsDir + "/${host}/cfg.nix")).syscfg.type == systemType)
systemNames; systemNames;
generateHosts = systemType: generateHosts = systemType:
builtins.listToAttrs (map lib.genAttrs
(host: lib.nameValuePair host (gen.generate { inherit host; })) (hostsByType systemType)
(hostsByType systemType)); (host: gen.generate { inherit host; });
in { in {
devShells = import ./shells { inherit inputs; }; devShells = import ./shells { inherit inputs; };
@@ -1,9 +1,8 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, ... }: {
config = lib.mkIf (config.syscfg.make.develop) { config = lib.mkIf (config.syscfg.make.develop) {
programs.vscode = { programs.vscodium = {
enable = true; enable = true;
package = pkgs.vscodium;
#profiles.default = { #profiles.default = {
profiles.default.extensions = with pkgs.vscode-extensions; [ profiles.default.extensions = with pkgs.vscode-extensions; [
bbenoist.nix bbenoist.nix
@@ -12,7 +11,6 @@
ms-python.vscode-pylance ms-python.vscode-pylance
ms-vscode.cpptools ms-vscode.cpptools
dbaeumer.vscode-eslint dbaeumer.vscode-eslint
continue.continue
]; ];
#}; #};
}; };
+1
View File
@@ -2,6 +2,7 @@
home.packages = with pkgs; [ xdg-user-dirs ]; home.packages = with pkgs; [ xdg-user-dirs ];
xdg.enable = true;
xdg.userDirs.enable = true; xdg.userDirs.enable = true;
xdg.userDirs.desktop = "${config.home.homeDirectory}/desktop"; xdg.userDirs.desktop = "${config.home.homeDirectory}/desktop";
xdg.userDirs.documents = "${config.home.homeDirectory}/desktop"; xdg.userDirs.documents = "${config.home.homeDirectory}/desktop";
@@ -91,7 +91,7 @@ in {
-H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" -d '{}' > /dev/null 2>&1 || true -H "Content-Type: application/json" -d '{}' > /dev/null 2>&1 || true
${pkgs.curl} -s -X POST "$HA_URL/api/onboarding/integration" \ ${pkgs.curl} -s -X POST "$HASS_URL/api/onboarding/integration" \
-H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"client_id":"'"$HASS_URL"'","redirect_uri":"'"$HASS_URL"'/?auth_callback=1"}' > /dev/null 2>&1 || true -d '{"client_id":"'"$HASS_URL"'","redirect_uri":"'"$HASS_URL"'/?auth_callback=1"}' > /dev/null 2>&1 || true
+55 -2
View File
@@ -25,9 +25,11 @@ let
background = { background = {
image = "/media/${backgroundFileName}"; image = "/media/${backgroundFileName}";
brightness = 50; brightness = 50;
opacity = 0.5;
blur = "";
}; };
cardBlur = "md"; cardBlur = "xs";
# favicon = config.syscfg.media.logo.ico; favicon = "https://${containerCfg.subdomain}.${serverCfg.domain}/favicon.ico";
theme = "dark"; theme = "dark";
color = "slate"; color = "slate";
fullWidth = true; fullWidth = true;
@@ -35,10 +37,12 @@ let
pwa = { }; pwa = { };
layout = { layout = {
Admin = { Admin = {
initiallyCollapsed = true;
style = "row"; style = "row";
columns = 4; columns = 4;
}; };
}; };
bookmarksStyle = "icons"
providers = { providers = {
finnhub = "{{HOMEPAGE_VAR_FINNHUB}}"; finnhub = "{{HOMEPAGE_VAR_FINNHUB}}";
}; };
@@ -86,6 +90,7 @@ let
Jellyfin = { Jellyfin = {
icon = "jellyfin.png"; icon = "jellyfin.png";
href = "https://${serverCfg.containers.jellyfin.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.jellyfin.subdomain}.${serverCfg.domain}";
siteMonitor = "http://jellyfin-server:8096";
widget = { widget = {
type = "jellyfin"; type = "jellyfin";
url = "http://jellyfin-server:8096"; url = "http://jellyfin-server:8096";
@@ -97,24 +102,41 @@ let
Invidious = { Invidious = {
icon = "invidious.png"; icon = "invidious.png";
href = "https://${serverCfg.containers.invidious.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.invidious.subdomain}.${serverCfg.domain}";
siteMonitor = "http://invidious-server:3000";
}; };
}) })
(lib.optional (serverCfg.containers ? calibre) { (lib.optional (serverCfg.containers ? calibre) {
Calibre = { Calibre = {
icon = "calibre.png"; icon = "calibre.png";
href = "https://${serverCfg.containers.calibre.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.calibre.subdomain}.${serverCfg.domain}";
siteMonitor = "http://calibre-server:8080";
# widget = {
# type = "calibreweb";
# url = "http://calibre-server:8080";
# username = "?";
# password = "?";
# };
}; };
}) })
(lib.optional (serverCfg.containers ? freshrss) { (lib.optional (serverCfg.containers ? freshrss) {
FreshRSS = { FreshRSS = {
icon = "freshrss.png"; icon = "freshrss.png";
href = "https://${serverCfg.containers.freshrss.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.freshrss.subdomain}.${serverCfg.domain}";
siteMonitor = "http://freshrss-server:8080";
# widget = {
# type = "freshrss";
# url = "http://freshrss-server:8080";
# username = "?";
# password = "?";
# };
};
}; };
}) })
(lib.optional (serverCfg.containers ? miniflux) { (lib.optional (serverCfg.containers ? miniflux) {
Miniflux = { Miniflux = {
icon = "miniflux.png"; icon = "miniflux.png";
href = "https://${serverCfg.containers.miniflux.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.miniflux.subdomain}.${serverCfg.domain}";
siteMonitor = "http://miniflux-server:80";
widget = { widget = {
type = "miniflux"; type = "miniflux";
url = "http://miniflux-server"; url = "http://miniflux-server";
@@ -126,6 +148,11 @@ let
Suwayomi = { Suwayomi = {
icon = "suwayomi.png"; icon = "suwayomi.png";
href = "https://${serverCfg.containers.suwayomi.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.suwayomi.subdomain}.${serverCfg.domain}";
siteMonitor = "http://suwayomi-server:8080";
widget = {
type = "suwayomi";
url = "http://suwayomi-server:8080";
};
}; };
}) })
]; ];
@@ -135,6 +162,7 @@ let
Nextcloud = { Nextcloud = {
icon = "nextcloud.png"; icon = "nextcloud.png";
href = "https://${serverCfg.containers.nextcloud.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.nextcloud.subdomain}.${serverCfg.domain}";
siteMonitor = "http://nextcloud-server:80";
widget = { widget = {
type = "nextcloud"; type = "nextcloud";
url = "http://nextcloud-server:80"; url = "http://nextcloud-server:80";
@@ -146,24 +174,28 @@ let
Ethercalc = { Ethercalc = {
icon = "ethercalc.png"; icon = "ethercalc.png";
href = "https://${serverCfg.containers.ethercalc.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.ethercalc.subdomain}.${serverCfg.domain}";
siteMonitor = "http://ethercalc-server:8080";
}; };
}) })
(lib.optional (serverCfg.containers ? etherpad) { (lib.optional (serverCfg.containers ? etherpad) {
Etherpad = { Etherpad = {
icon = "etherpad.png"; icon = "etherpad.png";
href = "https://${serverCfg.containers.etherpad.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.etherpad.subdomain}.${serverCfg.domain}";
siteMonitor = "http://etherpad-server:8080";
}; };
}) })
(lib.optional (serverCfg.containers ? collabora && false) { (lib.optional (serverCfg.containers ? collabora && false) {
Collabora = { Collabora = {
icon = "microsoft-office.png"; icon = "microsoft-office.png";
href = "https://${serverCfg.containers.collabora.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.collabora.subdomain}.${serverCfg.domain}";
siteMonitor = "http://collabora-server:9980";
}; };
}) })
(lib.optional (serverCfg.containers ? immich) { (lib.optional (serverCfg.containers ? immich) {
Immich = { Immich = {
icon = "immich.png"; icon = "immich.png";
href = "https://${serverCfg.containers.immich.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.immich.subdomain}.${serverCfg.domain}";
siteMonitor = "http://immich-server:80";
widget = { widget = {
type = "immich"; type = "immich";
url = "http://immich-server:80"; url = "http://immich-server:80";
@@ -179,18 +211,21 @@ let
"Home Assistant" = { "Home Assistant" = {
icon = "home-assistant.png"; icon = "home-assistant.png";
href = "https://${serverCfg.containers.homeassistant.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.homeassistant.subdomain}.${serverCfg.domain}";
siteMonitor = "http://${builder.hostIp}:8123";
}; };
}) })
(lib.optional (serverCfg.containers ? openhab) { (lib.optional (serverCfg.containers ? openhab) {
openHAB = { openHAB = {
icon = "openhab.png"; icon = "openhab.png";
href = "https://${serverCfg.containers.openhab.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.openhab.subdomain}.${serverCfg.domain}";
siteMonitor = "http://openhab-server:8080";
}; };
}) })
(lib.optional (serverCfg.containers ? frigate) { (lib.optional (serverCfg.containers ? frigate) {
Frigate = { Frigate = {
icon = "frigate.png"; icon = "frigate.png";
href = "https://${serverCfg.containers.frigate.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.frigate.subdomain}.${serverCfg.domain}";
siteMonitor = "http://frigate-server:5000";
}; };
}) })
]; ];
@@ -200,12 +235,19 @@ let
Gitea = { Gitea = {
icon = "gitea.png"; icon = "gitea.png";
href = "https://${serverCfg.containers.gitea.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.gitea.subdomain}.${serverCfg.domain}";
siteMonitor = "http://gitea-server:3000";
widget = {
type = "gitea";
url = "http://gitea-server:3000";
key = "{{HOMEPAGE_VAR_GITEA_API}}";
};
}; };
}) })
(lib.optional (serverCfg.containers ? trmnl) { (lib.optional (serverCfg.containers ? trmnl) {
TRMNL = { TRMNL = {
icon = "terminal.png"; icon = "terminal.png";
href = "https://${serverCfg.containers.trmnl.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.trmnl.subdomain}.${serverCfg.domain}";
siteMonitor = "http://trmnl-server:8080";
}; };
}) })
]; ];
@@ -215,6 +257,7 @@ let
Traefik = { Traefik = {
icon = "traefik.png"; icon = "traefik.png";
href = "https://${serverCfg.containers.traefik.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.traefik.subdomain}.${serverCfg.domain}";
siteMonitor = "http://traefik-server:8080";
widget = { widget = {
type = "traefik"; type = "traefik";
url = "http://traefik-server:8080"; url = "http://traefik-server:8080";
@@ -225,6 +268,7 @@ let
Authentik = { Authentik = {
icon = "authentik.png"; icon = "authentik.png";
href = "https://${serverCfg.containers.authentik.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.authentik.subdomain}.${serverCfg.domain}";
siteMonitor = "http://authentik-server:9000";
widget = { widget = {
type = "authentik"; type = "authentik";
url = "http://authentik-server:9000"; url = "http://authentik-server:9000";
@@ -237,24 +281,28 @@ let
Umami = { Umami = {
icon = "umami.png"; icon = "umami.png";
href = "https://${serverCfg.containers.umami.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.umami.subdomain}.${serverCfg.domain}";
siteMonitor = "http://umami-server:3000";
}; };
}) })
(lib.optional (serverCfg.containers ? influx) { (lib.optional (serverCfg.containers ? influx) {
Influx = { Influx = {
icon = "grafana.png"; icon = "grafana.png";
href = "https://${serverCfg.containers.influx.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.influx.subdomain}.${serverCfg.domain}";
siteMonitor = "http://influx-ui:3000";
}; };
}) })
(lib.optional (serverCfg.containers ? handbrake) { (lib.optional (serverCfg.containers ? handbrake) {
Handbrake = { Handbrake = {
icon = "handbrake.png"; icon = "handbrake.png";
href = "https://${serverCfg.containers.handbrake.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.handbrake.subdomain}.${serverCfg.domain}";
siteMonitor = "http://handbrake-server:5800";
}; };
}) })
(lib.optional (serverCfg.containers ? transmission) { (lib.optional (serverCfg.containers ? transmission) {
Transmission = { Transmission = {
icon = "transmission.png"; icon = "transmission.png";
href = "https://${serverCfg.containers.transmission.subdomain}.${serverCfg.domain}/transmission"; href = "https://${serverCfg.containers.transmission.subdomain}.${serverCfg.domain}/transmission";
siteMonitor = "http://transmission-server:9091";
widget = { widget = {
type = "transmission"; type = "transmission";
url = "http://transmission-server:9091"; url = "http://transmission-server:9091";
@@ -266,6 +314,7 @@ let
Selfmark = { Selfmark = {
icon = "link.png"; icon = "link.png";
href = "https://${serverCfg.containers.selfmark.subdomain}.${serverCfg.domain}"; href = "https://${serverCfg.containers.selfmark.subdomain}.${serverCfg.domain}";
siteMonitor = "http://selfmark-server:8080";
}; };
}) })
(lib.optional (serverCfg.containers ? servarr) ( (lib.optional (serverCfg.containers ? servarr) (
@@ -276,6 +325,7 @@ let
Sonarr = { Sonarr = {
icon = "sonarr.png"; icon = "sonarr.png";
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/sonarr"; href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/sonarr";
siteMonitor = "http://servarr-sonarr:8989";
widget = { widget = {
type = "sonarr"; type = "sonarr";
url = "http://servarr-sonarr:8989"; url = "http://servarr-sonarr:8989";
@@ -287,6 +337,7 @@ let
Radarr = { Radarr = {
icon = "radarr.png"; icon = "radarr.png";
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/radarr"; href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/radarr";
siteMonitor = "http://servarr-radarr:8989";
widget = { widget = {
type = "radarr"; type = "radarr";
url = "http://servarr-radarr:8989"; url = "http://servarr-radarr:8989";
@@ -298,6 +349,7 @@ let
Lidarr = { Lidarr = {
icon = "lidarr.png"; icon = "lidarr.png";
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/lidarr"; href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/lidarr";
siteMonitor = "http://servarr-lidarr:8989";
widget = { widget = {
type = "lidarr"; type = "lidarr";
url = "http://servarr-lidarr:8989"; url = "http://servarr-lidarr:8989";
@@ -309,6 +361,7 @@ let
Prowlarr = { Prowlarr = {
icon = "prowlarr.png"; icon = "prowlarr.png";
href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/prowlarr"; href = "https://${serverCfg.containers.servarr.subdomain}.${serverCfg.domain}/prowlarr";
siteMonitor = "http://servarr-prowlarr:8989";
widget = { widget = {
type = "prowlarr"; type = "prowlarr";
url = "http://servarr-prowlarr:8989"; url = "http://servarr-prowlarr:8989";
+9 -4
View File
@@ -1,9 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = (with pkgs; [
#LANG & COMPILER #LANG & COMPILER
gcc gcc
(with llvmPackages; [ libcxxClang ])
gnumake gnumake
cmake cmake
go go
@@ -16,7 +16,7 @@ pkgs.mkShell {
yarn-berry yarn-berry
crystal crystal
shards shards
(with python313Packages; [ pip pandas numpy matplotlib typer pillow reportlab python-barcode pypdf markdown requests ])
scala scala
sbt sbt
cargo cargo
@@ -36,7 +36,12 @@ pkgs.mkShell {
docker-compose docker-compose
#CUSTOM (custom...) #CUSTOM (custom...)
]; ]) ++ (with pkgs.llvmPackages; [
libcxxClang
]) ++ (with pkgs.python313Packages; [
pip pandas numpy matplotlib typer pillow reportlab python-barcode pypdf markdown requests
])
;
shellHook = '' shellHook = ''
export SHELLENVTYPE="DEV" export SHELLENVTYPE="DEV"
export HTTP_PORT=8080 export HTTP_PORT=8080
-1
View File
@@ -9,7 +9,6 @@
git = { git = {
email = "ci@ci"; email = "ci@ci";
username = "CI"; username = "CI";
key = "";
}; };
}]; }];
make = { make = {