From 698d8ed7dbb692ce0b963ae836f7ac24499d6363 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Mon, 30 Mar 2026 21:51:28 +1000 Subject: [PATCH 01/13] Waybar to own file, fix icons, add colour file --- alex/colours/catppuchin-mocha.nix | 17 +++ alex/sway.nix | 221 ++--------------------------- alex/waybar.nix | 224 ++++++++++++++++++++++++++++++ 3 files changed, 250 insertions(+), 212 deletions(-) create mode 100644 alex/colours/catppuchin-mocha.nix create mode 100644 alex/waybar.nix diff --git a/alex/colours/catppuchin-mocha.nix b/alex/colours/catppuchin-mocha.nix new file mode 100644 index 0000000..1ab7898 --- /dev/null +++ b/alex/colours/catppuchin-mocha.nix @@ -0,0 +1,17 @@ +{ + # Catppuccin Mocha Palette + base = "#1e1e2e"; + mantle = "#181825"; + surface0 = "#313244"; + surface1 = "#45475a"; + text = "#cdd6f4"; + lavender = "#b4befe"; + blue = "#89b4fa"; + sapphire = "#74c7ec"; + red = "#f38ba8"; + peach = "#fab387"; + yellow = "#f9e2af"; + green = "#a6e3a1"; + mauve = "#cba6f7"; + overlay0 = "#6c7086"; +} diff --git a/alex/sway.nix b/alex/sway.nix index c1f54ae..fc7b31e 100644 --- a/alex/sway.nix +++ b/alex/sway.nix @@ -18,6 +18,10 @@ let overlay0 = "#6c7086"; in { + imports = [ + ./waybar.nix + ]; + home.packages = with pkgs; [ swaybg swayidle @@ -64,7 +68,7 @@ in line-clear-color = base; line-wrong-color = base; bs-hl-color = red; - grace = 2; + grace = 6; grace-no-mouse = true; grace-no-touch = true; datestr = "%a, %B %e"; @@ -154,6 +158,7 @@ in keybindings = let modifier = "Mod4"; in lib.mkOptionDefault { + "${modifier}+Caps_Lock" = "input * xkb_switch_layout next"; "${modifier}+Return" = "exec wezterm"; "${modifier}+d" = "exec fuzzel"; "${modifier}+space" = "floating toggle"; @@ -212,7 +217,8 @@ in services.swayidle = let - lock = "${pkgs.swaylock-effects}/bin/swaylock --daemonize"; + lock = "${pkgs.swaylock-effects}/bin/swaylock -f"; + lockNow = "${pkgs.swaylock-effects}/bin/swaylock -f --grace 0"; # modify "display" function based on your window manager # Sway display = status: "${pkgs.sway}/bin/swaymsg 'output * power ${status}'"; @@ -244,7 +250,7 @@ in { event = "before-sleep"; # adding duplicated entries for the same event may not work - command = (display "off") + "; " + lock; + command = lockNow + "; " + (display "off"); } { event = "after-resume"; @@ -286,213 +292,4 @@ in }; }; }; - - programs.waybar = { - enable = true; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 30; - margin-top = 5; - margin-left = 10; - margin-right = 10; - spacing = 4; - - modules-left = [ "sway/workspaces" "sway/mode" ]; - modules-center = [ "clock" ]; - modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ]; - - "sway/workspaces" = { - disable-scroll = true; - all-outputs = true; - }; - - "clock" = { - format = "{:%a %d %b %H:%M:%S}"; - tooltip-format = "{:%Y %B}\n{calendar}"; - interval = 1; - }; - - "cpu" = { - format = "{usage}% "; - }; - - "memory" = { - format = "{}% "; - tooltip-format = "RAM: {used}GiB / {total}GiB ({percentage}%)\nSwap: {swapUsed}GiB / {swapTotal}GiB ({swapPercentage}%)"; - }; - - "battery" = { - states = { - warning = 30; - critical = 15; - }; - format = "{capacity}% {icon}"; - format-charging = "{capacity}% "; - format-plugged = "{capacity}% "; - format-icons = ["" "" "" "" ""]; - }; - - "network" = { - format-wifi = "{essid} ({signalStrength}%) "; - format-ethernet = "{ipaddr}/{cidr} 󰈀"; - tooltip-format = "{ifname} via {gwaddr} 󱂇"; - format-linked = "{ifname} (No IP) 󰈀"; - format-disconnected = "Disconnected ⚠"; - format-alt = "{ifname}: {ipaddr}/{cidr}"; - }; - - "pulseaudio" = { - format = "{volume}% {icon} {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = "{volume}% "; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - on-click = "pavucontrol"; - }; - }; - }; - - style = '' - * { - font-family: "JetBrainsMono Nerd Font"; - font-size: 13px; - } - - window#waybar { - background-color: transparent; - color: ${text}; - transition-property: background-color; - transition-duration: .5s; - } - - window#waybar > box { - background-color: ${base}; - border-radius: 15px; - opacity: 1.0; - padding: 0 3px 0 13px; - } - - button { - box-shadow: inset 0 -3px transparent; - border: none; - border-radius: 0; - } - - button:hover { - background: inherit; - box-shadow: inset 0 -3px ${text}; - } - - #workspaces button { - padding: 0 5px; - background-color: transparent; - color: ${text}; - } - - #workspaces button:hover { - background: rgba(0, 0, 0, 0.2); - } - - #workspaces button.focused { - background-color: ${surface1}; - box-shadow: inset 0 -3px ${lavender}; - } - - #workspaces button.urgent { - background-color: ${red}; - } - - #mode { - background-color: ${surface0}; - border-bottom: 3px solid ${text}; - } - - #clock, - #battery, - #cpu, - #memory, - #disk, - #temperature, - #backlight, - #network, - #pulseaudio, - #custom-media, - #tray, - #mode, - #idle_inhibitor, - #mpd { - padding: 0 10px; - color: ${text}; - background-color: ${surface0}; - border-radius: 10px; - margin: 5px 2px; - } - - #clock { - background-color: ${mauve}; - color: ${base}; - } - - #battery { - background-color: ${green}; - color: ${base}; - } - - #battery.charging, #battery.plugged { - color: ${base}; - background-color: ${green}; - } - - #battery.critical:not(.charging) { - background-color: ${red}; - color: ${text}; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #cpu { - background-color: ${peach}; - color: ${base}; - } - - #memory { - background-color: ${yellow}; - color: ${base}; - } - - #network { - background-color: ${sapphire}; - color: ${base}; - } - - #pulseaudio { - background-color: ${blue}; - color: ${base}; - } - - #pulseaudio.muted { - background-color: ${overlay0}; - color: ${text}; - } - - #tray { - background-color: ${surface0}; - } - ''; - }; } diff --git a/alex/waybar.nix b/alex/waybar.nix new file mode 100644 index 0000000..1932516 --- /dev/null +++ b/alex/waybar.nix @@ -0,0 +1,224 @@ +{ config, pkgs, lib, ... }: +let + palette = import ./colours/catppuchin-mocha.nix; +in +{ + programs.waybar = { + enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 30; + margin-top = 10; + margin-bottom = 0; + margin-left = 10; + margin-right = 10; + spacing = 4; + + modules-left = if (config.programs.niri or {}).enable or false then + [ "niri/workspaces" ] + else + [ "sway/workspaces" "sway/mode" ]; + modules-center = [ "clock" ]; + modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ]; + + "sway/workspaces" = { + disable-scroll = true; + all-outputs = true; + }; + + "niri/workspaces" = { + disable-scroll = true; + all-outputs = true; + }; + + "clock" = { + format = "{:%a %d %b %H:%M:%S}"; + tooltip-format = "{:%Y %B}\n{calendar}"; + interval = 1; + }; + + "cpu" = { + format = "{usage}% "; + }; + + "memory" = { + format = "{}% "; + tooltip-format = "RAM: {used}GiB / {total}GiB ({percentage}%)\nSwap: {swapUsed}GiB / {swapTotal}GiB ({swapPercentage}%)"; + }; + + "battery" = { + states = { + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon} icon"; + format-full = "{capacity}% {icon} full"; + format-charging = "{capacity}%  charged"; + format-plugged = "{capacity}% "; + format-icons = ["" "" "" "" ""]; + }; + + "network" = { + format-wifi = "{essid} ({signalStrength}%) "; + format-ethernet = "{ipaddr}/{cidr} 󰈀"; + tooltip-format = "{ifname} via {gwaddr} 󱂇"; + format-linked = "{ifname} (No IP) 󰈀"; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + + "pulseaudio" = { + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = "{volume}% "; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = ["" "" ""]; + }; + on-click = "pavucontrol"; + }; + }; + }; + + style = '' + * { + font-family: "Symbols Nerd Font Mono", "Lilex Nerd Font", "JetBrainsMono Nerd Font"; + font-size: 13px; + } + + window#waybar { + background-color: transparent; + color: ${palette.text}; + transition-property: background-color; + transition-duration: .5s; + } + + window#waybar > box { + background-color: ${palette.base}; + border-radius: 15px; + opacity: 1.0; + padding: 0 3px 0 13px; + } + + button { + box-shadow: inset 0 -3px transparent; + border: none; + border-radius: 0; + } + + button:hover { + background: inherit; + box-shadow: inset 0 -3px ${palette.text}; + } + + #workspaces button { + padding: 0 5px; + background-color: transparent; + color: ${palette.text}; + } + + #workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + } + + #workspaces button.focused { + background-color: ${palette.surface1}; + box-shadow: inset 0 -3px ${palette.lavender}; + } + + #workspaces button.urgent { + background-color: ${palette.red}; + } + + #mode { + background-color: ${palette.surface0}; + border-bottom: 3px solid ${palette.text}; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #network, + #pulseaudio, + #custom-media, + #tray, + #mode, + #idle_inhibitor, + #mpd { + padding: 0 10px; + color: ${palette.text}; + background-color: ${palette.surface0}; + border-radius: 10px; + margin: 5px 2px; + } + + #clock { + background-color: ${palette.mauve}; + color: ${palette.base}; + } + + #battery { + background-color: ${palette.green}; + color: ${palette.base}; + } + + #battery.charging, #battery.plugged { + color: ${palette.base}; + background-color: ${palette.green}; + } + + #battery.critical:not(.charging) { + background-color: ${palette.red}; + color: ${palette.text}; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #cpu { + background-color: ${palette.peach}; + color: ${palette.base}; + } + + #memory { + background-color: ${palette.yellow}; + color: ${palette.base}; + } + + #network { + background-color: ${palette.sapphire}; + color: ${palette.base}; + } + + #pulseaudio { + background-color: ${palette.blue}; + color: ${palette.base}; + } + + #pulseaudio.muted { + background-color: ${palette.overlay0}; + color: ${palette.text}; + } + + #tray { + background-color: ${palette.surface0}; + } + ''; + }; +} From 34a9dcde1fcb9aa4d847ad675853ba99beafd56d Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Mon, 30 Mar 2026 21:52:57 +1000 Subject: [PATCH 02/13] Add more nerdfonts --- hosts/modules/desktop.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/modules/desktop.nix b/hosts/modules/desktop.nix index f3c2443..2d46015 100644 --- a/hosts/modules/desktop.nix +++ b/hosts/modules/desktop.nix @@ -40,6 +40,7 @@ noto-fonts-cjk-sans noto-fonts-cjk-serif nerd-fonts.lilex + nerd-fonts.symbols-only fira-code ]; }; From 587fad0769f72662642b58a0a228077c8d7b0a89 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Mon, 30 Mar 2026 22:09:30 +1000 Subject: [PATCH 03/13] Update lock file --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 360504f..bd25d6e 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1773264488, - "narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=", + "lastModified": 1774559029, + "narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=", "owner": "nix-community", "repo": "home-manager", - "rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c", + "rev": "a0bb0d11514f92b639514220114ac8063c72d0a3", "type": "github" }, "original": { @@ -76,11 +76,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1773282481, - "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", "type": "github" }, "original": { @@ -92,11 +92,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1773375660, - "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=", + "lastModified": 1774388614, + "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", + "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "type": "github" }, "original": { From 394e4415d382c45ac6a7113aa1102d22a23b62f3 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 18:24:59 +1000 Subject: [PATCH 04/13] Fix intermittent mDNS resolution failures Switch NetworkManager WiFi backend to iwd to resolve repeated wpa_supplicant disconnects caused by nl80211 send_event_marker incompatibility with iwlwifi. Each disconnect was triggering avahi SIGHUP reloads, causing .local name resolution to fail for several minutes at a time. Also disable WiFi power save in TLP and enable IPv6 mDNS resolution via NSS (nssmdns6) for hosts that only advertise IPv6 addresses. Co-Authored-By: Claude Sonnet 4.6 --- hosts/modules/base.nix | 1 + hosts/modules/desktop.nix | 1 + hosts/modules/laptop.nix | 3 +++ readme.md | 10 ++++++++++ 4 files changed, 15 insertions(+) diff --git a/hosts/modules/base.nix b/hosts/modules/base.nix index 46a9f37..ed49e4b 100644 --- a/hosts/modules/base.nix +++ b/hosts/modules/base.nix @@ -110,6 +110,7 @@ services.avahi = { enable = true; nssmdns4 = true; # Enables Avahi for name service lookups (e.g., in /etc/nsswitch.conf) + nssmdns6 = true; # Also resolve IPv6 mDNS addresses via NSS publish = { enable = true; addresses = true; # Publish your laptop's IP addresses diff --git a/hosts/modules/desktop.nix b/hosts/modules/desktop.nix index 2d46015..f4e5913 100644 --- a/hosts/modules/desktop.nix +++ b/hosts/modules/desktop.nix @@ -53,6 +53,7 @@ # Enable networking networking.networkmanager.enable = true; + networking.networkmanager.wifi.backend = "iwd"; # Enable CUPS to print documents. services.printing.enable = true; diff --git a/hosts/modules/laptop.nix b/hosts/modules/laptop.nix index a7dfb4b..d7dd01b 100644 --- a/hosts/modules/laptop.nix +++ b/hosts/modules/laptop.nix @@ -22,6 +22,9 @@ # START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge STOP_CHARGE_THRESH_BAT0 = 81; # 80 and above it stops charging + WIFI_PWR_ON_AC = "off"; + WIFI_PWR_ON_BAT = "off"; + }; }; } diff --git a/readme.md b/readme.md index 12d38f0..e90ed4c 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,16 @@ From within this directory: sudo nixos-rebuild switch --flake . ``` +# WiFi + +NetworkManager is enabled. Use the terminal UI to connect: + +``` +nmtui +``` + +Select "Activate a connection", pick your network, and enter the password. + # Update and deploy From within this directory: From 77ec529eee73ceb7f358ddcb80340700d1838387 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:09:58 +1000 Subject: [PATCH 05/13] Update lock file --- flake.lock | 113 +++++++++++------------------------------------------ 1 file changed, 22 insertions(+), 91 deletions(-) diff --git a/flake.lock b/flake.lock index bd25d6e..aaa00b0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -25,11 +7,11 @@ ] }, "locked": { - "lastModified": 1774559029, - "narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=", + "lastModified": 1775425411, + "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", "owner": "nix-community", "repo": "home-manager", - "rev": "a0bb0d11514f92b639514220114ac8063c72d0a3", + "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", "type": "github" }, "original": { @@ -39,64 +21,13 @@ "type": "github" } }, - "locutus": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1751595811, - "narHash": "sha256-/lwWL8a9lIgB4YgM/f2TgOsTGe/OxYCrGYj/JGAy1+E=", - "ref": "refs/heads/main", - "rev": "35e72ae715021dfa261fc2b065dd2e13757de4e0", - "revCount": 4, - "type": "git", - "url": "https://git.figtree.dev/alex/locutus" - }, - "original": { - "type": "git", - "url": "https://git.figtree.dev/alex/locutus" - } - }, "nixpkgs": { "locked": { - "lastModified": 1750506804, - "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", + "lastModified": 1775595990, + "narHash": "sha256-OEf7YqhF9IjJFYZJyuhAypgU+VsRB5lD4DuiMws5Ltc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4206c4cb56751df534751b058295ea61357bbbaa", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1774709303, - "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1774388614, - "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", + "rev": "4e92bbcdb030f3b4782be4751dc08e6b6cb6ccf2", "type": "github" }, "original": { @@ -106,28 +37,28 @@ "type": "github" } }, - "root": { - "inputs": { - "home-manager": "home-manager", - "locutus": "locutus", - "nixpkgs": "nixpkgs_2", - "nixpkgs-unstable": "nixpkgs-unstable" - } - }, - "systems": { + "nixpkgs-unstable": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "lastModified": 1775423009, + "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9", "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } } }, "root": "root", From 72f4b407c3aa472dce50c0acaf6063bb5ff2c1ff Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:11:06 +1000 Subject: [PATCH 06/13] Add zk no neovim --- alex/nvim/init.lua | 25 ++++++++++++++++++++++++- alex/personal.nix | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/alex/nvim/init.lua b/alex/nvim/init.lua index f01875c..12ae617 100644 --- a/alex/nvim/init.lua +++ b/alex/nvim/init.lua @@ -987,7 +987,30 @@ require("lazy").setup({ } end, dependencies = { {"nvim-tree/nvim-web-devicons"}} - } + }, + { + "zk-org/zk-nvim", + config = function() + require("zk").setup({ + picker = "telescope", + }) + + local opts = { noremap = true, silent = true } + + -- new note in the current group/dir + vim.keymap.set("n", "zn", "ZkNew { title = vim.fn.input('Title: ') }", opts) + -- new note in inbox (no title needed) + vim.keymap.set("n", "zi", "ZkNew { dir = 'inbox' }", opts) + -- search notes by title/filename + vim.keymap.set("n", "zf", "ZkNotes { sort = { 'modified' } }", opts) + -- search notes by content (full text) + vim.keymap.set("n", "zs", "ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }", opts) + -- search tags + vim.keymap.set("n", "zt", "ZkTags", opts) + -- insert a link to another note + vim.keymap.set("n", "zl", "ZkInsertLink", opts) + end, + }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/alex/personal.nix b/alex/personal.nix index 2ff953a..8d5f035 100644 --- a/alex/personal.nix +++ b/alex/personal.nix @@ -10,6 +10,7 @@ in home.packages = with pkgs; [ foliate inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default + zk # jrnl # disable tests for now until the bug is fixed # https://github.com/NixOS/nixpkgs/issues/476190 From 37f2fdf9d442c40ddd04f7d5f8ead41562c23dfe Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:11:23 +1000 Subject: [PATCH 07/13] Remove locutus for now Git server is down. --- alex/personal.nix | 2 +- flake.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alex/personal.nix b/alex/personal.nix index 8d5f035..21108af 100644 --- a/alex/personal.nix +++ b/alex/personal.nix @@ -9,8 +9,8 @@ in { home.packages = with pkgs; [ foliate - inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default zk + # inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default # jrnl # disable tests for now until the bug is fixed # https://github.com/NixOS/nixpkgs/issues/476190 diff --git a/flake.nix b/flake.nix index 9021253..fbb2c7f 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ # to avoid problems caused by different versions of nixpkgs. inputs.nixpkgs.follows = "nixpkgs"; }; - locutus.url = "git+https://git.figtree.dev/alex/locutus"; + # locutus.url = "git+https://git.figtree.dev/alex/locutus"; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: From b082b02db37dcb6876d6ed08d982b11d69466f17 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:12:23 +1000 Subject: [PATCH 08/13] Add claude monitor --- alex/personal.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/alex/personal.nix b/alex/personal.nix index 21108af..0ca8348 100644 --- a/alex/personal.nix +++ b/alex/personal.nix @@ -40,6 +40,7 @@ in spotify unstable.gemini-cli unstable.claude-code + unstable.claude-monitor foliate From 6551b6cf87509602694f542b902a22ba99aa013a Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 20:12:33 +1000 Subject: [PATCH 09/13] Remove debug text --- alex/waybar.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alex/waybar.nix b/alex/waybar.nix index 1932516..ca0f882 100644 --- a/alex/waybar.nix +++ b/alex/waybar.nix @@ -53,7 +53,7 @@ in warning = 30; critical = 15; }; - format = "{capacity}% {icon} icon"; + format = "{capacity}% {icon}"; format-full = "{capacity}% {icon} full"; format-charging = "{capacity}%  charged"; format-plugged = "{capacity}% "; From 2af088e966848ba08110a7e427e14a236431f0c0 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 21:51:55 +1000 Subject: [PATCH 10/13] Add update script --- update.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 update.sh diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..1932765 --- /dev/null +++ b/update.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e + +nix flake update +sudo -v && sudo nixos-rebuild switch --flake . |& nom From 3b56a516348dab6f7337b28c386bb0163a020c93 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 21:54:25 +1000 Subject: [PATCH 11/13] feat: add panam host for forgejo instance --- flake.nix | 10 ++++++++++ hosts/alt/caddy.nix | 2 +- hosts/panam/configuration.nix | 24 ++++++++++++++++++++++++ hosts/panam/forgejo.nix | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 hosts/panam/configuration.nix create mode 100644 hosts/panam/forgejo.nix diff --git a/flake.nix b/flake.nix index fbb2c7f..6cc5b16 100644 --- a/flake.nix +++ b/flake.nix @@ -79,6 +79,16 @@ (mkHomeManagerConfig {}) ]; }; + + panam = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/panam/configuration.nix + home-manager.nixosModules.home-manager + (mkHomeManagerConfig {}) + ]; + }; # other hosts... }; }; diff --git a/hosts/alt/caddy.nix b/hosts/alt/caddy.nix index e7fb5be..d8fb7de 100644 --- a/hosts/alt/caddy.nix +++ b/hosts/alt/caddy.nix @@ -5,7 +5,7 @@ let "analytics.figtree.dev" = "http://192.168.80.1:3300"; "figtree.dev" = "http://192.168.1.63:8080"; "files.figtree.dev" = "http://192.168.80.4:8080"; - "git.figtree.dev" = "http://192.168.80.2:3000"; + "git.figtree.dev" = "http://192.168.80.8:3000"; "nc.figtree.dev" = "http://192.168.1.62:11000"; "paperless.figtree.dev" = "http://192.168.1.63:8010"; "photos.figtree.dev" = "http://192.168.80.1:2283"; diff --git a/hosts/panam/configuration.nix b/hosts/panam/configuration.nix new file mode 100644 index 0000000..d3663ab --- /dev/null +++ b/hosts/panam/configuration.nix @@ -0,0 +1,24 @@ +{ config, modulesPath, pkgs, inputs, ... }: + +{ + imports = + [ + (modulesPath + "/virtualisation/proxmox-lxc.nix") + ../modules/base.nix + ../modules/server.nix + ./forgejo.nix + ]; + + nix.settings = { sandbox = false; }; + proxmoxLXC = { + manageNetwork = false; + privileged = true; + }; + + networking.hostName = "panam"; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. + system.stateVersion = "25.05"; +} diff --git a/hosts/panam/forgejo.nix b/hosts/panam/forgejo.nix new file mode 100644 index 0000000..624a028 --- /dev/null +++ b/hosts/panam/forgejo.nix @@ -0,0 +1,32 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.services.forgejo; + srv = cfg.settings.server; +in +{ + services.forgejo = { + enable = true; + database.type = "sqlite"; + lfs.enable = true; + settings = { + server = { + DOMAIN = "git.figtree.dev"; + ROOT_URL = "https://git.figtree.dev/"; + HTTP_ADDR = "0.0.0.0"; + HTTP_PORT = 3000; + }; + service.DISABLE_REGISTRATION = true; + }; + }; + + # Open the firewall for Forgejo's HTTP and SSH ports + networking.firewall.allowedTCPPorts = [ 3000 22 ]; + + # Ensure the user 'alex' is an admin in Forgejo if needed + # (Note: Forgejo doesn't allow 'admin' as a username) + systemd.services.forgejo.preStart = '' + # This will fail if the user already exists, hence || true + ${lib.getExe cfg.package} admin user create --admin --email "code@figtree.dev" --username alex --password "changeme123" || true + ''; +} From dc92d5cb972866e7d466f2a25992a4b4ae2decb8 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Thu, 9 Apr 2026 22:19:08 +1000 Subject: [PATCH 12/13] Change sqlite to sqlite3 Didn't compile before. --- hosts/panam/forgejo.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/panam/forgejo.nix b/hosts/panam/forgejo.nix index 624a028..b85bd22 100644 --- a/hosts/panam/forgejo.nix +++ b/hosts/panam/forgejo.nix @@ -7,7 +7,7 @@ in { services.forgejo = { enable = true; - database.type = "sqlite"; + database.type = "sqlite3"; lfs.enable = true; settings = { server = { From 356362a6e120e6a71c05a52f7e6aa78b89ff6faa Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Fri, 10 Apr 2026 14:30:24 +1000 Subject: [PATCH 13/13] fix(panam): update forgejo for sqlite3 and set SSH_DOMAIN to panam.local --- hosts/panam/forgejo.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/panam/forgejo.nix b/hosts/panam/forgejo.nix index b85bd22..ab1df43 100644 --- a/hosts/panam/forgejo.nix +++ b/hosts/panam/forgejo.nix @@ -13,6 +13,7 @@ in server = { DOMAIN = "git.figtree.dev"; ROOT_URL = "https://git.figtree.dev/"; + SSH_DOMAIN = "panam.local"; HTTP_ADDR = "0.0.0.0"; HTTP_PORT = 3000; };