Merge pull request #94867 from Mic92/nixos-whitespace

nixos/modules: remove trailing whitespace
This commit is contained in:
Martin Weinelt 2020-08-07 16:18:22 +02:00 committed by GitHub
commit 066c604eec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 120 additions and 120 deletions

View File

@ -7,18 +7,18 @@ with lib;
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = ''
Whether to install files to support the Whether to install files to support the
<link xlink:href="https://www.freedesktop.org/software/appstream/docs/index.html">AppStream metadata specification</link>. <link xlink:href="https://www.freedesktop.org/software/appstream/docs/index.html">AppStream metadata specification</link>.
''; '';
}; };
}; };
config = mkIf config.appstream.enable { config = mkIf config.appstream.enable {
environment.pathsToLink = [ environment.pathsToLink = [
# per component metadata # per component metadata
"/share/metainfo" "/share/metainfo"
# legacy path for above # legacy path for above
"/share/appdata" "/share/appdata"
]; ];
}; };

View File

@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.hardware.tuxedo-keyboard; cfg = config.hardware.tuxedo-keyboard;
tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard; tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
in in
@ -27,7 +27,7 @@ in
''; '';
}; };
config = mkIf cfg.enable config = mkIf cfg.enable
{ {
boot.kernelModules = ["tuxedo_keyboard"]; boot.kernelModules = ["tuxedo_keyboard"];
boot.extraModulePackages = [ tuxedo-keyboard ]; boot.extraModulePackages = [ tuxedo-keyboard ];

View File

@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.i18n.inputMethod.uim; cfg = config.i18n.inputMethod.uim;
in in
{ {

View File

@ -18,7 +18,7 @@ in
''; '';
}; };
}; };
}; };
###### implementation ###### implementation
@ -26,7 +26,7 @@ in
environment.pathsToLink = [ "/share/autojump" ]; environment.pathsToLink = [ "/share/autojump" ];
environment.systemPackages = [ pkgs.autojump ]; environment.systemPackages = [ pkgs.autojump ];
programs.bash.interactiveShellInit = "source ${pkgs.autojump}/share/autojump/autojump.bash"; programs.bash.interactiveShellInit = "source ${pkgs.autojump}/share/autojump/autojump.bash";
programs.zsh.interactiveShellInit = mkIf prg.zsh.enable "source ${pkgs.autojump}/share/autojump/autojump.zsh"; programs.zsh.interactiveShellInit = mkIf prg.zsh.enable "source ${pkgs.autojump}/share/autojump/autojump.zsh";
programs.fish.interactiveShellInit = mkIf prg.fish.enable "source ${pkgs.autojump}/share/autojump/autojump.fish"; programs.fish.interactiveShellInit = mkIf prg.fish.enable "source ${pkgs.autojump}/share/autojump/autojump.fish";
}; };

View File

@ -25,7 +25,7 @@ in
'''; ''';
} }
''; '';
description = description =
'' ''
Configure freetds database entries. Each attribute denotes Configure freetds database entries. Each attribute denotes
a section within freetds.conf, and the value (a string) is the config a section within freetds.conf, and the value (a string) is the config
@ -47,7 +47,7 @@ in
environment.variables.FREETDS = "/etc/freetds.conf"; environment.variables.FREETDS = "/etc/freetds.conf";
environment.variables.SYBASE = "${pkgs.freetds}"; environment.variables.SYBASE = "${pkgs.freetds}";
environment.etc."freetds.conf" = { text = environment.etc."freetds.conf" = { text =
(concatStrings (mapAttrsToList (name: value: (concatStrings (mapAttrsToList (name: value:
'' ''
[${name}] [${name}]

View File

@ -23,7 +23,7 @@ let
<listen-socket> <listen-socket>
<port>${toString cfg.listen.port}</port> <port>${toString cfg.listen.port}</port>
<bind-address>${cfg.listen.address}</bind-address> <bind-address>${cfg.listen.address}</bind-address>
</listen-socket> </listen-socket>
<security> <security>
<chroot>0</chroot> <chroot>0</chroot>
@ -70,7 +70,7 @@ in {
description = "Base directory used for logging."; description = "Base directory used for logging.";
default = "/var/log/icecast"; default = "/var/log/icecast";
}; };
listen = { listen = {
port = mkOption { port = mkOption {
type = types.int; type = types.int;

View File

@ -18,7 +18,7 @@ let
Pid Directory = "/run"; Pid Directory = "/run";
${fd_cfg.extraClientConfig} ${fd_cfg.extraClientConfig}
} }
${concatStringsSep "\n" (mapAttrsToList (name: value: '' ${concatStringsSep "\n" (mapAttrsToList (name: value: ''
Director { Director {
Name = "${name}"; Name = "${name}";
@ -26,7 +26,7 @@ let
Monitor = "${value.monitor}"; Monitor = "${value.monitor}";
} }
'') fd_cfg.director)} '') fd_cfg.director)}
Messages { Messages {
Name = Standard; Name = Standard;
syslog = all, !skipped, !restored syslog = all, !skipped, !restored
@ -35,7 +35,7 @@ let
''; '';
sd_cfg = config.services.bacula-sd; sd_cfg = config.services.bacula-sd;
sd_conf = pkgs.writeText "bacula-sd.conf" sd_conf = pkgs.writeText "bacula-sd.conf"
'' ''
Storage { Storage {
Name = "${sd_cfg.name}"; Name = "${sd_cfg.name}";
@ -80,7 +80,7 @@ let
''; '';
dir_cfg = config.services.bacula-dir; dir_cfg = config.services.bacula-dir;
dir_conf = pkgs.writeText "bacula-dir.conf" dir_conf = pkgs.writeText "bacula-dir.conf"
'' ''
Director { Director {
Name = "${dir_cfg.name}"; Name = "${dir_cfg.name}";
@ -125,10 +125,10 @@ let
The password is plain text. It is not generated through any special The password is plain text. It is not generated through any special
process but as noted above, it is better to use random text for process but as noted above, it is better to use random text for
security reasons. security reasons.
''; '';
}; };
monitor = mkOption { monitor = mkOption {
default = "no"; default = "no";
example = "yes"; example = "yes";
@ -140,7 +140,7 @@ let
Please note that if this director is being used by a Monitor, we Please note that if this director is being used by a Monitor, we
highly recommend to set this directive to yes to avoid serious highly recommend to set this directive to yes to avoid serious
security problems. security problems.
''; '';
}; };
}; };
@ -163,7 +163,7 @@ let
type of autochanger, what you specify here can vary. This directive type of autochanger, what you specify here can vary. This directive
is optional. See the Using AutochangersAutochangersChapter chapter of is optional. See the Using AutochangersAutochangersChapter chapter of
this manual for more details of using this and the following this manual for more details of using this and the following
autochanger directives. autochanger directives.
''; '';
}; };
@ -200,7 +200,7 @@ let
Extra configuration to be passed in Autochanger directive. Extra configuration to be passed in Autochanger directive.
''; '';
example = '' example = ''
''; '';
}; };
}; };
@ -222,7 +222,7 @@ let
if you are archiving to disk storage. In this case, you must supply if you are archiving to disk storage. In this case, you must supply
the full absolute path to the directory. When specifying a tape the full absolute path to the directory. When specifying a tape
device, it is preferable that the "non-rewind" variant of the device device, it is preferable that the "non-rewind" variant of the device
file name be given. file name be given.
''; '';
}; };
@ -290,7 +290,7 @@ in {
Whether to enable the Bacula File Daemon. Whether to enable the Bacula File Daemon.
''; '';
}; };
name = mkOption { name = mkOption {
default = "${config.networking.hostName}-fd"; default = "${config.networking.hostName}-fd";
description = '' description = ''
@ -300,7 +300,7 @@ in {
Clients. This directive is required. Clients. This directive is required.
''; '';
}; };
port = mkOption { port = mkOption {
default = 9102; default = 9102;
type = types.int; type = types.int;
@ -310,7 +310,7 @@ in {
the Client resource of the Director's configuration file. the Client resource of the Director's configuration file.
''; '';
}; };
director = mkOption { director = mkOption {
default = {}; default = {};
description = '' description = ''
@ -349,14 +349,14 @@ in {
Whether to enable Bacula Storage Daemon. Whether to enable Bacula Storage Daemon.
''; '';
}; };
name = mkOption { name = mkOption {
default = "${config.networking.hostName}-sd"; default = "${config.networking.hostName}-sd";
description = '' description = ''
Specifies the Name of the Storage daemon. Specifies the Name of the Storage daemon.
''; '';
}; };
port = mkOption { port = mkOption {
default = 9103; default = 9103;
type = types.int; type = types.int;
@ -410,7 +410,7 @@ in {
console = all console = all
''; '';
}; };
}; };
services.bacula-dir = { services.bacula-dir = {
@ -429,7 +429,7 @@ in {
required. required.
''; '';
}; };
port = mkOption { port = mkOption {
default = 9101; default = 9101;
type = types.int; type = types.int;
@ -442,7 +442,7 @@ in {
specify DirAddresses (N.B plural) directive. specify DirAddresses (N.B plural) directive.
''; '';
}; };
password = mkOption { password = mkOption {
# TODO: required? # TODO: required?
description = '' description = ''

View File

@ -55,7 +55,7 @@ in
Configuration for the rclone remote being used for backup. Configuration for the rclone remote being used for backup.
See the remote's specific options under rclone's docs at See the remote's specific options under rclone's docs at
<link xlink:href="https://rclone.org/docs/"/>. When specifying <link xlink:href="https://rclone.org/docs/"/>. When specifying
option names, use the "config" name specified in the docs. option names, use the "config" name specified in the docs.
For example, to set <literal>--b2-hard-delete</literal> for a B2 For example, to set <literal>--b2-hard-delete</literal> for a B2
remote, use <literal>hard_delete = true</literal> in the remote, use <literal>hard_delete = true</literal> in the
attribute set. attribute set.

View File

@ -60,4 +60,4 @@ in
}; };
}; };
} }

View File

@ -93,4 +93,4 @@ in
}; };
}; };
} }

View File

@ -35,7 +35,7 @@ in
Name of the Erlang node. Name of the Erlang node.
''; '';
}; };
anonymousUserCreation = mkOption { anonymousUserCreation = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;

View File

@ -5,12 +5,12 @@ with lib;
let let
cfg = config.services.minetest-server; cfg = config.services.minetest-server;
flag = val: name: if val != null then "--${name} ${val} " else ""; flag = val: name: if val != null then "--${name} ${val} " else "";
flags = [ flags = [
(flag cfg.gameId "gameid") (flag cfg.gameId "gameid")
(flag cfg.world "world") (flag cfg.world "world")
(flag cfg.configPath "config") (flag cfg.configPath "config")
(flag cfg.logPath "logfile") (flag cfg.logPath "logfile")
(flag cfg.port "port") (flag cfg.port "port")
]; ];
in in
{ {
@ -26,7 +26,7 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
description = '' description = ''
Id of the game to use. To list available games run Id of the game to use. To list available games run
`minetestserver --gameid list`. `minetestserver --gameid list`.
If only one game exists, this option can be null. If only one game exists, this option can be null.
@ -59,7 +59,7 @@ in
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
description = '' description = ''
Path to logfile for logging. Path to logfile for logging.
If set to null, logging will be output to stdout which means If set to null, logging will be output to stdout which means
all output will be catched by systemd. all output will be catched by systemd.

View File

@ -7,7 +7,7 @@ let
worldSizeMap = { small = 1; medium = 2; large = 3; }; worldSizeMap = { small = 1; medium = 2; large = 3; };
valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\""; valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\"";
boolFlag = name: val: optionalString val "-${name}"; boolFlag = name: val: optionalString val "-${name}";
flags = [ flags = [
(valFlag "port" cfg.port) (valFlag "port" cfg.port)
(valFlag "maxPlayers" cfg.maxPlayers) (valFlag "maxPlayers" cfg.maxPlayers)
(valFlag "password" cfg.password) (valFlag "password" cfg.password)

View File

@ -67,7 +67,7 @@ in {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
Whether to build thinkfan with SMART support to read temperatures Whether to build thinkfan with SMART support to read temperatures
directly from hard disks. directly from hard disks.
''; '';
}; };

View File

@ -10,7 +10,7 @@ in {
meta = { meta = {
doc = ./trezord.xml; doc = ./trezord.xml;
}; };
### interface ### interface
options = { options = {
@ -40,7 +40,7 @@ in {
}; };
}; };
}; };
### implementation ### implementation
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -675,7 +675,7 @@ in {
} }
]; ];
users.users.matrix-synapse = { users.users.matrix-synapse = {
group = "matrix-synapse"; group = "matrix-synapse";
home = cfg.dataDir; home = cfg.dataDir;
createHome = true; createHome = true;

View File

@ -38,7 +38,7 @@ in
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
Whether to enable the Siproxd SIP Whether to enable the Siproxd SIP
proxy/masquerading daemon. proxy/masquerading daemon.
''; '';
}; };
@ -111,7 +111,7 @@ in
type = types.int; type = types.int;
default = 300; default = 300;
description = '' description = ''
Timeout for an RTP stream. If for the specified Timeout for an RTP stream. If for the specified
number of seconds no data is relayed on an active number of seconds no data is relayed on an active
stream, it is considered dead and will be killed. stream, it is considered dead and will be killed.
''; '';
@ -122,7 +122,7 @@ in
default = 46; default = 46;
description = '' description = ''
DSCP (differentiated services) value to be assigned DSCP (differentiated services) value to be assigned
to RTP packets. Allows QOS aware routers to handle to RTP packets. Allows QOS aware routers to handle
different types traffic with different priorities. different types traffic with different priorities.
''; '';
}; };
@ -132,7 +132,7 @@ in
default = 0; default = 0;
description = '' description = ''
DSCP (differentiated services) value to be assigned DSCP (differentiated services) value to be assigned
to SIP packets. Allows QOS aware routers to handle to SIP packets. Allows QOS aware routers to handle
different types traffic with different priorities. different types traffic with different priorities.
''; '';
}; };

View File

@ -11,7 +11,7 @@ in {
default = false; default = false;
description = '' description = ''
Enable the tzupdate timezone updating service. This provides Enable the tzupdate timezone updating service. This provides
a one-shot service which can be activated with systemctl to a one-shot service which can be activated with systemctl to
update the timezone. update the timezone.
''; '';
}; };
@ -21,7 +21,7 @@ in {
# We need to have imperative time zone management for this to work. # We need to have imperative time zone management for this to work.
# This will give users an error if they have set an explicit time # This will give users an error if they have set an explicit time
# zone, which is better than silently overriding it. # zone, which is better than silently overriding it.
time.timeZone = null; time.timeZone = null;
# We provide a one-shot service which can be manually run. We could # We provide a one-shot service which can be manually run. We could
# provide a service that runs on startup, but it's tricky to get # provide a service that runs on startup, but it's tricky to get

View File

@ -90,7 +90,7 @@ in {
default = []; default = [];
description = '' description = ''
Additional cadvisor options. Additional cadvisor options.
See <link xlink:href='https://github.com/google/cadvisor/blob/master/docs/runtime_options.md'/> for available options. See <link xlink:href='https://github.com/google/cadvisor/blob/master/docs/runtime_options.md'/> for available options.
''; '';
}; };

View File

@ -97,11 +97,11 @@ let
"dd-agent/conf.d/nginx.yaml".source = nginxConfig; "dd-agent/conf.d/nginx.yaml".source = nginxConfig;
}) // }) //
(optionalAttrs (cfg.mongoConfig != null) (optionalAttrs (cfg.mongoConfig != null)
{ {
"dd-agent/conf.d/mongo.yaml".source = mongoConfig; "dd-agent/conf.d/mongo.yaml".source = mongoConfig;
}) // }) //
(optionalAttrs (cfg.processConfig != null) (optionalAttrs (cfg.processConfig != null)
{ {
"dd-agent/conf.d/process.yaml".source = processConfig; "dd-agent/conf.d/process.yaml".source = processConfig;
}) // }) //
(optionalAttrs (cfg.jmxConfig != null) (optionalAttrs (cfg.jmxConfig != null)

View File

@ -15,7 +15,7 @@ in
options = { options = {
services.teamviewer.enable = mkEnableOption "TeamViewer daemon"; services.teamviewer.enable = mkEnableOption "TeamViewer daemon";
}; };
###### implementation ###### implementation

View File

@ -183,8 +183,8 @@ in
} }
]) eachBitcoind); ]) eachBitcoind);
environment.systemPackages = flatten (mapAttrsToList (bitcoindName: cfg: [ environment.systemPackages = flatten (mapAttrsToList (bitcoindName: cfg: [
cfg.package cfg.package
]) eachBitcoind); ]) eachBitcoind);
systemd.services = mapAttrs' (bitcoindName: cfg: ( systemd.services = mapAttrs' (bitcoindName: cfg: (

View File

@ -56,4 +56,4 @@ config = mkIf cfg.enable {
}; };
}; };
} }

View File

@ -5,7 +5,7 @@ in
with lib; with lib;
{ {
options.services.mstpd = { options.services.mstpd = {
enable = mkOption { enable = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;

View File

@ -60,7 +60,7 @@ let
# NB: nghttpx doesn't accept "tls", you must omit "no-tls" for # NB: nghttpx doesn't accept "tls", you must omit "no-tls" for
# the default behavior of turning on TLS. # the default behavior of turning on TLS.
params1 = lib.remove "tls" params0; params1 = lib.remove "tls" params0;
sections = [ host] ++ params1; sections = [ host] ++ params1;
formattedSections = lib.concatStringsSep ";" sections; formattedSections = lib.concatStringsSep ";" sections;
in in
@ -90,7 +90,7 @@ in
{ imports = [ { imports = [
./nghttpx-options.nix ./nghttpx-options.nix
]; ];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.groups.nghttpx = { }; users.groups.nghttpx = { };
@ -98,7 +98,7 @@ in
group = config.users.groups.nghttpx.name; group = config.users.groups.nghttpx.name;
isSystemUser = true; isSystemUser = true;
}; };
systemd.services = { systemd.services = {
nghttpx = { nghttpx = {

View File

@ -23,7 +23,7 @@ in {
### Documentation ### Documentation
# meta.doc = ./onedrive.xml; # meta.doc = ./onedrive.xml;
### Interface ### Interface
options.services.onedrive = { options.services.onedrive = {
enable = lib.mkOption { enable = lib.mkOption {

View File

@ -772,7 +772,7 @@ in
}; };
disco_items = { disco_items = {
${ lib.concatStringsSep "\n" (builtins.map (x: ''{ "${x.url}", "${x.description}"};'') discoItems)} ${ lib.concatStringsSep "\n" (builtins.map (x: ''{ "${x.url}", "${x.description}"};'') discoItems)}
}; };
allow_registration = ${toLua cfg.allowRegistration} allow_registration = ${toLua cfg.allowRegistration}

View File

@ -76,9 +76,9 @@ in
networking.supplicant = mkOption { networking.supplicant = mkOption {
type = with types; attrsOf (submodule { type = with types; attrsOf (submodule {
options = { options = {
configFile = { configFile = {
path = mkOption { path = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
@ -89,7 +89,7 @@ in
precedence over options defined in <literal>configFile</literal>. precedence over options defined in <literal>configFile</literal>.
''; '';
}; };
writable = mkOption { writable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -98,9 +98,9 @@ in
<literal>wpa_supplicant</literal>. <literal>wpa_supplicant</literal>.
''; '';
}; };
}; };
extraConf = mkOption { extraConf = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
@ -126,7 +126,7 @@ in
use the <literal>configFile</literal> instead. use the <literal>configFile</literal> instead.
''; '';
}; };
extraCmdArgs = mkOption { extraCmdArgs = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
@ -134,21 +134,21 @@ in
description = description =
"Command line arguments to add when executing <literal>wpa_supplicant</literal>."; "Command line arguments to add when executing <literal>wpa_supplicant</literal>.";
}; };
driver = mkOption { driver = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = "nl80211,wext"; default = "nl80211,wext";
description = "Force a specific wpa_supplicant driver."; description = "Force a specific wpa_supplicant driver.";
}; };
bridge = mkOption { bridge = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
description = "Name of the bridge interface that wpa_supplicant should listen at."; description = "Name of the bridge interface that wpa_supplicant should listen at.";
}; };
userControlled = { userControlled = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -159,20 +159,20 @@ in
access points. access points.
''; '';
}; };
socketDir = mkOption { socketDir = mkOption {
type = types.str; type = types.str;
default = "/run/wpa_supplicant"; default = "/run/wpa_supplicant";
description = "Directory of sockets for controlling wpa_supplicant."; description = "Directory of sockets for controlling wpa_supplicant.";
}; };
group = mkOption { group = mkOption {
type = types.str; type = types.str;
default = "wheel"; default = "wheel";
example = "network"; example = "network";
description = "Members of this group can control wpa_supplicant."; description = "Members of this group can control wpa_supplicant.";
}; };
}; };
}; };
}); });

View File

@ -106,7 +106,7 @@ in
Restart = "always"; Restart = "always";
}; };
}; };
}; };
meta.maintainers = with maintainers; [ maintainers."1000101" ]; meta.maintainers = with maintainers; [ maintainers."1000101" ];

View File

@ -5,12 +5,12 @@ with lib;
let cfg = config.services.networking.websockify; in { let cfg = config.services.networking.websockify; in {
options = { options = {
services.networking.websockify = { services.networking.websockify = {
enable = mkOption { enable = mkOption {
description = "Whether to enable websockify to forward websocket connections to TCP connections."; description = "Whether to enable websockify to forward websocket connections to TCP connections.";
default = false; default = false;
type = types.bool; type = types.bool;
}; };
sslCert = mkOption { sslCert = mkOption {

View File

@ -21,11 +21,11 @@ in
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
Whether to enable to haveged entropy daemon, which refills Whether to enable to haveged entropy daemon, which refills
/dev/random when low. /dev/random when low.
''; '';
}; };
refill_threshold = mkOption { refill_threshold = mkOption {
type = types.int; type = types.int;
default = 1024; default = 1024;
@ -34,16 +34,16 @@ in
haveged should refill the entropy pool. haveged should refill the entropy pool.
''; '';
}; };
}; };
}; };
###### implementation ###### implementation
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.haveged = systemd.services.haveged =
{ description = "Entropy Harvesting Daemon"; { description = "Entropy Harvesting Daemon";
unitConfig.Documentation = "man:haveged(8)"; unitConfig.Documentation = "man:haveged(8)";
@ -63,5 +63,5 @@ in
}; };
}; };
} }

View File

@ -33,7 +33,7 @@ in
description = " description = "
Which hostname to set the vHost to that is proxying to sks. Which hostname to set the vHost to that is proxying to sks.
"; ";
}; };
hkpAddress = mkOption { hkpAddress = mkOption {
default = builtins.head sksCfg.hkpAddress; default = builtins.head sksCfg.hkpAddress;

View File

@ -83,7 +83,7 @@ in
}; };
}; };
config = lib.mkIf cfg.enable (lib.mkMerge [ config = lib.mkIf cfg.enable (lib.mkMerge [
{ {
meta.maintainers = with lib.maintainers; [ kampka ]; meta.maintainers = with lib.maintainers; [ kampka ];

View File

@ -51,7 +51,7 @@ in
Whether or not to enable SSL (https) support. Whether or not to enable SSL (https) support.
''; '';
}; };
certDirectory = mkOption { certDirectory = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;

View File

@ -353,7 +353,7 @@ in
}; };
}; };
}; };
default = {}; default = {};
description = '' description = ''
Auto login configuration attrset. Auto login configuration attrset.

View File

@ -19,7 +19,7 @@ in
waitPID=$! waitPID=$!
''; '';
}]; }];
environment.systemPackages = [ pkgs.qtile ]; environment.systemPackages = [ pkgs.qtile ];
}; };
} }

View File

@ -5,7 +5,7 @@ with lib;
let let
cfg = config.boot.initrd.network.openvpn; cfg = config.boot.initrd.network.openvpn;
in in
{ {
@ -16,17 +16,17 @@ in
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
Starts an OpenVPN client during initrd boot. It can be used to e.g. Starts an OpenVPN client during initrd boot. It can be used to e.g.
remotely accessing the SSH service controlled by remotely accessing the SSH service controlled by
<option>boot.initrd.network.ssh</option> or other network services <option>boot.initrd.network.ssh</option> or other network services
included. Service is killed when stage-1 boot is finished. included. Service is killed when stage-1 boot is finished.
''; '';
}; };
boot.initrd.network.openvpn.configuration = mkOption { boot.initrd.network.openvpn.configuration = mkOption {
type = types.path; # Same type as boot.initrd.secrets type = types.path; # Same type as boot.initrd.secrets
description = '' description = ''
The configuration file for OpenVPN. The configuration file for OpenVPN.
<warning> <warning>
<para> <para>
@ -47,7 +47,7 @@ in
message = "You should specify a configuration for initrd OpenVPN"; message = "You should specify a configuration for initrd OpenVPN";
} }
]; ];
# Add kernel modules needed for OpenVPN # Add kernel modules needed for OpenVPN
boot.initrd.kernelModules = [ "tun" "tap" ]; boot.initrd.kernelModules = [ "tun" "tap" ];
@ -60,11 +60,11 @@ in
cp -pv ${pkgs.glibc}/lib/libresolv.so.2 $out/lib cp -pv ${pkgs.glibc}/lib/libresolv.so.2 $out/lib
cp -pv ${pkgs.glibc}/lib/libnss_dns.so.2 $out/lib cp -pv ${pkgs.glibc}/lib/libnss_dns.so.2 $out/lib
''; '';
boot.initrd.secrets = { boot.initrd.secrets = {
"/etc/initrd.ovpn" = cfg.configuration; "/etc/initrd.ovpn" = cfg.configuration;
}; };
# openvpn --version would exit with 1 instead of 0 # openvpn --version would exit with 1 instead of 0
boot.initrd.extraUtilsCommandsTest = '' boot.initrd.extraUtilsCommandsTest = ''
$out/bin/openvpn --show-gateway $out/bin/openvpn --show-gateway

View File

@ -64,10 +64,10 @@ in {
example = 120; example = 120;
type = types.nullOr types.int; type = types.nullOr types.int;
description = '' description = ''
Maximum number of latest generations in the boot menu. Maximum number of latest generations in the boot menu.
Useful to prevent boot partition running out of disk space. Useful to prevent boot partition running out of disk space.
<literal>null</literal> means no limit i.e. all generations <literal>null</literal> means no limit i.e. all generations
that were not garbage collected yet. that were not garbage collected yet.
''; '';
}; };

View File

@ -113,9 +113,9 @@ in {
config = config =
let let
units = mapAttrs' (n: v: let nspawnFile = "${n}.nspawn"; in nameValuePair nspawnFile (instanceToUnit nspawnFile v)) cfg; units = mapAttrs' (n: v: let nspawnFile = "${n}.nspawn"; in nameValuePair nspawnFile (instanceToUnit nspawnFile v)) cfg;
in in
mkMerge [ mkMerge [
(mkIf (cfg != {}) { (mkIf (cfg != {}) {
environment.etc."systemd/nspawn".source = mkIf (cfg != {}) (generateUnits' false "nspawn" units [] []); environment.etc."systemd/nspawn".source = mkIf (cfg != {}) (generateUnits' false "nspawn" units [] []);
}) })
{ {
@ -123,7 +123,7 @@ in {
# Workaround for https://github.com/NixOS/nixpkgs/pull/67232#issuecomment-531315437 and https://github.com/systemd/systemd/issues/13622 # Workaround for https://github.com/NixOS/nixpkgs/pull/67232#issuecomment-531315437 and https://github.com/systemd/systemd/issues/13622
# Once systemd fixes this upstream, we can re-enable -U # Once systemd fixes this upstream, we can re-enable -U
systemd.services."systemd-nspawn@".serviceConfig.ExecStart = [ systemd.services."systemd-nspawn@".serviceConfig.ExecStart = [
"" # deliberately empty. signals systemd to override the ExecStart "" # deliberately empty. signals systemd to override the ExecStart
# Only difference between upstream is that we do not pass the -U flag # Only difference between upstream is that we do not pass the -U flag
"${config.systemd.package}/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth --settings=override --machine=%i" "${config.systemd.package}/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth --settings=override --machine=%i"

View File

@ -8,6 +8,6 @@
boot.initrd.extraUdevRulesCommands = '' boot.initrd.extraUdevRulesCommands = ''
cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/ cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/
''; '';
} }

View File

@ -6,7 +6,7 @@ let
in in
{ {
imports = [ ./azure-common.nix ]; imports = [ ./azure-common.nix ];
options = { options = {
virtualisation.azureImage.diskSize = mkOption { virtualisation.azureImage.diskSize = mkOption {
type = with types; int; type = with types; int;

View File

@ -29,9 +29,9 @@ let
default = "none"; default = "none";
description = '' description = ''
The type of the filesystem to be mounted. The type of the filesystem to be mounted.
Linux: filesystem types supported by the kernel as listed in Linux: filesystem types supported by the kernel as listed in
`/proc/filesystems` (e.g., "minix", "ext2", "ext3", "jfs", "xfs", `/proc/filesystems` (e.g., "minix", "ext2", "ext3", "jfs", "xfs",
"reiserfs", "msdos", "proc", "nfs", "iso9660"). For bind mounts "reiserfs", "msdos", "proc", "nfs", "iso9660"). For bind mounts
(when options include either bind or rbind), the type is a dummy, (when options include either bind or rbind), the type is a dummy,
often "none" (not listed in /proc/filesystems). often "none" (not listed in /proc/filesystems).
''; '';
@ -45,9 +45,9 @@ let
default = [ "bind" ]; default = [ "bind" ];
description = '' description = ''
Mount options of the filesystem to be used. Mount options of the filesystem to be used.
Support optoions are listed in the mount(8) man page. Note that Support optoions are listed in the mount(8) man page. Note that
both filesystem-independent and filesystem-specific options both filesystem-independent and filesystem-specific options
are listed. are listed.
''; '';
}; };