1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

treewide: remove unused code (#6985)

This commit is contained in:
awwpotato 2025-05-07 08:03:21 -07:00 committed by GitHub
parent 76274a2130
commit 5da6eafceb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
87 changed files with 613 additions and 749 deletions

View file

@ -11,9 +11,9 @@
outputs =
{
self,
nixpkgs,
scss-reset,
...
}:
let
supportedSystems = [

View file

@ -3,20 +3,9 @@
confPath,
confAttr ? null,
check ? true,
newsReadIdsFile ? null,
}:
let
inherit (pkgs.lib)
concatMapStringsSep
fileContents
filter
length
optionalString
removeSuffix
replaceStrings
splitString
;
env = import ../modules {
configuration =

View file

@ -10,11 +10,6 @@
check ? true,
# Deprecated:
configuration ? null,
extraModules ? null,
stateVersion ? null,
username ? null,
homeDirectory ? null,
system ? null,
}@args:
let
msgForRemovedArg = ''

View file

@ -126,7 +126,6 @@ in
i: before: after: entries:
let
name = "${tag}-${toString i}";
i' = i + 1;
in
if entries == [ ] then
hm.dag.empty

View file

@ -2,24 +2,13 @@
let
inherit (lib)
concatStringsSep
defaultFunctor
fixedWidthNumber
hm
imap1
isAttrs
isList
length
listToAttrs
mapAttrs
mkIf
mkOrder
mkOption
mkOptionType
nameValuePair
stringLength
types
warn
;
dagEntryOf =

View file

@ -16,7 +16,6 @@ let
mergeAttrs
mergeDefaultOption
mergeOneOption
mergeOptions
mkOption
mkOptionType
showFiles

View file

@ -6,8 +6,6 @@
}:
let
inherit (lib)
generators
types
mkIf
mkEnableOption
mkPackageOption

View file

@ -16,9 +16,7 @@ let
cfg = config.programs.fish;
pluginModule = types.submodule (
{ config, ... }:
{
pluginModule = types.submodule {
options = {
src = mkOption {
type = types.path;
@ -39,8 +37,7 @@ let
'';
};
};
}
);
};
functionModule = types.submodule {
options = {
@ -480,7 +477,6 @@ in
destructiveSymlinkJoin =
args_@{
name,
paths,
preferLocalBuild ? true,
allowSubstitutes ? false,
postBuild ? "",

View file

@ -17,9 +17,7 @@ let
"tty"
];
backForeSubModule = types.submodule (
{ ... }:
{
backForeSubModule = types.submodule {
options = {
foreground = mkOption {
type = types.str;
@ -31,12 +29,9 @@ let
description = "The background color.";
};
};
}
);
};
profileColorsSubModule = types.submodule (
{ ... }:
{
profileColorsSubModule = types.submodule {
options = {
foregroundColor = mkOption {
type = types.str;
@ -71,12 +66,9 @@ let
description = "The colors for the terminals highlighted area.";
};
};
}
);
};
profileSubModule = types.submodule (
{ name, config, ... }:
{
profileSubModule = types.submodule {
options = {
default = mkOption {
default = false;
@ -230,8 +222,7 @@ let
description = "Background transparency in percent.";
};
};
}
);
};
buildProfileSet =
pcfg:

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (lib) mkIf mkOption types;
inherit (lib) mkIf mkOption;
cfg = config.programs.joshuto;
tomlFormat = pkgs.formats.toml { };

View file

@ -173,7 +173,6 @@ let
author,
name,
version,
hash,
}@args:
pkgs.stdenvNoCC.mkDerivation {
pname = "lapce-plugin-${author}-${name}";

View file

@ -12,7 +12,7 @@ let
]);
perAccountGroups =
{ name, config, ... }:
{ name, ... }:
{
options = {
name = mkOption {
@ -43,7 +43,7 @@ let
# Options for configuring channel(s) that will be composed together into a group.
channel =
{ name, config, ... }:
{ name, ... }:
{
options = {
name = mkOption {

View file

@ -8,8 +8,6 @@ let
inherit (lib)
mkEnableOption
mkPackageOption
types
literalExpression
mkIf
maintainers
;

View file

@ -43,9 +43,7 @@ let
str
];
bindingType = types.submodule (
{ name, config, ... }:
{
bindingType = types.submodule {
options = {
key = mkOption {
type = types.str;
@ -59,9 +57,7 @@ let
example = "scroll_down";
};
};
}
);
};
in
{
meta.maintainers = [ lib.hm.maintainers.olmokramer ];

View file

@ -447,7 +447,6 @@ in
programs.neovim.generatedConfigs =
let
grouped = lib.lists.groupBy (x: x.type) pluginsNormalized;
concatConfigs = lib.concatMapStrings (p: p.config);
configsOnly = lib.foldl (acc: p: if p.config != null then acc ++ [ p.config ] else acc) [ ];
in
lib.mapAttrs (name: vals: lib.concatStringsSep "\n" (configsOnly vals)) grouped;

View file

@ -11,8 +11,6 @@ let
mkPackageOption
mkOption
types
concatStringsSep
mapAttrsToList
;
cfg = config.programs.onedrive;

View file

@ -55,7 +55,7 @@ in
libraries = mkOption {
type = types.attrsOf (
types.submodule (
{ config, name, ... }:
{ name, ... }:
{
options = {
name = mkOption {

View file

@ -9,8 +9,6 @@ let
cfg = config.programs.pyenv;
tomlFormat = pkgs.formats.toml { };
in
{
meta.maintainers = with lib.maintainers; [ tmarkus ];

View file

@ -13,14 +13,6 @@ let
lib.filterAttrs (_: a: a.qcal.enable) config.accounts.calendar.accounts
);
rename =
oldname:
builtins.getAttr oldname {
url = "Url";
userName = "Username";
passwordCommand = "PasswordCmd";
};
filteredAccounts =
let
mkAccount =

View file

@ -11,9 +11,7 @@ let
jsonFormat = pkgs.formats.json { };
mountOpts =
{ config, name, ... }:
{
mountOpts = {
options = {
host = mkOption {
type = types.str;

View file

@ -70,9 +70,7 @@ let
};
};
matchBlockModule = types.submodule (
{ dagName, ... }:
{
matchBlockModule = types.submodule {
options = {
host = mkOption {
type = types.nullOr types.str;
@ -350,8 +348,7 @@ let
};
# config.host = mkDefault dagName;
}
);
};
matchBlockStr =
key: cf:

View file

@ -275,7 +275,7 @@ in
feedAccounts = mkOption {
type = types.attrsOf (
types.submodule (
{ config, name, ... }:
{ name, ... }:
{
options = {
name = mkOption {

View file

@ -7,7 +7,6 @@
let
inherit (lib)
all
filterAttrs
isStorePath
literalExpression

View file

@ -9,9 +9,7 @@ let
cfg = config.programs.zsh.zplug;
pluginModule = types.submodule (
{ config, ... }:
{
pluginModule = types.submodule {
options = {
name = mkOption {
type = types.str;
@ -24,10 +22,7 @@ let
description = "The plugin tags.";
};
};
}
);
};
in
{
options.programs.zsh.zplug = {

View file

@ -8,8 +8,6 @@ let
inherit (lib)
mkEnableOption
mkPackageOption
types
literalExpression
mkIf
maintainers
;

View file

@ -8,8 +8,6 @@ let
inherit (lib)
mkEnableOption
mkPackageOption
types
literalExpression
mkIf
maintainers
;

View file

@ -12,7 +12,6 @@ let
inherit (lib)
any
attrValues
getAttr
hm
isBool
literalExpression

View file

@ -10,15 +10,6 @@ let
default = null;
}
);
mkNullableEnableOption =
name:
lib.mkOption {
type = with lib.types; nullOr bool;
default = null;
example = true;
description = "Whether to enable ${name}.";
};
in
{
freeformType = with lib.types; attrsOf (attrsOf anything);

View file

@ -10,8 +10,7 @@
};
outputs =
inputs@{
nixpkgs,
{
home-manager,
darwin,
...

View file

@ -8,7 +8,7 @@
};
outputs =
inputs@{ nixpkgs, home-manager, ... }:
{ nixpkgs, home-manager, ... }:
{
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {

View file

@ -41,11 +41,7 @@ let
if lib.isDerivation value then scrubbedValue // newDrvAttrs else scrubbedValue
else
value;
scrubDerivations =
attrs:
let
in
lib.mapAttrs scrubDerivation attrs;
scrubDerivations = attrs: lib.mapAttrs scrubDerivation attrs;
# Globally unscrub a few selected packages that are used by a wide selection of tests.
whitelist =

View file

@ -18,7 +18,7 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs, ... }:
{ nixpkgs, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in

View file

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

View file

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

View file

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

View file

@ -2,8 +2,6 @@
let
inherit (pkgs.lib) escapeShellArg;
nixHome = "/home/alice@home\\extra";
pyHome = "/home/alice@home\\\\extra";

View file

@ -2,8 +2,6 @@
let
inherit (pkgs.lib) escapeShellArg;
home = "/home/alice";
in

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
{
home.file."tokdl-result.txt".text = lib.hm.generators.toKDL { } {

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
{
home.file."toscfg-empty-result.txt".text = lib.hm.generators.toSCFG { } { };

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
{
home.file."toscfg-err-dir-empty-name-result.txt".text = lib.hm.generators.toSCFG { } { "" = [ ]; };

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ lib, ... }:
{
home.file."toscfg-example-result.txt".text = lib.hm.generators.toSCFG { } {

View file

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

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, ... }:
{
config = {
# Test fallback behavior for stateVersion >= 20.09, which is pure.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,4 @@
espansoExtraArgs:
{ config, ... }:
{
espansoExtraArgs: {
services.espanso = {
enable = true;
configs = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, ... }:
{
services.pass-secret-service = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, ... }:
{
services.pass-secret-service = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
{ pkgs, ... }:
{
nmt.script = ''
userConf=home-files/.config/systemd/user.conf