Add Unstable Package Support

David Crompton 2023-07-28 10:58:16 -04:00
parent 4ce7f291d1
commit 015c1b04a8
2 changed files with 30 additions and 1 deletions

View File

@ -69,10 +69,27 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"nix-matlab": "nix-matlab", "nix-matlab": "nix-matlab",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },

View File

@ -3,6 +3,9 @@
nixpkgs = { nixpkgs = {
url = "github:NixOS/nixpkgs/release-23.05"; url = "github:NixOS/nixpkgs/release-23.05";
}; };
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
# Follow the system nixpkgs # Follow the system nixpkgs
@ -14,7 +17,7 @@
inputs.nixpkgs.follows = "nixpkgs"; 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"; system = "x86_64-linux";
unfree-overlay = final: prev: { unfree-overlay = final: prev: {
unfree = import nixpkgs { unfree = import nixpkgs {
@ -22,6 +25,15 @@
config.allowUnfree = true; 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; }); applyOverlays = overlays: ({...}:{ nixpkgs.overlays = overlays; });
in { in {
nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem { nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem {