diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-24 16:13:36 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-24 16:13:36 +0530 |
| commit | 5428eb798a91c1ca89f74a26ff4016842891930e (patch) | |
| tree | 2ac084e537b5a8e77592a2b60c7b57d6108684b3 /flake.nix | |
| parent | ec87f10653a2fa184666bff292118af444c2684a (diff) | |
| download | home-manager-config-5428eb798a91c1ca89f74a26ff4016842891930e.tar.gz home-manager-config-5428eb798a91c1ca89f74a26ff4016842891930e.zip | |
using devenv shell for development shell for home manager config
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 35 |
1 files changed, 21 insertions, 14 deletions
@@ -1,6 +1,5 @@ { description = "Home Manager configuration of arpit."; - inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { @@ -9,7 +8,15 @@ }; base16.url = "github:SenchoPens/base16.nix"; nixvim.url = "github:nix-community/nixvim"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + devenv = { + url = "github:cachix/devenv"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + nixConfig = { + extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; + extra-substituters = "https://devenv.cachix.org"; }; outputs = @@ -19,26 +26,26 @@ home-manager, base16, nixvim, - pre-commit-hooks, + devenv, ... - }: + }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { - checks.${system}.pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = ./.; - hooks = { - nixfmt.enable = true; - }; - }; formatter.${system} = pkgs.nixfmt-tree; - devShells.${system}.default = pkgs.mkShell { - inherit (self.checks.${system}.pre-commit-check) shellHook; - buildInputs = self.checks.${system}.pre-commit-check.enabledPackages; + devShells.${system}.default = devenv.lib.mkShell { + inherit inputs pkgs; + modules = [ + ( + { ... }: + { + git-hooks.hooks.nixfmt.enable = true; + } + ) + ]; }; - homeConfigurations = { arpit = let |
