From 465a23751960c8877b52287aaba7b02b50b717df Mon Sep 17 00:00:00 2001 From: Uttarayan Date: Wed, 14 Feb 2024 22:52:33 +0530 Subject: [PATCH] [feat] Add cachix cache and neovim-nightly-overlay --- config/nix/flake.lock | 178 +++++++++++++++++++++++++++++++++++++++++- config/nix/flake.nix | 14 +++- config/nix/home.nix | 2 + config/nix/nix.conf | 2 + 4 files changed, 192 insertions(+), 4 deletions(-) create mode 100644 config/nix/nix.conf diff --git a/config/nix/flake.lock b/config/nix/flake.lock index a92162e6..a5a851e9 100644 --- a/config/nix/flake.lock +++ b/config/nix/flake.lock @@ -1,5 +1,103 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704029560, + "narHash": "sha256-a4Iu7x1OP+uSYpqadOu8VCPY+MPF3+f6KIi+MAxlgyw=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "d5cbf433a6ae9cae05400189a8dbc6412a03ba16", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,7 +118,69 @@ "type": "github" } }, + "neovim-flake": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "dir": "contrib", + "lastModified": 1706140641, + "narHash": "sha256-H1qHhkf7sF7yrG2rb9Ks1Y4EtLY3cXGp16KCGveJWY4=", + "owner": "neovim", + "repo": "neovim", + "rev": "4e59422e1d4950a3042bad41a7b81c8db4f8b648", + "type": "github" + }, + "original": { + "dir": "contrib", + "owner": "neovim", + "repo": "neovim", + "type": "github" + } + }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-flake": "neovim-flake", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1706141075, + "narHash": "sha256-o66/XFTXmcJSpEcO508V5r765HtgT8qtr+H4LRIB9BY=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "1da2e054a16309d7d7f7669438c8b9a5ef1b4642", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1706006310, + "narHash": "sha256-nDPz0fj0IFcDhSTlXBU2aixcnGs2Jm4Zcuoj0QtmiXQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b43bb235efeab5324c5e486882ef46749188eee2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1707689078, "narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=", @@ -39,7 +199,23 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "neovim-nightly-overlay": "neovim-nightly-overlay", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/config/nix/flake.nix b/config/nix/flake.nix index 171e70e1..aac7832d 100644 --- a/config/nix/flake.nix +++ b/config/nix/flake.nix @@ -8,19 +8,27 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; }; - outputs = { nixpkgs, home-manager, ... }: + outputs = { nixpkgs, home-manager, ... }@inputs: let system = "x86_64-linux"; + overlays = [ inputs.neovim-nightly-overlay.overlay ]; pkgs = nixpkgs.legacyPackages.${system}; - in { + in + { homeConfigurations."fs0c131y" = home-manager.lib.homeManagerConfiguration { inherit pkgs; # Specify your home configuration modules here, for example, # the path to your home.nix. - modules = [ ./home.nix ]; + modules = [ + ./home.nix + ({ + nixpkgs.overlays = overlays; + }) + ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix diff --git a/config/nix/home.nix b/config/nix/home.nix index b9af2cd7..2a26c5ef 100644 --- a/config/nix/home.nix +++ b/config/nix/home.nix @@ -124,6 +124,8 @@ home.packages = [ pkgs.macchina pkgs.nixpkgs-fmt + pkgs.neovim-nightly + pkgs.cachix # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. # pkgs.hello diff --git a/config/nix/nix.conf b/config/nix/nix.conf new file mode 100644 index 00000000..4acf5539 --- /dev/null +++ b/config/nix/nix.conf @@ -0,0 +1,2 @@ +substituters = https://cache.nixos.org https://nix-community.cachix.org +trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=