diff --git a/.gitattributes b/.gitattributes index 1917907..9f1cb3c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,2 @@ *.yaml diff=sopsdiffer -.pre-commit-config.yaml diff=default diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index aca0e80..137d72d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -18,10 +18,10 @@ jobs: run: nix flake show - name: Check formatting - run: nix fmt -- --ci . + run: nix fmt --check . - name: Run deadnix - run: nix run nixpkgs#deadnix ./modules ./lib + run: deadnix ./modules ./lib - name: Run statix - run: nix run nixpkgs#statix check -- . + run: statix check ./modules ./lib diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index acbde48..a6b8116 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,11 +3,11 @@ repos: hooks: - id: nixfmt name: nixfmt - entry: nix + entry: nixfmt language: system types: [nix] pass_filenames: false - args: ["fmt"] + args: ["."] - id: deadnix name: deadnix @@ -16,10 +16,3 @@ repos: types: [nix] args: ["./modules", "./lib"] - - id: statix - name: statix - entry: statix - language: system - types: [nix] - args: ["check", "--", "."] - diff --git a/.sops.yaml b/.sops.yaml index bc2cfd3..09d78a0 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -60,6 +60,8 @@ creation_rules: key_groups: - age: - *system_rainbow_planet + - path_regex: ^\.pre-commit-config\.yaml$ + # Plain YAML file, not encrypted - path_regex: modules/shared/secrets.yaml$ key_groups: - age: diff --git a/flake.nix b/flake.nix index 9320164..f3b09bf 100644 --- a/flake.nix +++ b/flake.nix @@ -100,7 +100,7 @@ ]; in { - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree); + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt); # Darwin (macOS) hosts darwinConfigurations = { diff --git a/modules/shared/home/general/default.nix b/modules/shared/home/general/default.nix index 5b3aeda..dd045ca 100644 --- a/modules/shared/home/general/default.nix +++ b/modules/shared/home/general/default.nix @@ -51,7 +51,7 @@ in nodejs nurl nvd - nixfmt-tree + nixfmt onefetch powershell pre-commit