ss
/
nixos
Archived
1
0
Fork 0
Guide to Nix's packaging system.
This repository has been archived on 2023-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
ss 640a2f396c 2023-09-09 19:00:00 +02:00
README.md 2023-09-09 19:00:00 +02:00

README.md

Install

Alpine Linux

  1. Install xz shadow bash sudo curl
  2. Uncomment %wheel ALL=(ALL:ALL) ALL in /etc/sudoers
  3. Run the script: sh <(curl -L https://nixos.org/nix/install) --daemon
  4. Make the file nixd in /etc/init.d:
#!/sbin/openrc-run
description="Nix multi-user support daemon"

command="/usr/sbin/nix-daemon"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
  1. Make it executable: doas chmod a+rx /etc/init.d/nixd
  2. Find the nix-daemon blob and move it to /usr/sbin: doas mv $(doas find / -iname nix-daemon) /etc/sbin
  3. Enable the nix daemon: doas rc-update add nixd
  4. Add the desired users to the nixbld group: doas adduser <user> nixbld
  5. doas reboot

Normal

Multi-user Recommended. SELinux must be disabled. sh <(curl -L https://nixos.org/nix/install) --daemon
Single-user /nix will be owned by the invoking user, which should not be root. sh <(curl -L https://nixos.org/nix/install) --no-daemon

Can't decide?

Use

Find packages

Recommended Use their search engine with unstable checked.
Alternative List all packages with nix-env -qaP. Tip: Use grep to search.

Basic commands

List installed nix-env -q
Install nix-env -iA nixpkgs.<packname>
Uninstall nix-env -e <packname>
Update all nix-env -u
Update nix-env -u <packname>
Hold a package nix-env --set-flag keep true <packname>
List generations nix-env --list-generations
Rollback to last gen nix-env --rollback
Rollback to a gen nix-env --switch-generation #

Programs not showing up in start menu

Nix stores all .desktop in $HOME/.nix-profile/share/applications
Symlinks should be enough fix: ln -s $HOME/.nix-profile/share/applications/* $HOME/.local/share/applications