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
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.
Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Fix so that you can still generate `programs.helix.extraConfig` without
using `programs.helix.settings`. Useful particularly in the case of
`extraConfig = lib.readFile ./config.toml;`.
As I noticed in
<https://github.com/nix-community/home-manager/pull/7277#issuecomment-2985781610>,
it seems hyprland changed its domain name from `hyprland.org` to
`hypr.land`. (The old domain redirects to the new one)
These changes are made by the following:
find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/hyprland\.org/hypr.land/g'
Since we're creating a new derivation, we drop the original package
attributes. Add our own meta.mainProgram to resolve those warnings.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This is good for when displays are not considered part of the home configuration and are instead considered ephemeral.
Great for laptops but I use it for my desktop as well.
these hardcoded freeformat settings dont add anything over the default,
worse they generate empty sections which can then clash with user included config (my usecase).
It's best to move those to example.