Kieran's opinionated (and probably slightly dumb) nix config

fix: use pre-built zmx binaries to avoid zig2nix dependency

- Create custom package that downloads zmx binaries from zmx.sh
- Avoids zig2nix build issues on GitHub Actions x86_64 runner
- Add useGlobalPkgs to home-manager for consistent overlays
- Remove nixpkgs.enable from NixOS home configs
- Remove vscode config to eliminate nixpkgs.overlays warning

💘 Generated with Crush

Assisted-by: Claude Sonnet 4 via Crush <crush@charm.land>

dunkirk.sh cc6ab9bd 719f42c6

verified
+63 -102
+3
flake.nix
··· 147 147 hash = "sha256-7mkrPl2CQSfc1lRjl1ilwxdYcK5iRU//QGKmdCicK30="; 148 148 }; 149 149 }); 150 + 151 + zmx-binary = prev.callPackage ./packages/zmx.nix { }; 150 152 }) 151 153 ]; 152 154 }; ··· 258 260 home-manager.darwinModules.home-manager 259 261 agenix.darwinModules.default 260 262 unstable-overlays 263 + nur.modules.darwin.default 261 264 ./machines/atalanta 262 265 ]; 263 266 };
+1
machines/atalanta/home-manager.nix
··· 10 10 ]; 11 11 12 12 home-manager = { 13 + useGlobalPkgs = true; 13 14 extraSpecialArgs = { 14 15 inherit inputs outputs; 15 16 };
-2
machines/atalanta/home/default.nix
··· 9 9 (inputs.import-tree ../../../modules/home) 10 10 ]; 11 11 12 - nixpkgs.enable = true; 13 - 14 12 home = { 15 13 username = "kierank"; 16 14 homeDirectory = "/Users/kierank";
+1
machines/ember/default.nix
··· 6 6 { 7 7 imports = [ 8 8 (inputs.import-tree ../../modules/home) 9 + ../../modules/home/system/nixpkgs.nix.disabled 9 10 ]; 10 11 11 12 nixpkgs.enable = true;
+1
machines/john/default.nix
··· 6 6 { 7 7 imports = [ 8 8 (inputs.import-tree ../../modules/home) 9 + ../../modules/home/system/nixpkgs.nix.disabled 9 10 ]; 10 11 11 12 nixpkgs.enable = true;
+1
machines/moonlark/home-manager.nix
··· 6 6 ]; 7 7 8 8 home-manager = { 9 + useGlobalPkgs = true; 9 10 extraSpecialArgs = { 10 11 inherit inputs outputs; 11 12 };
-2
machines/moonlark/home/default.nix
··· 4 4 (inputs.import-tree ../../../modules/home) 5 5 ]; 6 6 7 - nixpkgs.enable = true; 8 - 9 7 home = { 10 8 username = "kierank"; 11 9 homeDirectory = "/home/kierank";
+1
machines/nest/default.nix
··· 7 7 { 8 8 imports = [ 9 9 (inputs.import-tree ../../modules/home) 10 + ../../modules/home/system/nixpkgs.nix.disabled 10 11 ]; 11 12 12 13 nixpkgs.enable = true;
+1
machines/prattle/home-manager.nix
··· 5 5 ]; 6 6 7 7 home-manager = { 8 + useGlobalPkgs = true; 8 9 extraSpecialArgs = { 9 10 inherit inputs outputs; 10 11 };
-2
machines/prattle/home/default.nix
··· 4 4 (inputs.import-tree ../../../modules/home) 5 5 ]; 6 6 7 - nixpkgs.enable = true; 8 - 9 7 home = { 10 8 username = "kierank"; 11 9 homeDirectory = "/home/kierank";
+1
machines/tacyon/default.nix
··· 6 6 { 7 7 imports = [ 8 8 (inputs.import-tree ../../modules/home) 9 + ../../modules/home/system/nixpkgs.nix.disabled 9 10 ]; 10 11 11 12 nixpkgs.enable = true;
+1
machines/terebithia/home-manager.nix
··· 5 5 ]; 6 6 7 7 home-manager = { 8 + useGlobalPkgs = true; 8 9 extraSpecialArgs = { 9 10 inherit inputs outputs; 10 11 };
-2
machines/terebithia/home/default.nix
··· 4 4 (inputs.import-tree ../../../modules/home) 5 5 ]; 6 6 7 - nixpkgs.enable = true; 8 - 9 7 home = { 10 8 username = "kierank"; 11 9 homeDirectory = "/home/kierank";
+4 -9
modules/home/apps/ssh.nix
··· 82 82 }; 83 83 84 84 config = mkIf cfg.enable { 85 - # On macOS (darwin), zmx must be installed manually due to build issues 86 - # Download from: https://zmx.sh/a/zmx-0.0.2-macos-aarch64.tar.gz 87 - # Extract and place in PATH (e.g., ~/.local/bin/) 88 - 89 - # On Linux, use the zmx flake 85 + # zmx provides pre-built binaries that we download instead of building from source 86 + # This avoids the zig2nix dependency which causes issues in CI 90 87 home.packages = 91 - (optionals (cfg.zmx.enable && !pkgs.stdenv.isDarwin) [ 92 - inputs.zmx.packages.${pkgs.stdenv.hostPlatform.system}.default 93 - ]) 94 - ++ (optionals cfg.zmx.enable [ 88 + (optionals cfg.zmx.enable [ 89 + pkgs.zmx-binary 95 90 pkgs.autossh 96 91 ]); 97 92
-85
modules/home/apps/vscode.nix
··· 1 - { 2 - lib, 3 - pkgs, 4 - config, 5 - inputs, 6 - ... 7 - }: 8 - { 9 - options.atelier.apps.vscode.enable = lib.mkEnableOption "Enable VSCode config"; 10 - config = lib.mkIf config.atelier.apps.vscode.enable { 11 - nixpkgs.overlays = [ 12 - inputs.nix-vscode-extensions.overlays.default 13 - inputs.catppuccin-vsc.overlays.default 14 - ]; 15 - programs.vscode = { 16 - enable = true; 17 - package = pkgs.unstable.vscode; 18 - profiles.default = { 19 - extensions = with pkgs.vscode-marketplace; [ 20 - ms-vscode.live-server 21 - formulahendry.auto-rename-tag 22 - edwinkofler.vscode-assorted-languages 23 - golang.go 24 - eamodio.gitlens 25 - yzhang.markdown-all-in-one 26 - github.vscode-github-actions 27 - yoavbls.pretty-ts-errors 28 - esbenp.prettier-vscode 29 - ms-vscode.vscode-serial-monitor 30 - prisma.prisma 31 - ms-azuretools.vscode-docker 32 - astro-build.astro-vscode 33 - github.copilot 34 - github.copilot-chat 35 - dotjoshjohnson.xml 36 - mikestead.dotenv 37 - bradlc.vscode-tailwindcss 38 - mechatroner.rainbow-csv 39 - wakatime.vscode-wakatime 40 - paulober.pico-w-go 41 - ms-python.python 42 - karunamurti.tera 43 - biomejs.biome 44 - bschulte.love 45 - yinfei.luahelper 46 - tamasfe.even-better-toml 47 - fill-labs.dependi 48 - rust-lang.rust-analyzer 49 - dustypomerleau.rust-syntax 50 - catppuccin.catppuccin-vsc 51 - inputs.frc-nix.packages.${pkgs.stdenv.hostPlatform.system}.vscode-wpilib 52 - ]; 53 - userSettings = { 54 - "editor.semanticHighlighting.enabled" = true; 55 - "terminal.integrated.minimumContrastRatio" = 1; 56 - "window.titleBarStyle" = "custom"; 57 - "gopls" = { 58 - "ui.semanticTokens" = true; 59 - }; 60 - "workbench.colorTheme" = "Catppuccin Macchiato"; 61 - "workbench.iconTheme" = "catppuccin-macchiato"; 62 - "catppuccin.accentColor" = lib.mkForce "blue"; 63 - "editor.fontFamily" = "'FiraCode Nerd Font', 'monospace', monospace"; 64 - "git.autofetch" = true; 65 - "git.confirmSync" = false; 66 - "github.copilot.editor.enableAutoCompletions" = false; 67 - "editor.formatOnSave" = true; 68 - "editor.defaultFormatter" = "biomejs.biome"; 69 - "[go]" = { 70 - "editor.defaultFormatter" = "golang.go"; 71 - }; 72 - "[yaml]" = { 73 - "editor.defaultFormatter" = "esbenp.prettier-vscode"; 74 - }; 75 - "[lua]" = { 76 - "editor.defaultFormatter" = "yinfei.luahelper"; 77 - }; 78 - "[html]" = { 79 - "editor.defaultFormatter" = "esbenp.prettier-vscode"; 80 - }; 81 - }; 82 - }; 83 - }; 84 - }; 85 - }
modules/home/system/nixpkgs.nix modules/home/system/nixpkgs.nix.disabled
+48
packages/zmx.nix
··· 1 + { pkgs, lib, stdenv, fetchurl, autoPatchelfHook }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "zmx"; 5 + version = "0.1.0"; 6 + 7 + src = fetchurl { 8 + url = if stdenv.isLinux then 9 + (if stdenv.isAarch64 then 10 + "https://zmx.sh/a/zmx-${version}-linux-aarch64.tar.gz" 11 + else 12 + "https://zmx.sh/a/zmx-${version}-linux-x86_64.tar.gz") 13 + else if stdenv.isDarwin then 14 + (if stdenv.isAarch64 then 15 + "https://zmx.sh/a/zmx-${version}-macos-aarch64.tar.gz" 16 + else 17 + "https://zmx.sh/a/zmx-${version}-macos-x86_64.tar.gz") 18 + else throw "Unsupported platform"; 19 + 20 + hash = if stdenv.isLinux && stdenv.isAarch64 then 21 + "sha256-sv83lR4DLJE+gsMtqCk6VCFdo5n4lhI0P1loxAf0iOg=" 22 + else if stdenv.isLinux then 23 + "sha256-c+wCUcm7DEO55wXuHq0aP0Kn908jj1FM5Z+JQJnKE0M=" 24 + else if stdenv.isDarwin && stdenv.isAarch64 then 25 + "sha256-dM6MFikdbpN+n8BK6fLbzyJfi88xetCWL9H5VfGB07o=" 26 + else 27 + "sha256-B52NC8NEjVPDNSG11qPb0uRNExB66bllnK7ivXMJbHk="; 28 + }; 29 + 30 + nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; 31 + 32 + sourceRoot = "."; 33 + 34 + installPhase = '' 35 + runHook preInstall 36 + mkdir -p $out/bin 37 + cp zmx $out/bin/ 38 + chmod +x $out/bin/zmx 39 + runHook postInstall 40 + ''; 41 + 42 + meta = with lib; { 43 + description = "Session persistence for terminal processes"; 44 + homepage = "https://zmx.sh"; 45 + license = licenses.mit; 46 + platforms = platforms.unix; 47 + }; 48 + }