nixpkgs/nixos/modules/services/misc
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
..
taskserver Added cross-references to NixOS manual 2018-04-12 09:39:14 +10:00
airsonic.nix nixos/airsonic: remove full-path commands from preStart 2017-08-25 23:18:46 +01:00
apache-kafka.nix apache-kafka.service: pass in log4j config more explicitly 2017-02-27 18:32:12 +00:00
autofs.nix autofs service: fix the manual 2017-07-26 15:24:43 +03:00
autorandr.nix nixos/autorandr: make default target in systemd service configurable 2018-07-05 14:39:08 +02:00
bepasty.nix bepasty: move out of python-packages 2017-08-25 19:36:18 +02:00
calibre-server.nix nixos/calibre-server: fix ExecStart call 2017-08-30 21:14:45 -07:00
canto-daemon.nix canto-daemon: Fix typo and remove TimeoutStopSec 2015-02-08 14:16:17 +00:00
cfdyndns.nix cfdyndns: init at 0.0.1 2016-02-15 12:54:04 -08:00
cgminer.nix treewide: use boolToString function 2017-04-11 18:18:53 +02:00
confd.nix treewide: use boolToString function 2017-04-11 18:18:53 +02:00
couchpotato.nix couchpotato module: init 2017-01-16 12:54:43 +01:00
cpuminer-cryptonight.nix cpuminer-cryptonight: new service module 2014-09-22 13:37:47 -04:00
defaultUnicornConfig.rb gitlab service: use recommended unicorn config 2018-03-22 02:29:28 +01:00
devmon.nix devmon: Non-root user, set PATH, require udisks2 2015-11-18 11:30:08 +00:00
dictd.nix nixos/modules: use defaultText where applicable 2016-11-21 16:35:15 +01:00
disnix.nix nixos: dysnomia: move into services subtree 2018-03-30 06:56:12 +00:00
docker-registry.nix nixos/docker-registry: allow running on ports < 1024 2018-06-06 22:26:26 +02:00
dysnomia.nix nixpkgs module: Clean up platform options 2018-04-06 12:41:44 -04:00
emby.nix emby service: allow changing data directory 2017-05-20 09:56:06 +02:00
errbot.nix errbot module: needs network-online to connect properly 2017-06-12 17:44:42 +02:00
etcd.nix etcd module: fix extraConf manual link 2017-04-16 00:26:23 +02:00
exhibitor.nix exhibitor: Fix bug with automatic instance management 2017-07-28 15:54:48 -04:00
felix.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
folding-at-home.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
fstrim.nix qt5ct module: expose qtstyleplugins 2017-07-23 12:56:04 +03:00
gammu-smsd.nix treewide: Mass replace 'sqlite}/bin' to refer to the correct outputs 2016-04-14 08:32:20 +03:00
geoip-updater.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
gitea.nix nixos/gitea: Respect gitea-dump enable option. (#41437) 2018-06-04 08:41:20 +02:00
gitit.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
gitlab.nix gitlab module: update for 10.8 2018-05-24 04:40:46 +02:00
gitlab.xml Added cross-references to NixOS manual 2018-04-12 09:39:14 +10:00
gitolite.nix nixos/gitolite: copy hooks with force 2017-12-21 08:41:59 +01:00
gitweb.nix nixos/gitweb: add gitwebTheme option 2018-04-17 20:07:01 +03:00
gogs.nix nixos/gogs: allow git operations over ssh 2018-03-30 16:37:36 +02:00
gollum.nix nixos/gollum: enable emoji and file uploads (#32373) 2017-12-06 09:10:54 +00:00
gpsd.nix types.uniq types.int -> types.int 2015-06-15 18:11:32 +02:00
home-assistant.nix home-assistant module: add openFirewall option 2018-05-22 14:29:57 +02:00
ihaskell.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
irkerd.nix irkerd service: init 2017-03-17 09:16:32 -05:00
jackett.nix nixos: static ids for jackett, radarr, sonarr 2017-04-25 12:08:21 +02:00
leaps.nix leaps: 0.5.1 + add a service + test 2016-11-06 10:34:42 +01:00
logkeys.nix logkeys.service: Add 'device' option 2018-02-21 18:16:14 +01:00
mantisbt.nix mantisbt: fix typo in documentation 2016-03-12 07:48:36 -06:00
mathics.nix nixos/mathics: New service and test 2016-01-02 14:34:55 -08:00
matrix-synapse-log_config.yaml matrix-synapse: init at 0.12.0 2016-01-15 15:17:14 +01:00
matrix-synapse.nix nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1 2018-05-12 19:27:09 +00:00
mbpfan.nix mbpfan: improve description, resolves #32266 2017-12-23 14:28:37 +00:00
mediatomb.nix Allow setting mediatomb interface 2015-06-13 15:16:28 +00:00
mesos-master.nix mesos: 1.0.1 -> 1.1.0 2016-12-29 20:09:46 -05:00
mesos-slave.nix nixos/mesos-slave: start after docker 2018-05-11 19:37:31 +02:00
mwlib.nix mwlib uses pdftk to create books 2015-06-08 08:35:12 +00:00
nix-daemon.nix nixos/sandbox: improve documentation. 2018-06-07 21:43:52 +01:00
nix-gc.nix nixos/treewide: systemd.time is in manvolume 7 2017-03-21 08:28:53 +01:00
nix-optimise.nix nixos/treewide: systemd.time is in manvolume 7 2017-03-21 08:28:53 +01:00
nix-ssh-serve.nix nixos: nix.sshServe: Support ssh-ng. 2018-02-28 16:55:00 -05:00
nixos-manual.nix w3m: Add a variant without graphics support and use for NixOS manual 2018-05-25 01:55:51 +03:00
novacomd.nix webos: init novacom, novacomd, cmake-modules; add nixos service 2018-02-20 10:34:19 -06:00
nscd-sssd.conf sssd: init at 1.14.2 2017-01-04 03:07:20 +03:00
nzbget.nix nzbget.service override nzbget.conf broken paths with current derivation 2017-10-29 19:37:56 -05:00
octoprint.nix octoprint: 1.3.1 -> 1.3.2 2017-03-21 20:22:27 +03:00
osrm.nix osrm service: init 2017-12-07 18:51:39 +01:00
packagekit.nix packagekit: add latest from hughsie's github repo 2016-07-05 20:26:59 +00:00
parsoid.nix nodePackages.parsoid: pin service-runner to 2.3.0 2018-04-02 22:38:40 +03:00
phd.nix Fix forgotten unit entry 2014-09-03 15:47:53 +04:00
plex.nix Fix warning about unknown escape sequences 2017-10-12 19:44:58 +02:00
plexpy.nix PlexPy service 2017-10-29 19:29:25 -05:00
pykms.nix pykms: nixos module 2017-10-12 08:51:34 +08:00
radarr.nix nixos: static ids for jackett, radarr, sonarr 2017-04-25 12:08:21 +02:00
redmine.nix nixos/redmine: fix create role 2017-09-13 21:55:50 +02:00
ripple-data-api.nix fix argument in mkEnableOption 2015-06-21 18:21:21 +03:00
rippled.nix rippled module: optionSet -> submodule 2016-09-13 12:53:10 +09:00
rogue.nix nixos/rogue: Set WorkingDirectory to /tmp 2015-07-22 16:08:17 +03:00
safeeyes.nix safeeyes: restart only on failure 2018-04-10 21:19:13 +03:00
serviio.nix add Serviio Media server package and service 2018-02-07 20:45:30 +01:00
siproxd.nix siproxd: initial service expression 2014-08-19 10:19:52 -04:00
snapper.nix snapper: add nixos module 2017-07-16 10:06:42 +01:00
sonarr.nix nixos: static ids for jackett, radarr, sonarr 2017-04-25 12:08:21 +02:00
spice-vdagentd.nix nixos/spice-vdagentd: remove needless shell 2017-07-14 16:28:25 +02:00
ssm-agent.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
sssd.nix sssd: init at 1.14.2 2017-01-04 03:07:20 +03:00
subsonic.nix Add script to move /var/subsonic to cfg.home 2016-05-16 14:42:22 -07:00
sundtek.nix sundtek: 2015-12-12 -> 2016-01-26 + service change 2016-01-30 20:08:52 +01:00
svnserve.nix svnserve service: network-interfaces.target -> network.target 2016-09-13 11:19:22 +02:00
synergy.nix nixos/synergy: Restart services on failure. 2015-10-13 04:42:39 +02:00
sysprof.nix sysprof: 1.2.0 -> 3.28.1 2018-05-16 16:54:12 +02:00
tzupdate.nix tzupdate service: init 2017-10-19 05:15:32 +01:00
uhub.nix uhub: initial service expression 2014-09-01 10:53:19 +04:00
xmr-stak.nix xmr-stak service: support multiple config files 2018-06-19 18:07:41 +02:00
zookeeper.nix zookeeper.service: option for package and add to environment 2018-02-06 09:59:01 +01:00