diff --git a/flake.lock b/flake.lock index 78bb396..6be7dc3 100644 --- a/flake.lock +++ b/flake.lock @@ -58,11 +58,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1765652629, - "narHash": "sha256-y55DAOlY4SYpCifzCBlLuEv4fAHdZ83oksagYyXepWs=", + "lastModified": 1765661038, + "narHash": "sha256-HSpkTs+J84DG0i9TJSM7u6ybEDHZ6W/GO5FZJnC8qao=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "3b511e2f552bc42ca57f2cc2f0dc801167f20ef0", + "rev": "fbf79e62e9961d809a12cf8990a23901a2e93d38", "type": "github" }, "original": { @@ -732,11 +732,11 @@ ] }, "locked": { - "lastModified": 1765654950, - "narHash": "sha256-S5opa3LAqCP3iyFz2ZjvOk/2nr4HuOd7xIWsjix14no=", + "lastModified": 1765670463, + "narHash": "sha256-U6QRo4b7l3NQa6aoJ3svpV3fP9cXigfadICFd18xgyc=", "owner": "nix-community", "repo": "NUR", - "rev": "b7f763b3a549ecef5e416f01dfe7dcc33d1e4f13", + "rev": "223ca4c42215c8d9dd9f72a5cceb454892232e84", "type": "github" }, "original": { diff --git a/hosts/work/default.nix b/hosts/work/default.nix index 102b810..aa28eb7 100644 --- a/hosts/work/default.nix +++ b/hosts/work/default.nix @@ -1,4 +1,4 @@ -{ +{lib, ...}: { config = { fireproof = { hostname = "work"; @@ -8,6 +8,8 @@ dev.enable = true; }; facter.reportPath = ./facter.json; + + fireproof.home-manager.programs.firefox.profiles.default.settings."browser.startup.homepage" = lib.mkForce "https://glance.nickolaj.com/work"; }; imports = [ diff --git a/modules/homelab/default.nix b/modules/homelab/default.nix index 0f53399..4eef938 100644 --- a/modules/homelab/default.nix +++ b/modules/homelab/default.nix @@ -5,7 +5,7 @@ imports = [ ./arr.nix - ./flame.nix + ./glance.nix ./home-assistant.nix ./jellyfin.nix ./nextcloud.nix diff --git a/modules/homelab/flame.nix b/modules/homelab/flame.nix deleted file mode 100644 index 6c4f398..0000000 --- a/modules/homelab/flame.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - ... -}: -lib.mkIf config.fireproof.homelab.enable (let - dataDir = "/var/lib/flame"; - domain = "flame.nickolaj.com"; -in { - services.restic.backups.homelab = { - paths = [dataDir]; - exclude = ["/var/lib/flame/db_backups"]; - }; - - services.nginx.virtualHosts."${domain}" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:5005"; - }; - }; - - virtualisation.oci-containers = { - containers = { - flame = { - autoStart = true; - image = "pawelmalak/flame:2.3.1"; - volumes = [ - "${dataDir}:/app/data" - ]; - ports = [ - "127.0.0.1:5005:5005" - ]; - }; - }; - }; -}) diff --git a/modules/homelab/glance.nix b/modules/homelab/glance.nix new file mode 100644 index 0000000..8966a08 --- /dev/null +++ b/modules/homelab/glance.nix @@ -0,0 +1,453 @@ +{ + config, + lib, + pkgs, + ... +}: +lib.mkIf config.fireproof.homelab.enable (let + domain = "glance.nickolaj.com"; + port = 8088; + + customCss = pkgs.writeText "glance-custom.css" '' + .bookmarks-group li > div { + background-color: var(--color-background); + margin-top: 5px; + border-radius: var(--border-radius); + transition: background-color 0.3s; + font-size: 1.2em; + padding-left: 5px; + } + + .bookmarks-group li > div:has(a:hover) { + background-color: var(--color-widget-background-highlight); + } + + .bookmarks-group li a { + padding: 10px 0; + width: 100%; + } + ''; +in { + age.secrets.glance-env.rekeyFile = ../../secrets/hosts/homelab/glance-env.age; + + services.glance = { + enable = true; + environmentFile = config.age.secrets.glance-env.path; + settings = { + server = { + inherit port; + host = "127.0.0.1"; + base-url = "https://${domain}"; + }; + theme = { + background-color = "30 4 11"; # #1C1B1A (HSL) + primary-color = "14 56 55"; # #CF6A4C accent (HSL) + positive-color = "72 59 38"; # #879A39 green (HSL) + negative-color = "5 64 54"; # #D14D41 red (HSL) + contrast-multiplier = 1.1; + text-saturation-multiplier = 1.0; + custom-css-file = "https://${domain}/custom.css"; + disable-picker = true; + }; + branding = { + hide-footer = true; + }; + pages = [ + { + name = "Home"; + columns = [ + { + size = "small"; + widgets = [ + { + type = "calendar"; + first-day-of-week = "monday"; + } + { + type = "weather"; + title = "Weather"; + location = "\${WEATHER_LOCATION}"; + units = "metric"; + } + { + type = "server-stats"; + servers = [ + { + type = "local"; + name = "Home Server"; + } + ]; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "bookmarks"; + title = "Applications"; + groups = [ + { + title = "Social"; + links = [ + { + title = "Gmail"; + url = "https://mail.google.com"; + icon = "si:gmail"; + same-tab = true; + } + { + title = "Reddit"; + url = "https://reddit.com"; + icon = "si:reddit"; + same-tab = true; + } + { + title = "Github"; + url = "https://github.com"; + icon = "si:github"; + same-tab = true; + } + ]; + } + { + title = "NixOS"; + links = [ + { + title = "NixOS Search"; + url = "https://search.nixos.org"; + icon = "si:nixos"; + same-tab = true; + } + { + title = "Home-manager Search"; + url = "https://home-manager-options.extranix.com"; + icon = "si:nixos"; + same-tab = true; + } + { + title = "Noogle"; + url = "https://noogle.dev"; + icon = "si:nixos"; + same-tab = true; + } + ]; + } + { + title = "Streaming"; + links = [ + { + title = "YouTube"; + url = "https://youtube.com"; + icon = "si:youtube"; + same-tab = true; + } + { + title = "Netflix"; + url = "https://netflix.com"; + icon = "si:netflix"; + same-tab = true; + } + { + title = "HBO Max"; + url = "https://play.max.com"; + icon = "si:hbo"; + same-tab = true; + } + { + title = "Disney Plus"; + url = "https://disneyplus.com"; + icon = "mdi:castle"; + same-tab = true; + } + ]; + } + ]; + } + { + type = "monitor"; + cache = "5m"; + sites = [ + { + title = "Home Assistant"; + url = "https://ha.nickolaj.com"; + icon = "sh:home-assistant"; + same-tab = true; + } + { + title = "Zigbee2MQTT"; + url = "https://zigbee.nickolaj.com"; + icon = "sh:zigbee2mqtt"; + same-tab = true; + } + { + title = "Nextcloud"; + url = "https://nextcloud.nickolaj.com"; + icon = "sh:nextcloud"; + same-tab = true; + } + { + title = "Plex"; + url = "https://plex.nickolaj.com"; + icon = "sh:plex"; + same-tab = true; + alt-status-codes = [401]; + } + { + title = "Jellyfin"; + url = "https://jellyfin.nickolaj.com"; + icon = "sh:jellyfin"; + same-tab = true; + } + { + title = "Sonarr"; + url = "https://sonarr.nickolaj.com"; + icon = "sh:sonarr"; + same-tab = true; + } + { + title = "Radarr"; + url = "https://radarr.nickolaj.com"; + icon = "sh:radarr"; + same-tab = true; + } + { + title = "SABnzbd"; + url = "https://sabnzbd.nickolaj.com"; + icon = "sh:sabnzbd"; + same-tab = true; + } + { + title = "Zitadel"; + url = "https://sso.nickolaj.com"; + icon = "sh:zitadel"; + same-tab = true; + } + ]; + } + { + type = "group"; + widgets = [ + { + type = "hacker-news"; + collapse-after = 10; + limit = 20; + } + { + type = "rss"; + style = "detailed-list"; + title-url = "https://www.inoreader.com/all_articles"; + feeds = [ + { + title = "Inoreader"; + url = "https://www.inoreader.com/stream/user/1004648594/tag/all-articles"; + } + ]; + } + { + type = "reddit"; + subreddit = "simracing"; + show-thumbnails = true; + collapse-after = 10; + comments-url-template = "https://old.reddit.com/{POST-PATH}"; + title-url = "https://old.reddit.com/r/simracing"; + } + { + type = "reddit"; + subreddit = "iracing"; + show-thumbnails = true; + collapse-after = 10; + comments-url-template = "https://old.reddit.com/{POST-PATH}"; + title-url = "https://old.reddit.com/r/iracing"; + } + { + type = "reddit"; + subreddit = "formula1"; + show-thumbnails = true; + collapse-after = 10; + comments-url-template = "https://old.reddit.com/{POST-PATH}"; + title-url = "https://old.reddit.com/r/formula1"; + } + { + type = "reddit"; + subreddit = "denmark"; + show-thumbnails = true; + collapse-after = 10; + comments-url-template = "https://old.reddit.com/{POST-PATH}"; + title-url = "https://old.reddit.com/r/denmark"; + } + ]; + } + ]; + } + ]; + } + { + name = "Work"; + columns = [ + { + size = "small"; + widgets = [ + { + type = "clock"; + title = "Clock"; + timezone = "Europe/Copenhagen"; + } + { + type = "weather"; + title = "Weather"; + location = "\${WEATHER_LOCATION}"; + units = "metric"; + } + { + type = "calendar"; + first-day-of-week = "monday"; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "bookmarks"; + title = "Applications"; + groups = [ + { + title = "Comunication"; + links = [ + { + title = "Outlook"; + url = "https://outlook.office.com"; + icon = "si:microsoftoutlook"; + same-tab = true; + } + { + title = "Teams"; + url = "https://teams.microsoft.com"; + icon = "si:microsoftteams"; + same-tab = true; + } + { + title = "Slack"; + url = "https://slack.com"; + icon = "si:slack"; + same-tab = true; + } + { + title = "Linear"; + url = "https://linear.app"; + icon = "si:linear"; + same-tab = true; + } + ]; + } + { + title = "Infra"; + links = [ + { + title = "Grafana"; + url = "\${URL_GRAFANA}"; + icon = "si:grafana"; + same-tab = true; + } + { + title = "Scaleway"; + url = "https://console.scaleway.com"; + icon = "si:scaleway"; + same-tab = true; + } + { + title = "Growthbook"; + url = "https://app.growthbook.io"; + icon = "mdi:ab-testing"; + same-tab = true; + } + { + title = "Metabase"; + url = "\${URL_METABASE}"; + icon = "si:metabase"; + same-tab = true; + } + { + title = "Dagster"; + url = "https://ao.eu.dagster.cloud"; + icon = "mdi:format-list-checks"; + same-tab = true; + } + ]; + } + { + title = "Development"; + links = [ + { + title = "GitHub"; + url = "https://github.com"; + icon = "si:github"; + same-tab = true; + } + { + title = "Copilot"; + url = "https://github.com/copilot"; + icon = "si:githubcopilot"; + same-tab = true; + } + { + title = "ArgoCD"; + url = "\${URL_ARGOCD}"; + icon = "si:argo"; + same-tab = true; + } + { + title = "ArgoCD (Dev)"; + url = "\${URL_ARGOCD_DEV}"; + icon = "si:argo"; + same-tab = true; + } + ]; + } + ]; + } + { + type = "split-column"; + widgets = [ + { + type = "hacker-news"; + collapse-after = 10; + } + { + type = "rss"; + collapse-after = 10; + title-url = "https://www.inoreader.com/all_articles"; + feeds = [ + { + title = "Inoreader"; + url = "https://www.inoreader.com/stream/user/1004648594/tag/all-articles"; + } + ]; + } + ]; + } + ]; + } + ]; + } + ]; + }; + }; + + services.oauth2-proxy.nginx.virtualHosts."${domain}".allowed_groups = ["default"]; + + services.nginx.virtualHosts."${domain}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString port}"; + }; + locations."= /custom.css" = { + alias = customCss; + extraConfig = '' + add_header Content-Type text/css; + ''; + }; + }; +}) diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index 0891f1e..d889cff 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -58,7 +58,7 @@ in { ]; settings = { - "browser.startup.homepage" = "https://flame.nickolaj.com"; + "browser.startup.homepage" = "https://glance.nickolaj.com"; }; }; }; diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix index eb585f2..ac5d20a 100644 --- a/modules/programs/vscode.nix +++ b/modules/programs/vscode.nix @@ -47,7 +47,6 @@ in { "editor.formatOnPaste" = true; "editor.bracketPairColorization.enabled" = true; "editor.guides.bracketPairs" = "active"; - "editor.smoothScrolling" = true; "editor.cursorSmoothCaretAnimation" = "on"; "editor.stickyScroll.enabled" = true; "editor.inlayHints.enabled" = "onUnlessPressed"; diff --git a/secrets/hosts/homelab/.rekey/f7207c9cc16945ae068ce6fc68516e9f-glance-env.age b/secrets/hosts/homelab/.rekey/f7207c9cc16945ae068ce6fc68516e9f-glance-env.age new file mode 100644 index 0000000..62366d4 --- /dev/null +++ b/secrets/hosts/homelab/.rekey/f7207c9cc16945ae068ce6fc68516e9f-glance-env.age @@ -0,0 +1,7 @@ +age-encryption.org/v1 +-> ssh-ed25519 uxq+Zw ESRKUw0kjkckQNDqa86CUfUmXbjKbJN+z5FiiSYj+RU +jCXaB/T6MybWvBdxYZNZZRPvYf5h5M2wkoIVyBViEqM +-> ^k[-grease i$ gpSv< o`gCT fXR;NS# +Hcvc16B32wDPtMDHVxHOoB5BTVIhJC8 +--- Aam7rndrR0zZgJXRnIWe+iDQ3H6D5BG89dMpZxBImYA +á1Smí¾Ë÷Œ:ôJéÒ¹N2R€üþâ©ÑPÊ’‚R4€J¼ºçëý#ÁƒÞqu1†u3ñYü°pŒÝÝÑLÂL6$Ê{cZ0€Âi‹ë~"š%kò)¨+Q€:ãëø¬GR”óBÑtÒ/I(²*̰/ì7ݧÐß·[Œ™* z±íSÀÆ£Úºþc%îlm§÷"ì$ïJ²m7²›rÁë O±êÄH+ð®‡e I=•óYí×LØÊ¡„Í™¿÷ç‹_úßâòû¨Û_Çv¾–¸íè"ßcØzÐÔsãŒ3.;À°gð€¥Á"®ŽOjšÞÞë¤éõ©}()OÁ‡ºRa§®Qžõñ›«ï—ÈR^_­