`pgrep -x somecommand` exits with a non-zero status if it finds no
process running with the given name. When using home-manager as a
NixOS module, on boot (when sway isn't running) this script would
fail and then fail the unit since it seems the onChange scripts
are running with the -e switch.
This change ensures we're always returning a 0 exit status where we
attempt to get the pid of sway - we're only interested in either the
pid or an empty string, the exit status isn't important.
The `ExecStart=` option of systemd must take arguments fully quoted.
That is,
"-sshargs=-i somekey"
and not
-ssargs="-i somekey"
Additionally, inside arguments passed to unison, `=` characters must
be quoted. After unquotation by systemd, one must have
-sshargs=-o Foo\=4
instead of
-sshargs=-o Foo=4
When running the service start script with `DISPLAY` set, a `gi`
import error is triggered. Blanking the variable will make the script
use a different code path that does not attempt to import `gi`.
Also moves activation script up into start of script instead.
PR #1415
This option can be used to enable optional Spotifyd features, such as
looking up the Spotify password in the system keyring or enabling
MPRIS support.
PR #1390
Emacs populates 'exec-path' at launch from the 'PATH' environment
variable. Likewise, the emacs derivation from nixpkgs populates
'load-path' from the 'NIX_PROFILES' variable. As neither of these are
available by default in the systemd user manager, revert to the
previous behavior of launching the Emacs daemon from a login shell.
Fixes#1354Fixes#1340
PR #1355
Add 'services.emacs.socketActivation.enable' for generating an
'emacs.socket' systemd unit.
Emacs since version 26 has supported socket activation, whereby an
external process manager such as systemd listens on a socket and passes
it to the Emacs daemon when the manager launches it. This improves
startup time of the user session and avoids launching the daemon when not
needed, for example when launching the user session via SSH.
This implementation hard-codes the socket path to the default for the
version of 'programs.emacs.finalPackage', because systemd does not
perform shell expansion in the socket unit's 'ListenStream' parameter
and it seems like an advanced use-case to change the socket path. Shell
expansion would be desirable as the socket path usually resides in
directories such as $XDG_RUNTIME_DIR or $TMPDIR.
Tests were added to verify behavior in the following cases:
- Emacs service with socket activation disabled
- Emacs 26 with socket activation enabled
- Emacs 27 with socket activation enabled
PR #1314
Add an option to enable a .desktop file for the Emacs client.
PR #1223
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: Robert Helgesson <robert@rycee.net>
Nixpkgs no longer packages compton, and instead packages picom, a
(mostly) compatible fork of compton, providing an alias from compton
to picom. Because some configuration options have been changed, and
all references to "compton" have been made deprecated and replaced
with "picom", 'services.compton' has been deprecated in favor of the
new 'services.picom'.
Resolves#878
PR #1101
Add 'services.lieer', which generates systemd timer and service units
to synchronize a Gmail account with lieer. Per-account configuration
lives in 'accounts.email.accounts.<name>.lieer.sync'.
This adds a service module for [grobi](https://github.com/fd0/grobi),
which can be used to automatically configure monitors/outputs for Xorg
via RANDR.
The old method for hiding the error no longer works in NixOS 19.09,
and ends up breaking blueman-applet entirely. Enable the NixOS service
instead.
Pull request #950
On NixOS it is necessary to set `bgSupport = true` when creating a
Home Manager desktop manager session. Otherwise NixOS will add code
that sets the background, overriding the effort made by the
`random-background` module.
Fixes#955
Pull request #956
This allows specifying, for example, the music directory using path
literals without causing the directory to be copied to the Nix store.
Suggested-by: Silvan Mosberger <infinisil@icloud.com>
MPD is using syslog for its logging output, while it could directly
log to systemd's journal, as this daemon is primarily used as a
systemd user service. This change makes MPD log to standard output,
which is captured by systemd.
See https://github.com/NixOS/nixpkgs/pull/57608, which does the same
thing to NixOS's MPD service.
This patch started by addresssing the code review comments to close
https://github.com/rycee/home-manager/pull/290. However initiating a new
pull request it became clear, that home-manager changed significantly
since then.
This changes the initial pull request to be consistent with the email
account management in home-manager now. It also adds a simple test and support
for multiple accounts.
In particular, don't add trailing backslashes introduced by
`xautolockExtraOptions`. Systemd's unit file parser seems to have
gotten a bit stricter and with systemd 242, the trailing backslash
caused the next non-empty line to be ignored.
In that case, this was `[Section]`, so all subsequent settings were
mistakenly added to `[Service]`, causing them to be ignored entirely.
Simplify and fix this by using `concatStringsSep` to build a single
`ExecStart` line.
All default keybindings should have a default priority attached to them.
This will allow users to redefine some of the default keybindings
without using mkForce. Fixes#485.
The ExecStartPost command is currently started when the mbsync is
invoked succesfully. However, we typically want to run something like
'mu index' or 'notmuch new' after mbsync completes. This changes the
unit type to oneshot, so that the ExecStartPost command is run after
mbsync finishes succesfully.