From 3850c295958ad7b189413289ebf30a1adadd82c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 15 Sep 2023 08:03:10 +0200 Subject: [PATCH] replace statix with deadnix statix does sometimes weird stuff while deadnix is even better at finding deadcode --- flake.nix | 4 ++-- lib/tests.nix | 4 ++-- lib/types/btrfs.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 986a2af..6a7d28b 100644 --- a/flake.nix +++ b/flake.nix @@ -60,14 +60,14 @@ name = "format"; runtimeInputs = with pkgs; [ nixpkgs-fmt - statix deno + deadnix ]; text = '' set -o xtrace nixpkgs-fmt "$@" - statix fix "$@" deno fmt "$@" + deadnix --edit "$@" ''; } ); diff --git a/lib/tests.nix b/lib/tests.nix index a55e67a..62cee83 100644 --- a/lib/tests.nix +++ b/lib/tests.nix @@ -86,7 +86,7 @@ let tsp-config = tsp-generator.config testConfigBooted; num-disks = builtins.length (lib.attrNames testConfigBooted.disko.devices.disk); - installed-system = { modulesPath, ... }: { + installed-system = { ... }: { imports = [ (lib.optionalAttrs (testMode == "direct") tsp-config) (lib.optionalAttrs (testMode == "module") { @@ -149,7 +149,7 @@ let makeTest' { name = "disko-${name}"; - nodes.machine = { pkgs, modulesPath, ... }: { + nodes.machine = { pkgs, ... }: { imports = [ (lib.optionalAttrs (testMode == "module") { imports = [ diff --git a/lib/types/btrfs.nix b/lib/types/btrfs.nix index 507f0b7..706054b 100644 --- a/lib/types/btrfs.nix +++ b/lib/types/btrfs.nix @@ -68,7 +68,7 @@ internal = true; readOnly = true; type = lib.types.functionTo diskoLib.jsonType; - default = dev: { }; + default = _dev: { }; description = "Metadata"; }; _create = diskoLib.mkCreateOption {