From 4bdee7a33fe52990a31c3e91e4a2d6a60e389221 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 12 Aug 2023 18:30:06 +0900 Subject: feat(home): add helix as overlay --- flake.lock | 113 ++++++++++++++++++++++++++++++++-- flake.nix | 4 ++ home/default.nix | 2 +- nixos/modules/cachix/caches/helix.nix | 12 ++++ 4 files changed, 126 insertions(+), 5 deletions(-) create mode 100644 nixos/modules/cachix/caches/helix.nix diff --git a/flake.lock b/flake.lock index feea893..05e2d5d 100644 --- a/flake.lock +++ b/flake.lock @@ -38,6 +38,36 @@ "url": "https://git.exotic.sh/pub/sefidel/asahi-firmware" } }, + "crane": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": [ + "helix", + "flake-utils" + ], + "nixpkgs": [ + "helix", + "nixpkgs" + ], + "rust-overlay": [ + "helix", + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -73,10 +103,44 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1685518550, "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", @@ -91,9 +155,9 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1681202837, @@ -109,6 +173,31 @@ "type": "github" } }, + "helix": { + "inputs": { + "crane": "crane", + "flake-utils": "flake-utils", + "nixpkgs": [ + "unstable" + ], + "rust-overlay": [ + "rust" + ] + }, + "locked": { + "lastModified": 1691765042, + "narHash": "sha256-EeMn5KYej0NmCf3ghOjq2s8axjaKfqurak5FzScGTO0=", + "owner": "helix-editor", + "repo": "helix", + "rev": "ee3171cc54052bc8d3569cc04bd9f6a57b43afca", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "repo": "helix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -146,7 +235,7 @@ }, "neovim": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "unstable" ] @@ -204,6 +293,7 @@ "apple-silicon": "apple-silicon", "asahi-firmware": "asahi-firmware", "darwin": "darwin", + "helix": "helix", "home-manager": "home-manager", "impermanence": "impermanence", "neovim": "neovim", @@ -216,7 +306,7 @@ }, "rust": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "unstable" ] @@ -302,6 +392,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "unstable": { "locked": { "lastModified": 1691654369, diff --git a/flake.nix b/flake.nix index 3d5c638..3afba38 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,10 @@ neovim.url = "github:neovim/neovim?dir=contrib"; neovim.inputs.nixpkgs.follows = "unstable"; + helix.url = "github:helix-editor/helix"; + helix.inputs.nixpkgs.follows = "unstable"; + helix.inputs.rust-overlay.follows = "rust"; + rust.url = "github:oxalica/rust-overlay"; rust.inputs.nixpkgs.follows = "unstable"; }; diff --git a/home/default.nix b/home/default.nix index 1c4797d..35ced24 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,7 +5,7 @@ "sefidel@alpha" = self.lib.mkHome { username = "sefidel"; hostname = "alpha"; - pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim.overlay ]; }; + pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim.overlay helix.overlays.default ]; }; extraModules = [ ./profiles/populate.nix diff --git a/nixos/modules/cachix/caches/helix.nix b/nixos/modules/cachix/caches/helix.nix new file mode 100644 index 0000000..7783a96 --- /dev/null +++ b/nixos/modules/cachix/caches/helix.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + nix.settings = { + substituters = [ + "https://helix.cachix.org" + ]; + trusted-public-keys = [ + "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + ]; + }; +} -- cgit 1.4.1