diff options
Diffstat (limited to 'parts')
| -rw-r--r-- | parts/deployment.nix | 2 | ||||
| -rw-r--r-- | parts/dev.nix | 30 |
2 files changed, 15 insertions, 17 deletions
diff --git a/parts/deployment.nix b/parts/deployment.nix index f0ab7d1..b9e43da 100644 --- a/parts/deployment.nix +++ b/parts/deployment.nix @@ -69,7 +69,7 @@ in { cfg = config.services.teawiebot; inherit (lib) mkEnableOption mkIf; in { - options.services.teawiebot.enable = mkEnableOption "enable teawiebot"; + options.services.teawiebot.enable = mkEnableOption "teawiebot"; config.systemd.services = mkIf cfg.enable { teawiebot = { diff --git a/parts/dev.nix b/parts/dev.nix index 246789a..fbd319b 100644 --- a/parts/dev.nix +++ b/parts/dev.nix @@ -4,12 +4,23 @@ ... }: { perSystem = { + config, craneLib, pkgs, system, toolchain, ... }: { + pre-commit = { + settings.hooks = { + actionlint.enable = true; + alejandra.enable = true; + deadnix.enable = true; + nil.enable = true; + statix.enable = true; + }; + }; + checks = let inherit (craneLib) cargoAudit cargoClippy cleanCargoSource cargoFmt; @@ -28,24 +39,11 @@ }); fmt = cargoFmt commonArgs; - - 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; - }; - }; }; - devShells = let - inherit (pkgs) mkShell; - in { - default = mkShell { - inherit (self.checks.${system}.pre-commit-check) shellHook; + devShells = { + default = pkgs.mkShell { + shellHook = config.pre-commit.installationScript; packages = with pkgs; [ actionlint alejandra |
