From 11ba75e40728e8b5735c9c7cefc7af1631c942af Mon Sep 17 00:00:00 2001 From: "Henry J. Webster" Date: Thu, 30 Jul 2026 10:38:54 -0500 Subject: Restructure into a multi-machine flake and add the enzo laptop Split the single-host config into a shared minimal base plus opt-in profiles, and add a second machine (enzo laptop) alongside kusanagi. - flake: add mkMachine helper; declare nixosConfigurations.kusanagi and .enzo; add the disko input; move overlays per-machine. - common/: minimal base only (boot, networking, tailscale, locale, nix settings, neovim editor). Old configuration.nix/programs.nix removed. - profiles/: coarse opt-in bundles (desktop, dev, apps). kusanagi imports all three and stays byte-for-byte identical to the running system. - machines/kusanagi/: all workstation-only config (ROCm, Scarlett audio, optical-disc archiving, NAS mounts, kavita/immich/ollama); hardware config moved here unchanged. User stays 'henz'. - machines/enzo/: new laptop. Declarative LUKS+btrfs via disko (LVM-on-LUKS, TPM2+PIN unlock, zram + encrypted swap for suspend-then-hibernate); its own minimal niri desktop with playback-only audio (no rtkit/jack); user 'hwebs'. Assisted-by: Claude:claude-opus-4-8 --- profiles/dev.nix | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 profiles/dev.nix (limited to 'profiles/dev.nix') diff --git a/profiles/dev.nix b/profiles/dev.nix new file mode 100644 index 0000000..e20fe5a --- /dev/null +++ b/profiles/dev.nix @@ -0,0 +1,85 @@ +# Dev profile: compilers, language servers, dev CLIs, and Emacs. Opt-in per machine. +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + zig + prettier + + (aspellWithDicts ( + dicts: with dicts; [ + en + en-computers + en-science + ] + )) + + pi-coding-agent + + (buildNpmPackage rec { + pname = "pi-acp"; + version = "0.0.31"; + src = fetchFromGitHub { + owner = "svkozak"; + repo = "pi-acp"; + rev = "v${version}"; + hash = "sha256-bM3V/3fxkY2Ib+OyfT82StIIRSLXGDuYUbt1CZKpTuo="; + }; + npmDepsHash = "sha256-qN+b/tMbnJLkWjotl3XrA0nfZ3KT/mT6gM+n3Qiz8Wk="; + }) + ]; + + users.users.henz.packages = with pkgs; [ + # toolchains / build + gcc + pkg-config + gnumake + autoconf + automake + libtool + cargo + nodejs + guile + direnv + gdb + + # language servers / formatters + lua-language-server + nil + clang-tools + marksman + gopls + ruff + basedpyright + zls + nixfmt + + # coding agents + opencode + claude-code + ]; + + services.emacs = { + enable = true; + package = + let + emacs = pkgs.emacs-pgtk.overrideAttrs (old: { + postInstall = (old.postInstall or "") + '' + # I only want the client version + rm -f $out/share/applications/emacs.desktop + ''; + }); + in + (pkgs.emacsPackagesFor emacs).withPackages (epkgs: [ + # NB: no g.tree-sitter-zig -- nixpkgs builds it from maxxnino/tree-sitter-zig, + # but zig-ts-mode requires the tree-sitter-grammars/tree-sitter-zig variant + # (different node names). The zig grammar is installed instead via + # `C-u M-x zig-ts-install-grammars' into ~/.config/emacs/tree-sitter/. + (epkgs.treesit-grammars.with-grammars (g: [ + g.tree-sitter-nix + g.tree-sitter-javascript + ])) + epkgs.vterm + ]); + }; +} -- cgit v1.3