-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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/redis: Disable hugepages for redis via sysctl and not via a systemd-oneshot #71584
Conversation
@GrahamcOfBorg build nixosTests.nextcloud.with-postgresql-and-redis |
}; | ||
boot.kernel.sysctl = { | ||
"vm.nr_hugepages" = "0"; | ||
} // mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; }; |
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.
Merging modules with //
does not work and will need to be fixed using mkMerge
like in #72916.
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.
Ah, I didn't know that. What is the explanation?
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.
Nix module system uses _type
attributes to tag attribute sets:
nix-repl> lib.mkIf false { foo = 1; }
{ _type = "if"; condition = false; content = { ... }; }
So if you merge it into a different attribute:
nix-repl> { bar = 5; } // lib.mkIf false { foo = 1; }
{ _type = "if"; bar = 5; condition = false; content = { ... }; }
the bar will not be properly merged into content
attribute, which the module attribute actually uses in the result.
We really need nixos-pills.
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.
followed up in #73049.
NixOS#71584 did merging without mkMerge. cc @jtojnar
NixOS#71584 did merging without mkMerge. cc @jtojnar (cherry picked from commit 6303131)
Motivation for this change
Fixes #71414
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @flokli