[Nix-dev] some basic questions from a new NixOS user
Linus Arver
linusarver at gmail.com
Thu Nov 24 07:24:13 CET 2011
Hello all,
I'm new to this list. I just installed NixOS on a spare laptop of mine
(with the minimum CD) by following the manual at
http://hydra.nixos.org/build/1568621/download/1/nixos/manual.html. The
system boots into the slim login manager at startup, since I enabled the
services.xserver portion in /etc/nixos/configuration.nix.
Anyway, here are some questions.
1a. I've added a new user account with "useradd," per the manual, and
have done a couple installations of software with `nix-env -i'. This is
great, but I'm curious --- what is the preferred way to install
software? The wiki page at http://nixos.org/wiki/Install/remove_software
says that there are two ways to install software --- system-wide (by
editing environment.systemPackages), and per-user (by just doing nix-env
-i [package]). My understanding is that in order to get the advertised
advantages of NixOS's rollback functionality, you have to do system-wide
installs because the whole "nixos-rebuild" command only looks at
/etc/nixos/configuration.nix. I.e., there is no way to rollback the
system on a per-user basis. So, do most people on here have a very long
environment.systemPackages definition in their configuration.nix,
defining all system-wide packages?
1b. If I wanted zsh, git, and rxvt-unicode to be available system-wide,
can I do:
environment.systemPackages = [
pkgs.zsh
pkgs.git
pkgs.rxvt-unicode
];
in my configuration.nix? There does not seem to be any documentation
regarding the syntax for this.
2. If I do "nix-env -i" as the root user, then the installation is only
for the root user, correct?
-Linus
More information about the nix-dev
mailing list