modules/config: init new module
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
39
modules/nixos/config/nix/common.nix
Normal file
39
modules/nixos/config/nix/common.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
package = pkgs.lixPackageSets.latest.lix;
|
||||
channel.enable = false;
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
# for container in builds support
|
||||
"auto-allocate-uids"
|
||||
"cgroups"
|
||||
|
||||
# Enable the use of the fetchClosure built-in function in the Nix language.
|
||||
"fetch-closure"
|
||||
|
||||
# Allow derivation builders to call Nix, and thus build derivations recursively.
|
||||
"recursive-nix"
|
||||
|
||||
# Allow the use of the impure-env setting.
|
||||
# "configurable-impure-env"
|
||||
];
|
||||
};
|
||||
};
|
||||
# no longer need to pre-allocate build users for everything
|
||||
nix.settings.auto-allocate-uids = lib.mkDefault true;
|
||||
# Needs a patch in Nix to work properly: https://github.com/NixOS/nix/pull/13135
|
||||
nix.settings.use-cgroups = true;
|
||||
|
||||
# for container in builds support
|
||||
nix.settings.system-features =
|
||||
if lib.versionAtLeast lib.version "25.05pre"
|
||||
then ["uid-range"]
|
||||
else lib.mkDefault ["uid-range"];
|
||||
}
|
Reference in New Issue
Block a user