This commit is contained in:
Daniel Bulant 2025-08-28 22:51:10 +02:00
parent 01e101cdcc
commit ae8c591faf
No known key found for this signature in database
4 changed files with 209 additions and 71 deletions

View file

@ -65,11 +65,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1756068868,
"narHash": "sha256-CmviJx9dcIpdkqMtJEJJBsTiA5/skVtIF4ziBFddr+A=",
"lastModified": 1756399571,
"narHash": "sha256-6B2EeP8/vHavcrqPS8SNkfJMmAIlfHbIe9raC7xyFqo=",
"owner": "9001",
"repo": "copyparty",
"rev": "48d6224ec899b47b6a3509625af744fc60cc1903",
"rev": "914686ec7cac86afe388e6747985d8150afaf899",
"type": "github"
},
"original": {
@ -208,11 +208,11 @@
]
},
"locked": {
"lastModified": 1755928099,
"narHash": "sha256-OILVkfhRCm8u18IZ2DKR8gz8CVZM2ZcJmQBXmjFLIfk=",
"lastModified": 1756245065,
"narHash": "sha256-aAZNbGcWrVRZgWgkQbkabSGcDVRDMgON4BipMy69gvI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4a44fb9f7555da362af9d499817084f4288a957f",
"rev": "54b2879ce622d44415e727905925e21b8f833a98",
"type": "github"
},
"original": {
@ -349,11 +349,11 @@
]
},
"locked": {
"lastModified": 1755183521,
"narHash": "sha256-wrP8TM2lb2x0+PyTc7Uc3yfVBeIlYW7+hFeG14N9Cr8=",
"lastModified": 1756325158,
"narHash": "sha256-aJ9jAYtZ64MWBpWPfH1q+t6U9b6kJWc2yK9Vrlj6fZY=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "c1ddebb423acc7c88653c04de5ddafee64dac89a",
"rev": "bf843fc6adf90d43a5dd7742e9df61d395ba780d",
"type": "github"
},
"original": {
@ -556,11 +556,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1756001208,
"narHash": "sha256-IXBb1RNIy4gNlDyeC5oaXXZwS8x9UYtFCA9Rr0/JPs8=",
"lastModified": 1756345845,
"narHash": "sha256-v6HBYw3q78Ne/kmHM98EP/zKBG40LPvkywnFajRbdXs=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "8f7fa30bd3f36f411133152f5980bafff5d8426e",
"rev": "97b93e2b8d4dbb441978400d58f4a5d5b49a5ec4",
"type": "github"
},
"original": {
@ -612,11 +612,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1755330281,
"narHash": "sha256-aJHFJWP9AuI8jUGzI77LYcSlkA9wJnOIg4ZqftwNGXA=",
"lastModified": 1756245047,
"narHash": "sha256-9bHzrVbjAudbO8q4vYFBWlEkDam31fsz0J7GB8k4AsI=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "3dac8a872557e0ca8c083cdcfc2f218d18e113b0",
"rev": "a65b650d6981e23edd1afa1f01eb942f19cdcbb7",
"type": "github"
},
"original": {
@ -658,11 +658,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"lastModified": 1756266583,
"narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2",
"type": "github"
},
"original": {
@ -721,11 +721,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1755922037,
"narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=",
"lastModified": 1756217674,
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c",
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"type": "github"
},
"original": {
@ -874,11 +874,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1756009581,
"narHash": "sha256-2I/NyYJm6Zq6fJ1YQWSY1S77LjXw+woFYUYEwU91uCc=",
"lastModified": 1756405670,
"narHash": "sha256-XHHshS1fjSwqjCDQOPsZjtQZIAB2Zz6bvJquxoAo/EM=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "0f80eb175059149c59edde75202721cab3384464",
"rev": "eae1aee1cb26449e192e855a35f737534b14fb51",
"type": "github"
},
"original": {

View file

@ -18,6 +18,11 @@ in
stateVersion = "24.05";
packages = with pkgs; [
thunderbird
logisim-evolution
typst
typstyle
typstwriter
colmena.defaultPackage.${system}
usbimager
bitwarden-desktop
@ -106,7 +111,9 @@ in
#jetbrains.webstorm
#jetbrains.clion
jetbrains.datagrip
#jetbrains.rider
# jetbrains.rider
jetbrains.idea-ultimate
jre_minimal
datovka
nwg-displays
wireguard-tools

View file

@ -4,10 +4,14 @@ let
# these are used both in service configuration but also to
# create mappings {name}.eisen.danbulant.cloud to port in caddy
ports = {
"uptime-kuma" = 3001;
"status" = 3001;
"glance" = 5678;
"copyparty" = 3210;
"syncthing" = 8384;
"gitea" = 3000;
"immich" = 2283;
"grafana" = 3002;
"ntfy" = 3003;
};
in
{
@ -72,18 +76,24 @@ in
settings = {
p = ports.copyparty;
idp-hm-usr = "^X-Webauth-Login^danbulant@github^dan";
rproxy = 1;
xff-hdr = "X-Forwarded-For";
ipu = [ "100.103.148.81/32=dan" /*"100.79.186.114/32=dan" "100.76.144.133/32=dan" "100.114.62.113/32=dan" */ ];
};
# accounts = {
# dan = {
# };
# };
accounts = {
dan = {
passwordFile = "/dev/null";
};
};
volumes = {
"/" = {
path = "/media/large";
access = {};
access = {
rwa = [ "dan" ];
r = [ "*" ];
};
};
};
@ -97,11 +107,45 @@ in
uptime-kuma = {
enable = true;
settings = {
PORT = toString ports."uptime-kuma";
PORT = toString ports.status;
};
};
grafana = {
enable = true;
settings.server.http_port = ports.grafana;
};
gitea = {
enable = true;
lfs = {
enable = true;
contentDir = "/media/large/gitea-lfs";
};
appName = "Eisen git";
settings.server.DOMAIN = "gitea.eisen";
settings.server.HTTP_PORT = ports.gitea;
settings.server.ROOT_URL = "http://gitea.eisen/";
};
immich = {
enable = true;
};
# perhaps add ntfy.sh
ntfy-sh = {
enable = true;
settings = {
listen-http = ":${toString ports.ntfy}";
base-url = "http://ntfy.eisen";
};
};
grafana-to-ntfy = {
enable = true;
settings = {
ntfyUrl = "http://ntfy.eisen/grafana";
};
};
glance = {
enable = true;
@ -138,8 +182,8 @@ in
map (k: {
name = "${k}.eisen.danbulant.cloud:80, ${k}.eisen:80";
value = {
# import auth
extraConfig = ''
import auth
reverse_proxy http://localhost:${toString ports.${k}}
'';
};

View file

@ -37,15 +37,71 @@
];
}
{
type = "twitch-channels";
channels = [
"theprimeagen"
"j_blow"
"piratesoftware"
"cohhcarnage"
"christitustech"
"EJ_SA"
];
type = "custom-api";
title = "Uptime Kuma";
title-url = "http://status.eisen";
url = "http://status.eisen/api/status-page/base";
subrequests = {
heartbeats = {
url = "http://status.eisen/api/status-page/heartbeat/base";
};
};
cache = "10m";
template = ''
{{ $hb := .Subrequest "heartbeats" }}
{{ if not (.JSON.Exists "publicGroupList") }}
<p class="color-negative">Error reading response</p>
{{ else if eq (len (.JSON.Array "publicGroupList")) 0 }}
<p>No monitors found</p>
{{ else }}
<ul class="dynamic-columns list-gap-8">
{{ range .JSON.Array "publicGroupList" }}
{{ range .Array "monitorList" }}
{{ $id := .String "id" }}
{{ $hbArray := $hb.JSON.Array (print "heartbeatList." $id) }}
<div class="flex items-center gap-12">
<a class="size-title-dynamic color-highlight text-truncate block grow" href="http://status.eisen/dashboard/{{ $id }}"
target="_blank" rel="noreferrer">
{{ .String "name" }} </a>
{{ if gt (len $hbArray) 0 }}
{{ $latest := index $hbArray (sub (len $hbArray) 1) }}
{{ if eq ($latest.Int "status") 1 }}
<div>{{ $latest.Int "ping" }}ms</div>
<div class="monitor-site-status-icon-compact" title="OK">
<svg fill="var(--color-positive)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z"
clip-rule="evenodd"></path>
</svg>
</div>
{{ else }}
<div><span class="color-negative">DOWN</span></div>
<div class="monitor-site-status-icon-compact" title="{{ if $latest.Exists "msg" }}{{ $latest.String "msg" }}{{ else
}}Error{{ end }}">
<svg fill="var(--color-negative)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
clip-rule="evenodd"></path>
</svg>
</div>
{{ end }}
{{ else }}
<div><span class="color-negative">No data</span></div>
<div class="monitor-site-status-icon-compact" title="No data available">
<svg fill="var(--color-negative)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M10 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm0-2a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-.75-8a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-1.5 0V8zm.75 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</svg>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
</ul>
{{ end }}
'';
}
];
}
@ -91,34 +147,9 @@
widgets = [
{
type = "weather";
location = "London, United Kingdom";
location = "Aarhus, Denmark";
units = "metric";
"hour-format" = "12h";
}
{
type = "markets";
markets = [
{
symbol = "SPY";
name = "S&P 500";
}
{
symbol = "BTC-USD";
name = "Bitcoin";
}
{
symbol = "NVDA";
name = "NVIDIA";
}
{
symbol = "AAPL";
name = "Apple";
}
{
symbol = "MSFT";
name = "Microsoft";
}
];
"hour-format" = "24h";
}
{
type = "releases";
@ -128,8 +159,64 @@
"go-gitea/gitea"
"immich-app/immich"
"syncthing/syncthing"
"9001/copyparty"
"caddyserver/caddy"
];
}
{
type = "custom-api";
title = "Epic Games";
cache = "1h";
url = "https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en&country=US&allowCountries=US";
template = ''
<div>
{{ if eq .Response.StatusCode 200 }}
<div class="horizontal-cards-2">
{{ range .JSON.Array "data.Catalog.searchStore.elements" }}
{{ $price := .String "price.totalPrice.discountPrice" }}
{{ $hasPromo := gt (len (.Array "promotions.promotionalOffers")) 0 }}
{{ if and $hasPromo (eq $price "0") }}
{{ $gamePage := .String "productSlug" }}
{{ if gt (len (.Array "offerMappings")) 0 }}
{{ $gamePage = .String "offerMappings.0.pageSlug" }}
{{end }}
<a href="https://store.epicgames.com/en-US/p/{{ $gamePage }}" target="_blank" class="card">
{{ $title := .String "title" }}
{{ range .Array "keyImages" }}
{{ if eq (.String "type") "OfferImageWide" }}
<img src="{{ .String "url" }}" alt="{{ $title }}" style="width: 100%; max-width: 300px; height: 150px; object-fit: cover; border-radius: var(--border-radius);">
{{ end }}
{{ end }}
<div class="card-content">
<span class="size-base color-primary">{{ $title }}</span><br>
<span class="size-h5 color-subdue">
{{ if $hasPromo }}
{{ $promotions := .Array "promotions.promotionalOffers" }}
{{ if gt (len $promotions) 0 }}
{{ $firstPromo := index $promotions 0 }}
{{ $offers := $firstPromo.Array "promotionalOffers" }}
{{ if gt (len $offers) 0 }}
{{ $firstOffer := index $offers 0 }}
Free until {{ slice ($firstOffer.String "endDate") 0 10 }}
{{ else }}
Free this week!
{{ end }}
{{ else }}
Free this week!
{{ end }}
{{ end }}
</span>
</div>
</a>
{{ end }}
{{ end }}
</div>
{{ else }}
<p class="color-negative">Error fetching Epic Games data.</p>
{{ end }}
</div>
'';
}
];
}
];