treewide: remove unused attrs patterns

This commit is contained in:
Benedikt Rips
2025-10-26 22:29:55 +01:00
committed by Austin Horstman
parent 71402c5df3
commit a93d80bcec
78 changed files with 62 additions and 159 deletions

View File

@@ -14,7 +14,7 @@ let
dstDir = "${config.home.homeDirectory}/Library/LaunchAgents"; dstDir = "${config.home.homeDirectory}/Library/LaunchAgents";
launchdConfig = launchdConfig =
{ config, name, ... }: { name, ... }:
{ {
options = { options = {
enable = lib.mkEnableOption name; enable = lib.mkEnableOption name;

View File

@@ -1,4 +1,3 @@
{ lib }:
{ {
# Converts a boolean to a yes/no string. This is used in lots of # Converts a boolean to a yes/no string. This is used in lots of
# configuration formats. # configuration formats.

View File

@@ -5,7 +5,7 @@ rec {
assertions = import ./assertions.nix { inherit lib; }; assertions = import ./assertions.nix { inherit lib; };
booleans = import ./booleans.nix { inherit lib; }; booleans = import ./booleans.nix;
darwin = import ./darwin.nix { inherit lib; }; darwin = import ./darwin.nix { inherit lib; };
deprecations = import ./deprecations.nix { inherit lib; }; deprecations = import ./deprecations.nix { inherit lib; };
generators = import ./generators.nix { inherit lib; }; generators = import ./generators.nix { inherit lib; };

View File

@@ -1,9 +1,3 @@
{
config,
lib,
pkgs,
...
}:
{ {
time = "2025-11-04T15:44:03+00:00"; time = "2025-11-04T15:44:03+00:00";
condition = true; condition = true;

View File

@@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{ {
time = "2026-03-15T20:42:27+00:00"; time = "2026-03-15T20:42:27+00:00";
condition = true; condition = true;

View File

@@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{ {
time = "2026-03-25T17:18:02+00:00"; time = "2026-03-25T17:18:02+00:00";
condition = true; condition = true;

View File

@@ -10,13 +10,11 @@ let
type = lib.types.str; type = lib.types.str;
}; };
initSubmodule = initSubmodule = {
{ config, ... }: options.bash = mkShellInitOption "bash";
{ options.fish = mkShellInitOption "fish";
options.bash = mkShellInitOption "bash"; options.nushell = mkShellInitOption "nushell";
options.fish = mkShellInitOption "fish"; };
options.nushell = mkShellInitOption "nushell";
};
# Preserve $SSH_AUTH_SOCK only if it stems from a forwarded agent which # Preserve $SSH_AUTH_SOCK only if it stems from a forwarded agent which
# is the case if both $SSH_AUTH_SOCK and $SSH_CONNECTION are set. # is the case if both $SSH_AUTH_SOCK and $SSH_CONNECTION are set.

View File

@@ -193,7 +193,6 @@ in
userName, userName,
imap, imap,
passwordCommand, passwordCommand,
aerc,
... ...
}@cfg: }@cfg:
let let

View File

@@ -45,7 +45,7 @@ in
contexts = mkOption { contexts = mkOption {
type = lib.types.attrsOf ( type = lib.types.attrsOf (
lib.types.submodule ( lib.types.submodule (
{ name, config, ... }: { name, ... }:
{ {
freeformType = jsonFormat.type; freeformType = jsonFormat.type;
options = { options = {

View File

@@ -16,7 +16,7 @@ let
mkUlidAssertions = mkUlidAssertions =
path: path:
lib.concatMap ( lib.concatMap (
{ name, value }: { name, ... }:
let let
length = 26; length = 26;
allowed = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; allowed = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";

View File

@@ -178,7 +178,7 @@ let
hotkeysSettingsType = with types; nullOr (attrsOf (listOf (submodule hotkeysOptions))); hotkeysSettingsType = with types; nullOr (attrsOf (listOf (submodule hotkeysOptions)));
extraFilesOptions = extraFilesOptions =
{ name, config, ... }: { name, ... }:
{ {
options = { options = {
source = mkOption { source = mkOption {
@@ -303,7 +303,7 @@ in
description = "List of vaults to create."; description = "List of vaults to create.";
type = types.attrsOf ( type = types.attrsOf (
types.submodule ( types.submodule (
{ name, config, ... }: { name, ... }:
{ {
options = { options = {
enable = mkOption { enable = mkOption {

View File

@@ -6,7 +6,7 @@
}: }:
let let
cfg = config.programs.vicinae; cfg = config.programs.vicinae;
vicinaeLib = import ./lib.nix { inherit lib pkgs; }; vicinaeLib = import ./lib.nix { inherit pkgs; };
jsonFormat = pkgs.formats.json { }; jsonFormat = pkgs.formats.json { };
tomlFormat = pkgs.formats.toml { }; tomlFormat = pkgs.formats.toml { };

View File

@@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
lib,
}: }:
{ {
mkExtension = mkExtension =

View File

@@ -1,6 +1,5 @@
{ {
config, config,
options,
lib, lib,
pkgs, pkgs,
... ...
@@ -46,7 +45,6 @@ let
{ {
name, name,
config, config,
options,
... ...
}: }:
{ {

View File

@@ -1,6 +1,5 @@
{ {
config, config,
options,
lib, lib,
pkgs, pkgs,
... ...

View File

@@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
options,
... ...
}: }:
let let

View File

@@ -1,6 +1,5 @@
{ {
config, config,
options,
lib, lib,
pkgs, pkgs,
... ...

View File

@@ -234,44 +234,41 @@ in
''; '';
default = { }; default = { };
type = lib.types.attrsOf ( type = lib.types.attrsOf (
lib.types.submodule ( lib.types.submodule {
{ name, config, ... }: options = {
{ onDispatch = lib.mkOption {
options = { type = lib.types.str;
onDispatch = lib.mkOption { default = "";
type = lib.types.str; description = ''
default = ""; Submap to use after a dispatch. Can either be a name or `reset` to disable submap after any dispatch.
description = '' '';
Submap to use after a dispatch. Can either be a name or `reset` to disable submap after any dispatch. example = "reset";
'';
example = "reset";
};
settings = lib.mkOption {
type = (with lib.types; attrsOf (listOf str)) // {
description = "Hyprland binds";
};
default = { };
description = ''
Hyprland binds to be put in the submap
'';
example = lib.literalExpression ''
{
binde = [
", right, resizeactive, 10 0"
", left, resizeactive, -10 0"
", up, resizeactive, 0 -10"
", down, resizeactive, 0 10"
];
bind = [
", escape, submap, reset"
];
}
'';
};
}; };
} settings = lib.mkOption {
) type = (with lib.types; attrsOf (listOf str)) // {
description = "Hyprland binds";
};
default = { };
description = ''
Hyprland binds to be put in the submap
'';
example = lib.literalExpression ''
{
binde = [
", right, resizeactive, 10 0"
", left, resizeactive, -10 0"
", up, resizeactive, 0 -10"
", down, resizeactive, 0 10"
];
bind = [
", escape, submap, reset"
];
}
'';
};
};
}
); );
example = lib.literalExpression '' example = lib.literalExpression ''
{ {

View File

@@ -1,8 +1,8 @@
{ {
cfg, cfg,
config,
lib, lib,
moduleName, moduleName,
...
}: }:
let let
inherit (lib) concatStringsSep mapAttrsToList optionalString; inherit (lib) concatStringsSep mapAttrsToList optionalString;

View File

@@ -1,7 +1,5 @@
{ {
config,
lib, lib,
pkgs,
... ...
}: }:

View File

@@ -1,5 +1,3 @@
{ config, pkgs, ... }:
{ {
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.

View File

@@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
home.username = "alice"; home.username = "alice";
home.homeDirectory = "/home/alice"; home.homeDirectory = "/home/alice";

View File

@@ -1,5 +1,3 @@
{ config, pkgs, ... }:
{ {
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.

View File

@@ -16,7 +16,7 @@
}; };
i18n-custom-locales = i18n-custom-locales =
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config = config =
let let

View File

@@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
gtk = { gtk = {
enable = true; enable = true;

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,10 +1,3 @@
{
lib,
pkgs,
config,
...
}:
{ {
programs.algia = { programs.algia = {
enable = true; enable = true;

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,5 +1,3 @@
{ lib, pkgs, ... }:
{ {
dbeaver-without-settings = ./without-settings.nix; dbeaver-without-settings = ./without-settings.nix;
dbeaver-with-settings = ./with-settings.nix; dbeaver-with-settings = ./with-settings.nix;

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { pkgs, ... }:
let let
workspaceDir = workspaceDir =

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { pkgs, ... }:
let let
workspaceDir = workspaceDir =

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { pkgs, ... }:
let let
workspaceDir = workspaceDir =

View File

@@ -1,4 +1,3 @@
{ config, ... }:
{ {
config = { config = {
programs.fish = { programs.fish = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
let let

View File

@@ -2,7 +2,6 @@
lib, lib,
options, options,
pkgs, pkgs,
config,
... ...
}: }:

View File

@@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, ... }:
{ {
programs.go = { programs.go = {

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{ {
programs.kitty = { programs.kitty = {
enable = true; enable = true;

View File

@@ -1,4 +1,3 @@
{ lib, pkgs, ... }:
{ {
config = { config = {
programs.kitty = { programs.kitty = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config = { config = {
programs.mods = { programs.mods = {

View File

@@ -1,4 +1,3 @@
{ config, ... }:
{ {
home.stateVersion = "25.05"; # <= 25.11 home.stateVersion = "25.05"; # <= 25.11
programs.password-store = { programs.password-store = {

View File

@@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
imports = [ ./stubs.nix ]; imports = [ ./stubs.nix ];

View File

@@ -1,6 +1,5 @@
{ {
config, config,
pkgs,
realPkgs, realPkgs,
... ...
}: }:

View File

@@ -1,8 +1,3 @@
{
config,
...
}:
{ {
config = { config = {
programs.ssh = { programs.ssh = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config = { config = {
programs.tex-fmt = { programs.tex-fmt = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config = { config = {
programs.tex-fmt = { programs.tex-fmt = {

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{ {
programs.ty = { programs.ty = {
enable = true; enable = true;

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
config = { config = {
programs.vesktop = { programs.vesktop = {

View File

@@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
config,
... ...
}: }:

View File

@@ -1,7 +1,6 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: }:

View File

@@ -1,4 +1,3 @@
{ config, ... }:
{ {
xdg.enable = true; xdg.enable = true;
home.preferXdgDirectories = true; home.preferXdgDirectories = true;

View File

@@ -1,5 +1,3 @@
{ lib, ... }:
{ {
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;

View File

@@ -1,5 +1,3 @@
{ lib, ... }:
{ {
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
config = { config = {
services.caffeine = { services.caffeine = {

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,7 +1,5 @@
{ {
config, config,
lib,
pkgs,
... ...
}: }:

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, ... }:
{ {
services.darkman = { services.darkman = {

View File

@@ -1,6 +1,5 @@
{ {
config, config,
lib,
... ...
}: }:

View File

@@ -1,6 +1,5 @@
{ {
config, config,
lib,
... ...
}: }:

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
config = { config = {
services.gnome-keyring = { services.gnome-keyring = {

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
config = { config = {
services.gnome-keyring = { services.gnome-keyring = {

View File

@@ -1,5 +1,3 @@
{ lib, pkgs, ... }:
{ {
xsession.windowManager.herbstluftwm = { xsession.windowManager.herbstluftwm = {
enable = true; enable = true;

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
config = { config = {
services.home-manager.autoUpgrade = { services.home-manager.autoUpgrade = {

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;

View File

@@ -1,5 +1,3 @@
{ config, ... }:
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config = { config = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
services.proton-pass-agent = { services.proton-pass-agent = {
enable = true; enable = true;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
services.proton-pass-agent = { services.proton-pass-agent = {
enable = true; enable = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, config, ... }: { config, ... }:
let let
package = config.lib.test.mkStubPackage { package = config.lib.test.mkStubPackage {
buildScript = '' buildScript = ''

View File

@@ -1,5 +1,3 @@
{ config, lib, ... }:
{ {
targets.genericLinux.gpu = { targets.genericLinux.gpu = {
enable = true; enable = true;

View File

@@ -11,7 +11,7 @@ includes = [ "*.nix" ]
[formatter.deadnix] [formatter.deadnix]
command = "deadnix" command = "deadnix"
options = [ "--edit", "--no-lambda-pattern-names" ] options = [ "--edit" ]
includes = [ "*.nix" ] includes = [ "*.nix" ]
[formatter.nixf-diagnose] [formatter.nixf-diagnose]