diff --git a/README.md b/README.md index ac50f50..4580b38 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,31 @@ -# Jet's NixOS config +# Jet's NixOS Config -I've done NixOS a few times, but this round has been very comfortable. Nothing is really that special about it, but feel free to copy it! +NixOS and Home Manager configuration for Jet's machines. -> silly language thing credited to https://github.com/SylvanFranklin/.config +This flake defines two hosts: -This flake currently defines one host: `framework` which is my laptop. +- `framework`: personal Framework laptop +- `framework-work`: work Framework laptop -- system config lives in `configuration.nix` -- Home Manager config lives in `home.nix` +## Layout + +- `flake.nix`: flake inputs, host wiring, overlays, formatter, and dev shell +- `flake.lock`: pinned flake input revisions +- `configuration.nix`: shared NixOS system configuration +- `hosts//`: host-specific NixOS configuration +- `home.nix`: shared Home Manager entrypoint +- `home-modules/`: split Home Manager modules +- `pkgs/`: local package definitions +- `gnome-extensions/`: local GNOME Shell extensions +- `secrets/`: agenix-encrypted secrets + +## Validation + +Run these before switching a machine: + +```sh +nix flake check --print-build-logs +nix build --no-link --print-build-logs .#nixosConfigurations.framework.config.system.build.toplevel .#nixosConfigurations.framework-work.config.system.build.toplevel +``` + +The repository uses direnv via `.envrc` with `use flake`. diff --git a/flake.lock b/flake.lock index 38681b5..689cd15 100644 --- a/flake.lock +++ b/flake.lock @@ -92,11 +92,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1779812402, - "narHash": "sha256-gozJEyJHbaAyrbzODKeWJhxpUrGK6m4DIPDogfjz2BU=", + "lastModified": 1780336672, + "narHash": "sha256-yYhzJch2CCAEZksQh7K4HahWveJ+ew7bC5jDMGPC588=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "2e5ad917eb4e325a3dbb161c3f41208a8cd35e44", + "rev": "5758e149319d244cbf2d21d1ae8d1376adaf1f91", "type": "github" }, "original": { @@ -112,11 +112,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1779426614, - "narHash": "sha256-Ynp7Vq/3ycx53zzLh/Dfvjibdvt+mVhTM50O5LCbdmw=", + "lastModified": 1780320683, + "narHash": "sha256-fxpL42AirGqicF5FixBge4+tn32GtJu3rnacL7pzSiI=", "owner": "helix-editor", "repo": "helix", - "rev": "a62d374fcb489f83bddd3a775df250ff4b9b34a9", + "rev": "72d583700adf1f0e4e79356662b563cd3a76ab88", "type": "github" }, "original": { @@ -175,11 +175,11 @@ ] }, "locked": { - "lastModified": 1779213149, - "narHash": "sha256-Cf+p/T4Z3n9Sw0TiR3kQaIwQI+/hfvLJcoTzeq6yS3E=", + "lastModified": 1780347968, + "narHash": "sha256-I8ibSDQx+E8cgw6k3UxX6Bm7awmGoKSTXc8Gt1Zbpp4=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd868f769a69d3b6091a1da68a75cb83a181033c", + "rev": "d0af9b8bf3b4a1d449be7034bebc9f8f9fd6ee99", "type": "github" }, "original": { @@ -196,11 +196,11 @@ ] }, "locked": { - "lastModified": 1778805320, - "narHash": "sha256-nGFJ01m2CTBKD4ABtcY4vLhHrRN91LKr/pn41PcU78A=", + "lastModified": 1780099287, + "narHash": "sha256-efIPwVGtIWIjWcznhaop6XN6HxnOL8800hF6CBNvlqQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "9846abe15e7d0d36b8acbd4d05f2b87461744c92", + "rev": "7d8127d308c3fb9664f7e643eec944be74ebb37d", "type": "github" }, "original": { @@ -216,11 +216,11 @@ ] }, "locked": { - "lastModified": 1778999127, - "narHash": "sha256-V5GquqJvAqwFTcpN6hxKSQAtwuJFRUEHmyNKbeaTQDg=", + "lastModified": 1780210899, + "narHash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "f680e0d3c1dbefe298c423691662e238496890f2", + "rev": "97df9dc0b7c924344b793a15c1e8e4522ebb854e", "type": "github" }, "original": { @@ -230,12 +230,15 @@ } }, "nixos-hardware": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, "locked": { - "lastModified": 1779258371, - "narHash": "sha256-j1iZsLy6oFApqR1oiDmHhvkwxXqcNi0aoSJj643LuwU=", + "lastModified": 1780310866, + "narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c97bc4d15bd3473dd095e8e8ba57330ab1943a77", + "rev": "4ed851c979641e28597a05086332d75cdc9e395f", "type": "github" }, "original": { @@ -275,11 +278,24 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1778443072, - "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", + "lastModified": 1767892417, + "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "type": "github" }, "original": { @@ -289,7 +305,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1776683584, "narHash": "sha256-NuTLMrr10Tng72hurYG8jYQ4XKK8wnpJmOGcPiis96g=", @@ -313,11 +329,11 @@ ] }, "locked": { - "lastModified": 1780252629, - "narHash": "sha256-WR5QPE25CUx6Jpj/dFQDG0IiYHUFFM365ajyVvOtIlI=", + "lastModified": 1780345519, + "narHash": "sha256-7asvwLC+iv5D6VUiyMdWvujy5Qb/x7Zxzkiwp8+B+Ts=", "owner": "nix-community", "repo": "NUR", - "rev": "c4af9c4f3669ecfa1a042d9977626096ec2daf86", + "rev": "1251658e58bf1f938ad87c1d0e55ac5a7252bb1b", "type": "github" }, "original": { @@ -328,14 +344,14 @@ }, "opencode": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1780182789, - "narHash": "sha256-PSRa+XhcJI/y+j7iSxGQZIQMPKYAq8od36RO8CcXL+c=", + "lastModified": 1780343775, + "narHash": "sha256-3JGnIpsaAzhWhYTxizpirCmQ8SoRVdwIXlO7U8wPGio=", "owner": "anomalyco", "repo": "opencode", - "rev": "30f9780561e703147745945490a46646ca27670b", + "rev": "6072a68d6bf9f2fd50b309705320c319009215c5", "type": "github" }, "original": { @@ -353,7 +369,7 @@ "home-manager": "home-manager_3", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nur": "nur", "opencode": "opencode", "zen-browser": "zen-browser" @@ -419,11 +435,11 @@ ] }, "locked": { - "lastModified": 1779781734, - "narHash": "sha256-c2FZ7S/rhnCHcwPkc82GOxlCw88HKYBaJkLtMgi72p8=", + "lastModified": 1780309250, + "narHash": "sha256-XE9QhtahY3C3/6DA0f7CsJ+RWDR4Y0OEucRFeTUpWFo=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "ef7c137fea3d0d0624864db7aa1f068eed79b0fb", + "rev": "9c1e768c5cdf4be1db2989d14856022cfedb2fa1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 33c4dbf..d80ba98 100644 --- a/flake.nix +++ b/flake.nix @@ -64,11 +64,24 @@ (final: prev: { jj-starship = prev.callPackage ./pkgs/jj-starship.nix { }; + # These nixpkgs packages still default to EOL Electron 39, but current builds work with Electron 40. + logseq = prev.logseq.override { electron_39 = prev.electron_40; }; + zulip = prev.zulip.override { electron_39 = prev.electron_40; }; + + gnomeExtensions = prev.gnomeExtensions // { + # The source moved to a new UUID and already declares GNOME 49/50 support. + tailscale-qs = prev.gnomeExtensions.tailscale-qs.overrideAttrs (_: { + postInstall = ""; + }); + }; + # opencode's dev branch asks for Bun 1.3.14, but this revision builds and runs with nixpkgs' Bun 1.3.13. opencode = prev.opencode.overrideAttrs (old: { postPatch = (old.postPatch or "") + '' substituteInPlace package.json \ --replace-fail "bun@1.3.14" "bun@1.3.13" + substituteInPlace packages/ui/package.json \ + --replace-fail '"./v2/*": "./src/v2/components/*.tsx",' '"./v2/*": "./src/v2/components/*.tsx", "./v2/*.css": "./src/v2/components/*.css",' ''; }); opencode-original = final.opencode; diff --git a/home-modules/desktop.nix b/home-modules/desktop.nix index e23a44a..b154ed2 100644 --- a/home-modules/desktop.nix +++ b/home-modules/desktop.nix @@ -183,7 +183,7 @@ in "wifiqrcode@glerro.pm.me" "system-monitor-next@paradoxxx.zero.gmail.com" "clipboard-indicator@tudmotu.com" - "tailscale@joaophi.github.com" + "tailscale-gnome-qs@tailscale-qs.github.io" "auto-move-windows@gnome-shell-extensions.gcampax.github.com" "gnome-shell-extension-maximized-by-default@stiggimy.github.com" "no-titlebar-when-maximized@alec.ninja" diff --git a/home-modules/lib.nix b/home-modules/lib.nix index d9f08bc..67dc43e 100644 --- a/home-modules/lib.nix +++ b/home-modules/lib.nix @@ -9,11 +9,7 @@ let sshPublicKeys = (import ../ssh-public-keys.nix).jet; name = "Jet"; - email = - if hostname == "framework-work" then - "jet@corp.primitive.dev" - else - "jet@extremist.software"; + email = if hostname == "framework-work" then "jet@corp.primitive.dev" else "jet@extremist.software"; sshSigningKey = "~/.ssh/id_ed25519"; opencodeLibraryPath = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]; opencodeMine = pkgs.writeShellApplication { @@ -179,8 +175,8 @@ let greptileSkills = pkgs.fetchFromGitHub { owner = "greptileai"; repo = "skills"; - rev = "4ae5198fb82fe28d7b452796152f2b1745051c77"; - hash = "sha256-NvDd3BSVeS10kYupLxo27VlKeeHPHrxyTb8EdVqrtQw="; + rev = "bda66cce07d1c59c83d387b87aeeed042b13369d"; + hash = "sha256-yfzi1K+Ko4YOpWYC5a+GCndtKkNsyRBhhns+KJU/f+E="; }; inthAgentSkills = pkgs.fetchFromGitHub { owner = "inthhq"; @@ -190,14 +186,14 @@ let }; betterbird = pkgs.stdenv.mkDerivation rec { pname = "betterbird"; - version = "140.10.0esr-bb21"; + version = "140.11.0esr-bb23"; src = pkgs.fetchurl { urls = [ "https://www.betterbird.eu/downloads/LinuxArchive/betterbird-${version}.en-US.linux-x86_64.tar.xz" "https://www.betterbird.eu/downloads/LinuxArchive/Previous/betterbird-${version}.en-US.linux-x86_64.tar.xz" ]; - hash = "sha256-Uh55xWn/cjoIutX2xdM/jUWw9c2As8P4fefK5KQtbQo="; + hash = "sha256-f5feH3Yj1XsKTaKJyEGJ3zASrwKTulFNDoowtaLYSyU="; }; nativeBuildInputs = [ diff --git a/home-modules/packages.nix b/home-modules/packages.nix index 01558d3..fd0d744 100644 --- a/home-modules/packages.nix +++ b/home-modules/packages.nix @@ -6,13 +6,6 @@ }: let - tailscaleQsGnome49 = pkgs.gnomeExtensions.tailscale-qs.overrideAttrs (old: { - postInstall = (old.postInstall or "") + '' - substituteInPlace "$out/share/gnome-shell/extensions/tailscale@joaophi.github.com/metadata.json" \ - --replace-fail '"48"' '"48", "49"' - ''; - }); - evilBitCtl = pkgs.writeShellApplication { name = "evil-bitctl"; runtimeInputs = [ @@ -208,7 +201,7 @@ in gnomeExtensions.maximized-by-default-actually-reborn gnomeExtensions.no-titlebar-when-maximized gnomeExtensions.system-monitor-next - tailscaleQsGnome49 + gnomeExtensions.tailscale-qs gnomeExtensions.wifi-qrcode evilBitToggleExtension opencodeTokenUsageExtension