diff --git a/common/nix.nix b/common/nix.nix index 046ba2b..fd5de27 100644 --- a/common/nix.nix +++ b/common/nix.nix @@ -1,19 +1,24 @@ -{nixpkgs, ...}: { +{ + nixpkgs, + pkgs, + ... +}: { environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; nix = { + package = pkgs.nixFlakes; nixPath = ["nixpkgs=/etc/nix/inputs/nixpkgs"]; registry.nixpkgs.flake = nixpkgs; settings = { + auto-optimise-store = true; + experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations"]; + auto-allocate-uids = true; + use-cgroups = true; trusted-substituters = [ "https://nix-community.cachix.org/" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; - auto-optimise-store = true; - experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations"]; - auto-allocate-uids = true; - use-cgroups = true; }; }; } diff --git a/flake.nix b/flake.nix index cbf331f..ad85fa3 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,9 @@ nixvim, } @ inputs: let secrets = import ./secrets.nix; + config = { + allowUnfree = true; + }; in { nixosConfigurations = { @@ -47,9 +50,7 @@ system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; - config = { - allowUnfree = true; - }; + inherit config; overlays = [(import ./packages)]; }; specialArgs = inputs // {inherit secrets;}; @@ -85,9 +86,7 @@ system = "aarch64-linux"; pkgs = import nixpkgs { inherit system; - config = { - allowUnfree = true; - }; + inherit config; }; specialArgs = inputs // {inherit secrets;}; modules = [