2022-11-02       UPDATED FIRST STEPS WITH NIX ON DEBIAN


Mixing Debian with Nix[1] in 2023 (updated from 2021)

1 Why Nix?
==========

 Mainly because $some_package is not (yet) available in Debian.

 </images/repology.png>


2 installation
==============

 to install, do, as root:

,----
|  apt install nix nix-setup-systemd
`----

 to allow the regular system users to use nix, add them to the
 nix-users group:

,----
|  adduser $your_user_name_here nix-users
`----

 then, as user, you can install nix packages. in this example, i
 install "typst[2]".

,----
|  nix shell nixpkgs#typst
`----


3 errors
========

 if you get errors like:

,----
|  nix-daemon.socket: failed to open /etc/systemd/system/nix-daemon.socket: no such file or directory
`----

 then you have bits and pieces of an earlier nix version lingering
 around.

 And while you're cleaning that, you can also, remove ~/.nix-profile
 ~/.nix-defexpr .nix-channels files. You can even remove /nix


 If you have
,----
|  nix-daemon.socket: socket service nix-daemon.service already active, refusing.
`----

 Then you forgot:

,----
|  adduser $your_user_name_here nix-users
`----

 logout of your X session, and start again, or reboot.

[1]: https://en.wikipedia.org/wiki/Nix_package_manager
[2]: https://typst.app/