diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-01-19 09:55:31 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-01-19 09:55:31 +0100 |
commit | 716aac2519a7571e7f5fd984a886d579a4a051c5 (patch) | |
tree | 53cf89cf764d787f4dc8f08474479892b9733177 /nixos/modules/config | |
parent | f8472457a440de3c44f6f604142d678b6ae2a762 (diff) | |
parent | 53b389327e34de319dc0dbda2b6bcab1a69db69d (diff) | |
download | nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2 nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.zip |
Merge branch 'staging' into closure-size
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/ldap.nix | 1 | ||||
-rw-r--r-- | nixos/modules/config/pulseaudio.nix | 1 | ||||
-rw-r--r-- | nixos/modules/config/shells-environment.nix | 1 | ||||
-rw-r--r-- | nixos/modules/config/swap.nix | 5 | ||||
-rw-r--r-- | nixos/modules/config/sysctl.nix | 7 | ||||
-rw-r--r-- | nixos/modules/config/unix-odbc-drivers.nix | 5 | ||||
-rw-r--r-- | nixos/modules/config/users-groups.nix | 2 |
7 files changed, 14 insertions, 8 deletions
diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix index c87996df8855..a6657768e061 100644 --- a/nixos/modules/config/ldap.nix +++ b/nixos/modules/config/ldap.nix @@ -57,6 +57,7 @@ in users.ldap = { enable = mkOption { + type = types.bool; default = false; description = "Whether to enable authentication against an LDAP server."; }; diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 2c40895296c6..334fa1f772c5 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -99,6 +99,7 @@ in { package = mkOption { type = types.package; default = pulseaudioLight; + defaultText = "pkgs.pulseaudioLight"; example = literalExample "pkgs.pulseaudioFull"; description = '' The PulseAudio derivation to use. This can be used to enable diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index d0243f9775c5..9642981803bf 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -119,6 +119,7 @@ in environment.binsh = mkOption { default = "${config.system.build.binsh}/bin/sh"; + defaultText = "\${config.system.build.binsh}/bin/sh"; example = literalExample '' "''${pkgs.dash}/bin/dash" ''; diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 9a5d6a9fc333..f0353c5a35ec 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -128,6 +128,7 @@ in wantedBy = [ "${realDevice'}.swap" ]; before = [ "${realDevice'}.swap" ]; path = [ pkgs.utillinux ] ++ optional sw.randomEncryption pkgs.cryptsetup; + script = '' ${optionalString (sw.size != null) '' @@ -145,11 +146,13 @@ in mkswap ${sw.realDevice} ''} ''; + unitConfig.RequiresMountsFor = [ "${dirOf sw.device}" ]; unitConfig.DefaultDependencies = false; # needed to prevent a cycle serviceConfig.Type = "oneshot"; serviceConfig.RemainAfterExit = sw.randomEncryption; - serviceConfig.ExecStop = optionalString sw.randomEncryption "cryptsetup luksClose ${sw.deviceName}"; + serviceConfig.ExecStop = optionalString sw.randomEncryption "${pkgs.cryptsetup}/bin/cryptsetup luksClose ${sw.deviceName}"; + restartIfChanged = false; }; in listToAttrs (map createSwapDevice (filter (sw: sw.size != null || sw.randomEncryption) config.swapDevices)); diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index e83562a8356e..61b02c5ffa6a 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -22,10 +22,9 @@ in boot.kernel.sysctl = mkOption { default = {}; - example = { - "net.ipv4.tcp_syncookies" = false; - "vm.swappiness" = 60; - }; + example = literalExample '' + { "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; } + ''; type = types.attrsOf sysctlOption; description = '' Runtime parameters of the Linux kernel, as set by diff --git a/nixos/modules/config/unix-odbc-drivers.nix b/nixos/modules/config/unix-odbc-drivers.nix index 98929392acec..eea6477fff23 100644 --- a/nixos/modules/config/unix-odbc-drivers.nix +++ b/nixos/modules/config/unix-odbc-drivers.nix @@ -10,8 +10,9 @@ with lib; options = { environment.unixODBCDrivers = mkOption { + type = types.listOf types.package; default = []; - example = literalExample "map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] )"; + example = literalExample "with pkgs.unixODBCDrivers; [ mysql psql psqlng ]"; description = '' Specifies Unix ODBC drivers to be registered in <filename>/etc/odbcinst.ini</filename>. You may also want to @@ -26,7 +27,7 @@ with lib; config = mkIf (config.environment.unixODBCDrivers != []) { environment.etc."odbcinst.ini".text = - let inis = config.environment.unixODBCDrivers; + let inis = map (x : x.ini) config.environment.unixODBCDrivers; in lib.concatStringsSep "\n" inis; }; diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 485926fb1dd0..e643b2d059b5 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -26,7 +26,7 @@ let ''; hashedPasswordDescription = '' - To generate hashed password install <literal>mkpassword</literal> + To generate hashed password install <literal>mkpasswd</literal> package and run <literal>mkpasswd -m sha-512</literal>. ''; |