From b308e705a57ef77c734837ab50a4e49e16dac18d Mon Sep 17 00:00:00 2001 From: Samuel Shuert Date: Wed, 19 Nov 2025 20:48:10 +0000 Subject: [PATCH] fix(pm): satisfy deadnix Change-Id: xksnzzzvllkyvrnlqkqmoopvxkmrntts deadnix finds unused nix code, some versions were giving us trouble as we rely on some unused parameters to be introspected by callers... though not all of them --- .tangled/workflows/deadnix.yml | 2 +- packetmix/ci.nix | 41 +++++++++++----------- packetmix/homes/default.nix | 1 - packetmix/nilla.nix | 1 - packetmix/packages/OpenLinkHub/default.nix | 1 - packetmix/packages/kavita/default.nix | 1 - packetmix/systems/teal/vaultwarden.nix | 4 --- 7 files changed, 21 insertions(+), 30 deletions(-) diff --git a/.tangled/workflows/deadnix.yml b/.tangled/workflows/deadnix.yml index d4f557b5..9081d805 100644 --- a/.tangled/workflows/deadnix.yml +++ b/.tangled/workflows/deadnix.yml @@ -18,4 +18,4 @@ steps: command: | set -eo pipefail - deadnix --exclude **/npins --no-underscore --fail | ansifilter + deadnix --exclude **/npins --no-underscore --no-lambda-pattern-names --fail | ansifilter diff --git a/packetmix/ci.nix b/packetmix/ci.nix index cd297171..e95646bb 100644 --- a/packetmix/ci.nix +++ b/packetmix/ci.nix @@ -6,27 +6,26 @@ let base = import ./nilla.nix; project = base.extend { modules = [ - ( - { config, ... }: - { - config.inputs = ( - builtins.mapAttrs ( - _name: value: - if value ? settings.configuration.allowUnfree then - { - settings.configuration = { - allowUnfree = false; - allowUnfreePredicate = ( - x: (x ? meta.license) && (x.meta.license.shortName == "unfreeRedistributable") - ); # As we push to a public cachix, we can't use non-redistributable unfree software in CI - }; - } - else - { } - ) base.inputs - ); - } - ) + + { + config.inputs = ( + builtins.mapAttrs ( + _name: value: + if value ? settings.configuration.allowUnfree then + { + settings.configuration = { + allowUnfree = false; + allowUnfreePredicate = ( + x: (x ? meta.license) && (x.meta.license.shortName == "unfreeRedistributable") + ); # As we push to a public cachix, we can't use non-redistributable unfree software in CI + }; + } + else + { } + ) base.inputs + ); + } + { config.lib.ci = true; } diff --git a/packetmix/homes/default.nix b/packetmix/homes/default.nix index 7ef74466..81b8dc78 100644 --- a/packetmix/homes/default.nix +++ b/packetmix/homes/default.nix @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: MIT -{ config, ... }: { config.homes."maya:x86_64-linux" = { modules = [ diff --git a/packetmix/nilla.nix b/packetmix/nilla.nix index ca134f81..8fe1cfe2 100644 --- a/packetmix/nilla.nix +++ b/packetmix/nilla.nix @@ -106,7 +106,6 @@ nilla.create ( { pkgs, system, - npins, mkShell, kdePackages, ... diff --git a/packetmix/packages/OpenLinkHub/default.nix b/packetmix/packages/OpenLinkHub/default.nix index ee310198..9e0fa644 100644 --- a/packetmix/packages/OpenLinkHub/default.nix +++ b/packetmix/packages/OpenLinkHub/default.nix @@ -1,7 +1,6 @@ # SPDX-FileCopyrightText: 2025 FreshlyBakedCake # # SPDX-License-Identifier: MIT -{ config, ... }: { config.packages.openlinkhub = { systems = [ "x86_64-linux" ]; diff --git a/packetmix/packages/kavita/default.nix b/packetmix/packages/kavita/default.nix index 252f4f47..7779e512 100644 --- a/packetmix/packages/kavita/default.nix +++ b/packetmix/packages/kavita/default.nix @@ -2,7 +2,6 @@ # SPDX-FileCopyrightText: 2025 Nixpkgs Maintainers # # SPDX-License-Identifier: MIT -{ config, ... }: { config.packages.kavita = { systems = [ "x86_64-linux" ]; diff --git a/packetmix/systems/teal/vaultwarden.nix b/packetmix/systems/teal/vaultwarden.nix index 6c2ad23e..a60c2e62 100644 --- a/packetmix/systems/teal/vaultwarden.nix +++ b/packetmix/systems/teal/vaultwarden.nix @@ -2,10 +2,6 @@ # # SPDX-License-Identifier: MIT -{ - config, - ... -}: { services.vaultwarden = { enable = true; -- 2.43.0