add nixpkgs-unstable to standard template

I decided it is a common enough usecase, so it makes sense to include it

Co-authored-by: Will Forman <wf8581@gmail.com>
This commit is contained in:
Gabriel Fontes 2023-02-20 17:08:47 -03:00
parent 0537107ce4
commit f0e313c886
No known key found for this signature in database
GPG key ID: 2E54EA7BFE630916
5 changed files with 35 additions and 2 deletions

View file

@ -37,10 +37,27 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1672953546,
"narHash": "sha256-oz757DnJ1ITvwyTovuwG3l9cX6j9j6/DH9eH+cXFJmc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a518c77148585023ff56022f09c4b2c418a51ef5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"utils": {

View file

@ -4,6 +4,10 @@
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
# Home manager
home-manager.url = "github:nix-community/home-manager";
@ -43,7 +47,7 @@
);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays;
overlays = import ./overlays { inherit inputs; };
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;

View file

@ -18,6 +18,7 @@
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.unstable
outputs.overlays.modifications
outputs.overlays.additions

View file

@ -22,6 +22,7 @@
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.unstable
outputs.overlays.modifications
outputs.overlays.additions

View file

@ -1,4 +1,5 @@
# This file defines overlays
{ inputs, ... }:
{
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs { pkgs = final; };
@ -11,4 +12,13 @@
# ...
# });
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
}