mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge staging-next into staging
This commit is contained in:
commit
3dc8bd98b9
111 changed files with 4193 additions and 3426 deletions
|
@ -157,9 +157,13 @@ in
|
|||
default = [ name ] ++ config.extraHostNames;
|
||||
defaultText = literalExpression "[ ${name} ] ++ config.${options.extraHostNames}";
|
||||
description = ''
|
||||
DEPRECATED, please use <literal>extraHostNames</literal>.
|
||||
A list of host names and/or IP numbers used for accessing
|
||||
the host's ssh service.
|
||||
the host's ssh service. This list includes the name of the
|
||||
containing <literal>knownHosts</literal> attribute by default
|
||||
for convenience. If you wish to configure multiple host keys
|
||||
for the same host use multiple <literal>knownHosts</literal>
|
||||
entries with different attribute names and the same
|
||||
<literal>hostNames</literal> list.
|
||||
'';
|
||||
};
|
||||
extraHostNames = mkOption {
|
||||
|
@ -167,7 +171,8 @@ in
|
|||
default = [];
|
||||
description = ''
|
||||
A list of additional host names and/or IP numbers used for
|
||||
accessing the host's ssh service.
|
||||
accessing the host's ssh service. This list is ignored if
|
||||
<literal>hostNames</literal> is set explicitly.
|
||||
'';
|
||||
};
|
||||
publicKey = mkOption {
|
||||
|
@ -198,7 +203,12 @@ in
|
|||
};
|
||||
}));
|
||||
description = ''
|
||||
The set of system-wide known SSH hosts.
|
||||
The set of system-wide known SSH hosts. To make simple setups more
|
||||
convenient the name of an attribute in this set is used as a host name
|
||||
for the entry. This behaviour can be disabled by setting
|
||||
<literal>hostNames</literal> explicitly. You can use
|
||||
<literal>extraHostNames</literal> to add additional host names without
|
||||
disabling this default.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
|
@ -207,6 +217,10 @@ in
|
|||
publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub;
|
||||
};
|
||||
"myhost2.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILIRuJ8p1Fi+m6WkHV0KWnRfpM1WxoW8XAS+XvsSKsTK";
|
||||
"myhost2.net/dsa" = {
|
||||
hostNames = [ "myhost2.net" ];
|
||||
publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
@ -279,9 +293,6 @@ in
|
|||
message = "knownHost ${name} must contain either a publicKey or publicKeyFile";
|
||||
});
|
||||
|
||||
warnings = mapAttrsToList (name: _: ''programs.ssh.knownHosts.${name}.hostNames is deprecated, use programs.ssh.knownHosts.${name}.extraHostNames'')
|
||||
(filterAttrs (name: {hostNames, extraHostNames, ...}: hostNames != [ name ] ++ extraHostNames) cfg.knownHosts);
|
||||
|
||||
# SSH configuration. Slight duplication of the sshd_config
|
||||
# generation in the sshd service.
|
||||
environment.etc."ssh/ssh_config".text =
|
||||
|
|
|
@ -267,11 +267,15 @@ in
|
|||
'' + ''
|
||||
ipfs --offline config show \
|
||||
| ${pkgs.jq}/bin/jq '. * $extraConfig' --argjson extraConfig ${
|
||||
escapeShellArg (builtins.toJSON ({
|
||||
Addresses.API = cfg.apiAddress;
|
||||
Addresses.Gateway = cfg.gatewayAddress;
|
||||
Addresses.Swarm = cfg.swarmAddress;
|
||||
} // cfg.extraConfig))
|
||||
escapeShellArg (builtins.toJSON (
|
||||
recursiveUpdate
|
||||
{
|
||||
Addresses.API = cfg.apiAddress;
|
||||
Addresses.Gateway = cfg.gatewayAddress;
|
||||
Addresses.Swarm = cfg.swarmAddress;
|
||||
}
|
||||
cfg.extraConfig
|
||||
))
|
||||
} \
|
||||
| ipfs --offline config replace -
|
||||
'';
|
||||
|
|
|
@ -7,19 +7,26 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.qtile.enable = mkEnableOption "qtile";
|
||||
options.services.xserver.windowManager.qtile = {
|
||||
enable = mkEnableOption "qtile";
|
||||
|
||||
package = mkPackageOption pkgs "qtile" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.windowManager.session = [{
|
||||
name = "qtile";
|
||||
start = ''
|
||||
${pkgs.qtile}/bin/qtile start &
|
||||
${cfg.package}/bin/qtile start &
|
||||
waitPID=$!
|
||||
'';
|
||||
}];
|
||||
|
||||
environment.systemPackages = [ pkgs.qtile ];
|
||||
environment.systemPackages = [
|
||||
# pkgs.qtile is currently a buildenv of qtile and its dependencies.
|
||||
# For userland commands, we want the underlying package so that
|
||||
# packages such as python don't bleed into userland and overwrite intended behavior.
|
||||
(cfg.package.unwrapped or cfg.package)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,17 +7,18 @@ in {
|
|||
options.services.lvm = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
|
||||
default = pkgs.lvm2;
|
||||
internal = true;
|
||||
defaultText = literalExpression "pkgs.lvm2";
|
||||
description = ''
|
||||
This option allows you to override the LVM package that's used on the system
|
||||
(udev rules, tmpfiles, systemd services).
|
||||
Defaults to pkgs.lvm2, or pkgs.lvm2_dmeventd if dmeventd is enabled.
|
||||
Defaults to pkgs.lvm2, pkgs.lvm2_dmeventd if dmeventd or pkgs.lvm2_vdo if vdo is enabled.
|
||||
'';
|
||||
};
|
||||
dmeventd.enable = mkEnableOption "the LVM dmevent daemon";
|
||||
boot.thin.enable = mkEnableOption "support for booting from ThinLVs";
|
||||
boot.vdo.enable = mkEnableOption "support for booting from VDOLVs";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
|
@ -40,6 +41,7 @@ in {
|
|||
environment.etc."lvm/lvm.conf".text = ''
|
||||
dmeventd/executable = "${cfg.package}/bin/dmeventd"
|
||||
'';
|
||||
services.lvm.package = mkDefault pkgs.lvm2_dmeventd;
|
||||
})
|
||||
(mkIf cfg.boot.thin.enable {
|
||||
boot.initrd = {
|
||||
|
@ -61,6 +63,32 @@ in {
|
|||
environment.etc."lvm/lvm.conf".text = concatMapStringsSep "\n"
|
||||
(bin: "global/${bin}_executable = ${pkgs.thin-provisioning-tools}/bin/${bin}")
|
||||
[ "thin_check" "thin_dump" "thin_repair" "cache_check" "cache_dump" "cache_repair" ];
|
||||
|
||||
environment.systemPackages = [ pkgs.thin-provisioning-tools ];
|
||||
})
|
||||
(mkIf cfg.boot.vdo.enable {
|
||||
boot = {
|
||||
initrd = {
|
||||
kernelModules = [ "kvdo" ];
|
||||
|
||||
extraUtilsCommands = ''
|
||||
ls ${pkgs.vdo}/bin/ | grep -v adaptLVMVDO | while read BIN; do
|
||||
copy_bin_and_libs ${pkgs.vdo}/bin/$BIN
|
||||
done
|
||||
'';
|
||||
|
||||
extraUtilsCommandsTest = ''
|
||||
ls ${pkgs.vdo}/bin/ | grep -v adaptLVMVDO | while read BIN; do
|
||||
$out/bin/$(basename $BIN) --help > /dev/null
|
||||
done
|
||||
'';
|
||||
};
|
||||
extraModulePackages = [ config.boot.kernelPackages.kvdo ];
|
||||
};
|
||||
|
||||
services.lvm.package = mkOverride 999 pkgs.lvm2_vdo; # this overrides mkDefault
|
||||
|
||||
environment.systemPackages = [ pkgs.vdo ];
|
||||
})
|
||||
(mkIf (cfg.dmeventd.enable || cfg.boot.thin.enable) {
|
||||
boot.initrd.preLVMCommands = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue