1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-28 17:38:33 +02:00
home-manager/modules
Erik Arvstedt e2414c4a4f
systemd: improve systemd-activate.rb script
- Pass arguments verbatim to the `systemctl` subprocess, obviating the
  need for shell escaping.

- Use open3 for capturing subprocess output.

- Fix printing of commands during dry run.

- Simplify `X-RestartIfChanged` regular expression.

  1. Use \s to match whitespace, \b to match a word boundary.

  2. Rename variable to conform to Ruby's underscore naming
     conventions.

- Remove no-op set operation. Specifically, 'no_restart' and 'to_stop'
  are disjunct since

  1. After reloading the daemon with the new generation, units in
     'to_stop' (i.e. units from the old gen that are missing in the
     new gen) are not registered anymore in the systemd daemon.

  2. Hence, 'systemctl cat' returns no output for these units.

  3. Because this output is needed to detect 'no_restart' units,
     'no_restart' includes no units from 'to_stop'.

  So 'to_stop -= to_restart' is a no-op.

- Only notify about units that would otherwise be restarted. That is,
  exclude units that are started but not restarted.

- Previously, all inactive units, like short-running services, were
  handled as failed units.

  Now systemd activation doesn't fail for oneshot services like
  'setxkbmap' while 'servicesStartTimeoutMs' is set.

- Don't start unchanged oneshot services.

PR #1110
2020-03-24 00:00:44 +01:00
..
accounts services.lieer: add module 2020-03-07 15:13:50 +01:00
lib lib: add GVariant datatype and functions 2020-03-21 00:28:50 +01:00
lib-bash activation-init: sanity check oldGenNum and oldGenPath 2018-03-13 20:49:45 +01:00
misc dconf: make settings have type gvariant 2020-03-21 01:02:41 +01:00
programs vscode: fix extension path symlink error 2020-03-21 17:47:32 +01:00
services syncthing: install man pages to user profile 2020-03-22 21:15:25 +01:00
default.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
files.nix files: add force flag 2020-03-17 23:42:26 +01:00
home-environment.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
manual.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
modules.nix keynav: add module 2020-03-17 22:59:15 +01:00
systemd-activate.rb systemd: improve systemd-activate.rb script 2020-03-24 00:00:44 +01:00
systemd-activate.sh allow Home Manager to be used as a NixOS module 2018-02-07 20:50:01 +01:00
systemd.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
xcursor.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
xresources.nix xresources: give properties option more specific type 2020-02-29 22:32:52 +01:00
xsession.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00