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
Changed files
+63 -102
machines
modules
packages
+3
flake.nix
···
hash = "sha256-7mkrPl2CQSfc1lRjl1ilwxdYcK5iRU//QGKmdCicK30=";
};
});
+
+
zmx-binary = prev.callPackage ./packages/zmx.nix { };
})
];
};
···
home-manager.darwinModules.home-manager
agenix.darwinModules.default
unstable-overlays
+
nur.modules.darwin.default
./machines/atalanta
];
};
+1
machines/atalanta/home-manager.nix
···
];
home-manager = {
+
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
-2
machines/atalanta/home/default.nix
···
(inputs.import-tree ../../../modules/home)
];
-
nixpkgs.enable = true;
-
home = {
username = "kierank";
homeDirectory = "/Users/kierank";
+1
machines/ember/default.nix
···
{
imports = [
(inputs.import-tree ../../modules/home)
+
../../modules/home/system/nixpkgs.nix.disabled
];
nixpkgs.enable = true;
+1
machines/john/default.nix
···
{
imports = [
(inputs.import-tree ../../modules/home)
+
../../modules/home/system/nixpkgs.nix.disabled
];
nixpkgs.enable = true;
+1
machines/moonlark/home-manager.nix
···
];
home-manager = {
+
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
-2
machines/moonlark/home/default.nix
···
(inputs.import-tree ../../../modules/home)
];
-
nixpkgs.enable = true;
-
home = {
username = "kierank";
homeDirectory = "/home/kierank";
+1
machines/nest/default.nix
···
{
imports = [
(inputs.import-tree ../../modules/home)
+
../../modules/home/system/nixpkgs.nix.disabled
];
nixpkgs.enable = true;
+1
machines/prattle/home-manager.nix
···
];
home-manager = {
+
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
-2
machines/prattle/home/default.nix
···
(inputs.import-tree ../../../modules/home)
];
-
nixpkgs.enable = true;
-
home = {
username = "kierank";
homeDirectory = "/home/kierank";
+1
machines/tacyon/default.nix
···
{
imports = [
(inputs.import-tree ../../modules/home)
+
../../modules/home/system/nixpkgs.nix.disabled
];
nixpkgs.enable = true;
+1
machines/terebithia/home-manager.nix
···
];
home-manager = {
+
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs outputs;
};
-2
machines/terebithia/home/default.nix
···
(inputs.import-tree ../../../modules/home)
];
-
nixpkgs.enable = true;
-
home = {
username = "kierank";
homeDirectory = "/home/kierank";
+4 -9
modules/home/apps/ssh.nix
···
};
config = mkIf cfg.enable {
-
# On macOS (darwin), zmx must be installed manually due to build issues
-
# Download from: https://zmx.sh/a/zmx-0.0.2-macos-aarch64.tar.gz
-
# Extract and place in PATH (e.g., ~/.local/bin/)
-
-
# On Linux, use the zmx flake
+
# zmx provides pre-built binaries that we download instead of building from source
+
# This avoids the zig2nix dependency which causes issues in CI
home.packages =
-
(optionals (cfg.zmx.enable && !pkgs.stdenv.isDarwin) [
-
inputs.zmx.packages.${pkgs.stdenv.hostPlatform.system}.default
-
])
-
++ (optionals cfg.zmx.enable [
+
(optionals cfg.zmx.enable [
+
pkgs.zmx-binary
pkgs.autossh
]);
-85
modules/home/apps/vscode.nix
···
-
{
-
lib,
-
pkgs,
-
config,
-
inputs,
-
...
-
}:
-
{
-
options.atelier.apps.vscode.enable = lib.mkEnableOption "Enable VSCode config";
-
config = lib.mkIf config.atelier.apps.vscode.enable {
-
nixpkgs.overlays = [
-
inputs.nix-vscode-extensions.overlays.default
-
inputs.catppuccin-vsc.overlays.default
-
];
-
programs.vscode = {
-
enable = true;
-
package = pkgs.unstable.vscode;
-
profiles.default = {
-
extensions = with pkgs.vscode-marketplace; [
-
ms-vscode.live-server
-
formulahendry.auto-rename-tag
-
edwinkofler.vscode-assorted-languages
-
golang.go
-
eamodio.gitlens
-
yzhang.markdown-all-in-one
-
github.vscode-github-actions
-
yoavbls.pretty-ts-errors
-
esbenp.prettier-vscode
-
ms-vscode.vscode-serial-monitor
-
prisma.prisma
-
ms-azuretools.vscode-docker
-
astro-build.astro-vscode
-
github.copilot
-
github.copilot-chat
-
dotjoshjohnson.xml
-
mikestead.dotenv
-
bradlc.vscode-tailwindcss
-
mechatroner.rainbow-csv
-
wakatime.vscode-wakatime
-
paulober.pico-w-go
-
ms-python.python
-
karunamurti.tera
-
biomejs.biome
-
bschulte.love
-
yinfei.luahelper
-
tamasfe.even-better-toml
-
fill-labs.dependi
-
rust-lang.rust-analyzer
-
dustypomerleau.rust-syntax
-
catppuccin.catppuccin-vsc
-
inputs.frc-nix.packages.${pkgs.stdenv.hostPlatform.system}.vscode-wpilib
-
];
-
userSettings = {
-
"editor.semanticHighlighting.enabled" = true;
-
"terminal.integrated.minimumContrastRatio" = 1;
-
"window.titleBarStyle" = "custom";
-
"gopls" = {
-
"ui.semanticTokens" = true;
-
};
-
"workbench.colorTheme" = "Catppuccin Macchiato";
-
"workbench.iconTheme" = "catppuccin-macchiato";
-
"catppuccin.accentColor" = lib.mkForce "blue";
-
"editor.fontFamily" = "'FiraCode Nerd Font', 'monospace', monospace";
-
"git.autofetch" = true;
-
"git.confirmSync" = false;
-
"github.copilot.editor.enableAutoCompletions" = false;
-
"editor.formatOnSave" = true;
-
"editor.defaultFormatter" = "biomejs.biome";
-
"[go]" = {
-
"editor.defaultFormatter" = "golang.go";
-
};
-
"[yaml]" = {
-
"editor.defaultFormatter" = "esbenp.prettier-vscode";
-
};
-
"[lua]" = {
-
"editor.defaultFormatter" = "yinfei.luahelper";
-
};
-
"[html]" = {
-
"editor.defaultFormatter" = "esbenp.prettier-vscode";
-
};
-
};
-
};
-
};
-
};
-
}
modules/home/system/nixpkgs.nix modules/home/system/nixpkgs.nix.disabled
+48
packages/zmx.nix
···
+
{ pkgs, lib, stdenv, fetchurl, autoPatchelfHook }:
+
+
stdenv.mkDerivation rec {
+
pname = "zmx";
+
version = "0.1.0";
+
+
src = fetchurl {
+
url = if stdenv.isLinux then
+
(if stdenv.isAarch64 then
+
"https://zmx.sh/a/zmx-${version}-linux-aarch64.tar.gz"
+
else
+
"https://zmx.sh/a/zmx-${version}-linux-x86_64.tar.gz")
+
else if stdenv.isDarwin then
+
(if stdenv.isAarch64 then
+
"https://zmx.sh/a/zmx-${version}-macos-aarch64.tar.gz"
+
else
+
"https://zmx.sh/a/zmx-${version}-macos-x86_64.tar.gz")
+
else throw "Unsupported platform";
+
+
hash = if stdenv.isLinux && stdenv.isAarch64 then
+
"sha256-sv83lR4DLJE+gsMtqCk6VCFdo5n4lhI0P1loxAf0iOg="
+
else if stdenv.isLinux then
+
"sha256-c+wCUcm7DEO55wXuHq0aP0Kn908jj1FM5Z+JQJnKE0M="
+
else if stdenv.isDarwin && stdenv.isAarch64 then
+
"sha256-dM6MFikdbpN+n8BK6fLbzyJfi88xetCWL9H5VfGB07o="
+
else
+
"sha256-B52NC8NEjVPDNSG11qPb0uRNExB66bllnK7ivXMJbHk=";
+
};
+
+
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+
sourceRoot = ".";
+
+
installPhase = ''
+
runHook preInstall
+
mkdir -p $out/bin
+
cp zmx $out/bin/
+
chmod +x $out/bin/zmx
+
runHook postInstall
+
'';
+
+
meta = with lib; {
+
description = "Session persistence for terminal processes";
+
homepage = "https://zmx.sh";
+
license = licenses.mit;
+
platforms = platforms.unix;
+
};
+
}