diff --git a/README.md b/README.md index ef751e5c1..a22aa0127 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..4db1ad210 --- /dev/null +++ b/flake.lock @@ -0,0 +1,11 @@ +{ + "inputs": { + "nixpkgs": { + "inputs": {}, + "narHash": "sha256-OnpEWzNxF/AU4KlqBXM2s5PWvfI5/BS6xQrPvkF5tO8=", + "originalUrl": "nixpkgs", + "url": "github:edolstra/nixpkgs/7f8d4b088e2df7fdb6b513bc2d6941f1d422a013" + } + }, + "version": 3 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..eeca6854e --- /dev/null +++ b/flake.nix @@ -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; + }; + }; + }; +}