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
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
Before the XDG variables would be set from the user's environment, if
available. This would break some tests.
With this change the tests should be fully deterministic.
Fixes#1190
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 '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'.
Add 'programs.lieer', a tool for synchronizing a Gmail account with a
local maildir and notmuch database. Per-account configuration lives in
'accounts.email.accounts.<name>.lieer'.
This allows the ability to provide arguments to a function, such as
`--on-event` in order to trigger a function on the
`fish_command_not_found` event, for example.
PR #1063
When setting values using the `git config --set` command, git formats
the file a bit differently. This changes the output so it maps to that
format.
Differences:
* each `key = value` in a section is prefixed by a tab character
* the `=` between the key and the value is surrounded by spaces
PR #1069
- If a function is defined, check that the function file exists and
that the contents matches a given string.
- If no functions exists, the functions folder should not exist.
- Verify plugin functionality.
This resolves the error
The option `accounts.email.accounts.xyz.neomutt.sendMailCommand`
is defined both null and not null, in
`…/home-manager/modules/accounts/email.nix' and
`…/home-manager/modules/accounts/email.nix'.
that would occur previously when both neomutt and msmtp were enabled
for an account.
This change makes use of the `extend` function inside `lib` to inject
a new `hm` field containing the Home Manager library functions. This
simplifies use of the Home Manager library in the modules and reduces
the risk of accidental infinite recursion.
PR #994
Given an inner type, the former function generates a type that expect
DAG option values. The latter function is only present to temporarily
allow the `programs.ssh.matchBlocks` to keep accepting list values.
- Default value is set to static '$HOME/.zsh_history' -- dotDir is not
prepended anymore
- $HOME is not prepended to the option value
- Ensure history path directory exists
Fixes#886, replaces #427.
This replaces some derivation outputs by simple strings rather than
full Nix store paths. This removes the need to download the whole
derivation when all we need is a static string.
The [throw-keyids](https://www.gnupg.org/gph/en/manual/r2110.html)
option "hides the receiver of the encrypted data as a countermeasure
against traffic analysis." However, it also slows down decryption, and
even breaks some applications; see e.g.
https://github.com/open-keychain/open-keychain/issues/626
I think the sane default would be to leave it off, just as it is off
by default in gpg. The typical user will probably not need this level
of security, and will probably prefer a better user experience (faster
decryption and compatibility with a wider range of applications).
Closes#838
This makes the
programs.firefox.package
option take a pre-wrapped Firefox package as value if state version is
set to "19.09" or later. This should make the Firefox module work with
a wider range of Firefox packages.
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.
This fixes a build error occurring when building a configuration
having fontconfig enabled and `home.packages` only containing one
package installing things to `/lib`.
Also adds a number of test cases to verify the fontconfig cache
generation functionality.
Fixes#703
Unfortunately, using `attrsOf` is not possible since it results in too
eager evaluation. In particular, the
home.sessionVariables = {
FOO = "Hello";
BAR = "${config.home.sessionVariables.FOO} World!";
};
example will cause an infinite recursion.
This commit restores the option type of
- `home.sessionVariables`,
- `pam.sessionVariables`,
- `programs.bash.sessionVariables`, and
- `programs.zsh.sessionVariables`
to `attrs`. It also adds test cases for the above options to avoid
regressions.
Fixes#659
In particular support source files whose name start with `.` or
contain characters not allowed in the nix store, such as spaces.
Also add some test cases for `home.file`.