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
This change stops update-mime-database from running unless the
`share/mime/packages` directory is writable. For some reason it
appears to be read-only on WSL1.
Fixes#1192
This adds an empty `nix-build` command to verify that the user is
having a good Nix install. It also, as a side effect, will create the
necessary per-user `profiles` and `gcroots` directories.
Fixes#1246
Using the `nix-env` command is far more robust. It also has the
benefit that if the per-user `profiles` and `gcroots` directories do
not exist then they will be created with the correct permissions.
Because of the second point this commit also removes the `mkdir` step
of the installation instructions.
PR #1239Closes#474, #948, #1091
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>
Using this function it is possible to make `home.file` create a
symlink to a path outside the Nix store. For example, a Home Manager
configuration containing
home.file."foo".source = config.lib.file.mkOutOfStoreSymlink ./bar;
would upon activation create a symlink `~/foo` that points to the
absolute path of the `bar` file relative the configuration file.
PR #1211
Otherwise, the pager (typically `less`) pauses execution of
`home-manager switch` until the pager is dismissed, if the content is
larger than would fit on the screen.
PR #1175
This switches the type of `matchBlocks` from `loaOf` to `listOrDagOf`.
The former has been deprecated in Nixpkgs. The latter allows
dependencies between entries to be expressed using the DAG functions.
Add a new 'bookmarks' option, for managing `~/.config/gtk3/bookmarks`,
a list of URIs to display as bookmarks in the sidebar of GTK file
browsers.
PR #1129
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
- 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