From d76f1d64530825130ff46463ed8239c2d253b982 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sun, 9 Aug 2026 14:46:33 -0400 Subject: [PATCH 1/2] add: added atuin overlay --- .gitea/workflows/publish-attic.yaml | 1 + flake.lock | 23 ++++++++++++++- flake.nix | 34 +++++++++++++++++----- overlays/default.nix | 44 ++++++++++++++++++++++++++++- pkgs/default.nix | 9 +++--- 5 files changed, 98 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/publish-attic.yaml b/.gitea/workflows/publish-attic.yaml index 36e1c46..a91f6aa 100644 --- a/.gitea/workflows/publish-attic.yaml +++ b/.gitea/workflows/publish-attic.yaml @@ -63,6 +63,7 @@ jobs: system="$(nix eval --impure --raw --expr builtins.currentSystem)" NIXPKGS_ALLOW_UNFREE=1 nix build --impure --accept-flake-config --no-link --print-out-paths -L \ + ".#packages.${system}.atuinLatest" \ ".#packages.${system}.musicpresence" \ ".#packages.${system}.vintage-story" \ ".#packages.${system}.swaytreesave" \ diff --git a/flake.lock b/flake.lock index 13ca140..0d4f110 100644 --- a/flake.lock +++ b/flake.lock @@ -93,7 +93,28 @@ "darwin": "darwin", "flake-utils": "flake-utils", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1786247265, + "narHash": "sha256-cVTcTqAhzSNMOVddtBhFpuv+Vx6/SgrhgZWJiI61H24=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "6df7076ea0f5697e3242719a4c71211f00411cf5", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } }, "systems": { diff --git a/flake.nix b/flake.nix index 6192da9..5b7a7ad 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,22 @@ home-manager.url = "github:nix-community/home-manager"; darwin.url = "github:LnL7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, darwin, ... }: + outputs = + inputs@{ + self, + nixpkgs, + flake-utils, + home-manager, + darwin, + rust-overlay, + ... + }: let systems = [ "x86_64-linux" @@ -19,7 +32,8 @@ forAllSystems = f: nixpkgs.lib.genAttrs systems f; in { - packages = forAllSystems (system: + packages = forAllSystems ( + system: let pkgs = import nixpkgs { inherit system; @@ -29,18 +43,24 @@ import ./pkgs { inherit pkgs; } ); - devShells = forAllSystems (system: - let pkgs = import nixpkgs { inherit system; }; in + devShells = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in { default = pkgs.mkShell { - packages = with pkgs; [ - nixfmt-rfc-style + packages = with pkgs; [ + nixfmt-rfc-style ]; }; } ); - overlays.default = import ./overlays; + overlays.default = nixpkgs.lib.composeManyExtensions [ + rust-overlay.overlays.default + (import ./overlays) + ]; homeManagerModules = import ./modules/home-manager self; nixosModules.default = import ./modules/nixos; darwinModules.default = import ./modules/darwin; diff --git a/overlays/default.nix b/overlays/default.nix index ce16870..6bca2b5 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1 +1,43 @@ -final: prev: { } +final: prev: +let + rustLatest = prev.rust-bin.stable.latest.default; + rustPlatform = prev.makeRustPlatform { + cargo = rustLatest; + rustc = rustLatest; + }; +in +{ + atuinLatest = (prev.atuin.override { inherit rustPlatform; }).overrideAttrs (oldAttrs: rec { + version = "18.19.0"; + + src = prev.fetchFromGitHub { + owner = "atuinsh"; + repo = "atuin"; + rev = "v${version}"; + hash = "sha256-yAw+ty6FUnFbiRTdAe2QQHzj6uU24fZ/bEIXcHl/thg="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + hash = "sha256-jirVe0+N5+UHZWioj8AipUhawMBameqEJJpa8HPTnfw="; + }; + + cargoBuildFeatures = [ + "ai" + "client" + "clipboard" + "daemon" + "hex" + "sync" + ]; + cargoCheckFeatures = cargoBuildFeatures; + + preCheck = (oldAttrs.preCheck or "") + '' + export HOME="$TMPDIR" + export XDG_CONFIG_HOME="$TMPDIR/.config" + export XDG_DATA_HOME="$TMPDIR/.local/share" + export XDG_STATE_HOME="$TMPDIR/.local/state" + mkdir -p "$XDG_CONFIG_HOME" "$XDG_DATA_HOME" "$XDG_STATE_HOME" + ''; + }); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index a556f03..c6ffb55 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,10 @@ { pkgs }: { + atuinLatest = pkgs.atuinLatest; # sable-web = pkgs.callPackage ./common/sable.nix {}; - swaytreesave = pkgs.callPackage ./linux/swaytreesave.nix {}; - musicpresence = pkgs.callPackage ./linux/musicpresence.nix {}; - vintage-story = pkgs.callPackage ./linux/vintage-story.nix {}; - archon = pkgs.callPackage ./linux/archon.nix {}; + swaytreesave = pkgs.callPackage ./linux/swaytreesave.nix { }; + musicpresence = pkgs.callPackage ./linux/musicpresence.nix { }; + vintage-story = pkgs.callPackage ./linux/vintage-story.nix { }; + archon = pkgs.callPackage ./linux/archon.nix { }; yubilock = pkgs.callPackage ./linux/yubilock/default.nix { }; } From fab444b00e62e1304761ffeae3eed9ff5e6efa52 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 26 Aug 2026 19:47:21 -0400 Subject: [PATCH 2/2] chore: update flake --- flake.lock | 60 +++++++++++++++++++++++++----------------------------- flake.nix | 13 +----------- 2 files changed, 29 insertions(+), 44 deletions(-) diff --git a/flake.lock b/flake.lock index 84ca983..a4c4892 100644 --- a/flake.lock +++ b/flake.lock @@ -99,11 +99,11 @@ ] }, "locked": { - "lastModified": 1787750582, - "narHash": "sha256-FfIAV44k33i+IjC1+new2KyjyVGUzGtV89VHVP4eK1U=", + "lastModified": 1787778830, + "narHash": "sha256-GnLPpDT727E6VpDlALP8JeP1BbSQ17H0HiEEYq6Ql4w=", "owner": "nix-community", "repo": "home-manager", - "rev": "0a364342a66bcecfc8a00d2fc38c6c29eee7bc5e", + "rev": "6b449e35980e1b75dd17da2d6d9b66e757194f1c", "type": "github" }, "original": { @@ -114,11 +114,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1787640266, - "narHash": "sha256-MrkfE5hF5xx4L/0h5NyJ3xQkKVftwSuKSkFSrvlTxGY=", + "lastModified": 1787753485, + "narHash": "sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4f698677b11021a8f84f452e23ae9ef2427bec3", + "rev": "062346a6d85bc4b49dfaa61c986e9c5be21217d1", "type": "github" }, "original": { @@ -134,32 +134,8 @@ "darwin": "darwin", "hildibrand": "hildibrand", "home-manager": "home-manager", -<<<<<<< HEAD - "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1786247265, - "narHash": "sha256-cVTcTqAhzSNMOVddtBhFpuv+Vx6/SgrhgZWJiI61H24=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "6df7076ea0f5697e3242719a4c71211f00411cf5", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" -======= - "nixpkgs": "nixpkgs" ->>>>>>> origin + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay_3" } }, "rust-overlay": { @@ -203,6 +179,26 @@ "repo": "rust-overlay", "type": "github" } + }, + "rust-overlay_3": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1787713867, + "narHash": "sha256-ZRYTEvDb8QZLCHRoMyIZle9V3Bvw905m0teeo1RvI7M=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "494680f9ffa2b4bf9f2df0f442c7096e44adfa00", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f8b1476..c3234a0 100644 --- a/flake.nix +++ b/flake.nix @@ -11,25 +11,14 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; - }; - outputs = - inputs@{ - self, - nixpkgs, - flake-utils, - home-manager, - darwin, - rust-overlay, - ... - }: hildibrand.url = "git+https://scm.wyattjmiller.com/wymiller/hildibrand.git"; hildibrand.inputs.nixpkgs.follows = "nixpkgs"; caitsith.url = "git+https://scm.wyattjmiller.com/wymiller/caitsith.git"; caitsith.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ self, nixpkgs, home-manager, darwin, ... }: + outputs = inputs@{ self, nixpkgs, home-manager, darwin, rust-overlay, ... }: let supportedSystems = [ "x86_64-linux"