mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
commit
104a5075a1
2 changed files with 17 additions and 29 deletions
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719745305,
|
||||
"narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=",
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719468428,
|
||||
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
|
||||
"lastModified": 1720368505,
|
||||
"narHash": "sha256-5r0pInVo5d6Enti0YwUSQK4TebITypB42bWy5su3MrQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
|
||||
"rev": "ab82a9612aa45284d4adf69ee81871a389669a9e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719749022,
|
||||
"narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
|
||||
"lastModified": 1720374026,
|
||||
"narHash": "sha256-ludjqxhR/5lXwJ1H6zHmZqp+4e8dFPHE9FIZ2eBh2G4=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
|
||||
"rev": "e1d7bd5ec6fc389eb3a90e232c4150338bf6a508",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
28
treefmt.nix
28
treefmt.nix
|
|
@ -1,17 +1,19 @@
|
|||
{ lib, inputs, ... }: {
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem = { pkgs, ... }: {
|
||||
perSystem = {
|
||||
treefmt = {
|
||||
# Used to find the project root
|
||||
projectRootFile = "flake.lock";
|
||||
projectRootFile = ".git/config";
|
||||
|
||||
programs = {
|
||||
deadnix.enable = true;
|
||||
deno.enable = true;
|
||||
mypy.enable = true;
|
||||
ruff.check = true;
|
||||
ruff.format = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
shellcheck.enable = true;
|
||||
shfmt.enable = true;
|
||||
|
|
@ -20,25 +22,11 @@
|
|||
|
||||
settings.formatter =
|
||||
let
|
||||
sh-includes = [ "*.sh" "direnvrc" ];
|
||||
shellIncludes = [ "*.sh" "direnvrc" ];
|
||||
in
|
||||
{
|
||||
python = {
|
||||
command = "sh";
|
||||
options = [
|
||||
"-eucx"
|
||||
''
|
||||
${lib.getExe pkgs.ruff} --fix "$@"
|
||||
${lib.getExe pkgs.ruff} format "$@"
|
||||
''
|
||||
"--" # this argument is ignored by bash
|
||||
];
|
||||
includes = [ "*.py" ];
|
||||
};
|
||||
|
||||
shellcheck.includes = sh-includes;
|
||||
|
||||
shfmt.includes = sh-includes;
|
||||
shellcheck.includes = shellIncludes;
|
||||
shfmt.includes = shellIncludes;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue