Skip to content

Commit ff810d5

Browse files
committed
dev: add nixf-diagnose, update deps
1 parent b9e14b8 commit ff810d5

7 files changed

Lines changed: 65 additions & 54 deletions

File tree

flake.lock

Lines changed: 29 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
inputs = {
44
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
55
nixpkgs2505.url = "github:NixOS/nixpkgs/2b0d2b456e4e8452cf1c16d00118d145f31160f9"; # to use for older packages
6-
flake-parts.url = "github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9";
7-
devshell.url = "github:numtide/devshell/17ed8d9744ebe70424659b0ef74ad6d41fc87071";
8-
import-tree.url = "github:vic/import-tree/3c23749d8013ec6daa1d7255057590e9ca726646";
9-
git-hooks-nix.url = "github:cachix/git-hooks.nix/b68b780b69702a090c8bb1b973bab13756cc7a27";
6+
flake-parts.url = "github:hercules-ci/flake-parts/";
7+
devshell.url = "github:numtide/devshell/";
8+
import-tree.url = "github:vic/import-tree/";
9+
git-hooks-nix.url = "github:cachix/git-hooks.nix/";
1010
treefmt-nix.url = "github:numtide/treefmt-nix";
1111
};
1212
outputs =
@@ -156,11 +156,28 @@
156156
deadnix.enable = true;
157157
statix.enable = true;
158158
nixfmt.enable = true;
159+
nixf-diagnose.enable = true;
160+
yamlfmt.enable = true;
161+
json-sort-cli.enable = true;
159162
};
160163

161164
settings = {
162165
global.excludes = [
166+
"LICENSE"
167+
"flake.lock"
168+
"*/flake.lock"
169+
".envrc"
163170
".direnv/*"
171+
"*/.gitignore"
172+
".github/*"
173+
"Pictures/*"
174+
"result/*"
175+
"*.png"
176+
"*.jpg"
177+
"*.conf"
178+
"*.ini"
179+
"docs/fonts/*"
180+
"**/*.conf"
164181
];
165182

166183
formatter = {
@@ -171,6 +188,9 @@
171188
strict = true;
172189
indent = 4;
173190
};
191+
nixf-diagnose = {
192+
priority = 99;
193+
};
174194
};
175195
};
176196
};

nix/editors/vscode/default.nix

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,13 @@ in
2626
fi
2727
2828
cat << EOF > .vscode/settings.json
29-
${if cfgcode.enableSettings then (builtins.toString settingsToJSON) else "{}"}
29+
${if cfgcode.enableSettings then (toString settingsToJSON) else "{}"}
3030
EOF
3131
3232
echo "VSCode settings have been successfully written"
3333
3434
cat << EOF > .vscode/extensions.json
35-
${
36-
if cfgcode.enableExtensions then
37-
(builtins.toString extensionsToJSON)
38-
else
39-
"{ \"recommendations\" = []}"
40-
}
35+
${if cfgcode.enableExtensions then (toString extensionsToJSON) else "{ \"recommendations\" = []}"}
4136
EOF
4237
echo "VSCode extensions.json have been successfully written"
4338
'';

nix/helpers/default.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ rec {
44
list,
55
attrs,
66
targetAttr,
7-
}@args:
8-
map (path: (import path { inherit (args) attrs; }).${targetAttr}) list;
7+
}:
8+
map (path: (import path { inherit attrs; }).${targetAttr}) list;
99
# bulkImportFromFileDirectory :: (path: String, attrs: AttrSet) -> [Path] -> [[Package]] -> [Package]
1010
bulkImportFromFileDirectory =
1111
{
@@ -53,7 +53,7 @@ rec {
5353
versionConfig,
5454
}:
5555
if lib.versionAtLeast versionConfig versionCriterion then
56-
pkgs."${packageName}${builtins.toString versionConfig}"
56+
pkgs."${packageName}${toString versionConfig}"
5757
else
5858
pkgsOlder."${packageName}${versionConfig}";
5959
selectFromOlderPkgsInt =
@@ -65,7 +65,7 @@ rec {
6565
versionConfig,
6666
}:
6767
if versionConfig < versionCriterion then
68-
pkgsOlder."${packageName}${builtins.toString versionConfig}"
68+
pkgsOlder."${packageName}${toString versionConfig}"
6969
else
70-
pkgs."${packageName}${builtins.toString versionConfig}";
70+
pkgs."${packageName}${toString versionConfig}";
7171
}

nix/languages/cpp/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ in
6060
# NixOS 25.05 is the last version to support GCC 9 - 12. This is included in this flake for backwards compat.
6161
type = t.ints.between minGCC maxGCC;
6262
default = maxGCC;
63-
description = "The GCC version to use. Defaults to GCC ${builtins.toString maxGCC}. NixOS 25.05 is the last version to support GCC 9 through to 12.";
63+
description = "The GCC version to use. Defaults to GCC ${toString maxGCC}. NixOS 25.05 is the last version to support GCC 9 through to 12.";
6464
};
6565
};
6666

@@ -80,7 +80,7 @@ in
8080
# NixOS 25.05 is the last version to support LLVM 12 - 17. This is included in this flake for backwards compat.
8181
type = t.ints.between minLLVM maxLLVM;
8282
default = maxLLVM;
83-
description = "The LLVM version to use. Defaults to LLVM ${builtins.toString maxLLVM}. NixOS 25.05 is the last version to support LLVM 12 through to 17.";
83+
description = "The LLVM version to use. Defaults to LLVM ${toString maxLLVM}. NixOS 25.05 is the last version to support LLVM 12 through to 17.";
8484
};
8585
packages = lib.mkOption {
8686
type = t.listOf t.packages;

nix/languages/fortran/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in
2828
# NixOS 25.05 is the last version to support GCC 9 - 12. This is included in this flake for backwards compat.
2929
type = t.ints.between minGCC maxGCC;
3030
default = maxGCC;
31-
description = "The gfortran version to use. Defaults to GCC ${builtins.toString maxGCC}. NixOS 25.05 is the last version to support gfortran 9 through to 12.";
31+
description = "The gfortran version to use. Defaults to GCC ${toString maxGCC}. NixOS 25.05 is the last version to support gfortran 9 through to 12.";
3232
};
3333
};
3434
};

nix/languages/js/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ in
8888
]
8989
)
9090
++ lib.optionals (!cfg.asdf && cfg.corepack.enable) [
91-
pkgs."corepack_${builtins.toString cfg.corepack.version}"
91+
pkgs."corepack_${toString cfg.corepack.version}"
9292
]
9393
++ lib.optionals (!cfg.asdf && !cfg.corepack.enable) (
9494
builtins.concatLists [
9595
[
96-
pkgs."nodejs_${builtins.toString cfg.nodeVersion}"
96+
pkgs."nodejs_${toString cfg.nodeVersion}"
9797
cfg.packageManager
9898
]
9999
cfg.nodePackages

0 commit comments

Comments
 (0)