Commit Graph

11777 Commits

Author SHA1 Message Date
Arian van Putten
604b7c139f Fix letsencrypt (#60219)
* nixos/acme: Fix ordering of cert requests

When subsequent certificates would be added, they would
not wake up nginx correctly due to target units only being triggered
once. We now added more fine-grained systemd dependencies to make sure
nginx always is aware of new certificates and doesn't restart too early
resulting in a crash.

Furthermore, the acme module has been refactored. Mostly to get
rid of the deprecated PermissionStartOnly systemd options which were
deprecated. Below is a summary of changes made.

* Use SERVICE_RESULT to determine status
This was added in systemd v232. we don't have to keep track
of the EXITCODE ourselves anymore.

* Add regression test for requesting mutliple domains

* Deprecate 'directory' option
We now use systemd's StateDirectory option to manage
create and permissions of the acme state directory.

* The webroot is created using a systemd.tmpfiles.rules rule
instead of the preStart script.

* Depend on certs directly

By getting rid of the target units, we make sure ordering
is correct in the case that you add new certs after already
having deployed some.

Reason it broke before:  acme-certificates.target would
be in active state, and if you then add a new cert, it
would still be active and hence nginx would restart
without even requesting a new cert. Not good!  We
make the dependencies more fine-grained now. this should fix that

* Remove activationDelay option

It complicated the code a lot, and is rather arbitrary. What if
your activation script takes more than activationDelay seconds?

Instead, one should use systemd dependencies to make sure some
action happens before setting the certificate live.

e.g. If you want to wait until your cert is published in DNS DANE /
TLSA, you could create a unit that blocks until it appears in DNS:

```
RequiredBy=acme-${cert}.service
After=acme-${cert}.service
ExecStart=publish-wait-for-dns-script
```
2019-08-29 16:32:59 +02:00
Florian Klink
132a8382b0
Merge pull request #66922 from davidak/netdata_enableCgroupAccounting
netdata: enable cgroup accounting
2019-08-29 11:56:57 +02:00
Jaka Hudoklin
8d1510abfb
Merge pull request #67606 from endocrimes/r-vault-1.2.2
vault: 1.0.2 -> 1.2.2
2019-08-29 07:07:09 +00:00
Pascal Bach
02ed974bba nixos/gitlab-runner: add missing HOME to environment (#67450)
Gitlab runner fails to start if HOME is not set.
2019-08-28 20:27:28 +00:00
Danielle Lancashire
4b99f9ba0b
vault: add raft backend to vault service 2019-08-28 18:42:18 +02:00
Silvan Mosberger
6233291d95
Merge pull request #64738 from rnhmjoj/magnetico
magnetico: init package and service
2019-08-28 18:39:21 +02:00
Silvan Mosberger
fb7611a496
Merge pull request #65661 from davidak/containers
nixos-containers: add TimeoutStartSec option
2019-08-28 18:37:30 +02:00
Matthew Bauer
b8f9e09ad1
Merge pull request #67260 from pstch/fix/xsession-allow-session-choice
nixos/x11: provide selected session to custom session
2019-08-28 11:07:19 -04:00
Hugo Geoffroy
a23798e478 nixos/x11: provide selected session to custom session
The custom session script is always executed (when it exists). This change
passes the selected session script and select session name to the custom session
script, so that it can defer to the selected session script based on the value
of the selected session name.
2019-08-28 16:58:12 +02:00
davidak
eba686ddfa nixos-containers: add TimeoutStartSec option
Default is now 1m instead of global default of 15sec. It is also
configurable.

Fixes issue where start of many containers (40+) fail
https://github.com/NixOS/nixpkgs/issues/65001
2019-08-28 14:54:51 +02:00
rnhmjoj
182830f542
nixos/magnetico: init service 2019-08-28 14:19:24 +02:00
Linus Heckemann
5e2f89bbce
Merge pull request #67394 from Ma27/drop-keys.target-dependency
nixos/treewide: drop dependencies to `keys.target`
2019-08-28 12:01:22 +02:00
Peter Hoeg
73701a7a05
Merge pull request #67487 from dasJ/suspend-then-hibernate
nixos/systemd: Add suspend-then-hibernate units
2019-08-28 17:29:17 +08:00
worldofpeace
27a4afefbe
Merge pull request #66859 from worldofpeace/xfce4-14-module
nixos/xfce4-14: init
2019-08-27 22:37:03 -04:00
Eelco Dolstra
35c1c170d7 nix.conf: Set sandbox-fallback = false
For security, we don't want the sandbox to be disabled silently.
2019-08-27 21:17:20 +02:00
worldofpeace
156f335161
Merge pull request #67549 from worldofpeace/gnome-control-center/fix-sharing
Fix sharing in gnome-control-center
2019-08-27 14:28:15 -04:00
Maximilian Bosch
56a7bc05e1
nixos/treewide: drop dependencies to keys.target
The `keys.target` is used to indicate whether all NixOps keys were
successfully uploaded on an unattended reboot. However this can cause
startup issues e.g. with NixOS containers (see #67265) and can block
boots even though this might not be needed (e.g. with a dovecot2
instance running that doesn't need any of the NixOps keys).

As described in the NixOps manual[1], dependencies to keys should be
defined like this now:

``` nix
{
  systemd.services.myservice = {
    after = [ "secret-key.service" ];
    wants = [ "secret-key.service" ];
  };
}
```

However I'd leave the issue open until it's discussed whether or not to
keep `keys.target` in `nixpkgs`.

[1] https://nixos.org/nixops/manual/#idm140737322342384
2019-08-27 18:55:55 +02:00
Matthew Bauer
4081bec5ac
zsh: remove unfunction on TERM=dumb
Unfortunately this gives an error when precmd or preexec exists. Removing to avoid that.
2019-08-27 11:00:58 -04:00
Marek Mahut
b40ee82685
Merge pull request #67556 from mmahut/matomo
nixos/matomo: fixing the configuration path
2019-08-27 16:13:34 +02:00
rnhmjoj
05ddde928d
nixos/dnschain: disable DNSSEC for namecoin TLDs 2019-08-27 14:42:06 +02:00
Silvan Mosberger
210756a450
nixos/pdns-recursor: implement a settings option (#67251)
nixos/pdns-recursor: implement a `settings` option
2019-08-27 14:34:32 +02:00
Marek Mahut
3a9d17ef04 nixos/matomo: fixing the configuration path 2019-08-27 11:44:34 +02:00
Florian Klink
9a02d9c75e
Merge pull request #66984 from flokli/systemd-cgroup-accounting
nixos/systemd: enable systemd cgroup accounting by default
2019-08-27 11:38:28 +02:00
worldofpeace
8a24bc2e08 nixos/gnome-user-share: cleanup
* No sessionPath!

* add to systemd.packages
  This is for the gnome-user-share-webdav.service.

* Update option description
2019-08-27 03:07:57 -04:00
Aaron Andersen
87fdc06a97
Merge pull request #63634 from aanderse/moodle
moodle: init at 3.7.1
2019-08-26 21:12:44 -04:00
Matthew Bauer
ed87d12187
Merge pull request #67476 from matthewbauer/fix-66745
nixos/update-users-groups.pl: chomp hashedPassword
2019-08-26 15:54:13 -04:00
rnhmjoj
0e0a533d9a
nixos/pdns-recursor: add luaConfig option 2019-08-26 17:46:04 +02:00
rnhmjoj
92d956267a
nixos/pdns-recursor: implement a settings option 2019-08-26 17:46:03 +02:00
Peter Simons
95c021393f mailman: reserve uid & gid in NixOS 2019-08-26 16:17:39 +02:00
Peter Hoeg
c876affce0 nixos darkhttpd: module to enable darkhttpd 2019-08-26 19:57:49 +08:00
worldofpeace
450a180542
Merge pull request #67466 from worldofpeace/gnome3-defaults-cleanup
nixos/gnome3: split up
2019-08-26 05:56:38 -04:00
worldofpeace
70e506cf7c nixos/gnome3: split out gnome-flashback 2019-08-26 05:36:11 -04:00
worldofpeace
fca8d35531 nixos/gnome3: split up
This introduces the following options under the services.gnome3 namespace:

* core-os-services.enable
* core-shell.enable
* core-utilities.enable
* games.enable

The first three are all default enabled by gnome3.enable
and their purpose is to make gnome3 more flexable for users
usecases. In the case of core-utilities and games, it allows
users to easily switch on the default gnome3 applications
and games packages. Previously we had lists in gnome-3/default.nix
but they weren't visible to the user. By having options we have
generated documentation and an interface.
2019-08-26 05:19:05 -04:00
Janne Heß
c8e863e25e nixos/systemd: Add suspend-then-hibernate units
Pretty useful for laptops. I use them with:

```
services.logind.lidSwitch = "suspend-then-hibernate";
environment.etc."systemd/sleep.conf".text = "HibernateDelaySec=8h";
```
2019-08-26 11:04:10 +02:00
Peter Hoeg
f729a79eae
Merge pull request #62974 from peterhoeg/f/zmtrigger
zoneminder: add perlPackages.DeviceSerialPort for zmtrigger.pl
2019-08-26 14:47:32 +08:00
Peter Hoeg
574ec28ef1 nixos/zoneminder: open telnet port for remote admin 2019-08-26 14:47:00 +08:00
Matthew Bauer
fc565c1b9d nixos/update-users-groups.pl: chomp hashedPassword
We don’t want any trailing whitespace, otherwise we mess up the
formating of the shadow file. Some things like readFile may have the
trailing new line.

Fixes #66745
2019-08-25 23:42:31 -04:00
Marek Mahut
81fe072a8f nixos/unifi: restarting on failure (#67456) 2019-08-25 18:22:03 -06:00
Florian Klink
0fb17141fb nixos/systemd: enable cgroup accounting by default
If this is the default for OpenShift already, we probably can enable it
as well.

see https://github.com/openshift/machine-config-operator/pull/581
2019-08-25 22:26:12 +02:00
Florian Klink
f3a18d4562 nixos/systemd: add new Default{BlockIO,IP}Accounting settings 2019-08-25 22:25:19 +02:00
Florian Klink
f34f38ef1c nixos/systemd: honor default enableCgroupAccounting settings
systemd defaults DefaultMemoryAccounting and DefaultTasksAccounting to
yes, so no need to enable explicitly
2019-08-25 22:25:19 +02:00
Marek Mahut
18dfe1a3f5
Merge pull request #67449 from mmahut/jormungandr
nixos/jormungandr: adding genesis tests
2019-08-25 19:54:03 +02:00
Marek Mahut
4ca0df1539
Merge pull request #67444 from dasJ/fix-memcached-privateusers
nixos/memcached: Remove PrivateUsers
2019-08-25 19:18:26 +02:00
Marek Mahut
f6ced211e6 nixos/jormungandr: changing the port to match upstream 2019-08-25 18:33:13 +02:00
Aaron Andersen
5b8c2295b0
Merge pull request #67393 from c0deaddict/feature/transmission-user-configurable
nixos/transmission: make user configurable
2019-08-25 10:47:40 -04:00
Janne Heß
cabab90ad2 nixos/memcached: Remove PrivateUsers
Seems to break systems using the hardened profile.
Ref #62936
cc @Izorkin
2019-08-25 16:34:06 +02:00
Marek Mahut
9ffc980ef7
Merge pull request #67391 from avnik/drop-rmilter
rmilter: remove deprecated package (and module)
2019-08-25 14:24:06 +02:00
Aaron Andersen
3bd03d2c0a nixos/moodle: init service 2019-08-25 08:12:28 -04:00
Jos van Bakel
c3e93d5ad4
nixos/transmission: make user configurable 2019-08-25 13:19:48 +02:00
worldofpeace
e075227b00
Merge pull request #67407 from jtojnar/gnome-bg
nixos/gnome3: fix default background setting
2019-08-24 18:33:41 -04:00