diff options
| -rw-r--r-- | flake.nix | 12 | ||||
| -rw-r--r-- | parts/dev.nix | 32 |
2 files changed, 25 insertions, 19 deletions
@@ -112,15 +112,21 @@ }; }; - outputs = inputs: - inputs.flake-parts.lib.mkFlake + outputs = { + flake-parts, + getchoo, + pre-commit-hooks, + ... + } @ inputs: + flake-parts.lib.mkFlake {inherit inputs;} { imports = [ ./hosts ./parts ./users - inputs.getchoo.flakeModules.homeConfigurations + getchoo.flakeModules.homeConfigurations + pre-commit-hooks.flakeModule ]; }; } diff --git a/parts/dev.nix b/parts/dev.nix index c0b5490..200f42d 100644 --- a/parts/dev.nix +++ b/parts/dev.nix @@ -1,41 +1,41 @@ { inputs, - self, + lib, ... -}: { +}: let + inherit (inputs) ragenix; +in { perSystem = { + config, pkgs, system, ... }: { - checks = { - pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { - src = self; - hooks = { - actionlint.enable = true; - alejandra.enable = true; - deadnix.enable = true; - nil.enable = true; - statix.enable = true; - stylua.enable = true; - }; + pre-commit = { + settings.hooks = { + actionlint.enable = true; + alejandra.enable = true; + deadnix.enable = true; + nil.enable = true; + statix.enable = true; + stylua.enable = true; }; }; devShells = { default = pkgs.mkShell { - inherit (self.checks.${system}.pre-commit-check) shellHook; + shellHook = config.pre-commit.installationScript; packages = with pkgs; [ actionlint alejandra deadnix just - inputs.ragenix.packages.${system}.ragenix + ragenix.packages.${system}.ragenix statix stylua ] - ++ lib.optional (system == "x86_64-linux") deploy-rs; + ++ lib.optional (system == "x86_64-linux") pkgs.deploy-rs; }; }; |
