nixpkgs/nixos/modules/security
aszlig 3e11ff6e0d
nixos/dhparams: Introduce a 'stateful' option
This option allows us to turn off stateful generation of Diffie-Hellman
parameters, which in some way is still stateful as the generated DH
params file is non-deterministic.

However what we can avoid with this is to have an increased surface for
failures during system startup, because generation of the parameters is
done during build-time.

Another advantage of this is that we no longer need to take care of
cleaning up the files that are no longer used and in my humble opinion I
would have preferred that #11505 (which puts the dhparams in the Nix
store) would have been merged instead of #22634 (which we have now).

Luckily we can still change that and this change gives the user the
option to put the dhparams into the Nix store.

Beside of the more obvious advantages pointed out here, this also
effects test runtime if more services are starting to use this (for
example see #39507 and #39288), because generating DH params could take
a long time depending on the bit size which adds up to test runtime.

If we generate the DH params in a separate derivation, subsequent test
runs won't need to wait for DH params generation during bootup.

Of course, tests could still mock this by force-disabling the service
and adding a service or activation script that places pre-generated DH
params in /var/lib/dhparams but this would make tests less readable and
the workaround would have to be made for each test affected.

Note that the 'stateful' option is still true by default so that we are
backwards-compatible with existing systems.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog, @abbradar, @fpletz
2018-04-26 08:04:50 +02:00
..
wrappers wrapper.c: fixup includes to work w/musl 2018-03-25 18:06:02 -05:00
acme.nix Fix incorrect merge 2018-04-21 22:34:39 +02:00
acme.xml nixos/acme: remove doc note about restarting nginx 2017-10-30 13:51:35 -04:00
apparmor-suid.nix Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
apparmor.nix apparmor: support for lxc profiles 2017-01-10 23:01:03 +01:00
audit.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
auditd.nix nixos/auditd: break ordering cycle (#27577) 2017-08-01 20:45:01 +01:00
ca.nix cacerts: refactor, add blacklist option 2016-10-09 02:00:18 +02:00
chromium-suid-sandbox.nix nixos/chromium-suid-sandbox: remove reference to grsecurity 2017-09-02 20:35:28 +02:00
dhparams.nix nixos/dhparams: Introduce a 'stateful' option 2018-04-26 08:04:50 +02:00
duosec.nix duosec: use root uid as sshd uid has been retired (#33597) 2018-03-21 18:46:35 -05:00
hidepid.nix hidepid: polkit and systemd-logind compatibility 2016-12-07 01:12:05 +01:00
hidepid.xml hidepid module: detailed description to external doc 2016-09-15 15:36:03 +02:00
lock-kernel-modules.nix nixos/lock-kernel-modules: fix deferred fileSystem mounts 2017-09-22 23:55:04 +02:00
oath.nix config.security.oath: new module 2016-02-25 13:52:45 +00:00
pam.nix Merge pull request #31969 from Assassinkin/master 2018-04-21 14:36:47 -05:00
pam_mount.nix pam_mount module: integrate pam_mount into PAM of NixOS 2015-07-04 23:42:31 +02:00
pam_usb.nix security.pam.usb: link to wiki on github.com 2017-09-28 16:00:28 +02:00
polkit.nix network-link-*.service: Set stopIfChanged = false 2017-04-04 15:13:49 +02:00
prey.nix nixos: fix some types 2015-09-18 18:48:50 +00:00
rngd.nix rngd: update modalias to match cpu type 2016-09-17 18:36:57 -07:00
rtkit.nix rtkit: Update from 0.10 to 0.11 2014-04-21 23:22:10 +02:00
sudo.nix nixos/security: fix description of sudo.wheelNeedsPassword 2018-03-16 21:50:46 +00:00