35 lines
No EOL
620 B
Markdown
35 lines
No EOL
620 B
Markdown
# Nix Package Manager
|
|
|
|
## Managing packages
|
|
|
|
```bash
|
|
nix-env -iA nixpkgs.<packagename>
|
|
```
|
|
|
|
# NixOS
|
|
|
|
## Updating a Flake based system
|
|
|
|
```bash
|
|
sudo nix update --flake /etc/nixos
|
|
sudo nixos-rebuild switch
|
|
```
|
|
|
|
## Updating a non-Flake based system
|
|
|
|
```bash
|
|
sudo nixos-rebuild switch
|
|
```
|
|
|
|
You can use `boot` instead of `switch` for the system to boot into the new generation on reboot instead.
|
|
|
|
# Contributing to nixpkgs
|
|
|
|
## Updating packages that you maintain
|
|
|
|
```bash
|
|
git checkout -b bump-mypkg
|
|
nix-shell -p nix-update --run 'nix-update <pkg> --commit'
|
|
nix-build -A <pkg> # ensure it builds
|
|
git push <fork> bump-mypkg
|
|
``` |