nixpkgs/nixos/modules/services
Maximilian Bosch 8325996621
nixos/autorandr: make default target in systemd service configurable
The `.service` file defining the `systemd` unit for `autorandr.service`
which is bundled with the package itself uses `--default default` in the
`ExecStart` section. This can be an issue when having multiple layouts
(e.g. `default` as workstation layout I mostly work on and `mobile` when
I go somewhere else).

When the service gets restarted and `--default` can't be applied,
however the current layout can't be detected (e.g. when working with an
unknown beamer) the service silently fails with a message like this:

```
Jun 22 18:44:46 hauptshuhle autorandr[3168]: /nix/store/h83b72ffm68nm8fyjnppljchp456a94r-xrandr-1.5.0/bin/xrandr: ca>
Jun 22 18:44:46 hauptshuhle autorandr[3168]: Failed to apply profile 'default' (line 718):
Jun 22 18:44:46 hauptshuhle autorandr[3168]:   Command failed: /nix/store/h83b72ffm68nm8fyjnppljchp456a94r-xrandr-1.>
```

As discussed in the IRC (see https://botbot.me/freenode/nixos/2018-07-05/?msg=101791455&page=6)
it's a bad long-term solution in terms of maintenance to manually patch
the service file bundled with the derivation, instead the service shall
be configured declaratively. Additionally this makes possible overrides
from the user-space way easier.

The `udev` rule (in `$out/etc/udev/rules.d`) won't' be affected, it
simply runs `systemctl start autorandr.service` when e.g. a new display
is added, so now `udev` communicates with the NixOS systemd unit.
2018-07-05 14:39:08 +02:00
..
admin nixos/oxidized: add module 2018-05-24 04:40:45 +02:00
amqp nixos/rabbitmq: fix restarts and sasl logs 2017-09-23 17:58:43 -04:00
audio mpd: fix spelling in description 2018-06-03 09:55:26 +02:00
backup Merge pull request #42133 from markuskowa/pgbackup 2018-06-20 22:21:52 +01:00
cluster/kubernetes add missing k8s Webhook authorization mode 2018-06-19 22:33:57 +02:00
computing nixos/slurm: remove propagatedBuidInputs from slurmWrapped 2018-06-02 14:01:24 +02:00
continuous-integration nixos/buildkite-agent: fix variable expansion in hook scripts 2018-04-27 12:17:40 +01:00
databases nixos/postgresql: Use listen_addresses, not -i 2018-06-13 23:03:02 -07:00
desktops nixos/flatpak: add flatpak's XDG_DATA_DIRS to the environment 2018-05-22 02:26:21 +02:00
development
editors Merge pull request #39478 from pngwjpgh/infinoted 2018-05-01 10:22:25 -05:00
games ghostOne: remove 2017-12-29 02:18:35 +01:00
hardware Merge pull request #39137 from peterhoeg/m/lcd 2018-04-28 22:57:59 +00:00
logging nixos/journaldriver: add module for journaldriver log forwarder 2018-06-18 20:36:44 +02:00
mail opensmtpd module: allow changing the package 2018-06-18 09:49:01 +02:00
misc nixos/autorandr: make default target in systemd service configurable 2018-07-05 14:39:08 +02:00
monitoring Merge pull request #40028 from WilliButz/add-dnsmasq-exporter 2018-06-01 23:18:49 -04:00
network-filesystems Merge pull request #40879 from seppeljordan/pr-ipfs-port-scanning 2018-05-24 10:53:49 +02:00
networking Merge pull request #41485 from teto/owamp 2018-06-20 21:45:36 -04:00
printing nixos/cupsd: Introduce services.printing.logLevel option 2018-04-27 16:41:49 +00:00
scheduling nixos/modules/services/scheduling/fcron: add setuid to fcrontab 2018-05-06 11:24:09 -07:00
search elasticsearch6: fix startup due to missing jvm.options 2018-04-18 00:38:48 +02:00
security Merge pull request #41098 from mkaito/oauth2_proxy 2018-06-18 20:47:55 +03:00
system Add localtime package and nixos module 2017-12-03 11:42:51 +01:00
torrent Merge pull request #33679 from flokli/deluge-module 2018-04-25 14:54:34 -05:00
ttys nixos: rename config.system.nixos* -> config.system.nixos.* 2018-02-18 12:56:30 +00:00
web-apps Merge pull request #42306 from ryantm/mattermost 2018-06-20 20:52:04 +00:00
web-servers nixos/uwsgi: use python.withPackages 2018-06-13 22:47:22 -07:00
x11 Merge pull request #39153 from mnacamura/lightdm-mini-greeter 2018-06-18 11:38:35 -04:00