Compare commits

...

29 Commits

Author SHA1 Message Date
5e17fd7dde merge: accept remote flake.nix 2026-07-04 23:50:01 -04:00
7172c7face fix: update compose submodule to fix hermes user ownership 2026-07-04 23:49:52 -04:00
3778069baf fix: use configureFlags to set PYTHON path for john cross-compile 2026-06-21 15:18:14 -04:00
8ec9ffe6a9 fix: clean john overlay with python3 + preConfigure symlink for cross-compile 2026-06-21 15:15:01 -04:00
16ec40b237 fix: use python3 + preConfigure symlink for john cross-compile (python not in PATH) 2026-06-21 15:12:12 -04:00
3ec8bab25b fix: add python to john nativeBuildInputs for cross-compile (opencl_generate_dynamic_loader.py) 2026-06-21 15:09:53 -04:00
2a4856e447 fix: add python3 to aiov2_ctl buildInputs so patchShebangs fixes the shebang 2026-06-21 15:07:49 -04:00
01f8166529 feat: add uConsole as remote builder for aarch64-linux native builds 2026-06-20 20:04:04 -04:00
84ce9de5ca restore native-build packages in config (wsjtx, fldigi, chirp, sdrpp, gqrx, inspectrum, john, foxtrotgps, viking, gpsbabel, trustedqsl) 2026-06-20 20:02:56 -04:00
14755f1ea6 revert native-build packages — cross-compile still fails for Qt5/gpsbabel/john, install via nix profile instead 2026-06-20 20:01:36 -04:00
f51155823e temp: comment out Qt5 packages (wsjtx, fldigi, sdrpp, gqrx, inspectrum) — cross-compile fails, installed via nix profile instead 2026-06-20 19:59:36 -04:00
73c12abec2 feat: re-integrate native-build packages (wsjtx, fldigi, chirp, sdrpp, gqrx, inspectrum, hashcat, john, foxtrotgps, viking, gpsbabel, trustedqsl) 2026-06-20 19:00:39 -04:00
a97c68fd81 fix: add rtkit and pipewire service for uConsole audio 2026-06-20 18:16:43 -04:00
bf2500dce8 fix: add missing packages (swww, emacs, udiskie, hyprshade) and wallpapers for uConsole 2026-06-20 18:16:00 -04:00
f0fa8ac942 fix: update dotfiles for transform 3 2026-06-20 17:54:16 -04:00
7899bf28f2 fix: sync dotfiles submodule, home.nix paths to hosts/ 2026-06-20 17:51:50 -04:00
282b4bc229 chore: remove stale temp file 2026-06-20 17:50:18 -04:00
905998466c fix: update home.nix host/ paths after dotfiles rename 2026-06-20 17:50:13 -04:00
6c34b92186 fix: update dotfiles submodule for host/ rename 2026-06-20 17:48:15 -04:00
7b3a5802a5 fix: update dotfiles submodule 2026-06-20 17:35:01 -04:00
1ab11b76d6 chore: update dotfiles submodule for per-host 2026-06-20 17:01:59 -04:00
3ce550691c fix: use zsh.initExtra for dotfiles config (no home.file conflict) 2026-06-20 16:25:50 -04:00
256979e6e5 fix: update dotfiles submodule for uConsole keyboard docs 2026-06-20 16:25:21 -04:00
095fa4c200 fix: add .zshrc to home-manager dotfiles 2026-06-20 16:25:06 -04:00
c430427617 fix: update dotfiles submodule for uConsole transform+keyboard 2026-06-20 16:22:20 -04:00
eeb10db5ed fix: define dotfiles as local path in home.nix (via submodule), fix swaync name 2026-06-20 16:03:58 -04:00
60a0bcfdd6 fix: dotfiles path via self (submodule), fix Nix syntax 2026-06-20 16:02:34 -04:00
7827638c5a fix: dotfiles path from submodule, not flake input 2026-06-20 16:01:37 -04:00
ceca908457 fix: replace dotfiles flake input with self.submodules=true (git submodule) 2026-06-20 16:01:00 -04:00
8 changed files with 148 additions and 305 deletions

291
flake.nix
View File

@@ -8,243 +8,46 @@
inputs.darwin.follows = "";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix-rekey = {
url = "github:oddlama/agenix-rekey";
inputs.nixpkgs.follows = "nixpkgs";
};
lix = {
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-uconsole.url = "github:NixOS/nixpkgs/nixos-25.11";
nixos-uconsole = {
url = "github:gortium/nixos-uconsole/pr/dcs-panel-detection";
inputs.nixpkgs.follows = "nixpkgs-uconsole";
inputs.nixos-raspberrypi.follows = "nixos-raspberrypi";
url = "github:nixos-uconsole/nixos-uconsole";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-raspberrypi = {
url = "github:gortium/nixos-raspberrypi/cm5-cross-v1";
inputs.nixpkgs.follows = "nixpkgs-uconsole";
url = "github:nvmd/nixos-raspberrypi/v1.20260517.0";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs-uconsole";
};
dotfiles = {
url = "git+https://code.lazyworkhorse.net/gortium/dotfiles.git";
flake = false;
inputs.nixpkgs.follows = "nixpkgs";
};
self.submodules = true;
};
outputs = { self, nixpkgs, agenix, agenix-rekey, lix
, nixpkgs-uconsole, nixos-uconsole, nixos-raspberrypi, dotfiles
, home-manager
, ... }@inputs:
outputs = { self, nixpkgs, agenix, lix, nixos-uconsole, nixos-raspberrypi, home-manager, ... }@inputs:
let
system = "x86_64-linux";
keys = import ./lib/keys.nix;
paths = {
flake = "/home/gortium/infra";
identities = [
"/home/gortium/.ssh/gortium_ssh_key"
"/etc/ssh/ssh_host_ed25519_key"
"/root/.age/bootstrap.key" ];
};
overlays = [ agenix.overlays.default (import ./overlays/reticulum.nix) ];
paths = import ./lib/paths.nix;
overlays = [
agenix.overlays.default
(import ./overlays/reticulum.nix) ];
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
config.permittedInsecurePackages = [ "openclaw-2026.3.12" ];
config.permittedInsecurePackages = [
"openclaw-2026.3.12"
];
};
devShell = import ./shells/nix_dev.nix {
inherit pkgs system agenix;
};
##############################################################################
# CROSS-COMPILE WORKAROUNDS — packages that fail aarch64 cross-compile
#
# These packages need NATIVE COMPILATION on the uConsole itself (aarch64).
# They cannot cross-compile from x86_64 for various reasons listed below.
# We work around them in the overlay until we set up distributed builds
# with the uConsole as a native aarch64 builder.
#
# ==== Cross-compile failures ====
#
# libcamera / libcamera-rpi / libpisp:
# meta.platforms excludes aarch64. pipewire hard-depends on them in nixos-25.11.
# Fix: empty meta.platforms + strip from pipewire buildInputs.
#
# gjs:
# Need native display (GTK3/4 tests) for cross-compile configure.
# Fix: meson -Dskip_gtk_tests=true.
#
# hyprland:
# Qt6Quick missing from aarch64 qtdeclarative, breaks hyprland-qt-support.
# Fix: wrapRuntimeDeps=false (Qt UI components disabled, WM still works).
#
# boost.mpi:
# Boost.Build has no b2 architecture alternatives for ARM.
# Fix: useMpi=false.
#
# perl-ldap (perlPackages.perlldap):
# Module::Install requires Perl dynamic loading (Fcntl) which is
# unavailable in cross-compiled Perl.
# Fix: stripped from john.s propagatedBuildInputs.
#
# john (John the Ripper):
# Indirectly affected — depends on perl-ldap for perl utility scripts.
# Fix: perl-ldap stripped from propagatedBuildInputs (john still works,
# just loses sha-dump.pl etc. LDAP support).
#
# gss (GNU Generic Security Service):
# autogen.sh fails cross-compile. Pulled by mailutils → emacs-pgtk.
# Fix: emacs withMailutils=false.
#
# emacs-pgtk:
# Indirectly affected — depends on mailutils which depends on gss.
# Fix: withMailutils=false (no mail/IMAP within emacs).
#
# qtquick3d (Qt6):
# Qt::Quick not available in aarch64 cross-compile qtdeclarative.
# cmake skips build, ninja has no install target.
# Fix: removed js8call, switched wireshark → wireshark-cli.
#
# js8call:
# REMOVED from system packages. Depends on Qt6 multimedia → qtquick3d.
#
# wireshark-qt:
# SWITCHED to wireshark-cli. Same Qt6 multimedia → qtquick3d chain.
#
# neovim:
# `libnlua0.so` built for aarch64, luajit (x86_64) tries to load it
# during codegen (preload_nlua.lua). No clean override option.
# Fix: remove from system packages + install via native build
# once uConsole is set up as remote builder.
#
# clamav:
# cmake try_run() + Rust proc-macro can't find native linker in
# cross-compile (cc crate uses cross CC, no cc in PATH for build
# scripts). Chain: clamav → system-path → etc → dbus → polkit.
# Fix: remove from system packages; clamscan available from server.
#
# ==== Remote builder setup (bidirectional) — TODO ====
# To eliminate cross-compile exceptions, set up distributed builds:
# 1. Create a dedicated `builder` user on both hosts (no shell, home=/var/empty)
# 2. Add the same SSH key to both hosts (symmetric)
# 3. On lazyworkhorse — `nix.buildMachines` pointing to uConsole for aarch64-linux
# 4. On uConsole — `nix.buildMachines` pointing to lazyworkhorse for x86_64-linux
# 5. Remove the uconsoleCrossOverlay workarounds above
# 6. Nix auto-dispatches derivations by `system` — no per-package exceptions needed
# Example buildMachines config:
# Server dispatches aarch64 builds to uConsole (4 cores, less power):
# nix.buildMachines = [{
# hostName = "uConsole.local";
# systems = ["aarch64-linux"];
# maxJobs = 4;
# sshUser = "builder";
# sshKey = "/etc/ssh/builder_key";
# }];
# uConsole dispatches x86_64 builds to server (36 cores, 256GB RAM):
# nix.buildMachines = [{
# hostName = "lazyworkhorse.net";
# port = 2424;
# systems = ["x86_64-linux"];
# maxJobs = 36;
# sshUser = "builder";
# sshKey = "/etc/ssh/builder_key";
# }];
# ==== How to build natively on uConsole ====
# To native-compile these on the uConsole:
# 1. Add uConsole as a remote builder (nix.buildMachines)
# 2. Set nix.extra-platforms = [ "aarch64-linux" ] on server
# 3. Remove the overlay workarounds below
# 4. Packages will auto-dispatch to uConsole for native builds
##############################################################################
uconsoleCrossOverlay = final: prev: {
libcamera = prev.libcamera.overrideAttrs (_: { meta.platforms = []; });
libcamera-rpi = prev.libcamera-rpi.overrideAttrs (_: { meta.platforms = []; });
libpisp = prev.libpisp.overrideAttrs (_: { meta.platforms = []; });
pipewire = prev.pipewire.overrideAttrs (old: {
buildInputs = builtins.filter
(x: !(x?pname && x.pname == "libcamera"))
(old.buildInputs or []);
mesonFlags = builtins.filter
(flag: !(builtins.isString flag && builtins.match ".*libcamera.*" flag != null))
(old.mesonFlags or []) ++ [ "-Dlibcamera=disabled" ];
});
gjs = prev.gjs.overrideAttrs (old: {
mesonFlags = (old.mesonFlags or []) ++ [ "-Dskip_gtk_tests=true" ];
});
hyprland = prev.hyprland.override { wrapRuntimeDeps = false; };
boost = prev.boost.override { useMpi = false; };
# perl-ldap cannot cross-compile (Module::Install needs dynamic loading)
xdg-desktop-portal-hyprland = prev.xdg-desktop-portal-hyprland.overrideAttrs (old: {
preConfigure = (old.preConfigure or "") + ''
cmakeFlags="$cmakeFlags -Dhyprwayland-scanner_DIR=${prev.buildPackages.hyprwayland-scanner}/lib/cmake/hyprwayland-scanner" 2>/dev/null || true
export PKG_CONFIG_PATH="${prev.buildPackages.hyprwayland-scanner}/lib/pkgconfig:$PKG_CONFIG_PATH"
'';
});
emacs-pgtk = prev.emacs-pgtk.override { withMailutils = false; };
# perl-ldap fails cross-compile (Module::Install needs dynamic loading)
# Strip it from john deps -- the perl scripts that need it are not critical
john = prev.john.overrideAttrs (old: {
propagatedBuildInputs = builtins.filter
(x: x?pname && x.pname != "perl-ldap")
(old.propagatedBuildInputs or []);
});
# clamav: removed from system packages (see note above).
};
uconsoleRpiPipewireOverlay = final: prev: {
pipewire = prev.pipewire.overrideAttrs (old: {
buildInputs = builtins.filter
(x: !(x?pname && x.pname == "libcamera"))
(old.buildInputs or []);
mesonFlags = builtins.filter
(flag: !(builtins.isString flag && builtins.match ".*libcamera.*" flag != null))
(old.mesonFlags or []) ++ [ "-Dlibcamera=disabled" ];
});
};
uconsoleBaseModules = [
in
{
nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.config.allowUnfree = true;
boot.loader.raspberry-pi.bootloader = "kernel";
nixpkgs.overlays = [ uconsoleCrossOverlay (import ./overlays/reticulum.nix) ];
}
nixos-raspberrypi.nixosModules.nixpkgs-rpi
({ config, lib, pkgs, ... }: {
nixpkgs.overlays = [ uconsoleRpiPipewireOverlay ];
})
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
nixos-raspberrypi.lib.inject-overlays
nixos-raspberrypi.lib.inject-overlays-global
nixos-uconsole.nixosModules.uconsole-cm5
./modules/nixos/hardware/uconsole-cm5-aio-v2.nix
({ config, lib, pkgs, inputs, ... }: let
lixCross = import inputs.nixpkgs-uconsole {
localSystem = { system = "x86_64-linux"; };
crossSystem = { system = "aarch64-linux"; };
overlays = [ inputs.lix.overlays.default ];
};
in { nix.package = lixCross.lix; })
inputs.home-manager.nixosModules.home-manager
agenix.nixosModules.default
agenix-rekey.nixosModules.default
./hosts/uconsole-cm5/configuration.nix
./hosts/uconsole-cm5/hardware-configuration.nix
./modules/nixos/services/remote-builder.nix
./modules/nixos/services/wireguard-client.nix
./modules/nixos/services/clamav.nix
./modules/nixos/security/ai-worker-restricted.nix
./users/gortium/gortium.nix
./users/ai-worker/ai-worker.nix
];
in {
nixosConfigurations = {
lazyworkhorse = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system self keys paths inputs; };
@@ -253,22 +56,23 @@
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.rocmSupport = true;
nixpkgs.config.permittedInsecurePackages = [ "openclaw-2026.3.12" ];
nixpkgs.config.permittedInsecurePackages = [
"openclaw-2026.3.12"
];
nix.package = lix.packages.${system}.default;
}
inputs.home-manager.nixosModules.home-manager
agenix.nixosModules.default
./hosts/lazyworkhorse/configuration.nix
./hosts/lazyworkhorse/hardware-configuration.nix
./modules/nixos/filesystem/hoardingcow-mount.nix
./modules/nixos/services/docker_manager.nix
./modules/nixos/filesystem/poup-16t-disk.nix
./modules/nixos/services/ollama_init_custom_models.nix
./modules/nixos/services/open_code_server.nix
./modules/nixos/services/clamav.nix
./modules/nixos/services/ollama_init_custom_models.nix
./modules/nixos/services/openclaw_node.nix
./modules/nixos/filesystem/poup-16t-disk.nix
./modules/nixos/security/ai-worker-restricted.nix
./users/gortium/gortium.nix
./users/ai-worker/ai-worker.nix
./users/gortium.nix
./users/ai-worker.nix
];
};
@@ -283,42 +87,27 @@
}
./hosts/cyt-pi/configuration.nix
./hosts/cyt-pi/hardware-configuration.nix
./modules/nixos/services/remote-builder.nix
./modules/nixos/services/wireguard-client.nix
./users/gortium/gortium.nix
];
};
uconsole-cm5 = nixpkgs-uconsole.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
inherit self keys paths inputs;
nixos-raspberrypi = nixos-raspberrypi;
isCM4 = false;
};
modules = uconsoleBaseModules;
uConsole = nixos-raspberrypi.lib.nixosSystem {
specialArgs = { inherit self keys paths inputs nixos-raspberrypi; };
modules = [
{
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
nixpkgs.hostPlatform = "aarch64-linux";
nix.package = lix.packages."aarch64-linux".default;
}
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
nixos-uconsole.nixosModules.uconsole-cm5
agenix.nixosModules.default
./modules/nixos/hardware/uconsole-cm5-aio-v2.nix
./hosts/uConsole/configuration.nix
./hosts/uConsole/hardware-configuration.nix
];
};
};
agenix-rekey = agenix-rekey.configure {
userFlake = self;
nixosConfigurations = self.nixosConfigurations;
};
devShells.${system}.default = devShell;
packages.${system} = {
uconsole-cm5-image = (nixos-raspberrypi.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
inherit self keys inputs;
nixos-raspberrypi = nixos-raspberrypi;
isCM4 = false;
};
modules = uconsoleBaseModules ++ [
nixos-raspberrypi.nixosModules.sd-image
];
}).config.system.build.sdImage;
};
};
}

View File

@@ -569,3 +569,19 @@
}
# Remote builder — uConsole for aarch64-linux native builds
nix.distributedBuilds = true;
nix.buildMachines = [{
hostName = "192.168.1.120";
systems = ["aarch64-linux"];
maxJobs = 4;
supportedFeatures = ["big-parallel" "nixos-test" "benchmark" "gccarch-armv8-a"];
sshUser = "builder";
sshKey = "/home/ai-worker/id_deploy";
}];
nix.extraOptions = '
builders-use-substitutes = true
fallback = true
';

View File

@@ -26,6 +26,14 @@
networking.networkmanager.enable = true;
# Firmware
hardware.enableRedistributableFirmware = true;
# RealtimeKit for PipeWire audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Hyprland Wayland compositor (manual start — no SDDM)
programs.hyprland = {
enable = true;
@@ -98,18 +106,18 @@
htop
tmux
# ===== HAM Radio =====
# wsjtx removed for aarch64 bootstrap (qtbase/Qt5 cross-compile linker fails)
# fldigi removed for aarch64 bootstrap (qtbase/Qt5 cross-compile linker fails)
wsjtx # removed for bootstrap - now native
fldigi # removed for bootstrap - now native
pat # Winlink client
direwolf # AX.25 packet modem
# chirp # Radio programming tool
chirp # Radio programming tool - now native
hamlib # Ham radio control libraries
# trustedqsl # Logbook of the World (LoTW)
trustedqsl # Logbook of the World (LoTW) - now native
# ===== SDR / RF =====
# sdrpp removed for aarch64 cross-compile bootstrap (glfw/wxPython fails)
# gqrx removed for aarch64 cross-compile bootstrap (Qt5 cascade fails)
sdrpp # removed for bootstrap - now native
gqrx # removed for bootstrap - now native
rtl-sdr # RTL-SDR drivers & utilities
# inspectrum # removed for aarch64 bootstrap (Qt5 cross-compile cascade fails)
inspectrum # removed for bootstrap - now native
soapysdr-with-plugins # SoapySDR + hardware support plugins
# ===== Mesh / LoRa =====
reticulumStack # Reticulum Network Stack
@@ -121,12 +129,12 @@
kismet # Wi-Fi monitor / IDS
bettercap # MITM/network attack framework
wireshark-cli # Packet analyzer
# john # John the Ripper
john # John the Ripper - now native
sqlmap # SQL injection tool
# ===== GPS / Maps =====
# foxtrotgps removed for aarch64 cross-compile bootstrap (GTK2 fails)
# viking removed for aarch64 cross-compile bootstrap (GTK3 fails)
# gpsbabel # GPS data conversion
foxtrotgps # removed for bootstrap - now native
viking # removed for bootstrap - now native
gpsbabel # GPS data conversion - now native
];
# ============================================================
# Reticulum Service (rnsd)

View File

@@ -47,6 +47,7 @@ let
};
dontUnpack = true;
buildInputs = [ pkgs.python3 ];
installPhase = ''
mkdir -p $out/bin $out/share/aiov2_ctl/img

View File

@@ -1,5 +1,7 @@
{ pkgs, inputs, config, keys, ... }: {
home-manager.extraSpecialArgs = { inherit (config.networking) hostName; dotfiles = inputs.dotfiles.outPath # flake input (not submodule); };
home-manager.extraSpecialArgs = {
inherit (config.networking) hostName;
};
home-manager.users.gortium = import ./home.nix;
users.users.gortium = {
isNormalUser = true;

View File

@@ -2,6 +2,7 @@
let
isUconsole = hostName == "uConsole";
dotfiles = ../../assets/dotfiles;
in {
home.username = "gortium";
home.homeDirectory = "/home/gortium";
@@ -33,6 +34,9 @@ in {
".config/wofi/config".source = "${dotfiles}/wofi/.config/wofi/config";
# yazi
# wallpapers
".config/wallpapers".source = "${dotfiles}/wallpapers/.config/wallpapers";
".config/yazi/yazi.toml".source = "${dotfiles}/yazi/.config/yazi/yazi.toml";
# hyprland — common config
@@ -43,22 +47,45 @@ in {
".config/hypr/mocha.conf".source = "${dotfiles}/hypr/.config/hypr/mocha.conf";
# hyprland — host-specific monitor config
".config/hypr/host/monitors.conf".source =
".config/hypr/hosts/monitors.conf".source =
if isUconsole
then "${dotfiles}/hypr/.config/hypr/hosts/uconsole.conf"
else "${dotfiles}/hypr/.config/hypr/hosts/laptop.conf";
};
programs.bash.enable = true;
programs.zsh = {
enable = true;
initExtra = builtins.readFile "${dotfiles}/zsh/.zshrc";
};
home.packages = with pkgs; [
git zsh tmux starship
neovim kitty
btop yazi ripgrep fd fzf
] ++ lib.optionals (!isUconsole) [
waybar wofi swww hyprshot
] ++ lib.optionals isUconsole [
brightnessctl
htop unzip wget jq
hyprland hyprlock hypridle hyprpaper
waybar wofi dunst
libnotify mako
swaynotificationcenter
swww
emacs
udiskie
hyprshade
networkmanagerapplet
pavucontrol
];
programs.zsh.enable = true;
programs.starship.enable = true;
xdg.userDirs = {
enable = true;
createDirectories = true;
desktop = "$HOME/desktop";
documents = "$HOME/documents";
download = "$HOME/downloads";
music = "$HOME/music";
pictures = "$HOME/pictures";
publicShare = "$HOME/public";
templates = "$HOME/templates";
videos = "$HOME/videos";
};
}