Questions tagged [nix]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
34 views

How can I reference the store path of a Nix package?

I'd like to add functionality relating to the awscli command completion. In my particular case I need to source the script from /nix/store/hvx7xqvjz7r08nsb9kssh1d9s302v3sp-awscli-1.16.106/share/zsh/...
3
votes
0answers
30 views

NixOS configuration to format disk before mounting

I'm running a VM on a virtual cluster. The (experimental) cluster provisioning system puts an unformatted block device in /dev/sdb. Upon cluster initialization, I want to format this device and mount. ...
1
vote
0answers
30 views

How to detect redundant Nix packages?

Say I have services.foo.enable = true; and environment.systemPackages contains "foo". The latter is often redundant, because the foo service requires the "foo" package. How do I detect such duplicates,...
2
votes
1answer
112 views

How to disable root password in NixOS?

I tried setting users.users.root.hashedPassword = "*"; similar to sudo passwd -d root or user { 'root': password => '*', require => Package[ruby-shadow], } in Puppet, but after sudo nixos-...
1
vote
1answer
67 views

How can I discover and install a specific version of a package?

I have an installation of nix on a Linux system, and I have added the channel nixpkgs-unstable. I can now install packages such as gcc: % nix-env --install gcc installing 'gcc-7.4.0' ... created 78 ...
0
votes
1answer
37 views

nix package manage: can't install firefox

Tried to install firefox, at first the dependent packages were installed correctly. But at the end I got the following errors: $nix-env -i firefox-67.0.1 ... post-installation fixup Moving /nix/store/...
0
votes
1answer
60 views

Is an executable portable between different Nixos hosts which reference different nixpkg commits?

I'm trying to get an executable to work by just copying it directly from one Nixos host to another. It works/executes on only one of the hosts. On old host (where it works): [root@...
1
vote
4answers
516 views

How to install Python pip on Nixos?

I can't seem to find the appropriate package that install's pip on Nixos?
3
votes
1answer
140 views

Can I manage my NixOS configuration in version control like git?

Long story short: I've used only distributions with "imperative configuration management/packaging" approach, so far. And,... I'm annoyed by hard to trace breakages/issues with imperative ...
3
votes
2answers
201 views

How can I set a custom DNS server within Nixos?

I've not found much information in the manual. I've tried to manually modify the file /etc/resolv.conf however this seems to be overwritten by something? How can I achieve this?
0
votes
2answers
146 views

NixOS - how is environment.systemPackages implemented

I've started using NixOS. As far as I understand Nix is a purpose built functional language to avoid side-effects. All packages are part of a giant attribute set but as everything is lazily evaluated ...
0
votes
1answer
38 views

`df` within VPS shows available space far below provisioned space

I'm stuck on figuring out whether this is (1) a NixOS problem, (2) a Vultr problem, (3) something particular to my image. I have a Vultr VPS running custom Nix image (18.09 Jellyfish), and the ...
1
vote
1answer
25 views

Nix value is not of type `attribute set of signed integers'

I'm trying to set: networking.firewall.allowedTCPPortRanges = [ 80 81 5900]; However I get the below error: error: The option value networking.firewall.allowedTCPPortRanges.[definition 1-...
1
vote
1answer
78 views

How can I enable PHP within the Apache service configuration in Nixos?

I'm using the following config: services.httpd = { enable = true; adminAddr = "localhost"; extraModules = [ "http2" ]; enablePHP = true; virtualHosts = [ ...
0
votes
1answer
41 views

How can I set the Java heap size for elasticsearch on Nixos?

It seems these should go in the ${configDir}/jvm.options"} (/var/lib/elasticsearch/config/jvm.options ?) looking at the package at https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/...
1
vote
1answer
77 views

Is there a faster alternative than `nixos-rebuild switch` when updating services?

Often I'm configuring a new service and having to run nixos-rebuild switch for the changes to take effect. For example setting up a configuration for a webserver. However the nixos-rebuild switch ...
1
vote
2answers
280 views

How do I diagnose a failing nix-build?

How do I diagnose a nix-build failing? Currently I see output as: nix build -v warning: dumping very large path (> 256 MiB); this may run out of memory building '/nix/store/...
3
votes
1answer
467 views

How can I override a broken Haskell package in nix?

I use NixOS, and I'm trying to set up a Nix Haskell environment for my Haskell project. I have this Haskell package written in Nix that I'm trying to get working via nix-shell, but the dependent ...
0
votes
1answer
80 views

How to make binary in already existing Nix package able to run a shell script in another package?

I'm currently packaging a printer driver, which uses a shell script as the CUPS filter. Obviously, CUPS needs to be able to run that script. Currently, however, it is giving me an exec format error ...
6
votes
2answers
844 views

Cloning builder process: Operation not permitted when using Nix (under Linux) update channel

I use Arch Linux 4.19.15-1-lts #1 SMP Sun Jan 13 13:53:52 CET 2019 x86_64 GNU/Linux. I do also have Nix installed: nix-env (Nix) 2.2. I've never had any problems until the recent update to version 2....
3
votes
2answers
218 views

How do I specify a path to an executable for a systemd unit file on nix?

I'm trying to write a systemd unit file. How do I specify the path to an executable? How can I determine what to use? In this specific case I'm trying to use mkdir. ExecStartPre = "/bin/mkdir -p %h/...
2
votes
1answer
105 views

NixOS: some user-subscribed channels are not shown by `nix-channel --list`, how to remove them (unsubscribe)?

I am confused by the current state of my channel subscription on NixOS. It seems that I have a per-user subscription to nixos-17.03 and nixos-17.09: $ nix-shell -p nix-info --run "nix-info -m" - ...
1
vote
1answer
799 views

How do I upgrade Nixos to use a new channel nixos version?

I'm currently on 18.03 and would like to upgrade to 18.09. How would I go about doing this? I've found the following via a web search but it's not very conclusive: https://discourse.nixos.org/t/how-...
4
votes
1answer
671 views

How do I modify my hosts file in Nixos?

Seems my hosts file (/etc/hosts) points to /nix/store/gds7bha3bx0a22pnzw93pgf0666anpyr-etc-hosts and is read only. How am I meant to modify this file?
2
votes
1answer
205 views

Dealing with NixOS missing dependency ~ libpng-dev

Moving away from an OS like Arch where packages are mostly available, how does one deal with a missing dev dependency like libpng-dev? I have an issue with a Node package dependency - pngquant-bin. ...
0
votes
2answers
168 views

How can I install jack2 on nixos?

I have been trying to follow the instrucitons here: https://nixos.wiki/wiki/Using_JACK_with_PulseAudio error: attribute 'pulseaudio' missing, at /etc/nixos/configuration.nix:17:33 (use '--show-trace' ...
0
votes
1answer
102 views

Is there a Iosevka Term package available on Nixos?

Related to the following issue: https://github.com/be5invis/Iosevka/issues/231 Is there a Iosevka Term width available in nixpkgs? I can only find iosevka and iosevka-bin via https://nixos.org/nixos/...
2
votes
0answers
326 views

“bash: cannot execute binary file” during nix dockerTools cross-build from MacOS host

A great 2016 blog post described building minimal Docker images with Nix. The below is a simple example taken from that blog post, modified to support Nix 2.0: { pkgs ? import <nixpkgs> {} }: ...
0
votes
0answers
54 views

How to make Nix applications visible in application menu (GNOME)?

On my CentOS 7 machine I have Firefox installed via Nix (the Firefox in the official repos isn't starting for me, so this is my workaround), the problem is its launcher doesn't appear in application ...
2
votes
1answer
147 views

Killing background processes started in nix-shell

I am developing a simple data science environment with Python tools and a database. When I enter the nix-shell, I spin up the database process. I would like to spin it down when exiting the ...
0
votes
1answer
151 views

Linux Ubuntu 18.04 - nix nixpkgs virtualbox - channel

my status quo Linux cc 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux nix-env (Nix) 2.0.2 "18.09pre140705.090b7cc8f1b" I would like to use nixpkgs / ...
3
votes
1answer
624 views

Installing CMU fonts on NixOS

I have figured out that I need CMU fonts to be able to typeset Russian text with XeLaTeX. Under NixOS there is cm-unicode package for it, I have installed it with nix-env -iA nixos.cm_unicode but ...
0
votes
2answers
379 views

point $NIX_PATH to ~/.nix-defexpr/channels

I would like to point $NIX_PATH to ~/.nix-defexpr/channels instead of ~/.nix-defexpr/channels_root as currently. I don't want to have to type that every time I run nix-env. What's the right way of ...
1
vote
2answers
230 views

nixpkgs-unstable visible imperatively but not declaratively [closed]

I'm trying to install this Python library python3.6-geopandas-0.3.0. And I successfully installed it imperatively with $ nix-env -iA nixpkgs.python3Packages.geopandas However I need to create an ...
5
votes
3answers
2k views

how to find which packages are installed system-wide in NixOS?

Is there a command that can be used to figure out which packages are installed system-wide in NixOS? For instance, I can list packages installed for my current user with nix-env -q. I don't know of ...
1
vote
0answers
283 views

How to share nix store among multiple aws instances?

I am using nixops and want to reduce disk space consumption by sharing nix store among instances. Possible implementation: share /nix/store store through elastic file system. make cron job on random ...
0
votes
1answer
158 views

How to find the correct version of an installed package in /nix/store

I installed dovecot and with it came a tool called maildirlock that I would like to use. It's not in PATH, but it is in /nix/store. Multiple times in different versions, of course (and they can be ...
0
votes
2answers
129 views

Track /etc/nixos/result in VCS?

While one can rollback NixOS build generations easily, this won't give back the corresponding NixOS configuration in /etc/nixos/configuration.nix. Thus, it seems to be common to track /etc/nixos/ in a ...
4
votes
1answer
1k views

How do I view information about a package in nix?

How do I get more details about a nix package, e.g. to verify that it actually is what I think it is. In Debian, I would use apt-cache show; but how do I get similar information for nix? A command to ...
3
votes
0answers
567 views

installing .net core sdk 2.0 on NixOs (can't find templates)

Resume I am currently trying to install dot-net-core-sdk 2.0 with the Nix package manager in NixOs. I am very new to both NixOs, Nix, bash scripting and stuff like ELF. Yet I think I've successfully ...
0
votes
2answers
780 views

NixOS Build Error: “dbus/dbus.h” not found

I'm trying to build the "nvidiaBeta" driver, but it fails to build nvidia-settings with the error gtk+-2.x/ctkgridlicense.c:38:23: fatal error: dbus/dbus.h: No such file or directory I have tried ...
5
votes
1answer
2k views

Is there any way to remove single package from cache?

Is there any way to force removing a package from /nix/store/.. I am testing my expression for my package and want to make sure it will rebuild correctly. The problem is if I build my package once, ...
3
votes
1answer
776 views

`ld: cannot find -lc` on NixOS

I have the following Nix derivation: with import <nixpkgs> {}; stdenv.mkDerivation rec { name = "scipoptsuite-${version}"; version = "4.0.0"; src = fetchurl { url = "http://scip.zib....
6
votes
2answers
833 views

How to configure a Nix environment, outside of NixOS?

So far, I have been trying out the Nix package manager by nix-env -i installing packages. Now, I would like to manage that with a ~/configuration.nix, like the example here, so that I can version it ...
1
vote
1answer
171 views

How can I use ruby gem commands like bundler when ruby is installed by nix package manager?

I'm new to nix package manager. After installing nix into Ubuntu 16.04 LTS(Japanese translated version), I installed ruby with nix-env command. Then I did gem install bundler. That seemed to work ...
2
votes
1answer
161 views

Trouble merging two simple dot nix files for nix-shell

I am new to nix expression. I found two configuration files that I want to use in nix-shell. Unfortunately I failed to merge them due to my lack of nix expression knowledge. Always end-up with ...
2
votes
1answer
711 views

Disabling the security hardening options for a `nix-shell` environment

In an attempt to build GCC (6.3) on NixOS (16.09), within a nix-shell, I get this: make[1]: Entering directory '<my-build-path>/coreboot/util/crossgcc/build-i386-elf-GCC/build-x86_64-pc-linux-...
2
votes
1answer
748 views

nix: install virtualbox-guest

I am testing the nix package manager. I installed ubuntu in a virtualbox and try to install the guest additions. My ~/.nixpkgs/config.nix is { allowUnfree = true; packageOverrides = pkgs_: with ...
7
votes
4answers
1k views

How does Nix manage SystemD modules on a non-NixOS?

Suppose I use nix-env to install a package that uses SystemD, on a Ubuntu host. What needs to be done to make Ubuntu's SystemD aware of the SystemD modules that come from Nix packages? Let's try ...
6
votes
1answer
1k views

name collision in input Nix expressions with nix-env -f

Following this previous answer that was given to me, I started following the nixpkgs-unstable channel with a git clone of this repository: https://github.com/NixOS/nixpkgs-channels/ My clone is in ~/...