Merge pull request #175 from nrdxp/flake

Inital working flake implementation
This commit is contained in:
Jörg Thalheim 2020-03-24 12:12:50 +00:00 committed by GitHub
commit 77ae289229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 0 deletions

View file

@ -132,6 +132,30 @@ in
}
```
### Flake Support
Using overlays and modules from NUR in your configuration is fairly straight
forward.
In your flake.nix:
```nix
inputs.nur.url = github:nix-community/NUR;
outputs = {self, nixpkgs, nur }:
{
nixosConfigurations.myConfig = nixpkgs.lib.nixosSystem {
# ...
modules = [
({
nixpkgs.overlays = [ nur."${nur-username}".overlays."${anOverlay}" ]
})
nur."${nur-username}".modules.${aModule}
];
};
}
```
## Finding packages
You can find all packages using

11
flake.lock generated Normal file
View file

@ -0,0 +1,11 @@
{
"inputs": {
"nixpkgs": {
"inputs": {},
"narHash": "sha256-OnpEWzNxF/AU4KlqBXM2s5PWvfI5/BS6xQrPvkF5tO8=",
"originalUrl": "nixpkgs",
"url": "github:edolstra/nixpkgs/7f8d4b088e2df7fdb6b513bc2d6941f1d422a013"
}
},
"version": 3
}

15
flake.nix Normal file
View file

@ -0,0 +1,15 @@
{
description = "Nix User Repository";
epoch = 201909;
outputs = { self, nixpkgs }:
{
overlay = final: prev: {
nur = import ./default.nix {
nurpkgs = nixpkgs;
pkgs = nixpkgs.pkgs;
};
};
};
}