The default value of `programs.ncmpcpp.mpdMusicDir` is taken from
`services.mpd.musicDirectory` if the mpd module is enabled, which has
type `either path str`. `programs.ncmpcpp.mpdMusicDir` did not accept
`str` values, though, so an error was raised when the default value was
used and `services.mpd.musicDirectory` was set to a value of type `str`.
This commit changes the type of `programs.ncmpcpp.mpdMusicDir` to also
accept `str` to reflect the type of `services.mpd.musicDirectory`.
Fixes#3560
Assigning to `programs.neovim.extraLuaPackages` a function taking a lua package set as input
and returning a list of packages, as described in the documentation,
threw an error because the rest of the code assumed that the value was always a plain list.
Using `lib.types.coercedTo`, we can accept such functions, as per the documentation,
as well as plain lists, which we then convert to a function ignoring its input argument.
We print a warning when a plain list is assigned, since the function
form is preferred, as it ensures that the right lua package set is used.
For the lua packages, we also get the lua package set from the
finalPackage, to make sure that we are always using the same package set
as the actual unwrapped neovim package being built.
For `programs.neovim.extraPythonPackages` I did the same.
I updated the test case so that we test both ways of setting these options.
This enables nushell integration by default for direnv, similar to
bash/zsh/fish. The slightly verbose way of setting this is to ensure
that peoples' existing nushell configuration isn't overwritten, only
appended to, as would be the case if we just used the integration
example from the nushell docs:
https://www.nushell.sh/cookbook/direnv.htmlCloses#3520
Previously the nushell module did not differentiate between Linux and
Darwin when deciding where to place config files, whereas nushell
does. This commit fixes that.
The previous version linked the file into home, then sourced that. Since
nothing else expects that file to be there, this is unnecessary.
Additionally, doing so made it impossible to test a built config without
switching, e.g. using `XDG_CONFIG_HOME=… nvim` or `nvim -u`. This
remedies that, at least for this particular reference.
To test this, change from asserting contents of the config file to
actually starting nvim, outputting sentinel values, and then asserting
their values are present. This way it’s tested that nvim loaded the
config, rather than that some config is in a specific place.
This is all in one commit as the test, as written now, would not have
worked before since the previously hard-coded home path was not an
actual file in the test environment.
* ssh: add generic Match support for matchBlocks
Introduce conservative support for actual `Match`
blocks in ssh config.
"Conservative" means this PR doesn'tt try to process
the `match` expression and simply uses it as a string
provided by the user.
If set, `match` has precedence over `host` meaning
if both are set, `match` is used and `host` is ignored.
* Add news entry
* flake: Expose tests to allow running purely
The existing way to run tests with `nix-shell` relies on impure usage of
`<nixpkgs>`. This can lead to failures when the local nixpkgs is
incompatible with the locked one. I.e., where CI is passing but a
contributor may experience a failure.
So, expose tests as `devShells.tests` to use the locked nixpkgs and
allow easy invocation via `nix develop`.
* tests: Remove impure path
With Nix 2.10+ and pure evaluation mode e.g.
```
nix run nixpkgs/nixos-unstable#nixVersions.nix_2_10 -- develop -i .#tests.zplug-modules
```
this test would fail with:
> error: the path '~/.customZplugHome' can not be resolved in pure mode
Since the test only cares that it is a path, rather than anything about
its contents, use a dummy empty directory.
Add a new Thunderbird module that uses the configuration in
`accounts.email.accounts` to setup SMTP and IMAP accounts.
Multiple profiles are not supported at this point.
Update notification popups are annoying when vscode/vscodium is
managed by Home Manager. However, as these settings also require the
configuration to be managed via `userSettings`, they are disabled by
default.
With this change, it's now possible to configure the default search
engine in Firefox with
programs.firefox.profiles.<name>.search.default
and add custom engines with
programs.firefox.profiles.<name>.search.engines.
It's also recommended to enable
programs.firefox.profiles.<name>.search.force = true
since Firefox will replace the symlink for the search configuration on
every launch, but note that you'll loose any existing configuration by
enabling this.
This will cache the output of `passwordCommand` per authentication
realm.
Context: the `credentials` key in `sbt` is a `TaskKey[Seq[Credentials]]`.
In `sbt`, tasks are evaluated on-demand and their output is not cached.
This particular key is referenced by all submodules in a project. When
the command is relatively expensive (e.g.: `pass show foo`), this
results in several seconds of delay when doing basic things like
`compile` or `test` which makes this unusable without some kind of
caching.
sbt allows overriding the default repositories to use to resolve
dependencies. This is often used with proxies and/or private
repositories to host internal packages.
This change adds a `repositories` attribute to `sbt` to allow
specifying the values that will go in `~/.sbt/repositories` file.
To support the above change we also deprecate the `baseConfigPath`
option in favour of `baseUserConfigPath` which points one level higher
by default. This allows not using relative paths to refer to the
top-level configuration directory.
Also adds tests for the new option and the deprecation of the previous
one.
At commit [5666e6b9](5666e6b9fb),
broot refactored the content of the file `/resources/default-conf.hjson`
into multiple files under the directory `/resources/default-conf`, using
[`imports`](5666e6b9fb/resources/default-conf/conf.hjson (L152-L165))
to refer to other configurations.
This refactoring is effective since version 1.14.0 of broot.
After this refactoring, in `xdg.configFile.broot` (which defaults to
`~/.config/broot`):
- we need to copy all potentially referenced files (all files under
`resources/default-conf`),
- except we need to leave out `conf.hjson` which conflicts with the
`conf.toml` generated by home-manager (because broot [accepts both conf.toml and conf.hjson](https://dystroy.org/broot/conf_file/))
To implement this, we use `symlinkJoin` to create the content of
`xdg.configFile.broot` by merging multiple sources.
* broot: use freeformType for config
* broot: use defaults from upstream
closes#2395
* broot: generate shell function
* broot: add @dermetfan to CODEOWNERS
* broot: rename `config` option to `settings`
* broot: make example more idiomatic
Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
Co-authored-by: Nicolas Berbiche <nic.berbiche@gmail.com>
We change the current logic: instead of writing an init.vim which loads
lua/init-home-manager.lua, we write an init.lua that sources init.vim
This commit also avoids writing any of these files if the plugins have
no config.
Some configuration options can take space separated strings; for
example `SSLVersions` can be configured with multiple allowed
versions.
SSLVersions TLSv1.3 TLSv1.2
This can now be represented in Home Manager.
SSLVersions = [ “TLSv1.3” “TLSv1.2” ];
In implementing this change, it uses oneOf for config type, as it is a
cleaner way to represent the union than the nested eithers
formulation.
Also add SSLVersions to test lists of strings in
`account.extraConfig`.
The `tag.gpgSign` config option was added in Git 2.23.0 and seems like
it should be set in addition to `commit.gpgSign` when
`programs.git.signing.signByDefault` is enabled
This adds support for configuring email accounts, with automatic smtp, imap,
sendmail (msmpt) and maildir (mbsync, offlineimap) setup in aerc,
via `accounts.email`.
mujmap is a tool that synchronizes mail between a mail server and
notmuch via JMAP. It's very similar to lieer, so I heavily based the
implementation of the notmuch module on lieer's. I did not include an
equivalent to lieer's periodic synchronization service, however,
because I plan to soon introduce a daemon mode to mujmap.
https://github.com/elizagamedev/mujmap
M_SHARE is not a valid column on Darwin. It seems that previously htop
ignored unknown columns, but the current version does not display all
subsequent columns.
Neomutt will run the given command (which can be a string or a path)
and take the output from stdout and use it as the signature for your
email.
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
This is achieved by generating the Home Manager configuration
file as `~/.config/task/home-manager-taskrc`, and including that
file into ~/.config/task/taskrc.
Fixes#2360
Co-authored-by: mainrs <5113257+mainrs@users.noreply.github.com>
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
* systemd: fix creation of user service unit files
* helix: fix failing test due to file output format change
Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
This has no effect if the user does not have any aliases defined for
any accounts.
This will also only add `--my-address=` to only accounts that are
enabled to be tracked by mu.
Note, the pubs configuration file uses ConfigObj syntax, which is
similar to the INI files syntax but with extra functionalities like
nested sections. This prevents it from using Nix's INI format
generator. Here is an example of pubs configuration that cannot be
generated using Nix's INI format generator:
[plugins]
[[git]]
manual=False
For this reason, we opted for a stringly-typed configuration since the
use of a structured `settings` option would require a custom parser.
Previously, if a process inside a foot client triggered the OOM killer,
systemd would also kill the parent unit, namely the foot server.
This is not ideal if a user has a lot of clients attached, and it's
usually not the terminal emulator's fault that a process inside it has
ended up using all the available memory.
There seems to be some changes on how wrapped binaries are implemented
on nixpkgs. This broke the nnn tests since the tests were coupled with
the old implementation.
This commit fix the tests, and also make it less coupled by just testing
if the bookmarks/plugins/environment variables are available.
This patch moves both home.sessionVariables and
programs.zsh.sessionVariables from .zshrc to .zshenv. Additionally,
these two kinds of session variables will not be sourced more than
once to allow user-customized ones to take effect.
Before, session variables are in .zshrc, which causes non-interactive
shells to not be able to get those variables. For example, running a
command through SSH is in a non-interactive and non-login shell, which
suffers from this. With this patch, all kinds of shells can get
session variables.
The reason why these session variables are not moved to .zprofile is
that programs started by systemd user instances are not able to get
variables defined in that file. For example, GNOME
Terminal (gnome-terminal-server.service) is one of these programs and
doesn't get variables defined in .zprofile. As a result, the shells it
starts, which are interactive and non-login, do not get those
variables.
Fixes#2445
Related NixOS/nixpkgs#33219
Related NixOS/nixpkgs#45784
This file is not formatted before and is excluded by ./format, so I don't format it.