mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
Merge pull request #1277 from sheepfleece/NixOS_Config
Add Usage for NixOS
This commit is contained in:
commit
9328098363
@ -152,6 +152,20 @@ in hosts format to the generated hosts file.
|
|||||||
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
|
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
|
||||||
to remove hosts from the generated hosts file.
|
to remove hosts from the generated hosts file.
|
||||||
|
|
||||||
|
#### Using NixOS:
|
||||||
|
|
||||||
|
To install hosts file on your machine add the following into your `configuration.nix`:
|
||||||
|
```haskell
|
||||||
|
networking.extraHosts = let
|
||||||
|
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
|
||||||
|
hostsFile = builtins.fetchurl hostsPath;
|
||||||
|
in builtins.readFile "${hostsFile}";
|
||||||
|
```
|
||||||
|
|
||||||
|
* NOTE: Change `hostsPath` if you need other versions of hosts file.
|
||||||
|
* NOTE: The call to `fetchurl` is impure.
|
||||||
|
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
|
||||||
|
|
||||||
|
|
||||||
## How do I control which sources are unified?
|
## How do I control which sources are unified?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user