306 current 2025-10-11 17:04:37 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# flake for blakes nixos config
|
||||
# define new devices in outputs
|
||||
# generation: 305 current 2025-10-11 16:58:36 25.05.20251006.20c4598 6.12.50 *
|
||||
# generation: 306 current 2025-10-11 17:04:37 25.05.20251006.20c4598 6.12.50 *
|
||||
{
|
||||
description = "blakes nix config";
|
||||
inputs = {
|
||||
|
||||
@@ -81,6 +81,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.mediastack = [{
|
||||
title = service;
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
@@ -89,8 +89,7 @@ in
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}";
|
||||
allow-insecure = false; }];
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
|
||||
@@ -92,8 +92,7 @@ in
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}";
|
||||
allow-insecure = true; }];
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
|
||||
@@ -90,8 +90,7 @@ in
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}";
|
||||
allow-insecure = true; }];
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
|
||||
@@ -115,6 +115,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.service = [{
|
||||
title = service;
|
||||
url = "https://git.${home.base_domain}";
|
||||
error-url = "http://${cfg.url}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
@@ -53,11 +53,21 @@ in
|
||||
description = "enable backups for ${service}";
|
||||
};
|
||||
links = {
|
||||
services = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
description = "list of links for ${service}";
|
||||
};
|
||||
mediastack = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
description = "list of links for ${service}";
|
||||
};
|
||||
system = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
description = "list of links for ${service}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -123,8 +133,8 @@ in
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "mediastack";
|
||||
sites = cfg.links.mediastack;
|
||||
title = "services";
|
||||
sites = cfg.links.services;
|
||||
# sites = [
|
||||
# { title = "jellyfin"; url = "https://media.blakedheld.xyz"; icon = "di:jellyfin"; }
|
||||
# { title = "audiobookshelf"; url = "https://audiobooks.blakedheld.xyz"; icon = "di:audiobookshelf"; }
|
||||
@@ -140,29 +150,31 @@ in
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "services";
|
||||
sites = [
|
||||
{ title = "immich"; url = "https://pics.blakedheld.xyz"; icon = "di:immich"; }
|
||||
{ title = "vaultwarden"; url = "https://pass.blakedheld.xyz"; icon = "di:vaultwarden"; }
|
||||
{ title = "gitea"; url = "https://git.blakedheld.xyz"; icon = "di:gitea"; }
|
||||
{ title = "home assistant"; url = "https://home.blakedheld.xyz"; icon = "di:home-assistant"; }
|
||||
{ title = "zigbee2mqtt"; url = "http://10.10.0.30:4142"; icon = "di:zigbee2mqtt"; }
|
||||
{ title = "syncthing"; url = "http://10.10.0.20:2222"; icon = "di:syncthing"; }
|
||||
{ title = "archivebox"; url = "http://10.10.0.30:5656"; icon = "sh:archivebox"; }
|
||||
{ title = "copyparty"; url = "http://10.10.0.20:3923"; icon = "sh:copyparty"; }
|
||||
];
|
||||
title = "mediastack";
|
||||
sites = cfg.links.mediastack;
|
||||
# [
|
||||
# { title = "immich"; url = "https://pics.blakedheld.xyz"; icon = "di:immich"; }
|
||||
# { title = "vaultwarden"; url = "https://pass.blakedheld.xyz"; icon = "di:vaultwarden"; }
|
||||
# { title = "gitea"; url = "https://git.blakedheld.xyz"; icon = "di:gitea"; }
|
||||
# { title = "home assistant"; url = "https://home.blakedheld.xyz"; icon = "di:home-assistant"; }
|
||||
# { title = "zigbee2mqtt"; url = "http://10.10.0.30:4142"; icon = "di:zigbee2mqtt"; }
|
||||
# { title = "syncthing"; url = "http://10.10.0.20:2222"; icon = "di:syncthing"; }
|
||||
# { title = "archivebox"; url = "http://10.10.0.30:5656"; icon = "sh:archivebox"; }
|
||||
# { title = "copyparty"; url = "http://10.10.0.20:3923"; icon = "sh:copyparty"; }
|
||||
# ];
|
||||
}
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "system";
|
||||
sites = [
|
||||
{ title = "proxmox"; url = "http://10.10.0.10:8006"; icon = "di:proxmox"; allow-insecure = true; }
|
||||
{ title = "nginx"; url = "http://10.10.0.30:8080"; icon = "di:nginx"; }
|
||||
{ title = "uptime kuma"; url = "http://10.10.0.30:8181"; icon = "di:uptime-kuma"; }
|
||||
{ title = "tn holocron"; url = "https://10.10.0.20"; icon = "di:truenas"; allow-insecure = true; }
|
||||
{ title = "bebe"; url = "https://10.10.0.1"; icon = "di:unifi"; allow-insecure = true; }
|
||||
];
|
||||
sites = cfg.links.system;
|
||||
# [
|
||||
# { title = "proxmox"; url = "http://10.10.0.10:8006"; icon = "di:proxmox"; allow-insecure = true; }
|
||||
# { title = "nginx"; url = "http://10.10.0.30:8080"; icon = "di:nginx"; }
|
||||
# { title = "uptime kuma"; url = "http://10.10.0.30:8181"; icon = "di:uptime-kuma"; }
|
||||
# { title = "tn holocron"; url = "https://10.10.0.20"; icon = "di:truenas"; allow-insecure = true; }
|
||||
# { title = "bebe"; url = "https://10.10.0.1"; icon = "di:unifi"; allow-insecure = true; }
|
||||
# ];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -96,6 +96,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.service = [{
|
||||
title = service;
|
||||
url = "https://photos.${homelab.base_domain}";
|
||||
error-url = "http://${cfg.url}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir "/var/lib/redis-immich" ]; };
|
||||
|
||||
@@ -90,12 +90,13 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# sops.secrets = {
|
||||
# "${service}_" = {
|
||||
# owner = "${service}";
|
||||
# group = "${service}";
|
||||
# };
|
||||
# };
|
||||
# add to glance
|
||||
modules.services.glance.links.mediastack = [{
|
||||
title = service;
|
||||
url = "https://media.${homelab.base_domain}";
|
||||
error-url = "http://${cfg.url}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
|
||||
@@ -119,6 +119,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.mediastack = [{
|
||||
title = service;
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
@@ -137,6 +137,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.services = [{
|
||||
title = service;
|
||||
url = "https://hass.${homelab.base_domain}";
|
||||
error-url = "http://${cfg.url}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
@@ -64,9 +64,10 @@ in
|
||||
acl = [ "readwrite #" ];
|
||||
hashedPassword = "$7$101$140powz2MtsRawFT$ydndjal9wCAywIWtUEAh/IusdfDFvnHMupTFjdS7Ad/EjsEIbJgHrLY9waCe4Z3142XieuxMrXUDjMTp2qwyiw==";
|
||||
};
|
||||
#settings.allow_anonymous = true;
|
||||
#acl = [ "pattern readwrite #" ];
|
||||
#omitPasswordAuth = true;
|
||||
# use with no auth
|
||||
# settings.allow_anonymous = true;
|
||||
# acl = [ "pattern readwrite #" ];
|
||||
# omitPasswordAuth = true;
|
||||
}
|
||||
];
|
||||
# override umask to make permissions work out
|
||||
@@ -76,19 +77,9 @@ in
|
||||
Group = "${service}";
|
||||
};
|
||||
|
||||
# # open firewall
|
||||
# open firewall
|
||||
networking.firewall.allowedTCPPorts = [ cfg.port ];
|
||||
|
||||
# # internal reverse proxy entry
|
||||
# services.nginx.virtualHosts."${cfg.url}" = {
|
||||
# forceSSL = true;
|
||||
# sslCertificate = sec."ssl_blakedheld_crt".path;
|
||||
# sslCertificateKey = sec."ssl_blakedheld_key".path;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
||||
# };
|
||||
# };
|
||||
|
||||
sops.secrets = {
|
||||
"${service}_hashed_passwd" = {
|
||||
owner = "${service}";
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${service}.${homelab.base_domain}";
|
||||
default = "z2m.${homelab.base_domain}";
|
||||
description = "set domain for ${service}";
|
||||
};
|
||||
data_dir = lib.mkOption {
|
||||
@@ -111,6 +111,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.services = [{
|
||||
title = service;
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
@@ -99,6 +99,14 @@ in
|
||||
# };
|
||||
# };
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.system = [{
|
||||
title = service;
|
||||
url = "https://${cfg.url}";
|
||||
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ];
|
||||
};
|
||||
|
||||
@@ -110,6 +110,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# add to glance
|
||||
modules.services.glance.links.services = [{
|
||||
title = service;
|
||||
url = "https://${homelab.base_domain}";
|
||||
error-url = "http://${cfg.url}:${toString cfg.port}";
|
||||
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
|
||||
icon = "di:${service}"; }];
|
||||
|
||||
# add to backups
|
||||
modules.system.backups.baks = {
|
||||
${service} = { paths = [ cfg.data_dir ]; };
|
||||
|
||||
Reference in New Issue
Block a user