3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

9861 commits

Author SHA1 Message Date
aszlig ce87773867
nixos/dhparams: Clean up module expression
First of all let's start with a clean up the multiline string
indentation for descriptions, because having two indentation levels
after description is a waste of screen estate.

A quick survey in the form of the following also reveals that the
majority of multiline strings in nixpkgs is starting the two beginning
quotes in the same line:

$ find -name '*.nix' -exec sed -n -e '/=$/ { n; /'\'\''/p }' {} + | wc -l
817
$ find -name '*.nix' -exec grep "= *'' *\$" {} + | wc -l
14818

The next point is to get the type, default and example attributes on top
of the description because that's the way it's rendered in the manual.

Most services have their enable option close to the beginning of the
file, so let's move it to the top.

Also, I found the script attribute for dhparams-init.service a bit hard
to read as it was using string concatenation to split a "for" loop.

Now for the more substantial clean ups rather than just code style:

  * Remove the "with lib;" at the beginning of the module, because it
    makes it easier to do a quick check with "nix-instantiate --parse".
  * Use ConditionPathExists instead of test -e for checking whether we
    need to generate the dhparams file. This avoids spawning a shell if
    the file exists already and it's probably more common that it will
    exist, except for the initial creation of course.
  * When cleaning up old dhparams file, use RemainAfterExit so that the
    unit won't be triggered again whenever we stop and start a service
    depending on it.
  * Capitalize systemd unit descriptions to be more in par with most
    other unit descriptions (also see 0c5e837b66).
  * Use "=" instead of "==" for conditionals using []. It's just a very
    small nitpick though and it will only fail for POSIX shells. Bash on
    the other side accepts it anyway.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:52 +02:00
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
aszlig 761266bd18
nixos/dhparams: Turn params into a submodule
We're going to implement an option which allows us to turn off stateful
handling of Diffie-Hellman parameter files by putting them into the Nix
store.

However, modules now might need a way to reference these files, so we
add a now path option to every param specified, which carries a
read-only value of the path where to find the corresponding DH params
file.

I've also improved the description of security.dhparams.params a bit so
that it uses <warning/> and <note/>.

The NixOS VM test also reflects this change and checks whether the old
way to specify the bit size still works.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:48 +02:00
aszlig 4de774a63b
nixos/dhparams: Add a VM test
We're going to make changes to the dhparams module so we really want to
make sure we don't break it, so having a NixOS VM test is to make sure
we don't blow things up and can iterate on it.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:45 +02:00
Robin Gloster 94f5e5ad14
Revert "gitlab: disable"
This reverts commit 68c4605f1a.

Gitlab has been fixed
2018-04-26 00:15:24 +02:00
Robin Gloster 783fb86de4
gitlab module: update to gitlab 10.7 2018-04-26 00:15:24 +02:00
Matthew Justin Bauer e4d2d32a32
Merge pull request #33679 from flokli/deluge-module
Deluge: use mkEnableOption, add test
2018-04-25 14:54:34 -05:00
Matthew Justin Bauer a4a2626cd9
Merge pull request #35280 from markus1189/logkeys
Logkeys: Update and add `device` option to service
2018-04-25 14:48:29 -05:00
John Ericson ba52ae5048 treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
2018-04-25 15:28:55 -04:00
Ben Wolsieffer 4d40adb86d nginx: allow basic auth passwords to be specified in a file 2018-04-25 15:37:09 +02:00
Sarah Brofeldt 25abc29f47
Merge pull request #39473 from xeji/update-keymap-test
nixos/tests/keymap: wait for xdotool to succeed
2018-04-25 11:17:53 +02:00
xeji 6891bda370 nixos/tests/keymap: wait for xdotool to succeed
xdotool failed in rare cases when a window was already created
but not yet decorated by the window manager.
also prevent a (never observed but possible) race condition
2018-04-25 10:16:52 +02:00
Austin Seipp e4e8562806 nixos: typofixes/tab deletion in some foundationdb docs/module
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-04-25 00:05:18 -05:00
Peter Hoeg 45f1205bab
Merge pull request #39304 from peterhoeg/f/ha
home-assistant: add a few knobs and make config YAML
2018-04-25 01:35:12 +00:00
Robert Schütz e4a6e320bb home-assistant: simplify definition of configFile 2018-04-24 20:49:16 +02:00
Matthew Justin Bauer 1b0a7bfe38
Merge pull request #31833 from pngwjpgh/feat/acme/delay
nixos/acme: Allow for time window between cert issue and activation
2018-04-24 10:06:02 -05:00
Sarah Brofeldt 65abd2e63f
Merge pull request #39400 from xeji/improve-keymap-tests
nixos/tests/keymap: improve keymap tests
2018-04-24 11:49:53 +02:00
xeji 84a6e18947 nixos/tests/keymap: improve keymap tests
simplify tests, prevent timeouts and non-deterministic failures
2018-04-24 11:13:48 +02:00
Michael Raskin 6048470df1
Merge pull request #39342 from samueldr/fix/nixos-enter-efivarfs
nixos-enter: Ensures presence of full /sys tree. (for efivarfs)
2018-04-23 21:42:12 +00:00
gnidorah ce8f347ca8 nixos/hans, nixos/iodine: fix passwordFile attribute 2018-04-23 23:40:47 +03:00
Austin Seipp 18f28a6413 nixos: add foundationdb module, documentation
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-04-23 12:13:09 -05:00
Matthew Justin Bauer 14e66c1659
Merge pull request #36734 from gnidorah/hans
nixos/hans: init
2018-04-23 11:42:09 -05:00
Jan Malakhovski fbd4563b53 nixos: documentation: implement documentation.dev.enable option
I know that "devinfo" output does not currently exist, but so does "devman".
It is mentioned in the nixpkgs manual, but no derivation in nixpkgs actually uses it.
2018-04-23 15:08:58 +02:00
Jan Malakhovski 483815a743 nixos: documentation: move some code around, make docstrings more informative 2018-04-23 15:08:58 +02:00
adisbladis dd486e64e5
Merge pull request #39322 from elitak/trezor
trezord: Added Trezor Model-T (v2) udev rules
2018-04-23 18:14:20 +08:00
Peter Hoeg b886faa6b6 home-assistant: use remarshal to convert configuration to YAML
HA doesn't mind the configuration being JSON instead of YAML but since YAML is
the official language, use that as it allows users to easily exchange config
data with other parties in the community.
2018-04-23 16:53:13 +08:00
Peter Hoeg 4cd88807d8 home-assistant: make port configurable so we can use it elsewhere
Additionally, some settings based on NixOS configuation is set via defaultConfig
which is then merged with the user provided configration.

For now that just means http port and time zone but others can easily be added.
2018-04-23 16:53:12 +08:00
Jörg Thalheim 54bcf06084
Merge pull request #39155 from NixOS/zramSwap-one-dev
zramSwap: default to 1 device
2018-04-23 08:44:16 +01:00
Samuel Dionne-Riel 14cab1ac57 nixos-enter: Ensures presence of full /sys tree.
This partially reverts a change from e88f28965a
which removed the `mount --rbind /sys`.

While true that the activation scripts will mount `sysfs` at `/sys`,
none of the mountpoints lower in the `/sys` tree are handled by the
activation script, which includes `efivarfs`.

This fixes #38477 since it ensures the presence of `efivarfs` in the
`/sys` tree, which is why the systemd-boot installation failed.
2018-04-22 16:02:57 -04:00
Tuomas Tynkkynen 6a819c8f8c nixos/iso-image.nix: Fix typo 2018-04-22 22:12:17 +03:00
Nikolay Amiantov 7c90a86770 wireguard service: use scripts instead of ExecStarts/Stops
This is more in line with what other services do; also looks cleaner.
It changes configuration entries for pre-and post-hooks type to lines from
lists of strings which are more logical for them; coersion is provided for
backwards compatibility.

Finally, add several steps to improve robustness:

1. Load kernel module on start if not loaded;
2. Don't remove wireguard interface on start; it is removed on service stop. If
   it's not something is wrong.
2018-04-22 13:33:11 -05:00
Joachim F f442bfc02a
Merge pull request #39048 from oxij/nixos/fix-rename-bugs
nixos: fix rename.nix bugs
2018-04-22 17:46:09 +00:00
Bastian Köcher 6ed495cf13 raspberrypi-bootloader: Adds firmwareConfig config option
The `firmwareConfig` option will be appended to `/boot/config.txt`.
2018-04-22 18:27:17 +03:00
Bastian Köcher 8bc970bbc7 raspberrypi-bootloader: Adds support for using uboot
Uboot is copied into `/boot` in the installation process.
The boot entries are created by calling the `generic-extlinux-compatible` builder.
2018-04-22 18:27:17 +03:00
Jörg Thalheim fecda3498b
Merge pull request #27117 from cjxgm/fix-nspawn-missing-suffix
systemd.nspawn: fix missing suffix
2018-04-22 15:21:07 +01:00
Eric Litak 4bf61fa67a trezord: Added Trezor Model-T (v2) udev rules 2018-04-21 22:04:47 -07:00
Matthew Justin Bauer e4717c902f
Merge pull request #27958 from LumiGuide/strongswan-swanctl
nixos: add the strongswan-swanctl service
2018-04-21 15:47:39 -05:00
Gregor Kleen 79eebad055 Fix incorrect merge 2018-04-21 22:34:39 +02:00
Gregor Kleen e11cb1d2a9 Merge branch 'master' of github.com:NixOS/nixpkgs into feat/acme/delay 2018-04-21 22:34:01 +02:00
Matthew Justin Bauer 29dc27c5a3
Merge pull request #30908 from kierdavis/boinc-fhs
boinc service: use an FHS environment (CI now passing)
2018-04-21 15:25:58 -05:00
Matthew Justin Bauer 1eea73eaa8
Merge branch 'master' into feat/acme/delay 2018-04-21 14:53:23 -05:00
Matthew Justin Bauer 7a516cd0c3
Merge branch 'master' into feat/nsd/dnssec 2018-04-21 14:48:30 -05:00
Matthew Justin Bauer aeff4242db
Merge pull request #31969 from Assassinkin/master
Update sssd integration with pam as documented by RedHat
2018-04-21 14:36:47 -05:00
Jörg Thalheim dc0653f54f
Merge pull request #38816 from Ekleog/dovecot-lda-test
dovecot module: test dovecot's LDA
2018-04-21 19:55:23 +01:00
Jörg Thalheim 862f5b0b34
Merge pull request #35541 from xeji/containers-extraflags
nixos/containers: add extraFlags option
2018-04-21 14:16:49 +01:00
Jörg Thalheim a3e197a222
Merge pull request #39300 from erikarvstedt/openvpn-no-timestamps
openvpn: remove redundant timestamps from log output
2018-04-21 13:18:48 +01:00
Erik Arvstedt 683eeab299 openvpn: remove redundant timestamps from log output
The systemd journal is already logging and showing timestamps
2018-04-21 14:17:22 +02:00
Jörg Thalheim bf6998bdfa
Merge pull request #39297 from xeji/tests/gnome3-gdm
nixos/tests/gnome3-gdm: fix broken test
2018-04-21 11:40:52 +01:00
Lassulus 6db2057f00 nixos/restic: init (#38948) 2018-04-21 11:12:43 +01:00
xeji 4c14202bd1 nixos/tests/gnome3-gdm: fix broken test
test always failed due to multiple bugs
2018-04-21 12:09:30 +02:00