NixOS configuration 🪄

✨🚧 rewriting glance configuration to yaml

Signed-off-by: Xaiya Schumin <d.schumin@proton.me>

+413 -429
+1 -1
modules/nixos/services/default.nix
··· 7 7 ./minecraft.nix 8 8 ./vaultwarden.nix 9 9 ./gitlab.nix 10 - ./glance.nix 10 + ./glance 11 11 ]; 12 12 13 13 }
-427
modules/nixos/services/glance.nix
··· 1 - { config, lib, self, pkgs, ... }: 2 - let 3 - inherit (lib) mkIf; 4 - inherit (self.lib.modules) mkPackageOpt; 5 - 6 - cfg = config.sylveon.services.glance; 7 - in 8 - { 9 - 10 - options.sylveon.services.glance = 11 - mkPackageOpt pkgs.glance "Glance configuration (Dashboard)"; 12 - 13 - config = mkIf cfg.enable { 14 - age.secrets = { 15 - lastfm-apikey.rekeyFile = "${self}/secrets/lastfm-apikey.age"; 16 - tailscale-apikey.rekeyFile = "${self}/secrets/tailscale-apikey.age"; 17 - }; 18 - 19 - services.glance = { 20 - enable = true; 21 - openFirewall = false; /* Managed through nginx server */ 22 - 23 - settings = { 24 - server = { 25 - host = ""; /* Needs to be an empty string, otherwise interfaces cant be found correctly */ 26 - port = 8002; 27 - proxied = true; 28 - }; 29 - 30 - pages = [ 31 - { 32 - name = "Overview"; 33 - hide-desktop-navigation = true; 34 - center-vertically = true; 35 - 36 - head-widgets = [ 37 - { 38 - type = "search"; 39 - autofocus = true; 40 - } 41 - ]; 42 - 43 - columns = [ 44 - { 45 - size = "small"; 46 - widgets = [ 47 - { 48 - type = "clock"; 49 - hour-format = "24h"; 50 - } 51 - 52 - { 53 - type = "calendar"; 54 - } 55 - { 56 - type = "weather"; 57 - location = "Berlin, Germany"; 58 - hour-format = "24h"; 59 - } 60 - ]; 61 - } 62 - 63 - { 64 - size = "full"; 65 - widgets = [ 66 - { 67 - type = "monitor"; 68 - cache = "30s"; 69 - title = "Services"; 70 - sites = [ 71 - { 72 - title = "Vaultwarden"; 73 - url = "https://vault.xaiya.dev"; 74 - } 75 - { 76 - title = "GitLab"; 77 - url = "https://git.xaiya.dev"; 78 - } 79 - { 80 - title = "Firefly"; 81 - url = "https://cash.xaiya.dev"; 82 - } 83 - ]; 84 - } 85 - 86 - { 87 - type = "custom-api"; 88 - title = "Minecraft Servers"; 89 - url = "https://api.mcsrvstat.us/3/xaiya.dev"; 90 - cache = "30s"; 91 - template = '' 92 - <div style="display:flex; align-items:center; gap:12px;"> 93 - <div style="width:40px; height:40px; flex-shrink:0; border-radius:4px; display:flex; justify-content:center; align-items:center; overflow:hidden;"> 94 - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width:32px; height:32px; opacity:0.5;"> 95 - <path fill-rule="evenodd" d="M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" clip-rule="evenodd" /> 96 - </svg> 97 - </div> 98 - 99 - <div style="flex-grow:1; min-width:0;"> 100 - <a class="size-h4 block text-truncate color-highlight"> 101 - {{ .JSON.String "motd.raw.0" }} 102 - {{ if .JSON.Bool "online" }} 103 - <span 104 - style="width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-positive); display: inline-block; vertical-align: middle;" 105 - data-popover-type="text" 106 - data-popover-text="Online" 107 - ></span> 108 - {{ else }} 109 - <span 110 - style="width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-negative); display: inline-block; vertical-align: middle;" 111 - data-popover-type="text" 112 - data-popover-text="Offline" 113 - ></span> 114 - {{ end }} 115 - </a> 116 - 117 - <ul class="list-horizontal-text"> 118 - <li> 119 - {{ if .JSON.Bool "online" }} 120 - <span>{{ .JSON.String "version" }}</span> 121 - {{ else }} 122 - <span>Offline</span> 123 - {{ end }} 124 - </li> 125 - {{ if .JSON.Bool "online" }} 126 - <li data-popover-type="html"> 127 - <div data-popover-html> 128 - {{ range .JSON.Array "players.list" }}<br>{{ end }} 129 - </div> 130 - <p style="display:inline-flex;align-items:center;"> 131 - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6" style="height:1em;vertical-align:middle;margin-right:0.5em;"> 132 - <path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" /> 133 - </svg> 134 - {{ .JSON.Int "players.online" | formatNumber }}/{{ .JSON.Int "players.max" | formatNumber }} players 135 - </p> 136 - </li> 137 - {{ else }} 138 - <li> 139 - <p style="display:inline-flex;align-items:center;"> 140 - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6" style="height:1em;vertical-align:middle;margin-right:0.5em;opacity:0.5;"> 141 - <path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" /> 142 - </svg> 143 - 0 players 144 - </p> 145 - </li> 146 - {{ end }} 147 - </ul> 148 - </div> 149 - </div> 150 - ''; 151 - } 152 - 153 - { 154 - type = "custom-api"; 155 - title = "Trending Repositories"; 156 - cache = "24h"; 157 - url = "https://api.ossinsight.io/v1/trends/repos/?period=past_24_hours&language=All"; 158 - template = '' 159 - <ul class="list list-gap-10 collapsible-container" data-collapse-after="2"> 160 - {{ range .JSON.Array "data.rows"}} 161 - <li> 162 - <a class="color-primary-if-not-visited" href="https://github.com/{{ .String "repo_name" }}">{{ .String "repo_name" }}</a> 163 - <ul class="list-horizontal-text"> 164 - <li class="color-highlight"> {{.String "primary_language"}} </li> 165 - 166 - <li style="display: flex; align-items: center;gap: 4px;"> 167 - {{ .Int "stars" }} 168 - <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"> 169 - <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> 170 - </svg> 171 - </li> 172 - 173 - <li style="display: flex; align-items: center;gap: 4px;"> 174 - {{ .Int "forks" }} 175 - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"> 176 - <path stroke="none" d="M0 0h24v24H0z" fill="none"/> 177 - <circle cx="12" cy="18" r="2" /> 178 - <circle cx="7" cy="6" r="2" /> 179 - <circle cx="17" cy="6" r="2" /> 180 - <path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" /> 181 - <path d="M12 12l0 4" /> 182 - </svg> 183 - </li> 184 - 185 - <li style="display: flex; align-items: center;gap: 4px;"> 186 - {{ .Int "pull_requests" }} 187 - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"> 188 - <circle cx="6" cy="6" r="3"></circle> 189 - <circle cx="18" cy="18" r="3"></circle> 190 - <path d="M13 6h3a2 2 0 0 1 2 2v7"></path> 191 - <line x1="6" y1="9" x2="6" y2="21"></line> 192 - </svg> 193 - </li> 194 - 195 - </ul> 196 - <ul class="list collapsible-container"> 197 - <li style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" class="color-subdue"> 198 - Contributors: {{ .String "contributor_logins"}} 199 - </li> 200 - <li> 201 - {{ .String "description" }} 202 - </li> 203 - </ul> 204 - </li> 205 - {{ end }} 206 - </ul> 207 - ''; 208 - } 209 - ]; 210 - } 211 - 212 - { 213 - size = "small"; 214 - widgets = [ 215 - { 216 - type = "custom-api"; 217 - "title" = "Recent listens"; 218 - "cache" = "60s"; 219 - "url" = "http://ws.audioscrobbler.com/2.0/"; 220 - "parameters" = { 221 - "method" = "user.getRecentTracks"; 222 - "user" = "xaiyadev"; 223 - "api_key" = "${(builtins.readFile config.age.secrets.lastfm-apikey.path)}"; 224 - "format" = "json"; 225 - "limit" = "5"; 226 - }; 227 - 228 - "template" = '' 229 - <ul class="list list-gap-10 collapsible-container" data-collapse-after="1"> 230 - {{ range .JSON.Array "recenttracks.track" }} 231 - <li class="flex items-center gap-10"> 232 - <img src={{ .String "image.2.#text" }} style="border-radius: 5px; min-width: 5rem; max-width: 5rem;" class="card"> 233 - <div class="flex-1"> 234 - <p class="color-positive size-h5">{{ .String "artist.#text" }}</p> 235 - <p class="size-h5">{{ .String "name" }}</p> 236 - <p class="size-h6"> 237 - {{ if .String "@attr.nowplaying" }} 238 - <span class="color-positive">Now playing</span> 239 - {{ else }} 240 - <span class="color-subdue" {{ .String "date.#text" | parseRelativeTime "02 Jan 2006, 15:04" }}></span> 241 - {{ end }} 242 - </p> 243 - </div> 244 - </li> 245 - {{ end }} 246 - </ul> 247 - ''; 248 - 249 - } 250 - 251 - { 252 - type = "releases"; 253 - show-source-icon = true; 254 - repositories = [ 255 - "WillPower3309/swayfx" 256 - "Inrixia/TidaLuna" 257 - ]; 258 - } 259 - 260 - { 261 - type = "server-stats"; 262 - servers = [ 263 - { 264 - type = "local"; 265 - name = "Apricot"; 266 - 267 - mountpoints = { "/mnt/raid" = { name = "/mnt/raid"; }; }; 268 - } 269 - ]; 270 - } 271 - 272 - { 273 - type = "custom-api"; 274 - title = "Tailscale devices"; 275 - title-url = "https://login.tailscale.com/admin/machines"; 276 - url = "https://api.tailscale.com/api/v2/tailnet/-/devices"; 277 - headers = { 278 - Authorization = "Bearer ${(builtins.readFile config.age.secrets.lastfm-apikey.path)}"; 279 - }; 280 - cache = "10m"; 281 - template = '' 282 - {{/* User Variables */}} 283 - {{/* Set to true if you'd like an indicator for online devices */}} 284 - {{ $enableOnlineIndicator := true }} 285 - 286 - <style> 287 - .device-info-container { 288 - position: relative; 289 - overflow: hidden; 290 - height: 1.5em; 291 - } 292 - 293 - .device-info { 294 - display: flex; 295 - transition: transform 0.2s ease, opacity 0.2s ease; 296 - } 297 - 298 - .device-ip { 299 - position: absolute; 300 - top: 0; 301 - left: 0; 302 - transform: translateY(-100%); 303 - opacity: 0; 304 - transition: transform 0.2s ease, opacity 0.2s ease; 305 - } 306 - 307 - .device-info-container:hover .device-info { 308 - transform: translateY(100%); 309 - opacity: 0; 310 - } 311 - 312 - .device-info-container:hover .device-ip { 313 - transform: translateY(0); 314 - opacity: 1; 315 - } 316 - 317 - .update-indicator { 318 - width: 8px; 319 - height: 8px; 320 - border-radius: 50%; 321 - background-color: var(--color-primary); 322 - display: inline-block; 323 - margin-left: 4px; 324 - vertical-align: middle; 325 - } 326 - 327 - .offline-indicator { 328 - width: 8px; 329 - height: 8px; 330 - border-radius: 50%; 331 - background-color: var(--color-negative); 332 - display: inline-block; 333 - margin-left: 4px; 334 - vertical-align: middle; 335 - } 336 - 337 - .online-indicator { 338 - width: 8px; 339 - height: 8px; 340 - border-radius: 50%; 341 - background-color: var(--color-positive); 342 - display: inline-block; 343 - margin-left: 4px; 344 - vertical-align: middle; 345 - } 346 - 347 - .device-name-container { 348 - display: flex; 349 - align-items: center; 350 - gap: 8px; 351 - } 352 - 353 - .indicators-container { 354 - display: flex; 355 - align-items: center; 356 - gap: 4px; 357 - } 358 - </style> 359 - <ul class="list list-gap-10 collapsible-container" data-collapse-after="4"> 360 - {{ range .JSON.Array "devices" }} 361 - <li> 362 - <div class="flex items-center gap-10"> 363 - <div class="device-name-container grow"> 364 - <span class="size-h4 block text-truncate color-primary"> 365 - {{ findMatch "^([^.]+)" (.String "name") }} 366 - </span> 367 - <div class="indicators-container"> 368 - {{ if (.Bool "updateAvailable") }} 369 - <span class="update-indicator" data-popover-type="text" data-popover-text="Update Available"></span> 370 - {{ end }} 371 - 372 - {{ $lastSeen := .String "lastSeen" | parseTime "rfc3339" }} 373 - {{ if not ($lastSeen.After (offsetNow "-10s")) }} 374 - {{ $lastSeenTimezoned := $lastSeen.In now.Location }} 375 - <span class="offline-indicator" data-popover-type="text" 376 - data-popover-text="Offline - Last seen {{ $lastSeenTimezoned.Format " Jan 2 3:04pm" }}"></span> 377 - {{ else if $enableOnlineIndicator }} 378 - <span class="online-indicator" data-popover-type="text" data-popover-text="Online"></span> 379 - {{ end }} 380 - </div> 381 - </div> 382 - </div> 383 - <div class="device-info-container"> 384 - <ul class="list-horizontal-text device-info"> 385 - <li>{{ .String "os" }}</li> 386 - <li>{{ .String "user" }}</li> 387 - </ul> 388 - <div class="device-ip"> 389 - {{ .String "addresses.0"}} 390 - </div> 391 - </div> 392 - </li> 393 - {{ end }} 394 - </ul> 395 - ''; 396 - } 397 - ]; 398 - } 399 - ]; 400 - } 401 - ]; 402 - 403 - /* rose-pine theme */ 404 - theme = { 405 - constrat-multiplier = 1.3; 406 - background-color = "249 22 12"; 407 - pirmary-color = "245 50 91"; 408 - positive-color = "247 23 15"; 409 - negative-color = "248 15 61"; 410 - }; 411 - 412 - }; 413 - }; 414 - 415 - 416 - /* All the configurations neede */ 417 - 418 - services.nginx.virtualHosts."xaiya.dev" = { 419 - forceSSL = true; 420 - useACMEHost = "xaiya.dev"; 421 - locations."/".proxyPass = "http://[::1]:8002"; 422 - 423 - extraConfig = "proxy_ssl_server_name on;"; 424 - }; 425 - }; 426 - 427 - }
+69
modules/nixos/services/glance/default.nix
··· 1 + { config, lib, self, pkgs, ... }: 2 + let 3 + inherit (lib) 4 + mkIf 5 + mkMerge 6 + ; 7 + 8 + inherit (self.lib.modules) 9 + mkPackageOpt 10 + ; 11 + 12 + jsonOutputDrv = file: 13 + pkgs.runCommand 14 + "from-yaml" 15 + { nativeBuildInputs = [ pkgs.remarshal ]; } 16 + ''${pkgs.remarshal}/bin/remarshal -if yaml -i "${file}" -of json -o "$out"''; 17 + 18 + fromYAML = builtins.fromJSON (builtins.readFile jsonOutputDrv); 19 + 20 + cfg = config.sylveon.services.glance; 21 + in 22 + { 23 + 24 + options.sylveon.services.glance = 25 + mkPackageOpt pkgs.glance "Glance configuration (Dashboard)"; 26 + 27 + config = mkIf cfg.enable { 28 + age.secrets.glance-env.rekeyFile = "${self}/secrets/glance-env.age"; 29 + 30 + services.glance = { 31 + enable = true; 32 + openFirewall = false; /* Managed through nginx server */ 33 + 34 + settings = mkMerge [ 35 + { 36 + server = { 37 + host = ""; /* Needs to be an empty string, otherwise interfaces cant be found correctly */ 38 + port = 8002; 39 + proxied = true; 40 + }; 41 + 42 + /* rose-pine theme */ 43 + theme = { 44 + constrat-multiplier = 1.3; 45 + background-color = "249 22 12"; 46 + pirmary-color = "245 50 91"; 47 + positive-color = "247 23 15"; 48 + negative-color = "248 15 61"; 49 + }; 50 + } 51 + 52 + fromYAML ./default.yaml 53 + 54 + ]; 55 + }; 56 + 57 + 58 + /* All the configurations neede */ 59 + 60 + services.nginx.virtualHosts."xaiya.dev" = { 61 + forceSSL = true; 62 + useACMEHost = "xaiya.dev"; 63 + locations."/".proxyPass = "http://[::1]:8002"; 64 + 65 + extraConfig = "proxy_ssl_server_name on;"; 66 + }; 67 + }; 68 + 69 + }
+317
modules/nixos/services/glance/default.yaml
··· 1 + pages: 2 + - name: Overview 3 + head-widgets: 4 + - type: search 5 + autofocus: true 6 + 7 + columns: 8 + - size: small 9 + widgets: 10 + - type: clock 11 + hour-format: 24h 12 + 13 + - type: calendar 14 + 15 + - type: weather 16 + location: Berlin, Germany 17 + hour-format: 24h 18 + 19 + - size: full 20 + widgets: 21 + - type: group 22 + widgets: 23 + - type: monitor 24 + cache: 30s 25 + title: Services 26 + sites: 27 + - title: Vaultwarden 28 + url: https://vault.xaiya.dev/ 29 + - title: GitLab 30 + url: https://git.xaiya.dev/ 31 + - title: Firefly 32 + url: https://cach.xaiya.dev/ 33 + - type: custom-api 34 + title: Minecraft Servers 35 + url: https://api.mcsrvstat.us/3/xaiya.dev 36 + cache: 30s 37 + template: | 38 + <div style="display:flex; align-items:center; gap:12px;"> 39 + <div style="width:40px; height:40px; flex-shrink:0; border-radius:4px; display:flex; justify-content:center; align-items:center; overflow:hidden;"> 40 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width:32px; height:32px; opacity:0.5;"> 41 + <path fill-rule="evenodd" d="M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" clip-rule="evenodd" /> 42 + </svg> 43 + </div> 44 + 45 + <div style="flex-grow:1; min-width:0;"> 46 + <a class="size-h4 block text-truncate color-highlight"> 47 + {{ .JSON.String "motd.raw.0" }} 48 + {{ if .JSON.Bool "online" }} 49 + <span 50 + style="width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-positive); display: inline-block; vertical-align: middle;" 51 + data-popover-type="text" 52 + data-popover-text="Online" 53 + ></span> 54 + {{ else }} 55 + <span 56 + style="width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-negative); display: inline-block; vertical-align: middle;" 57 + data-popover-type="text" 58 + data-popover-text="Offline" 59 + ></span> 60 + {{ end }} 61 + </a> 62 + 63 + <ul class="list-horizontal-text"> 64 + <li> 65 + {{ if .JSON.Bool "online" }} 66 + <span>{{ .JSON.String "version" }}</span> 67 + {{ else }} 68 + <span>Offline</span> 69 + {{ end }} 70 + </li> 71 + {{ if .JSON.Bool "online" }} 72 + <li data-popover-type="html"> 73 + <div data-popover-html> 74 + {{ range .JSON.Array "players.list" }}<br>{{ end }} 75 + </div> 76 + <p style="display:inline-flex;align-items:center;"> 77 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6" style="height:1em;vertical-align:middle;margin-right:0.5em;"> 78 + <path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" /> 79 + </svg> 80 + {{ .JSON.Int "players.online" | formatNumber }}/{{ .JSON.Int "players.max" | formatNumber }} players 81 + </p> 82 + </li> 83 + {{ else }} 84 + <li> 85 + <p style="display:inline-flex;align-items:center;"> 86 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6" style="height:1em;vertical-align:middle;margin-right:0.5em;opacity:0.5;"> 87 + <path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" /> 88 + </svg> 89 + 0 players 90 + </p> 91 + </li> 92 + {{ end }} 93 + </ul> 94 + </div> 95 + </div> 96 + 97 + - type: custom-api 98 + title: Trending Repositories 99 + cache: 24h 100 + url: https://api.ossinsight.io/v1/trends/repos/?period=past_24_hours&language=All 101 + template: | 102 + <ul class="list list-gap-10 collapsible-container" data-collapse-after="2"> 103 + {{ range .JSON.Array "data.rows"}} 104 + <li> 105 + <a class="color-primary-if-not-visited" href="https://github.com/{{ .String "repo_name" }}">{{ .String "repo_name" }}</a> 106 + <ul class="list-horizontal-text"> 107 + <li class="color-highlight"> {{.String "primary_language"}} </li> 108 + <li style="display: flex; align-items: center;gap: 4px;"> 109 + {{ .Int "stars" }} 110 + <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"> 111 + <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> 112 + </svg> 113 + </li> 114 + <li style="display: flex; align-items: center;gap: 4px;"> 115 + {{ .Int "forks" }} 116 + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"> 117 + <path stroke="none" d="M0 0h24v24H0z" fill="none"/> 118 + <circle cx="12" cy="18" r="2" /> 119 + <circle cx="7" cy="6" r="2" /> 120 + <circle cx="17" cy="6" r="2" /> 121 + <path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" /> 122 + <path d="M12 12l0 4" /> 123 + </svg> 124 + </li> 125 + 126 + <li style="display: flex; align-items: center;gap: 4px;"> 127 + {{ .Int "pull_requests" }} 128 + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"> 129 + <circle cx="6" cy="6" r="3"></circle> 130 + <circle cx="18" cy="18" r="3"></circle> 131 + <path d="M13 6h3a2 2 0 0 1 2 2v7"></path> 132 + <line x1="6" y1="9" x2="6" y2="21"></line> 133 + </svg> 134 + </li> 135 + 136 + </ul> 137 + 138 + <ul class="list collapsible-container"> 139 + <li style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" class="color-subdue"> 140 + Contributors: {{ .String "contributor_logins"}} 141 + </li> 142 + <li> 143 + {{ .String "description" }} 144 + </li> 145 + </ul> 146 + </li> 147 + {{ end }} 148 + </ul> 149 + 150 + - type: small 151 + widgets: 152 + - type: custom-api 153 + title: Recent listens 154 + cache: 60s 155 + url: http://ws.audioscrobbler.com/2.0/ 156 + parameters: 157 + method: user.getRecentTracks 158 + user: xaiyadev 159 + api_key: ${LASTFM_APIKEY} 160 + format: json 161 + limit: 5 162 + template: | 163 + <ul class="list list-gap-10 collapsible-container" data-collapse-after="1"> 164 + {{ range .JSON.Array "recenttracks.track" }} 165 + <li class="flex items-center gap-10"> 166 + <img src={{ .String "image.2.#text" }} style="border-radius: 5px; min-width: 5rem; max-width: 5rem;" class="card"> 167 + <div class="flex-1"> 168 + <p class="color-positive size-h5">{{ .String "artist.#text" }}</p> 169 + <p class="size-h5">{{ .String "name" }}</p> 170 + <p class="size-h6"> 171 + {{ if .String "@attr.nowplaying" }} 172 + <span class="color-positive">Now playing</span> 173 + {{ else }} 174 + <span class="color-subdue" {{ .String "date.#text" | parseRelativeTime "02 Jan 2006, 15:04" }}></span> 175 + {{ end }} 176 + </p> 177 + </div> 178 + </li> 179 + {{ end }} 180 + </ul> 181 + 182 + - type: releases 183 + show-source-icon: true 184 + repositories: 185 + - WillPower3309/swayfx 186 + - Inrixia/TidaLuna 187 + 188 + - type: server-stats 189 + servers: 190 + - type: local 191 + name: Apricot 192 + mountpoints: 193 + /mnt/raid: 194 + name: /mnt/raid 195 + 196 + - type: custom-api 197 + title: Tailscale devices 198 + title-url: https://login.tailscale.com/admin/machines 199 + url: https://api.tailscale.com/api/v2/tailnet/-/devices 200 + headers: 201 + Authorization: Bearer ${TAILSCALE_API} 202 + cache: 10m 203 + template: | 204 + {{/* User Variables */}} 205 + {{/* Set to true if you'd like an indicator for online devices */}} 206 + {{ $enableOnlineIndicator := true }} 207 + 208 + <style> 209 + .device-info-container { 210 + position: relative; 211 + overflow: hidden; 212 + height: 1.5em; 213 + } 214 + 215 + .device-info { 216 + display: flex; 217 + transition: transform 0.2s ease, opacity 0.2s ease; 218 + } 219 + 220 + .device-ip { 221 + position: absolute; 222 + top: 0; 223 + left: 0; 224 + transform: translateY(-100%); 225 + opacity: 0; 226 + transition: transform 0.2s ease, opacity 0.2s ease; 227 + } 228 + 229 + .device-info-container:hover .device-info { 230 + transform: translateY(100%); 231 + opacity: 0; 232 + } 233 + 234 + .device-info-container:hover .device-ip { 235 + transform: translateY(0); 236 + opacity: 1; 237 + } 238 + 239 + .update-indicator { 240 + width: 8px; 241 + height: 8px; 242 + border-radius: 50%; 243 + background-color: var(--color-primary); 244 + display: inline-block; 245 + margin-left: 4px; 246 + vertical-align: middle; 247 + } 248 + 249 + .offline-indicator { 250 + width: 8px; 251 + height: 8px; 252 + border-radius: 50%; 253 + background-color: var(--color-negative); 254 + display: inline-block; 255 + margin-left: 4px; 256 + vertical-align: middle; 257 + } 258 + 259 + .online-indicator { 260 + width: 8px; 261 + height: 8px; 262 + border-radius: 50%; 263 + background-color: var(--color-positive); 264 + display: inline-block; 265 + margin-left: 4px; 266 + vertical-align: middle; 267 + } 268 + 269 + .device-name-container { 270 + display: flex; 271 + align-items: center; 272 + gap: 8px; 273 + } 274 + 275 + .indicators-container { 276 + display: flex; 277 + align-items: center; 278 + gap: 4px; 279 + } 280 + </style> 281 + <ul class="list list-gap-10 collapsible-container" data-collapse-after="4"> 282 + {{ range .JSON.Array "devices" }} 283 + <li> 284 + <div class="flex items-center gap-10"> 285 + <div class="device-name-container grow"> 286 + <span class="size-h4 block text-truncate color-primary"> 287 + {{ findMatch "^([^.]+)" (.String "name") }} 288 + </span> 289 + <div class="indicators-container"> 290 + {{ if (.Bool "updateAvailable") }} 291 + <span class="update-indicator" data-popover-type="text" data-popover-text="Update Available"></span> 292 + {{ end }} 293 + 294 + {{ $lastSeen := .String "lastSeen" | parseTime "rfc3339" }} 295 + {{ if not ($lastSeen.After (offsetNow "-10s")) }} 296 + {{ $lastSeenTimezoned := $lastSeen.In now.Location }} 297 + <span class="offline-indicator" data-popover-type="text" 298 + data-popover-text="Offline - Last seen {{ $lastSeenTimezoned.Format " Jan 2 3:04pm" }}"></span> 299 + {{ else if $enableOnlineIndicator }} 300 + <span class="online-indicator" data-popover-type="text" data-popover-text="Online"></span> 301 + {{ end }} 302 + </div> 303 + </div> 304 + </div> 305 + <div class="device-info-container"> 306 + <ul class="list-horizontal-text device-info"> 307 + <li>{{ .String "os" }}</li> 308 + <li>{{ .String "user" }}</li> 309 + </ul> 310 + <div class="device-ip"> 311 + {{ .String "addresses.0"}} 312 + </div> 313 + </div> 314 + </li> 315 + {{ end }} 316 + </ul> 317 +
+1 -1
modules/nixos/services/vaultwarden.nix
··· 34 34 35 35 ROCKET_ADDRESS = "::1"; 36 36 ROCKET_PORT = 8222; 37 - DATABASE_URL=postgresql://vaultwarden?host=/run/postgresql; 37 + DATABASE_URL="postgresql://vaultwarden?host=/run/postgresql"; 38 38 }; 39 39 40 40 environmentFile = config.age.secrets.vaultwarden-env.path;
secrets/lastfm-apikey.age

This is a binary file and will not be displayed.

+8
secrets/tailscale-apikey.age
··· 1 + age-encryption.org/v1 2 + -> piv-p256 3eMZ2w Aq7/MZGAZgXM6DRJSECktijxA1g0BGZl5NKv+55wqsBp 3 + 5QUAEHefcW2wK7jC9ujqaaYl2qynd581TMT7Wx12ow8 4 + -> e^D`gVb-grease hb;Dq\u 5 + vo+wuXIZ4qghC8JM+9rjv4rmClv0ZHiu9fXylDajeqNwH3FQ4Bc77xsmkUG2J9OM 6 + 8tC1A5sh4UlQQK2FRAKRR9NTYg 7 + --- qEFSv4E7D7FRUvdXjp0GuRWTFqVHP/PlTKe3Nx0cvy8 8 + �Sa���!���Ļ�b,�o��'��t*[�:���Jd�9��9r<&bq�l5���u8���j~�� h�+��iB+��}������F��������9U4�Eh
+8
systems/apricot/secrets/0fd9740ecd77d0886d3bf4e22b1be196-tailscale-apikey.age
··· 1 + age-encryption.org/v1 2 + -> ssh-ed25519 1a/qJw TH3ff64IhoH22O0lr4jxzofR8UyjnUkYmBy0pqF0sFs 3 + 4HJeeGTW6ttNlE7Qz4UYn28Ifxa6qqRZkZCNN09ZnY4 4 + -> uf'X"T-grease ' 5 + PPRIgqCyiJcK 6 + --- Q0BjNDbKgovN0JIPlO8Vcz5TAJqPpkZz/Z6MPttxt5Q 7 + #�Ƹ�Z��"j�[��m땦���t�ڏ;�&������'��/5X�w0��D���� 8 + N�Ve�74��Mm�r���D{��|����Ǯ GG��29�W^�{�
+9
systems/apricot/secrets/b62c4867a2cfb19d0cb3e54bdb3d8a12-lastfm-apikey.age
··· 1 + age-encryption.org/v1 2 + -> ssh-ed25519 1a/qJw P9M4fd8U1mxN1vMRtY3aUtFZAjXxPXrY30tk8z+xsV4 3 + 51REwX6/GQPe7dRn4+4inYtHvrGbAomugQlM3zkroow 4 + -> XXL-grease h>S^!]^a Co8< ?EgD0 E7|Dt)Sw 5 + +9qPpRw6iMOjOqODbQ+ou76Okw8UkZOYlnEd8riH2vdGspKiUYuwTNbSgxvReQ 6 + --- nXs3VX1tSj/J/agSq/NIagnUcRII1hsnB34dVBz6uSQ 7 + SY�b^g��b��� 8 + 3��{�i����]�/���u��?Y���c�7z�<V��7����� 9 + J