From 6d087c123344a65eb674ec0d1500cd156c9aca37 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 18 Feb 2025 15:14:17 -0600 Subject: [PATCH] Add dashy and update Jellyfin IP address --- hosts/default.nix | 3 +- hosts/genesis/default.nix | 134 ++++++++++++++++++++++++++++-- hosts/genesis/net/hosts | 3 +- hosts/genesis/networking/dhcp.nix | 2 +- hosts/vm-jellyfin/default.nix | 1 + 5 files changed, 131 insertions(+), 12 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 88d3194..acb6923 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -54,7 +54,7 @@ let ] ++ extraMods; }; in -{ +rec { genesis = unstable { name = "genesis"; }; exodus = unstable { name = "exodus"; }; jude = unstable { name = "jude"; }; @@ -65,6 +65,7 @@ in isaiah = unstable { name = "isaiah"; }; vm-jellyfin = vm { name = "vm-jellyfin"; }; + jellyfin = vm-jellyfin; vm-matrix = vm { name = "vm-matrix"; }; iso = unstable { name = "iso"; }; diff --git a/hosts/genesis/default.nix b/hosts/genesis/default.nix index 2998ed1..32c50a4 100644 --- a/hosts/genesis/default.nix +++ b/hosts/genesis/default.nix @@ -2,8 +2,13 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, ... }: +{ config, pkgs, ... }: +let + dashy_port = "8080"; + speedtest_port = "19472"; + uptime_kuma_port = "4000"; +in { imports = [ # Include the results of the hardware scan. @@ -13,8 +18,16 @@ ./networking.nix ]; - greg.home = true; - greg.gnome.enable = false; + greg = { + home = true; + gnome.enable = false; + proxies = { + "speed.home".target = "http://localhost:${speedtest_port}"; + "speedtest.thehellings.lan".target = "http://localhost:${speedtest_port}"; + "dashy.home".target = "http://localhost:${dashy_port}"; + "uptime.home".target = "http://localhost:${uptime_kuma_port}"; + }; + }; # Bootloader. boot.loader.grub = { @@ -31,17 +44,120 @@ # }; #}; - networking.hostName = "genesis"; # Define your hostname. environment.systemPackages = with pkgs; [ awscli2 create_ssl step-ca ]; - virtualisation.oci-containers.containers.speedtest = { - image = "ghcr.io/librespeed/speedtest"; - hostname = "speedtest"; - ports = [ "19472:80" ]; + networking.hostName = "genesis"; # Define your hostname. + + services = { + dashy = { + enable = true; + settings = { + appConfig = { + enableFontAwesome = true; + statusCheck = true; + statusCheckInterval = 20; + theme = "callisto"; + }; + pageInfo = { + description = "Hellings Lab"; + navLinks = [ + { + path = "/"; + title = "Home"; + } + { + path = "http://speed.home"; + title = "Local Speedtest"; + } + ]; + }; + sections = [ + { + name = "Hosting"; + displayData = { + sortBy = "alphabetical"; + rows = 1; + cols = 1; + collapsed = false; + hideForGusts = false; + }; + items = [ + { + title = "Romans"; + description = "Core Proxmox"; + icon = "favicon"; + url = "https://10.42.1.1:8006"; + target = "newtab"; + statusCheckAllowInsecure = true; + } + { + title = "Isaiah"; + description = "Isaiah Proxmox"; + icon = "favicon"; + url = "https://isaiah.thehellings.lan:8006"; + target = "newtab"; + statusCheckAllowInsecure = true; + } + { + title = "Linode"; + icon = "favicon"; + url = "https://login.linode.com/login"; + target = "newtab"; + } + ]; + } + { + name = "Services"; + displayData = { + sortBy = "alphabetical"; + rows = 1; + cols = 1; + collapsed = false; + hideForGusts = false; + }; + items = [ + { + title = "Jellyfin"; + description = "Home Jellyfin Server"; + icon = "favicon"; + url = "http://jellyfin.home"; + target = "newtab"; + } + { + title = "Speedtest"; + description = "Local Speedtest"; + icon = "favicon"; + url = "http://speed.home"; + target = "newtab"; + } + ]; + } + ]; + }; + }; + uptime-kuma = { + enable = true; + settings = { + PORT = uptime_kuma_port; + }; + }; + }; + + virtualisation.oci-containers.containers = { + dashy = { + image = "lissy93/dashy:latest"; + hostname = "dashy"; + ports = [ "${dashy_port}:${dashy_port}" ]; + volumes = [ "${config.services.dashy.finalDrv}/conf.yml:/app/user-data/conf.yml" ]; + }; + speedtest = { + image = "ghcr.io/librespeed/speedtest"; + hostname = "speedtest"; + ports = [ "${speedtest_port}:80" ]; + }; }; - greg.proxies."speedtest.thehellings.lan".target = "http://localhost:19472"; } diff --git a/hosts/genesis/net/hosts b/hosts/genesis/net/hosts index cf55164..82fe167 100644 --- a/hosts/genesis/net/hosts +++ b/hosts/genesis/net/hosts @@ -26,7 +26,7 @@ 100.119.228.115 chronicles.home nas.home chronicles.shire-zebra.ts.net 100.88.91.27 dns.home 100.80.99.48 exodus.home -100.88.91.27 genesis.home smart.home zwave.home nixcache.home gitcache.home +100.88.91.27 genesis.home smart.home zwave.home nixcache.home gitcache.home dashy.home uptime.home speed.home 100.78.226.76 gitlab.home gitlab.shire-zebra.ts.net gitlab.thehellings.lan registry.thehellings.lan git.thehellings.lan 100.68.203.1 hosea.home hosea.shire-zebra.ts.net 100.84.183.79 isaiah.home isaiah.shire-zebra.ts.net @@ -34,6 +34,7 @@ 100.90.74.19 jude.home 100.115.57.8 linode.home 100.65.5.38 matrix.home matrix.shire-zebra.ts.net +100.92.183.94 jellyfin.home # Dev hosts 10.42.101.1 icdm.lan wiki.icdm.lan *.icdm.lan diff --git a/hosts/genesis/networking/dhcp.nix b/hosts/genesis/networking/dhcp.nix index 85e2820..bc3b0aa 100644 --- a/hosts/genesis/networking/dhcp.nix +++ b/hosts/genesis/networking/dhcp.nix @@ -111,7 +111,7 @@ ip-address = "10.42.4.1"; # Dendrite } { - hw-address = "BC:24:11:A2:F3:6A"; + hw-address = "BC:24:11:A2:F3:A6"; ip-address = "10.42.4.2"; # Jellyfin } ]; diff --git a/hosts/vm-jellyfin/default.nix b/hosts/vm-jellyfin/default.nix index 050aaae..bd633f8 100644 --- a/hosts/vm-jellyfin/default.nix +++ b/hosts/vm-jellyfin/default.nix @@ -5,6 +5,7 @@ greg = { proxies."jellyfin.home".target = "http://localhost:8096/"; + proxies."jellyfin.thehellings.lan".target = "http://localhost:8096/"; tailscale.enable = true; };