diff --git a/README.md b/README.md index e45c004..13e63a5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ In case you are not familiar with nix/nixos, this is a collection of configurati ## Features this repository includes: - Sets up all the apps I use — including git, neovim, fish, tmux, starship, hyprland, anyrun, discord, zathura, wezterm & much more. -- Sets up my entire homelab — including zfs-based [impermanence](https://grahamc.com/blog/erase-your-darlings), automatic let's-encrypt certificates, tailscale, syncthing, vaultwarden, whoogle, pounce, calico, smos, intray & more. +- Sets up my entire homelab — including zfs-based [impermanence](https://grahamc.com/blog/erase-your-darlings), automatic let's-encrypt certificates, tailscale, syncthing, vaultwarden, whoogle, pounce, calico, smos, intray, actual & more. - Consistent base16 theming using [stylix](https://github.com/danth/stylix) - Declarative secret management using [sops-nix](https://github.com/Mic92/sops-nix) @@ -98,7 +98,7 @@ Here's some things you might want to check out: - [Ranger](https://github.com/ranger/ranger) — file manager - [Catgirl](https://git.causal.agency/catgirl/about/) — irc client - Self management: - - [Smos](https://github.com/NorfairKing/smos) — selfhosted comprehensive self-management System + - [Smos](https://github.com/NorfairKing/smos) — selfhosted comprehensive self-management system - [Intray](https://github.com/NorfairKing/intray) — selfhosted GTD capture tool ### Services @@ -109,8 +109,9 @@ Most services are served over [tailscale](https://tailscale.com/), using certifi - [Whoogle](https://github.com/benbusby/whoogle-search#manual-docker) — search engine - [Pounce](https://git.causal.agency/pounce/about/) & [calico](https://git.causal.agency/pounce/about/calico.1) — irc bouncer - [Vaultwarden](https://github.com/dani-garcia/vaultwarden/) — password manager -- [Smos](https://github.com/NorfairKing/smos) — a comprehensive self-management System. +- [Smos](https://github.com/NorfairKing/smos) — a comprehensive self-management system. - [Intray](https://github.com/NorfairKing/intray) — GTD capture tool. +- [Actual](https://actualbudget.org/) — budgeting tool. ## Hall of fame diff --git a/common/icons/actual.png b/common/icons/actual.png new file mode 100644 index 0000000..fe497b1 Binary files /dev/null and b/common/icons/actual.png differ diff --git a/common/icons/bitwarden.png b/common/icons/bitwarden.png new file mode 100644 index 0000000..b43289b Binary files /dev/null and b/common/icons/bitwarden.png differ diff --git a/home/features/desktop/firefox/icons/desmos.png b/common/icons/desmos.png similarity index 100% rename from home/features/desktop/firefox/icons/desmos.png rename to common/icons/desmos.png diff --git a/home/features/desktop/firefox/icons/monkeytype.png b/common/icons/monkeytype.png similarity index 100% rename from home/features/desktop/firefox/icons/monkeytype.png rename to common/icons/monkeytype.png diff --git a/home/features/desktop/firefox/icons/syncthing.png b/common/icons/syncthing.png similarity index 100% rename from home/features/desktop/firefox/icons/syncthing.png rename to common/icons/syncthing.png diff --git a/common/icons/whoogle.webp b/common/icons/whoogle.webp new file mode 100644 index 0000000..eaa3db9 Binary files /dev/null and b/common/icons/whoogle.webp differ diff --git a/home/features/desktop/firefox/default.nix b/home/features/desktop/firefox/default.nix index 79184fd..0ec4603 100644 --- a/home/features/desktop/firefox/default.nix +++ b/home/features/desktop/firefox/default.nix @@ -195,6 +195,7 @@ in url = "https://search.moonythm.dev/search"; param = "q"; aliases = [ "@m" "@moonythm" ]; + icon = ../../../../common/icons/whoogle.webp; }; "Google".metaData.alias = "@g"; @@ -282,7 +283,7 @@ in # {{{ Desmos desmos = { url = "https://www.desmos.com/calculator"; - icon = ./icons/desmos.png; + icon = ../../../../common/icons/desmos.png; displayName = "Desmos"; id = 1; }; @@ -290,7 +291,7 @@ in # {{{ Monkey type monkey-type = { url = "https://monkeytype.com/"; - icon = ./icons/monkeytype.png; + icon = ../../../../common/icons/monkeytype.png; displayName = "Monkeytype"; id = 2; }; @@ -298,7 +299,7 @@ in # {{{ Syncthing syncthing = { url = "http://localhost:8384/"; - icon = ./icons/syncthing.png; + icon = ../../../../common/icons/syncthing.png; displayName = "Syncthing"; id = 3; }; diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index 09b6940..358a535 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -11,6 +11,7 @@ ./services/smos.nix ./services/vaultwarden.nix ./services/actual.nix + ./services/homer.nix ./services/zfs.nix ./filesystems ./hardware diff --git a/hosts/nixos/lapetus/services/homer.nix b/hosts/nixos/lapetus/services/homer.nix new file mode 100644 index 0000000..414e63f --- /dev/null +++ b/hosts/nixos/lapetus/services/homer.nix @@ -0,0 +1,90 @@ +{ pkgs, config, ... }: +let + colors = with config.lib.stylix.scheme.withHashtag; { + highlight-primary = base0A; + highlight-secondary = base09; + highlight-hover = base08; + text-title = base00; + text-subtitle = base00; + text = base05; + link = base08; + background = base00; + card-background = base01; + }; + + fa = name: "fas fa-${name}"; + icon = file: ../../../../common/icons/${file}; +in +{ + services.nginx.virtualHosts."dashboard.moonythm.dev" = { + enableACME = true; + acmeRoot = null; + forceSSL = true; + root = pkgs.homer.withAssets { + config = { + title = "✨ The celestial citadel ✨"; + subtitle = "The home for my homelab :3"; + + header = false; + footer = false; + connectivityCheck = true; + + colors.light = colors; + colors.dark = colors; + + services = [ + { + name = "Pillars"; + icon = fa "toolbox"; + items = [ + { + name = "Vaultwarden"; + subtitle = "Password manager"; + logo = icon "bitwarden.png"; + url = "warden.moonythm.dev"; + keywords = "pass"; + } + { + name = "Syncthing"; + subtitle = "File synchronization"; + logo = icon "syncthing.png"; + url = "syncthing.lapetus.moonythm.dev"; + } + { + name = "Whoogle"; + subtitle = "Search engine"; + logo = icon "woogle.webp"; + url = "search.moonythm.dev"; + keywords = "search google"; + } + ]; + } + { + name = "Self management"; + icon = fa "superpowers"; + items = [ + { + name = "Intray"; + subtitle = "GTD capture tool"; + icon = fa "cubes-stacked"; + url = "intray.moonythm.dev"; + } + { + name = "Smos"; + subtitle = "A comprehensive self-management system."; + icon = fa "list"; + url = "smos.moonythm.dev"; + } + { + name = "Actual"; + subtitle = "Budgeting tool"; + logo = icon "actual.png"; + url = "actual.moonythm.dev"; + } + ]; + } + ]; + }; + }; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 5deb8fd..372bcff 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,7 @@ let plymouthThemes = pkgs.callPackage (import ./plymouth-themes.nix) { }; in { # example = pkgs.callPackage (import ./example.nix) {}; vimclip = pkgs.callPackage (import ./vimclip.nix) { }; + homer = pkgs.callPackage (import ./homer.nix) { }; plymouthThemeCutsAlt = plymouthThemes.cuts_alt; } diff --git a/pkgs/homer.nix b/pkgs/homer.nix new file mode 100644 index 0000000..9872bc7 --- /dev/null +++ b/pkgs/homer.nix @@ -0,0 +1,37 @@ +{ lib, fetchzip, writeTextFile, runCommandLocal, symlinkJoin }: + +let + homer = fetchzip rec { + pname = "homer"; + version = "24.02.1"; + url = + "https://github.com/bastienwirtz/${pname}/releases/download/v${version}/${pname}.zip"; + hash = "sha256-McMJuZ84B3BlGHLQf+/ttRe5xAzQuR6qHrH8IjGys2Q="; + stripRoot = false; + + passthru = { + withAssets = { name ? null, config, extraAssets ? [ ] }: + let nameSuffix = lib.optionalString (name != null) "-${name}"; + in + symlinkJoin { + name = "homer-root${nameSuffix}"; + paths = [ + homer + (writeTextFile { + name = "homer-configuration${nameSuffix}"; + text = builtins.toJSON config; + destination = "/assets/config.yml"; + }) + ] ++ lib.optional (extraAssets != [ ]) + (runCommandLocal "homer-assets${nameSuffix}" { } + (builtins.concatStringsSep "\n" (map + (asset: '' + mkdir -p $out/assets/${dirOf asset} + ln -s ${asset} $out/assets/${asset} + '') + extraAssets))); + }; + }; + }; +in +homer