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 = outputs =
{ {
self,
nixpkgs, nixpkgs,
scss-reset, scss-reset,
...
}: }:
let let
supportedSystems = [ supportedSystems = [

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -16,31 +16,28 @@ let
cfg = config.programs.fish; cfg = config.programs.fish;
pluginModule = types.submodule ( pluginModule = types.submodule {
{ config, ... }: options = {
{ src = mkOption {
options = { type = types.path;
src = mkOption { description = ''
type = types.path; Path to the plugin folder.
description = ''
Path to the plugin folder.
Relevant pieces will be added to the fish function path and Relevant pieces will be added to the fish function path and
the completion path. The {file}`init.fish` and the completion path. The {file}`init.fish` and
{file}`key_binding.fish` files are sourced if {file}`key_binding.fish` files are sourced if
they exist. they exist.
''; '';
};
name = mkOption {
type = types.str;
description = ''
The name of the plugin.
'';
};
}; };
}
); name = mkOption {
type = types.str;
description = ''
The name of the plugin.
'';
};
};
};
functionModule = types.submodule { functionModule = types.submodule {
options = { options = {
@ -480,7 +477,6 @@ in
destructiveSymlinkJoin = destructiveSymlinkJoin =
args_@{ args_@{
name, name,
paths,
preferLocalBuild ? true, preferLocalBuild ? true,
allowSubstitutes ? false, allowSubstitutes ? false,
postBuild ? "", postBuild ? "",

View file

@ -17,221 +17,212 @@ let
"tty" "tty"
]; ];
backForeSubModule = types.submodule ( backForeSubModule = types.submodule {
{ ... }: options = {
{ foreground = mkOption {
options = { type = types.str;
foreground = mkOption { description = "The foreground color.";
type = types.str;
description = "The foreground color.";
};
background = mkOption {
type = types.str;
description = "The background color.";
};
}; };
}
);
profileColorsSubModule = types.submodule ( background = mkOption {
{ ... }: type = types.str;
{ description = "The background color.";
options = {
foregroundColor = mkOption {
type = types.str;
description = "The foreground color.";
};
backgroundColor = mkOption {
type = types.str;
description = "The background color.";
};
boldColor = mkOption {
default = null;
type = types.nullOr types.str;
description = "The bold color, null to use same as foreground.";
};
palette = mkOption {
type = types.listOf types.str;
description = "The terminal palette.";
};
cursor = mkOption {
default = null;
type = types.nullOr backForeSubModule;
description = "The color for the terminal cursor.";
};
highlight = mkOption {
default = null;
type = types.nullOr backForeSubModule;
description = "The colors for the terminals highlighted area.";
};
}; };
} };
); };
profileSubModule = types.submodule ( profileColorsSubModule = types.submodule {
{ name, config, ... }: options = {
{ foregroundColor = mkOption {
options = { type = types.str;
default = mkOption { description = "The foreground color.";
default = false;
type = types.bool;
description = "Whether this should be the default profile.";
};
visibleName = mkOption {
type = types.str;
description = "The profile name.";
};
colors = mkOption {
default = null;
type = types.nullOr profileColorsSubModule;
description = "The terminal colors, null to use system default.";
};
cursorBlinkMode = mkOption {
default = "system";
type = types.enum [
"system"
"on"
"off"
];
description = "The cursor blink mode.";
};
cursorShape = mkOption {
default = "block";
type = types.enum [
"block"
"ibeam"
"underline"
];
description = "The cursor shape.";
};
font = mkOption {
default = null;
type = types.nullOr types.str;
description = "The font name, null to use system default.";
};
allowBold = mkOption {
default = null;
type = types.nullOr types.bool;
description = ''
If `true`, allow applications in the
terminal to make text boldface.
'';
};
scrollOnOutput = mkOption {
default = true;
type = types.bool;
description = "Whether to scroll when output is written.";
};
showScrollbar = mkOption {
default = true;
type = types.bool;
description = "Whether the scroll bar should be visible.";
};
scrollbackLines = mkOption {
default = 10000;
type = types.nullOr types.int;
description = ''
The number of scrollback lines to keep, null for infinite.
'';
};
customCommand = mkOption {
default = null;
type = types.nullOr types.str;
description = ''
The command to use to start the shell, or null for default shell.
'';
};
loginShell = mkOption {
default = false;
type = types.bool;
description = "Run command as a login shell.";
};
backspaceBinding = mkOption {
default = "ascii-delete";
type = eraseBinding;
description = ''
Which string the terminal should send to an application when the user
presses the *Backspace* key.
`auto`
: Attempt to determine the right value from the terminal's IO settings.
`ascii-backspace`
: Send an ASCII backspace character (`0x08`).
`ascii-delete`
: Send an ASCII delete character (`0x7F`).
`delete-sequence`
: Send the `@7` control sequence.
`tty`
: Send terminal's "erase" setting.
'';
};
boldIsBright = mkOption {
default = null;
type = types.nullOr types.bool;
description = "Whether bold text is shown in bright colors.";
};
deleteBinding = mkOption {
default = "delete-sequence";
type = eraseBinding;
description = ''
Which string the terminal should send to an application when the user
presses the *Delete* key.
`auto`
: Send the `@7` control sequence.
`ascii-backspace`
: Send an ASCII backspace character (`0x08`).
`ascii-delete`
: Send an ASCII delete character (`0x7F`).
`delete-sequence`
: Send the `@7` control sequence.
`tty`
: Send terminal's "erase" setting.
'';
};
audibleBell = mkOption {
default = true;
type = types.bool;
description = "Turn on/off the terminal's bell.";
};
transparencyPercent = mkOption {
default = null;
type = types.nullOr (types.ints.between 0 100);
description = "Background transparency in percent.";
};
}; };
}
); backgroundColor = mkOption {
type = types.str;
description = "The background color.";
};
boldColor = mkOption {
default = null;
type = types.nullOr types.str;
description = "The bold color, null to use same as foreground.";
};
palette = mkOption {
type = types.listOf types.str;
description = "The terminal palette.";
};
cursor = mkOption {
default = null;
type = types.nullOr backForeSubModule;
description = "The color for the terminal cursor.";
};
highlight = mkOption {
default = null;
type = types.nullOr backForeSubModule;
description = "The colors for the terminals highlighted area.";
};
};
};
profileSubModule = types.submodule {
options = {
default = mkOption {
default = false;
type = types.bool;
description = "Whether this should be the default profile.";
};
visibleName = mkOption {
type = types.str;
description = "The profile name.";
};
colors = mkOption {
default = null;
type = types.nullOr profileColorsSubModule;
description = "The terminal colors, null to use system default.";
};
cursorBlinkMode = mkOption {
default = "system";
type = types.enum [
"system"
"on"
"off"
];
description = "The cursor blink mode.";
};
cursorShape = mkOption {
default = "block";
type = types.enum [
"block"
"ibeam"
"underline"
];
description = "The cursor shape.";
};
font = mkOption {
default = null;
type = types.nullOr types.str;
description = "The font name, null to use system default.";
};
allowBold = mkOption {
default = null;
type = types.nullOr types.bool;
description = ''
If `true`, allow applications in the
terminal to make text boldface.
'';
};
scrollOnOutput = mkOption {
default = true;
type = types.bool;
description = "Whether to scroll when output is written.";
};
showScrollbar = mkOption {
default = true;
type = types.bool;
description = "Whether the scroll bar should be visible.";
};
scrollbackLines = mkOption {
default = 10000;
type = types.nullOr types.int;
description = ''
The number of scrollback lines to keep, null for infinite.
'';
};
customCommand = mkOption {
default = null;
type = types.nullOr types.str;
description = ''
The command to use to start the shell, or null for default shell.
'';
};
loginShell = mkOption {
default = false;
type = types.bool;
description = "Run command as a login shell.";
};
backspaceBinding = mkOption {
default = "ascii-delete";
type = eraseBinding;
description = ''
Which string the terminal should send to an application when the user
presses the *Backspace* key.
`auto`
: Attempt to determine the right value from the terminal's IO settings.
`ascii-backspace`
: Send an ASCII backspace character (`0x08`).
`ascii-delete`
: Send an ASCII delete character (`0x7F`).
`delete-sequence`
: Send the `@7` control sequence.
`tty`
: Send terminal's "erase" setting.
'';
};
boldIsBright = mkOption {
default = null;
type = types.nullOr types.bool;
description = "Whether bold text is shown in bright colors.";
};
deleteBinding = mkOption {
default = "delete-sequence";
type = eraseBinding;
description = ''
Which string the terminal should send to an application when the user
presses the *Delete* key.
`auto`
: Send the `@7` control sequence.
`ascii-backspace`
: Send an ASCII backspace character (`0x08`).
`ascii-delete`
: Send an ASCII delete character (`0x7F`).
`delete-sequence`
: Send the `@7` control sequence.
`tty`
: Send terminal's "erase" setting.
'';
};
audibleBell = mkOption {
default = true;
type = types.bool;
description = "Turn on/off the terminal's bell.";
};
transparencyPercent = mkOption {
default = null;
type = types.nullOr (types.ints.between 0 100);
description = "Background transparency in percent.";
};
};
};
buildProfileSet = buildProfileSet =
pcfg: pcfg:

View file

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

View file

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

View file

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

View file

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

View file

@ -43,25 +43,21 @@ let
str str
]; ];
bindingType = types.submodule ( bindingType = types.submodule {
{ name, config, ... }: options = {
{ key = mkOption {
options = { type = types.str;
key = mkOption { description = "Key to bind.";
type = types.str; example = "j";
description = "Key to bind.";
example = "j";
};
command = mkOption {
type = with types; either str (listOf str);
description = "Command or sequence of commands to be executed.";
example = "scroll_down";
};
}; };
}
);
command = mkOption {
type = with types; either str (listOf str);
description = "Command or sequence of commands to be executed.";
example = "scroll_down";
};
};
};
in in
{ {
meta.maintainers = [ lib.hm.maintainers.olmokramer ]; meta.maintainers = [ lib.hm.maintainers.olmokramer ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -11,66 +11,64 @@ let
jsonFormat = pkgs.formats.json { }; jsonFormat = pkgs.formats.json { };
mountOpts = mountOpts = {
{ config, name, ... }: options = {
{ host = mkOption {
options = { type = types.str;
host = mkOption { description = "The host to connect to.";
type = types.str; };
description = "The host to connect to.";
};
port = mkOption { port = mkOption {
type = types.port; type = types.port;
default = 22; default = 22;
description = "The port to connect to."; description = "The port to connect to.";
}; };
user = mkOption { user = mkOption {
type = types.str; type = types.str;
description = "The username to authenticate with."; description = "The username to authenticate with.";
}; };
mountOptions = mkOption { mountOptions = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
description = "Options to pass to sshfs."; description = "Options to pass to sshfs.";
}; };
mountPoint = mkOption { mountPoint = mkOption {
type = types.str; type = types.str;
description = "The remote path to mount."; description = "The remote path to mount.";
}; };
authType = mkOption { authType = mkOption {
type = types.enum [ type = types.enum [
"password" "password"
"publickey" "publickey"
"hostbased" "hostbased"
"keyboard-interactive" "keyboard-interactive"
"gssapi-with-mic" "gssapi-with-mic"
]; ];
default = "publickey"; default = "publickey";
description = "The authentication method to use."; description = "The authentication method to use.";
}; };
sshKey = mkOption { sshKey = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = cfg.defaultSshKey; default = cfg.defaultSshKey;
defaultText = lib.literalExpression "config.programs.sftpman.defaultSshKey"; defaultText = lib.literalExpression "config.programs.sftpman.defaultSshKey";
description = '' description = ''
Path to the SSH key to use for authentication. Path to the SSH key to use for authentication.
Only applies if authMethod is `publickey`. Only applies if authMethod is `publickey`.
''; '';
}; };
beforeMount = mkOption { beforeMount = mkOption {
type = types.str; type = types.str;
default = "true"; default = "true";
description = "Command to run before mounting."; description = "Command to run before mounting.";
};
}; };
}; };
};
in in
{ {
meta.maintainers = with lib.maintainers; [ fugi ]; meta.maintainers = with lib.maintainers; [ fugi ];

View file

@ -70,288 +70,285 @@ let
}; };
}; };
matchBlockModule = types.submodule ( matchBlockModule = types.submodule {
{ dagName, ... }: options = {
{ host = mkOption {
options = { type = types.nullOr types.str;
host = mkOption { default = null;
type = types.nullOr types.str; example = "*.example.org";
default = null; description = ''
example = "*.example.org"; `Host` pattern used by this conditional block.
description = '' See
`Host` pattern used by this conditional block. {manpage}`ssh_config(5)`
See for `Host` block details.
{manpage}`ssh_config(5)` This option is ignored if
for `Host` block details. {option}`ssh.matchBlocks.*.match`
This option is ignored if if defined.
{option}`ssh.matchBlocks.*.match` '';
if defined.
'';
};
match = mkOption {
type = types.nullOr types.str;
default = null;
example = ''
host <hostname> canonical
host <hostname> exec "ping -c1 -q 192.168.17.1"'';
description = ''
`Match` block conditions used by this block. See
{manpage}`ssh_config(5)`
for `Match` block details.
This option takes precedence over
{option}`ssh.matchBlocks.*.host`
if defined.
'';
};
port = mkOption {
type = types.nullOr types.port;
default = null;
description = "Specifies port number to connect on remote host.";
};
forwardAgent = mkOption {
default = null;
type = types.nullOr types.bool;
description = ''
Whether the connection to the authentication agent (if any)
will be forwarded to the remote machine.
'';
};
forwardX11 = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether X11 connections will be automatically redirected
over the secure channel and {env}`DISPLAY` set.
'';
};
forwardX11Trusted = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether remote X11 clients will have full access to the
original X11 display.
'';
};
identitiesOnly = mkOption {
type = types.bool;
default = false;
description = ''
Specifies that ssh should only use the authentication
identity explicitly configured in the
{file}`~/.ssh/config` files or passed on the
ssh command-line, even if {command}`ssh-agent`
offers more identities.
'';
};
identityFile = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies files from which the user identity is read.
Identities will be tried in the given order.
'';
};
identityAgent = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies the location of the ssh identity agent.
'';
};
user = mkOption {
type = types.nullOr types.str;
default = null;
description = "Specifies the user to log in as.";
};
hostname = mkOption {
type = types.nullOr types.str;
default = null;
description = "Specifies the real host name to log into.";
};
serverAliveInterval = mkOption {
type = types.int;
default = 0;
description = "Set timeout in seconds after which response will be requested.";
};
serverAliveCountMax = mkOption {
type = types.ints.positive;
default = 3;
description = ''
Sets the number of server alive messages which may be sent
without SSH receiving any messages back from the server.
'';
};
sendEnv = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Environment variables to send from the local host to the
server.
'';
};
setEnv = mkOption {
type =
with types;
attrsOf (oneOf [
str
path
int
float
]);
default = { };
description = ''
Environment variables and their value to send to the server.
'';
};
compression = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Specifies whether to use compression. Omitted from the host
block when `null`.
'';
};
checkHostIP = mkOption {
type = types.bool;
default = true;
description = ''
Check the host IP address in the
{file}`known_hosts` file.
'';
};
proxyCommand = mkOption {
type = types.nullOr types.str;
default = null;
description = "The command to use to connect to the server.";
};
proxyJump = mkOption {
type = types.nullOr types.str;
default = null;
description = "The proxy host to use to connect to the server.";
};
certificateFile = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies files from which the user certificate is read.
'';
};
addressFamily = mkOption {
default = null;
type = types.nullOr (
types.enum [
"any"
"inet"
"inet6"
]
);
description = ''
Specifies which address family to use when connecting.
'';
};
localForwards = mkOption {
type = types.listOf forwardModule;
default = [ ];
example = literalExpression ''
[
{
bind.port = 8080;
host.address = "10.0.0.13";
host.port = 80;
}
];
'';
description = ''
Specify local port forwardings. See
{manpage}`ssh_config(5)` for `LocalForward`.
'';
};
remoteForwards = mkOption {
type = types.listOf forwardModule;
default = [ ];
example = literalExpression ''
[
{
bind.port = 8080;
host.address = "10.0.0.13";
host.port = 80;
}
];
'';
description = ''
Specify remote port forwardings. See
{manpage}`ssh_config(5)` for `RemoteForward`.
'';
};
dynamicForwards = mkOption {
type = types.listOf dynamicForwardModule;
default = [ ];
example = literalExpression ''
[ { port = 8080; } ];
'';
description = ''
Specify dynamic port forwardings. See
{manpage}`ssh_config(5)` for `DynamicForward`.
'';
};
extraOptions = mkOption {
type = types.attrsOf types.str;
default = { };
description = "Extra configuration options for the host.";
};
}; };
# config.host = mkDefault dagName; match = mkOption {
} type = types.nullOr types.str;
); default = null;
example = ''
host <hostname> canonical
host <hostname> exec "ping -c1 -q 192.168.17.1"'';
description = ''
`Match` block conditions used by this block. See
{manpage}`ssh_config(5)`
for `Match` block details.
This option takes precedence over
{option}`ssh.matchBlocks.*.host`
if defined.
'';
};
port = mkOption {
type = types.nullOr types.port;
default = null;
description = "Specifies port number to connect on remote host.";
};
forwardAgent = mkOption {
default = null;
type = types.nullOr types.bool;
description = ''
Whether the connection to the authentication agent (if any)
will be forwarded to the remote machine.
'';
};
forwardX11 = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether X11 connections will be automatically redirected
over the secure channel and {env}`DISPLAY` set.
'';
};
forwardX11Trusted = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether remote X11 clients will have full access to the
original X11 display.
'';
};
identitiesOnly = mkOption {
type = types.bool;
default = false;
description = ''
Specifies that ssh should only use the authentication
identity explicitly configured in the
{file}`~/.ssh/config` files or passed on the
ssh command-line, even if {command}`ssh-agent`
offers more identities.
'';
};
identityFile = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies files from which the user identity is read.
Identities will be tried in the given order.
'';
};
identityAgent = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies the location of the ssh identity agent.
'';
};
user = mkOption {
type = types.nullOr types.str;
default = null;
description = "Specifies the user to log in as.";
};
hostname = mkOption {
type = types.nullOr types.str;
default = null;
description = "Specifies the real host name to log into.";
};
serverAliveInterval = mkOption {
type = types.int;
default = 0;
description = "Set timeout in seconds after which response will be requested.";
};
serverAliveCountMax = mkOption {
type = types.ints.positive;
default = 3;
description = ''
Sets the number of server alive messages which may be sent
without SSH receiving any messages back from the server.
'';
};
sendEnv = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
Environment variables to send from the local host to the
server.
'';
};
setEnv = mkOption {
type =
with types;
attrsOf (oneOf [
str
path
int
float
]);
default = { };
description = ''
Environment variables and their value to send to the server.
'';
};
compression = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Specifies whether to use compression. Omitted from the host
block when `null`.
'';
};
checkHostIP = mkOption {
type = types.bool;
default = true;
description = ''
Check the host IP address in the
{file}`known_hosts` file.
'';
};
proxyCommand = mkOption {
type = types.nullOr types.str;
default = null;
description = "The command to use to connect to the server.";
};
proxyJump = mkOption {
type = types.nullOr types.str;
default = null;
description = "The proxy host to use to connect to the server.";
};
certificateFile = mkOption {
type = with types; either (listOf str) (nullOr str);
default = [ ];
apply =
p:
if p == null then
[ ]
else if lib.isString p then
[ p ]
else
p;
description = ''
Specifies files from which the user certificate is read.
'';
};
addressFamily = mkOption {
default = null;
type = types.nullOr (
types.enum [
"any"
"inet"
"inet6"
]
);
description = ''
Specifies which address family to use when connecting.
'';
};
localForwards = mkOption {
type = types.listOf forwardModule;
default = [ ];
example = literalExpression ''
[
{
bind.port = 8080;
host.address = "10.0.0.13";
host.port = 80;
}
];
'';
description = ''
Specify local port forwardings. See
{manpage}`ssh_config(5)` for `LocalForward`.
'';
};
remoteForwards = mkOption {
type = types.listOf forwardModule;
default = [ ];
example = literalExpression ''
[
{
bind.port = 8080;
host.address = "10.0.0.13";
host.port = 80;
}
];
'';
description = ''
Specify remote port forwardings. See
{manpage}`ssh_config(5)` for `RemoteForward`.
'';
};
dynamicForwards = mkOption {
type = types.listOf dynamicForwardModule;
default = [ ];
example = literalExpression ''
[ { port = 8080; } ];
'';
description = ''
Specify dynamic port forwardings. See
{manpage}`ssh_config(5)` for `DynamicForward`.
'';
};
extraOptions = mkOption {
type = types.attrsOf types.str;
default = { };
description = "Extra configuration options for the host.";
};
};
# config.host = mkDefault dagName;
};
matchBlockStr = matchBlockStr =
key: cf: key: cf:

View file

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

View file

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

View file

@ -9,25 +9,20 @@ let
cfg = config.programs.zsh.zplug; cfg = config.programs.zsh.zplug;
pluginModule = types.submodule ( pluginModule = types.submodule {
{ config, ... }: options = {
{ name = mkOption {
options = { type = types.str;
name = mkOption { description = "The name of the plugin.";
type = types.str;
description = "The name of the plugin.";
};
tags = mkOption {
type = types.listOf types.str;
default = [ ];
description = "The plugin tags.";
};
}; };
} tags = mkOption {
); type = types.listOf types.str;
default = [ ];
description = "The plugin tags.";
};
};
};
in in
{ {
options.programs.zsh.zplug = { options.programs.zsh.zplug = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
home.username = "alice"; 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 # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { lib, ... }:
{ {
home.file."tokdl-result.txt".text = lib.hm.generators.toKDL { } { 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 { } { }; 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 { } { "" = [ ]; }; 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 { } { home.file."toscfg-example-result.txt".text = lib.hm.generators.toSCFG { } {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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