Questions tagged [nix]

Questions about Nix, the purely functional package manager and its usage and configuration.

Filter by
Sorted by
Tagged with
2
votes
1answer
390 views

manage packages of the system profile in NixOS

In NixOS how can I manage the system installed packages? If I run nix-env -q from root I get the packages installed by root (and available to all the users), but many are missing like ssh, the whole ...
16
votes
1answer
5k views

How to split /etc/nixos/configuration.nix into separate modules?

Suppose I have a very simple NixOS configuration file: { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # SOME ...
17
votes
2answers
2k views

How to find out which (not installed) package a file belongs to on NixOS?

I am using a Nix package manager on NixOS. Suppose I want to install a package that provides a file libgtk-x11-2.0.so.0. How do I find a package that provides this file, similar to other GNU/Linux ...
28
votes
4answers
14k views

How to find the name of a Nix package to install it in configuration.nix?

Suppose I search for a package to install using nix-env's --query operation: $ nix-env -qa 'aspell.*en' aspell-dict-en-7.1-0 I write this package name in /etc/nixos/configuration.nix, NixOS's main ...
2
votes
1answer
482 views

How can I import packages from another mounted Nix store?

I have a USB disk with a nix store (to be more precise, the nix-store.squashfs file from the NixOS installation ISO) mounted at /mnt/foobar. So that when I do ls /mnt/foobar, I see the familiar ...
2
votes
2answers
1k views

List packages I'm losing by running nix-env --delete-generations

I use NixOS, Nix version 1.10. nix-env, Nix package manager's installation command, creates a new generation every time you install a package. This way different package configurations are stored in ...
1
vote
1answer
437 views

View logs for nix-env last installation

I use NixOS: $ nixos-version 16.03pre71289.7ae05ed (Emu) $ nix-env --version nix-env (Nix) 1.10 $ nix-channel --list $ sudo nix-channel --list nixos https://nixos.org/channels/nixos-unstable ...
6
votes
3answers
3k views

Installing Nix or Guix without root permissions?

This answer to the question Non-Root Package Managers suggests Nix as a solution. However, the installation documentation says: The script will invoke sudo to create /nix if it doesn’t already ...
8
votes
2answers
2k views

Best method of copying full /nix/store over the network from one nixos machine to another

Currently I use: find /nix/store/* -maxdepth 1 | xargs -L <N> nix-copy-closure --sign --gzip --use-substitutes --to <remote machine> Where N is some reasonable number that will not make ...
3
votes
0answers
223 views

How to use a package revision not yet in the published nixpkgs (but described in the development branches of nixpkgs)?

I'd like to use the new release of ghc (7.10, because of a new feature -- static ptr), and I'm using a single-user nix environment. I don't find the wanted new release in the published lists at https:...
7
votes
2answers
919 views

Quickly reload nix expression in nix-shell?

When I run nix-shell nix-shell ~/dev/nixpkgs -A pythonPackages.some-package and then edit phases of pythonPackages.some-package, how to reload nix-shell environment with new changes? Quit nix-...
9
votes
2answers
9k views

How to use libraries installed by nix at run-time?

I'm using nix in "single-user mode" in a system where I'm not the root (see below for a description of my nix setup). I wanted to quickly run one of my binaries which is dynamically linked with a ...
7
votes
2answers
2k views

nix package manager: perl warning: Setting locale failed

Whenever I run a command for the nix package manager (e.g. nix-channel --update) I get the following warning: perl: warning: Setting locale failed. perl: warning: Please check that your locale ...
1
vote
1answer
264 views

Unable to install vim plugins

I am unable to install any vim plugins on nixOS running the command: nix-env -i vimplugin-Syntastic gives these as the last 3 lines of output: output path ‘/nix/store/...
17
votes
3answers
5k views

How do I create a local repository for NixOS/nixpkgs?

All the instructions I find for creating a local repository of Nix packages involve creating a local clone of the main nixpkgs repository and adding to that. Is there a way I can create a small ...
9
votes
3answers
3k views

Nix: Skipping unit tests when installing a Haskell package

I'm using Nix to install packages under my home (so no binary packages) on a shared host with limited resources. I'm trying to install git-annex. When building one of its dependencies, haskell-lens, ...
8
votes
1answer
425 views

Preventing Nix from upgrading git to git-full

I'm using Nix on Ubuntu to have more modern versions of some packages, one of them being git. When I'm run nix-env -u, this is what happens: % nix-env -u --dry-run '*' (dry run; not doing anything) ...

1 2
3