This resolves issue that someone might try and configure bookmarks and a
policy will prevent it from applying properly.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Currently, we aggressively limit what modifier can be used in the module
system that blocks valid configurations. Allow any strings to unblock
these configs. But, could be refactored further to support list of
modifiers and automatically convert to a config string.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Add an example of using extension settings to control installation and
accesibility of a extension in the policies option.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We can simplify maintainance of HM while providing more consistency
across modules by relying on the nixpkgs module primitive mkBefore /
mkOrder as it was done in the Zsh module.
Deprecates:
- programs.msmtp.extraConfig
- programs.msmtp.extraAccounts
programs.msmtp: merge extraConfig and extraAccount into configContent
We can simplify maintainance of HM while providing more consistency
across modules by relying on the nixpkgs module primitive mkBefore /
mkOrder as it was done in the Zsh module.
Deprecates:
- programs.msmtp.extraConfig
- programs.msmtp.extraAccounts
Similar purpose to the `mkSettingsRenamedOptionsModule` for migrating
users configuration to the new format needed by a module. But,
supporting freeform options that shouldn't get option definitions.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We generate the maintainer list from `meta.maintainers` and need the
attribute to be available on eval of all modules. It was set in the
`config` option which would only be evaluated when a module was enabled.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
https://github.com/nix-community/home-manager/pull/7117#issuecomment-3018582819
noted that #7117 broke compatibility with forwarding ssh-agents using
`ssh -A`/`ForwardAgent`. In order to continue supporting the fix for
the issue raised in #5997 and address the compatibility problem
mentioned by @euank, this commit introduces the solution described in
https://github.com/nix-community/home-manager/pull/7117#issuecomment-3025001779.
The code now checks the following:
1. is this shell part of an SSH connection and is `SSH_AUTH_SOCK` set?
if so, assume the socket variable was set by sshd to point at a
forwarded socket; bail out to skip setting `SSH_AUTH_SOCK".
1. is the current process a child of `gpg-agent --daemon`? if so, then
bail out to skip setting `SSH_AUTH_SOCK`.
1. if we got this far, then set `SSH_AUTH_SOCK`.
I've tested this fix locally and can confirm that both #5997 as well as
the regression are fixed.
Signed-off-by: squat <lserven@gmail.com>
Creates the user.js if profile.extensions.settings is set.
This fixes the case when profile.extensions.settings is set but every
other option in the mkIf is false, resulting in no user.js creation.
Before:
> Existing file '' would be clobbered by backing up '/home/winter/.config/fish/config.fish'
After:
> Existing file '/home/winter/.config/fish/config.fish' would be clobbered
I had programs.bash.sessionVariables.CDPATH = ... defined in the
different nix files. One was taken into account and the other one
ignored.
Turns out plain "types.attrs" has the following merging strategy:
===
merge = loc: foldl' (res: def: res // def.value) { };
===
Changing it to "attrsOf", the module system warned me of the conflicting
values.
We have a configuration option services.syncthing.guiAddress which is an explicit option because we need it in the syncthing-init service, but why not also set it in the actual syncthing config as well as (or instead of?) the current CLI override? This way other software that parses the config file / REST API like syncthingtray just works with it instead of erroring out and unexpectedly requesting user interaction.
I guess we could actually also scrap the explicit services.syncthing.guiAddress option in favor of the syncthing-native services.syncthing.settings.gui.address because these two (valid!) options conflict otherwise.
Also, a next PR (or addition to this one) could be to make sure the syncthing-init service treats services.syncthing.settings.gui differently by not PUTting but PATCHing the configuration as PUTting triggers an API key regeneration, again breaking REST API access for other tools.
This commit addresses https://github.com/nix-community/home-manager/issues/5997
At the root, the gpg-agent SSH integration is not working on Darwin
because shells are started with `SSH_AUTH_SOCK` already set to something
like `/private/tmp/com.apple.launchd.ozLmoURHDC/Listeners`, which
prevents the hook from setting the variable to the gpg-agent's socket.
This commit fixes the issue using a different mechanism to detect if the
current shell has already had the `SSH_AUTH_SOCK` variable set to the
gpg-agent's socket, namely by checking for `gnupg_SSH_AUTH_SOCK_by` as
documented in
https://www.gnupg.org/documentation/manuals/gnupg/Agent-Examples.html#Agent-Examples.
This is essentially a simplified version of
https://github.com/nix-community/home-manager/pull/5901 that does not
attempt to migrate gpg-agent over to launchd.
Signed-off-by: squat <lserven@gmail.com>
Zed uses JSON5 for settings files. JQ doesn't understand that format and
fails if found, when merging with preexisting settings.
Here I add a conversion step that converts JSON5 to JSON before handling
the contents to JQ.
Besides, I changed the arguments in the jq function, so instead of using
`[0]` and `[1]`, we now use `$dynamic` and `$static` respectively. This
should make scripts more readable.
Fixes https://github.com/nix-community/home-manager/issues/7247
Fixes https://github.com/nix-community/home-manager/issues/7226