Compare commits

...

10 commits

Author SHA1 Message Date
356362a6e1 fix(panam): update forgejo for sqlite3 and set SSH_DOMAIN to panam.local 2026-04-10 14:30:24 +10:00
dc92d5cb97 Change sqlite to sqlite3
Didn't compile before.
2026-04-09 22:19:08 +10:00
3b56a51634 feat: add panam host for forgejo instance 2026-04-09 21:54:25 +10:00
2af088e966 Add update script 2026-04-09 21:51:55 +10:00
6551b6cf87 Remove debug text 2026-04-09 20:12:33 +10:00
b082b02db3 Add claude monitor 2026-04-09 20:12:23 +10:00
37f2fdf9d4 Remove locutus for now
Git server is down.
2026-04-09 20:11:23 +10:00
72f4b407c3 Add zk no neovim 2026-04-09 20:11:06 +10:00
77ec529eee Update lock file 2026-04-09 20:09:58 +10:00
394e4415d3 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 <noreply@anthropic.com>
2026-04-09 18:24:59 +10:00
13 changed files with 139 additions and 96 deletions

View file

@ -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", "<leader>zn", "<cmd>ZkNew { title = vim.fn.input('Title: ') }<cr>", opts)
-- new note in inbox (no title needed)
vim.keymap.set("n", "<leader>zi", "<cmd>ZkNew { dir = 'inbox' }<cr>", opts)
-- search notes by title/filename
vim.keymap.set("n", "<leader>zf", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", opts)
-- search notes by content (full text)
vim.keymap.set("n", "<leader>zs", "<cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<cr>", opts)
-- search tags
vim.keymap.set("n", "<leader>zt", "<cmd>ZkTags<cr>", opts)
-- insert a link to another note
vim.keymap.set("n", "<leader>zl", "<cmd>ZkInsertLink<cr>", opts)
end,
},
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the

View file

@ -9,7 +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
@ -39,6 +40,7 @@ in
spotify
unstable.gemini-cli
unstable.claude-code
unstable.claude-monitor
foliate

View file

@ -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}% ";

113
flake.lock generated
View file

@ -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",

View file

@ -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:
@ -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...
};
};

View file

@ -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";

View file

@ -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

View file

@ -53,6 +53,7 @@
# Enable networking
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
# Enable CUPS to print documents.
services.printing.enable = true;

View file

@ -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";
};
};
}

View file

@ -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";
}

33
hosts/panam/forgejo.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
services.forgejo = {
enable = true;
database.type = "sqlite3";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.figtree.dev";
ROOT_URL = "https://git.figtree.dev/";
SSH_DOMAIN = "panam.local";
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
'';
}

View file

@ -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:

5
update.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
nix flake update
sudo -v && sudo nixos-rebuild switch --flake . |& nom