-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/git: add lfs option to allow enabling and installing lfs easily #141255
Conversation
nixos/modules/programs/git.nix
Outdated
(mkIf cfg.lfs.enable { | ||
environment.systemPackages = [ cfg.lfs.package ]; | ||
programs.git.config = { | ||
"filter \"lfs\"" = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filter \"lfs\"" = { | |
''filter "lfs"'' = { |
not sure which one is nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filter \"lfs\"" = { | |
filter.lfs = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to create a problem, setting filter = <...>
inside programs.git.config
overrides this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe using something like lib.recursiveUpdate
can fix the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be solved by using a more explicit option type? with types; attrsOf (oneOf [(attrsOf (oneOf [ int str bool ])) int str bool ])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(more explicit option type might use a smarter coercion function, effectivly what recursiveUpdate does)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it works. recursiveUpdate
seems like an easier solution to me though since we don't have to worry about invalidating valid configs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure but I think calling recursive update on a config key whose value we set causes infinite recursion error (or generally whenever the value is used and set in the same file)
3cda5cb
to
0063ec0
Compare
Co-authored-by: figsoda <figsoda@pm.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might work
I like the |
the commits are seperate, we could just merge the one that uses attrs and I'll put the other two into another pr? |
made #141274 |
Motivation for this change
nixos/git: add lfs option to allow enabling and installing lfs easily
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)