diff --git a/flake.lock b/flake.lock index 040c2a6..7710c37 100644 --- a/flake.lock +++ b/flake.lock @@ -171,6 +171,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -215,6 +233,26 @@ "type": "github" } }, + "helix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1745302248, + "narHash": "sha256-MEEYZaOYmU2SlgzAKRFjF4vtODRx/AUG33nRJ+nKy78=", + "owner": "helix-editor", + "repo": "helix", + "rev": "0815b52e0959e21ec792ea41d508a050b552f850", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "repo": "helix", + "type": "github" + } + }, "hercules-ci-effects": { "inputs": { "flake-parts": [ @@ -550,7 +588,7 @@ "nixpkgs" ], "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1741442524, @@ -594,15 +632,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744932701, - "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", - "owner": "NixOS", + "lastModified": 1740560979, + "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "rev": "5135c59491985879812717f4c9fea69604e7f26f", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -621,6 +659,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1736429638, "narHash": "sha256-dDWqQqSgMQXw5eFtcyoVijv7HbYJZOIo+jWQdJtsxn4=", @@ -687,15 +741,37 @@ }, "root": { "inputs": { + "helix": "helix", "hyprland": "hyprland", "impermanence": "impermanence", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "schizofox": "schizofox", - "systems": "systems_2" + "systems": "systems_3" } }, "rust-overlay": { + "inputs": { + "nixpkgs": [ + "helix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1740623427, + "narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -722,9 +798,9 @@ "flake-parts": "flake-parts_2", "home-manager": "home-manager", "nixpak": "nixpak", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "searx-randomizer": "searx-randomizer", - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1744892989, @@ -764,6 +840,21 @@ } }, "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -778,7 +869,7 @@ "type": "github" } }, - "systems_2": { + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", diff --git a/flake.nix b/flake.nix index e9303de..2b6fa56 100644 --- a/flake.nix +++ b/flake.nix @@ -13,12 +13,20 @@ packages = eachSystem ( system: { - inherit (import ./packages pkgsFor.${system}) fish helix kakoune; + inherit + (import ./packages { + pkgs = pkgsFor.${system}; + helix = inputs.helix.packages.${pkgs.system}.default; + }) + fish + wrapped-helix + kakoune + ; } ); apps = eachSystem (system: let - inherit (inputs.self.packages.${system}) fish helix; + inherit (inputs.self.packages.${system}) fish wrapped-helix; in { default = { type = "app"; @@ -26,7 +34,7 @@ }; helix = { type = "app"; - program = "${helix}/bin/hx"; + program = "${wrapped-helix}/bin/hx"; }; }); }; @@ -51,5 +59,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.systems.follows = "systems"; }; + + helix.url = "github:helix-editor/helix"; }; } diff --git a/hosts/common.nix b/hosts/common.nix index d627e4a..5a9bef2 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -7,7 +7,7 @@ pkgs, ... }: let - inherit (self.packages.${pkgs.stdenv.system}) helix fish; + inherit (self.packages.${pkgs.stdenv.system}) wrapped-helix fish; in { environment.systemPackages = builtins.attrValues { inherit @@ -39,8 +39,8 @@ in { zip zoxide ; - inherit helix fish; + inherit wrapped-helix fish; }; # helix as the only editor, a reasonable choice. - environment.sessionVariables.EDITOR = pkgs.lib.getExe' helix "hx"; + environment.sessionVariables.EDITOR = pkgs.lib.getExe' wrapped-helix "hx"; } diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index 3896031..9210ebd 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -79,6 +79,5 @@ wordgrinder xournalpp ; - inherit (self.packages.${pkgs.stdenv.system}) helix; }; } diff --git a/packages/default.nix b/packages/default.nix index bd69889..4310e5f 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,7 +1,10 @@ -pkgs: let - helix = pkgs.callPackage ./helix.nix {}; +{ + pkgs, + helix, +}: let + wrapped-helix = pkgs.callPackage ./helix.nix {inherit helix;}; kakoune = pkgs.callPackage ./kakoune.nix {}; fish = pkgs.callPackage ./shell {}; in { - inherit helix kakoune fish; + inherit wrapped-helix kakoune fish; } diff --git a/packages/helix.nix b/packages/helix.nix index 763c8b0..c12db4c 100644 --- a/packages/helix.nix +++ b/packages/helix.nix @@ -4,7 +4,6 @@ alejandra, basedpyright, bash-language-server, - black, clang-tools, clippy, cmake-format, @@ -15,25 +14,23 @@ gdb, golangci-lint-langserver, gopls, - helix, lazygit, lib, lldb_19, marksman, nil, - pyright, + nixd, ruff, rust-analyzer, rustfmt, shellcheck, shfmt, - solargraph, - stdenv, superhtml, taplo, tinymist, typescript-language-server, vscode-langservers-extracted, + helix, ... }: let inherit (lib.meta) getExe; @@ -277,6 +274,8 @@ wrapped-helix = symlinkJoin { name = "helix-wrapped"; paths = [ + helix + # Bash bash-language-server # C/C++ @@ -284,12 +283,12 @@ clippy golangci-lint-langserver gopls - helix lldb_19 # Markdown marksman # Nix nil + nixd rust-analyzer rustfmt # Shell