Update multiple channel support
This commit is contained in:
parent
36bb43592a
commit
1318be7362
10
README.md
10
README.md
|
@ -105,6 +105,16 @@ the latest and greatest nix3 flake-enabled command UX.
|
|||
|
||||
# What next?
|
||||
|
||||
## Multiple nixpkgs channels
|
||||
|
||||
`multi-nixpkgs` shows how to setup multiple nixpkgs channels. For example, using the stable channel you can add the unstable version of neovim like:
|
||||
|
||||
```
|
||||
home.packages = with pkgs; [
|
||||
unstable.neovim
|
||||
];
|
||||
```
|
||||
|
||||
## Adding more hosts or users
|
||||
|
||||
You can organize them by hostname and username on `nixos` and `home-manager`
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
|
@ -43,7 +44,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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{ inputs, ... }:
|
||||
# This file defines overlays
|
||||
{
|
||||
# Sets `unstable` under `pkgs` as the nixpkgs unstable channel
|
||||
unstable = final: _prev: {
|
||||
unstable = inputs.nixpkgs-unstable.legacyPackages.${final.system};
|
||||
};
|
||||
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
|
||||
|
|
Loading…
Reference in a new issue