Your one-stop-cake-shop for everything Freshly Baked has to offer

ci: add deadnix #40

merged opened by a.starrysky.fyi targeting main from private/minion/push-vmslusqkrqom

deadnix is a package to find unused nix code, we can add it to enforce that we don't leave let bindings/inputs/etc. around when they are not needed

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3lzosuzwcwg22
+160 -50
Diff #2
+1 -1
packetmix/ci.nix
··· 7 project = base.extend { 8 modules = [ 9 ( 10 - { config, lib, ... }: 11 { 12 config.inputs = ( 13 builtins.mapAttrs (
··· 7 project = base.extend { 8 modules = [ 9 ( 10 + { config, ... }: 11 { 12 config.inputs = ( 13 builtins.mapAttrs (
+1 -1
packetmix/homes/catppuccin/catppuccin.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { project, lib, ... }: 6 { 7 imports = [ project.inputs.catppuccin.result.homeModules.catppuccin ]; 8 config.catppuccin.enable = true;
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 + { project, ... }: 6 { 7 imports = [ project.inputs.catppuccin.result.homeModules.catppuccin ]; 8 config.catppuccin.enable = true;
-1
packetmix/homes/coded/catppuccin.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { project, ... }: 6 { 7 config.catppuccin = { 8 flavor = "macchiato";
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 config.catppuccin = { 7 flavor = "macchiato";
-1
packetmix/homes/common/gtk.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { pkgs, ... }: 6 { 7 gtk.enable = true; 8 }
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 gtk.enable = true; 7 }
-1
packetmix/homes/common/helix.nix
··· 4 5 { 6 config, 7 - pkgs, 8 project, 9 system, 10 ...
··· 4 5 { 6 config, 7 project, 8 system, 9 ...
-3
packetmix/homes/default.nix
··· 4 # SPDX-License-Identifier: MIT 5 6 { config, ... }: 7 - let 8 - nixpkgs = config.inputs.nixpkgs.result; 9 - in 10 { 11 config.homes."maya:x86_64-linux" = { 12 modules = [
··· 4 # SPDX-License-Identifier: MIT 5 6 { config, ... }: 7 { 8 config.homes."maya:x86_64-linux" = { 9 modules = [
-2
packetmix/homes/development/helix.nix
··· 4 5 { 6 pkgs, 7 - project, 8 - system, 9 ... 10 }: 11 {
··· 4 5 { 6 pkgs, 7 ... 8 }: 9 {
-1
packetmix/homes/development/tmux.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { lib, ... }: 6 { 7 programs.tmux.enable = true; 8 programs.fzf.tmux.enableShellIntegration = true; # Needed for using sesh - which relies on fzf+tmux
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 programs.tmux.enable = true; 7 programs.fzf.tmux.enableShellIntegration = true; # Needed for using sesh - which relies on fzf+tmux
+4 -1
packetmix/homes/espanso/espanso.nix
··· 3 # 4 # SPDX-License-Identifier: MIT 5 6 - { config, lib, ... }: 7 { 8 home.file = { 9 ".cache/espanso/kvs/has_completed_wizard" = {
··· 3 # 4 # SPDX-License-Identifier: MIT 5 6 + { 7 + config, 8 + ... 9 + }: 10 { 11 home.file = { 12 ".cache/espanso/kvs/has_completed_wizard" = {
-2
packetmix/homes/maya/niri.nix
··· 4 # SPDX-License-Identifier: MIT 5 6 { 7 - project, 8 - config, 9 pkgs, 10 lib, 11 ...
··· 4 # SPDX-License-Identifier: MIT 5 6 { 7 pkgs, 8 lib, 9 ...
-3
packetmix/homes/minion/niri.nix
··· 3 # SPDX-License-Identifier: MIT 4 5 { 6 - project, 7 - config, 8 pkgs, 9 - lib, 10 ... 11 }: 12 {
··· 3 # SPDX-License-Identifier: MIT 4 5 { 6 pkgs, 7 ... 8 }: 9 {
-2
packetmix/homes/niri/niri.nix
··· 104 105 binds = 106 let 107 - inherit (config.lib.niri) actions; 108 - 109 mod = "Super"; 110 mod1 = "Alt"; 111
··· 104 105 binds = 106 let 107 mod = "Super"; 108 mod1 = "Alt"; 109
-1
packetmix/modules/nilla-home/home.nix
··· 4 5 { lib, config }: 6 let 7 - inherit (config) inputs; 8 homes-type = import ./homes-type.nix { inherit lib config; }; 9 in 10 {
··· 4 5 { lib, config }: 6 let 7 homes-type = import ./homes-type.nix { inherit lib config; }; 8 in 9 {
-2
packetmix/modules/nilla-home/nixos.nix
··· 30 31 config.modules = 32 let 33 - system = submodule.config.pkgs.system; 34 warn' = builtins.warn or builtins.trace; # builtins.warn doesn't exist on some versions of nix/lix 35 warnIf = 36 condition: message: value: ··· 52 { 53 home, 54 homeName, 55 - username, 56 }@identity: 57 warnIf (home.home-manager != homeManager) 58 "The home \"${homeName}\" isn't using the same home-manager input as the NixOS system \"${name}\". This may work, but is not officially supported by the Nilla Home or Nilla NixOS maintainers. Please fix this before reporting any bugs you may find."
··· 30 31 config.modules = 32 let 33 warn' = builtins.warn or builtins.trace; # builtins.warn doesn't exist on some versions of nix/lix 34 warnIf = 35 condition: message: value: ··· 51 { 52 home, 53 homeName, 54 }@identity: 55 warnIf (home.home-manager != homeManager) 56 "The home \"${homeName}\" isn't using the same home-manager input as the NixOS system \"${name}\". This may work, but is not officially supported by the Nilla Home or Nilla NixOS maintainers. Please fix this before reporting any bugs you may find."
+123 -6
packetmix/nilla.nix
··· 6 pins = import ./npins; 7 8 nilla = import pins.nilla; 9 - 10 - settings = { 11 - nixpkgs.configuration.allowUnfree = true; 12 - "nixos-24.11" = settings.nixpkgs; 13 - nixos-unstable = settings.nixpkgs; 14 - }; 15 in 16 nilla.create ( 17 { config, lib }:
··· 6 pins = import ./npins; 7 8 nilla = import pins.nilla; 9 in 10 nilla.create ( 11 { config, lib }: 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + config.inputs.nilla-home.result.packages.nilla-home.result.${system} 129 + config.inputs.nilla-nixos.result.packages.nilla-nixos.result.${system} 130 + config.inputs.nixos-unstable.result.${system}.quickshell 131 + config.inputs.nixpkgs.result.${system}.deadnix 132 + config.packages.nilla-fmt.result.${system} 133 + config.packages.treefmt.result.${system} 134 + (config.inputs.npins.result { inherit pkgs system; })
-2
packetmix/packages/bluesky-pds/default.nix
··· 9 systems = [ "x86_64-linux" ]; 10 package = 11 { 12 - system, 13 stdenv, 14 nodejs, 15 pnpm_9, 16 - lib, 17 srcOnly, 18 python3, 19 ...
··· 9 systems = [ "x86_64-linux" ]; 10 package = 11 { 12 stdenv, 13 nodejs, 14 pnpm_9, 15 srcOnly, 16 python3, 17 ...
+4 -1
packetmix/systems/common/fonts.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { pkgs, lib, ... }: 6 { 7 fonts.packages = [ 8 pkgs.cantarell-fonts
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 + { 6 + pkgs, 7 + ... 8 + }: 9 { 10 fonts.packages = [ 11 pkgs.cantarell-fonts
-1
packetmix/systems/common/inputs.nix
··· 4 5 { 6 project, 7 - pkgs, 8 lib, 9 ... 10 }:
··· 4 5 { 6 project, 7 lib, 8 ... 9 }:
+4 -1
packetmix/systems/default.nix
··· 3 # 4 # SPDX-License-Identifier: MIT 5 6 - { config, lib, ... }: 7 let 8 nixpkgs = config.inputs.nixpkgs.result; 9 in
··· 3 # 4 # SPDX-License-Identifier: MIT 5 6 + { 7 + config, 8 + ... 9 + }: 10 let 11 nixpkgs = config.inputs.nixpkgs.result; 12 in
-1
packetmix/systems/emden/hardware-configuration.nix
··· 5 { 6 config, 7 lib, 8 - pkgs, 9 modulesPath, 10 ... 11 }:
··· 5 { 6 config, 7 lib, 8 modulesPath, 9 ... 10 }:
-1
packetmix/systems/emden/steam.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { lib, ... }: 6 { 7 programs.steam = { 8 enable = true;
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 programs.steam = { 7 enable = true;
+1 -1
packetmix/systems/espanso/nixpkgs-328890--espanso-capdacoverride.nix
··· 42 43 config = lib.mkIf cfg.enable { 44 nixpkgs.overlays = [ 45 - (final: prev: { 46 _espanso-wayland-orig = prev.espanso-wayland; 47 espanso-wayland = 48 pkgs.callPackage ./nixpkgs-328890--espanso-capdacoverride/espanso-capdacoverride.nix
··· 42 43 config = lib.mkIf cfg.enable { 44 nixpkgs.overlays = [ 45 + (_final: prev: { 46 _espanso-wayland-orig = prev.espanso-wayland; 47 espanso-wayland = 48 pkgs.callPackage ./nixpkgs-328890--espanso-capdacoverride/espanso-capdacoverride.nix
-1
packetmix/systems/gaming/steam.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { lib, ... }: 6 { 7 programs.steam = { 8 enable = true;
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 programs.steam = { 7 enable = true;
-1
packetmix/systems/marbled/hardware-configuration.nix
··· 6 { 7 config, 8 lib, 9 - pkgs, 10 modulesPath, 11 ... 12 }:
··· 6 { 7 config, 8 lib, 9 modulesPath, 10 ... 11 }:
-1
packetmix/systems/niri/niri.nix
··· 5 # 6 # This file is based on some work from sodiboo's niri-flake, see https://github.com/sodiboo/niri-flake/blob/main/flake.nix 7 { 8 - project, 9 pkgs, 10 lib, 11 ...
··· 5 # 6 # This file is based on some work from sodiboo's niri-flake, see https://github.com/sodiboo/niri-flake/blob/main/flake.nix 7 { 8 pkgs, 9 lib, 10 ...
-1
packetmix/systems/personal/configuration.nix
··· 8 9 { 10 project, 11 - config, 12 system, 13 pkgs, 14 ...
··· 8 9 { 10 project, 11 system, 12 pkgs, 13 ...
-1
packetmix/systems/redhead/hardware-configuration.nix
··· 5 { 6 config, 7 lib, 8 - pkgs, 9 modulesPath, 10 ... 11 }:
··· 5 { 6 config, 7 lib, 8 modulesPath, 9 ... 10 }:
-4
packetmix/systems/redhead/remoteBuilds.nix
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 - { 6 - lib, 7 - ... 8 - }: 9 { 10 nix = { 11 distributedBuilds = true;
··· 2 # 3 # SPDX-License-Identifier: MIT 4 5 { 6 nix = { 7 distributedBuilds = true;
+1 -2
packetmix/systems/teal/pds.nix
··· 4 5 { 6 project, 7 - pkgs, 8 system, 9 ... 10 }: ··· 15 ]; 16 17 nixpkgs.overlays = [ 18 - (final: prev: { 19 bluesky-pdsadmin = final.pdsadmin; 20 }) 21 ];
··· 4 5 { 6 project, 7 system, 8 ... 9 }: ··· 14 ]; 15 16 nixpkgs.overlays = [ 17 + (final: _prev: { 18 bluesky-pdsadmin = final.pdsadmin; 19 }) 20 ];
-1
packetmix/systems/teal/stalwart.nix
··· 5 { 6 project, 7 config, 8 - pkgs, 9 lib, 10 ... 11 }:
··· 5 { 6 project, 7 config, 8 lib, 9 ... 10 }:
-2
packetmix/systems/teal/vaultwarden.nix
··· 3 # SPDX-License-Identifier: MIT 4 5 { 6 - pkgs, 7 - lib, 8 config, 9 ... 10 }:
··· 3 # SPDX-License-Identifier: MIT 4 5 { 6 config, 7 ... 8 }:
+21
.tangled/workflows/deadnix.yml
···
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + when: 6 + - event: ["push", "pull_request"] 7 + branch: ["main"] 8 + 9 + engine: nixery 10 + 11 + dependencies: 12 + nixpkgs: 13 + - ansifilter 14 + - deadnix 15 + 16 + steps: 17 + - name: Check for unused nix bindings 18 + command: | 19 + set -eo pipefail 20 + 21 + deadnix --exclude **/npins --no-underscore --fail | ansifilter

History

5 rounds 0 comments
sign up or login to add to the discussion
2 commits
expand
style: remove dead code
ci(treewide): add deadnix
expand 0 comments
pull request successfully merged
2 commits
expand
style: remove dead code
ci(treewide): add deadnix
expand 0 comments
2 commits
expand
style: remove dead code
ci(treewide): add deadnix
expand 0 comments
1 commit
expand
ci(treewide): add deadnix
expand 0 comments
1 commit
expand
ci: add deadnix
expand 0 comments