diff --git a/flake.lock b/flake.lock index d75a1c3..6222cb5 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/home.nix b/home.nix index 8d729bf..d415f70 100644 --- a/home.nix +++ b/home.nix @@ -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 diff --git a/servers/eisen/configuration.nix b/servers/eisen/configuration.nix index 6c4607c..89d8345 100644 --- a/servers/eisen/configuration.nix +++ b/servers/eisen/configuration.nix @@ -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}} ''; }; diff --git a/servers/eisen/glance-pages.nix b/servers/eisen/glance-pages.nix index ada5286..7b2e112 100644 --- a/servers/eisen/glance-pages.nix +++ b/servers/eisen/glance-pages.nix @@ -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") }} +

Error reading response

+ {{ else if eq (len (.JSON.Array "publicGroupList")) 0 }} +

No monitors found

+ {{ else }} + + + {{ 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 = '' +
+ {{ if eq .Response.StatusCode 200 }} +
+ {{ 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 }} + + {{ $title := .String "title" }} + {{ range .Array "keyImages" }} + {{ if eq (.String "type") "OfferImageWide" }} + {{ $title }} + {{ end }} + {{ end }} +
+ {{ $title }}
+ + {{ 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 }} + +
+
+ {{ end }} + {{ end }} +
+ {{ else }} +

Error fetching Epic Games data.

+ {{ end }} +
+ ''; + } ]; } ];