Mention workaround and constraints for not having systemd
crantok opened this issue · 1 comments
A) Got error running the curl install
Error
Error:
0: Planner error
1: Error executing action
2: Action `configure_init_service` errored
3: Could not detect systemd; you may be able to get up and running without systemd with `nix-installer install linux --init none`.
See https://github.com/DeterminateSystems/nix-installer#without-systemd-linux-only for documentation on usage and drawbacks.
Metadata
key | value |
---|---|
version | 0.16.1 |
os | linux |
arch | x86_64 |
B) Modified install command as suggested by the error message and it worked, although I noticed it said it planned to start daemon, which I thought only worked with systemd
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none
info: downloading installer https://install.determinate.systems/nix/tag/v0.16.1/nix-installer-x86_64-linux
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
Nix install plan (v0.16.1)
Planner: linux
Configured settings:
* init: "None"
* start_daemon: true
Planned actions:
* Create directory `/nix`
* Fetch `https://releases.nixos.org/nix/nix-2.19.3/nix-2.19.3-x86_64-linux.tar.xz` to `/nix/temp-install-dir`
* Create a directory tree in `/nix`
* Move the downloaded Nix into `/nix`
* Create build users (UID 30001-30032) and group (GID 30000)
* Setup the default Nix profile
* Place the Nix configuration in `/etc/nix/nix.conf`
* Configure the shell profiles
* Remove directory `/nix/temp-install-dir`
Proceed? ([Y]es/[n]o/[e]xplain): Y
INFO Step: Create directory `/nix`
INFO Step: Provision Nix
INFO Step: Create build users (UID 30001-30032) and group (GID 30000)
INFO Step: Configure Nix
INFO Step: Create directory `/etc/tmpfiles.d`
INFO Step: Leave the Nix daemon unconfigured
INFO Step: Remove directory `/nix/temp-install-dir`
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh`
C) Tried running the Hello Nix example but didn't have permission to set permissions on something
$ echo "Hello Nix" | nix run "nixpkgs#ponysay"
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
I did the first thing that the installation error message suggested (i.e. rerunning with --init none
) and because that worked, I didn't notice or follow the link to https://github.com/DeterminateSystems/nix-installer#without-systemd-linux-only that was in the next line of the error message.
The target of that link is a very small amount of text, but very important. I would argue that it is far more important than the table that mentions systemd (but does not explain the ramifications) on the first tutorial page.
Suggestions:
- Copy that text to the first tutorial page so people following the instructions can make a decision about whether to or not to install the Determinate Systems Nix installer.
- Mention that the single-user standard Nix installation method (i.e. the one at https://nixos.org/download.html ) does not require sudo to run Nix (although it does require passing more options.)