diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..44610e5 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake; diff --git a/.gitignore b/.gitignore index 9448a835..726d2d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ result - - +.direnv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..de6e0e3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +default_install_hook_types: + - pre-commit + - commit-msg + +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.18.2 + hooks: + - id: gitleaks + stages: [commit] + + - repo: local + hooks: + - id: nixpkgs-fmt + name: Check formatting + entry: nixfmt + language: system + files: .*\.nix$ + args: [-c] + stages: [commit] diff --git a/flake.nix b/flake.nix index 3fd7889..a56642a 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,15 @@ }; }; + devShell."${system}" = pkgs.mkShell { + buildInputs = with pkgs; [ + pre-commit + nixfmt-rfc-style + ]; + shellHook = '' + ${pkgs.pre-commit}/bin/pre-commit install -f + ''; + }; templates = import ./templates; }; } diff --git a/modules/system/mime.nix b/modules/system/mime.nix index e69de29..ffcd441 100644 --- a/modules/system/mime.nix +++ b/modules/system/mime.nix @@ -0,0 +1 @@ +{ }