You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+80-36
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ more decentralized way.
14
14
NUR automatically check its list of repositories and perform evaluation checks
15
15
before it propagated the updates.
16
16
17
-
## How to use
17
+
## Installation
18
18
19
19
First include NUR in your `packageOverrides`:
20
20
@@ -23,9 +23,9 @@ To make NUR accessible for your login user, add the following to `~/.config/nixp
23
23
```nix
24
24
{
25
25
packageOverrides = pkgs: {
26
-
nur = pkgs.callPackage (import (builtins.fetchGit {
27
-
url = "https://github.com/nix-community/NUR";
28
-
})) {};
26
+
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
27
+
inherit pkgs;
28
+
};
29
29
};
30
30
}
31
31
```
@@ -35,13 +35,28 @@ For NixOS add the following to your `/etc/nixos/configuration.nix`:
35
35
```nix
36
36
{
37
37
nixpkgs.config.packageOverrides = pkgs: {
38
-
nur = pkgs.callPackage (import (builtins.fetchGit {
39
-
url = "https://github.com/nix-community/NUR";
40
-
})) {};
38
+
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
39
+
inherit pkgs;
40
+
};
41
41
};
42
42
}
43
43
```
44
44
45
+
### Pinning
46
+
47
+
Using `builtins.fetchTarball` without a sha256 will only cache the download for 1 hour by default, so you need internet access almost every time you build something. You can pin the version if you don't want that:
48
+
49
+
```nix
50
+
builtins.fetchTarball {
51
+
# Get the revision by choosing a version from https://github.com/nix-community/NUR/commits/master
Then packages can be used or installed from the NUR namespace.
46
61
47
62
```console
@@ -62,7 +77,7 @@ or
62
77
63
78
```console
64
79
# configuration.nix
65
-
environment.systemPackages = [
80
+
environment.systemPackages = with pkgs; [
66
81
nur.repos.mic92.inxi
67
82
];
68
83
```
@@ -73,19 +88,39 @@ for its content.
73
88
***NUR does not check repository for malicious content on a regular base and it is
74
89
recommend to check expression before installing them.***
75
90
91
+
### Using modules overlays or library functions on NixOS
92
+
93
+
If you intend to use modules, overlays or library functions in your NixOS configuration.nix, you need to take care to not introduce infinite recursion. Specifically, you need to import NUR like this in the modules:
0 commit comments