Added wip nix page
This commit is contained in:
parent
976baae293
commit
50a1474d0e
1 changed files with 50 additions and 0 deletions
|
@ -0,0 +1,50 @@
|
||||||
|
# Nix (WIP - don't follow)
|
||||||
|
|
||||||
|
The *Nix package manager* is a package manager which allows for user independent packages and a whole lot more (although it's not necessarily minimal). To set it up install it's package and activate it's service:
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
```
|
||||||
|
# apk add nix
|
||||||
|
# rc-update add nix-daemon default
|
||||||
|
# rc-service nix-daemon start
|
||||||
|
```
|
||||||
|
|
||||||
|
> (The `nix` package is only available in the `edge` and `apk-ample` repositories)
|
||||||
|
|
||||||
|
And add this line to `/etc/nix/nix.conf` to globally enable some features which will be necessary later:
|
||||||
|
|
||||||
|
```
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
```
|
||||||
|
|
||||||
|
Don't forget to add your user to the nix group:
|
||||||
|
|
||||||
|
```
|
||||||
|
adduser <username> nix
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
> From here on things have to be done per user.
|
||||||
|
|
||||||
|
Now that Nix is up and running utilize the `flake` that comes with the config files to set up our home for us:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/.config/home-manager
|
||||||
|
$ nix run . switch
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you are able to install packages as a user without root from `nixpkgs`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ nix-env -iA nixpkgs.<package>
|
||||||
|
```
|
||||||
|
|
||||||
|
> You can also test a package before installing it with `nix-shell -p <program>`
|
||||||
|
|
||||||
|
### Home-Manager
|
||||||
|
|
||||||
|
### Nix-Bubblewrap
|
||||||
|
|
||||||
|
### NixGL
|
Loading…
Reference in a new issue