From cc9d329d47d4927cf836f04783595cc8f26a08da Mon Sep 17 00:00:00 2001 From: David Crompton Date: Fri, 28 Jul 2023 10:23:57 -0400 Subject: [PATCH] Add Support for Unfree Packages with pkgs.unfree --- flake.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 86d3d02..78c8cdf 100644 --- a/flake.nix +++ b/flake.nix @@ -14,11 +14,21 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, sops-nix, nix-matlab }@attrs: { + outputs = { self, nixpkgs, sops-nix, nix-matlab }@attrs: let + system = "x86_64-linux"; + unfree-overlay = final: prev: { + unfree = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + }; + applyOverlays = overlays: ({...}:{ nixpkgs.overlays = overlays; }); + in { nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; specialArgs = attrs; modules = [ + (applyOverlays [ unfree-overlay ]) ./machines/kcnhub/configuration.nix sops-nix.nixosModules.sops ];