[URGENT]: treefmt / treefmt-nix dithced

Signed-off-by: s0me1newithhand7s <117505144+s0me1newithhand7s@users.noreply.github.com>
This commit is contained in:
s0me1newithhand7s 2025-10-15 12:11:46 +03:00
parent bb2f60ef95
commit 1726d090c8
No known key found for this signature in database
3 changed files with 26 additions and 44 deletions

View file

@ -5,17 +5,22 @@ on:
workflow_dispatch:
push:
pull_request:
types: [opened,edited,synchronize,reopened]
types: [
opened,
edited,
synchronize,
reopened
]
jobs:
checker:
runs-on: "ubuntu-latest"
steps:
- name: "repo checkout"
uses: "actions/checkout@v4"
- name: "nix install"
- name: "Repo checkout"
uses: "actions/checkout"
- name: "Nix Package Manager install"
uses: "DeterminateSystems/nix-installer-action@v16"
- name: "flake check"
- name: "Flake.lock checking"
uses: "DeterminateSystems/flake-checker-action@v5"
- name: "nix fmt"
- name: "Formatter run"
run: "nix fmt"

View file

@ -1,30 +0,0 @@
[formatter.alejandra]
command = "alejandra"
options = [
"--experimental-config",
"fmtconf/alejandra.toml",
"--check",
]
includes = [
"."
]
[formatter.statix]
command = "statix"
options = [
"check",
"--config",
"fmtconf/statix.toml",
]
includes = [
"."
]
[formatter.deadnix]
command = "deadnix"
options = [
"--fail",
]
includes = [
"."
]

View file

@ -225,23 +225,30 @@
} @ inputs: {
formatter = {
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.writeShellApplication {
name = "treefmt-nix-lite";
name = "hand7sfmt";
runtimeInputs = with nixpkgs.legacyPackages.x86_64-linux; [
alejandra
statix
deadnix
treefmt
];
text = ''
treefmt \
--ci \
--config-file \
"${self}/.github/workflows/"
${nixpkgs.lib.getExe nixpkgs.legacyPackages.x86_64-linux.alejandra} \
--experimental-config \
${self}/.github/workflows/alejandra.toml \
--check \
${self} && ${nixpkgs.lib.getExe nixpkgs.legacyPackages.x86_64-linux.statix} \
check \
--config \
${self}/.github/workflows/statix.toml \
${self} && ${nixpkgs.lib.getExe nixpkgs.legacyPackages.x86_64-linux.deadnix} \
--fail \
${self}
'';
};
};
homeConfigurations = {
hand7s = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;