From b5a7c3624142b38741bb0663aa68313ef22a24f0 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sun, 4 Aug 2024 15:01:33 -0400 Subject: [PATCH] nix.channel.enable = false --- modules/nix.nix | 100 +++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/modules/nix.nix b/modules/nix.nix index 327faab..992d515 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -5,56 +5,62 @@ config, }: { - # - # Flake registry and $NIX_PATH pinning - # - nix.registry = lib.pipe inputs [ - (lib.filterAttrs (_: lib.isType "flake")) - (lib.mapAttrs (_: flake: { inherit flake; })) - (x: x // { nixpkgs.flake = inputs.unstable; }) - ]; + nix = { + # + # Disable usage of channels + # + channel.enable = false; + # + # 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: { name = "nix/path/${name}"; value.source = value.flake; }) 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; - }; }