[URGENT]: treefmt / treefmt-nix dithced
Signed-off-by: s0me1newithhand7s <117505144+s0me1newithhand7s@users.noreply.github.com>
This commit is contained in:
parent
bb2f60ef95
commit
1726d090c8
3 changed files with 26 additions and 44 deletions
19
.github/workflows/flake-check-action.yaml
vendored
19
.github/workflows/flake-check-action.yaml
vendored
|
|
@ -2,20 +2,25 @@
|
|||
name: "Flake Check Action"
|
||||
run-name: "nfc"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
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"
|
||||
|
|
|
|||
30
.github/workflows/treefmt.toml
vendored
30
.github/workflows/treefmt.toml
vendored
|
|
@ -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 = [
|
||||
"."
|
||||
]
|
||||
21
flake.nix
21
flake.nix
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue