mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
nix.channel.enable = false
This commit is contained in:
parent
137fde5248
commit
b5a7c36241
1 changed files with 53 additions and 47 deletions
100
modules/nix.nix
100
modules/nix.nix
|
|
@ -5,56 +5,62 @@
|
||||||
config,
|
config,
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
#
|
nix = {
|
||||||
# Flake registry and $NIX_PATH pinning
|
#
|
||||||
#
|
# Disable usage of channels
|
||||||
nix.registry = lib.pipe inputs [
|
#
|
||||||
(lib.filterAttrs (_: lib.isType "flake"))
|
channel.enable = false;
|
||||||
(lib.mapAttrs (_: flake: { inherit flake; }))
|
#
|
||||||
(x: x // { nixpkgs.flake = inputs.unstable; })
|
# Flake registry and $NIX_PATH pinning
|
||||||
];
|
#
|
||||||
|
registry = lib.pipe inputs [
|
||||||
|
(lib.filterAttrs (_: lib.isType "flake"))
|
||||||
|
(lib.mapAttrs (_: flake: { inherit flake; }))
|
||||||
|
(x: x // { nixpkgs.flake = inputs.unstable; })
|
||||||
|
];
|
||||||
|
nixPath = [ "/etc/nix/path" ];
|
||||||
|
#
|
||||||
|
# Ignore global registry
|
||||||
|
#
|
||||||
|
settings.flake-registry = "";
|
||||||
|
#
|
||||||
|
# Use nix directly from master
|
||||||
|
#
|
||||||
|
package = nix.packages.default;
|
||||||
|
#
|
||||||
|
# Other nix settings
|
||||||
|
#
|
||||||
|
settings = {
|
||||||
|
experimental-features = [
|
||||||
|
"auto-allocate-uids"
|
||||||
|
"ca-derivations"
|
||||||
|
"cgroups"
|
||||||
|
"daemon-trust-override"
|
||||||
|
"dynamic-derivations"
|
||||||
|
"fetch-closure"
|
||||||
|
"flakes"
|
||||||
|
"nix-command"
|
||||||
|
"no-url-literals"
|
||||||
|
"parse-toml-timestamps"
|
||||||
|
"read-only-local-store"
|
||||||
|
"recursive-nix"
|
||||||
|
"configurable-impure-env"
|
||||||
|
];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
warn-dirty = false;
|
||||||
|
#
|
||||||
|
# Use for testing
|
||||||
|
#
|
||||||
|
#allow-import-from-derivation = false;
|
||||||
|
trusted-users = [ "root" ];
|
||||||
|
allowed-users = [ "@wheel" ];
|
||||||
|
use-xdg-base-directories = true;
|
||||||
|
auto-allocate-uids = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.etc = lib.mapAttrs' (name: value: {
|
environment.etc = lib.mapAttrs' (name: value: {
|
||||||
name = "nix/path/${name}";
|
name = "nix/path/${name}";
|
||||||
value.source = value.flake;
|
value.source = value.flake;
|
||||||
}) config.nix.registry;
|
}) config.nix.registry;
|
||||||
nix.nixPath = [ "/etc/nix/path" ];
|
|
||||||
#
|
|
||||||
# Ignore global registry
|
|
||||||
#
|
|
||||||
nix.settings.flake-registry = "";
|
|
||||||
#
|
|
||||||
# Use nix directly from master
|
|
||||||
#
|
|
||||||
nix.package = nix.packages.default;
|
|
||||||
#
|
|
||||||
# Other nix settings
|
|
||||||
#
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = [
|
|
||||||
"auto-allocate-uids"
|
|
||||||
"ca-derivations"
|
|
||||||
"cgroups"
|
|
||||||
"daemon-trust-override"
|
|
||||||
"dynamic-derivations"
|
|
||||||
"fetch-closure"
|
|
||||||
"flakes"
|
|
||||||
"nix-command"
|
|
||||||
"no-url-literals"
|
|
||||||
"parse-toml-timestamps"
|
|
||||||
"read-only-local-store"
|
|
||||||
"recursive-nix"
|
|
||||||
"configurable-impure-env"
|
|
||||||
];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
warn-dirty = false;
|
|
||||||
#
|
|
||||||
# Use for testing
|
|
||||||
#
|
|
||||||
#allow-import-from-derivation = false;
|
|
||||||
trusted-users = [ "root" ];
|
|
||||||
allowed-users = [ "@wheel" ];
|
|
||||||
use-xdg-base-directories = true;
|
|
||||||
auto-allocate-uids = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue