From 9750035c9388b0fd1fc6535f7806e2fc423e771e Mon Sep 17 00:00:00 2001 From: David Crompton Date: Fri, 28 Jul 2023 10:58:16 -0400 Subject: [PATCH] Add Unstable Package Support --- flake.lock | 17 +++++++++++++++++ flake.nix | 14 +++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 7712eed..d71b10e 100644 --- a/flake.lock +++ b/flake.lock @@ -69,10 +69,27 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1690367991, + "narHash": "sha256-2VwOn1l8y6+cu7zjNE8MgeGJNNz1eat1HwHrINeogFA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c9cf0708f00fbe553319258e48ca89ff9a413703", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "nix-matlab": "nix-matlab", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index 78c8cdf..7f70899 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,9 @@ nixpkgs = { url = "github:NixOS/nixpkgs/release-23.05"; }; + nixpkgs-unstable = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; sops-nix = { url = "github:Mic92/sops-nix"; # Follow the system nixpkgs @@ -14,7 +17,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, sops-nix, nix-matlab }@attrs: let + outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, nix-matlab }@attrs: let system = "x86_64-linux"; unfree-overlay = final: prev: { unfree = import nixpkgs { @@ -22,6 +25,15 @@ config.allowUnfree = true; }; }; + unstable-overlay = final: prev: { + unstable = import nixpkgs-unstable { inherit system; } ; + }; + unstable-unfree-overlay = final: prev: { + unstable-unfree = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; applyOverlays = overlays: ({...}:{ nixpkgs.overlays = overlays; }); in { nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem {