All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

In Nix, how can I build a package that has a Python post-install script?

I'm trying to make a Nix derivation for Foliate, and this is my first real derivation, so I don't really know what I'm doing yet. Here's what I have so far. It builds and installs, but fails with ...
0
votes
1answer
9 views

Setting up Kubespray python project on Nixos

nix-shell -p libffi openssl python37Packages.virtualenv python37Packages.virtualenvwrapper python37Packages.pip python37Packages.setuptools ... Collecting certifi>=2017.4.17 (from requests>=2.21....
0
votes
1answer
6 views

How to refer to another user's properties in Nix expression?

I want to set root's startGid and startUid to the GID and UID of another user. How can I do that without hardcoding them? I've tried several variations on the following: users.users = { root = {...
3
votes
1answer
1k 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-...
2
votes
1answer
31 views

Debugging why nix is building a package when I assume it to be in the nixpkgs binary cache?

I asked this question in the IRC channel, but thought I'd document it here for my own as well as other's reference. I have a shell.nix file that is taking a long time to build, in particular it seems ...
21
votes
4answers
9k 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 ...
1
vote
1answer
30 views

Nixos how can I search for packages in a specific channel?

nix-env -v -qaP '*' currently returns all the packages available from all my channels. How can I specify to return packages from a specific channel for example unstable / 18.03?
1
vote
1answer
59 views

How to enable internet access for nixos container with private network

In my host I have: networking.nat.enable = true; networking.nat.internalInterfaces = ["ve-+"]; networking.nat.externalInterface = "wlp2s0f0u8"; In my container I have defined: ...
0
votes
1answer
52 views

How to disable binary cache for nix-env?

I was trying to figure out nix-serve / nix binary caching. At some point I added: nix = { binaryCaches = [ "https://cache.nixos.org/" "http://127.0.0.1:8899" ]; ...
0
votes
1answer
23 views

Nixos ssh with ZSH - command not found

I've got a fresh nixos VM. I have a minor issue where the PATH does not seem to be set when running commands via ssh. For example: ssh chris@192.168.0.10 'whoami' - Outputs: with zsh:1: command not ...
0
votes
1answer
13 views

client nixos error of “error: public key is not valid” when using nix-serve as binary cache

I'm running into an error of error: public key is not valid: [demo@nixos:~]$ nix-env -i ripgrep installing 'ripgrep-0.10.0' these paths will be fetched (0.00 MiB download, 4.76 MiB unpacked): /nix/...
1
vote
1answer
61 views

Nixos unable to modify or chmod nix config - '/etc/nix/nix.conf'

[root@nixos:/etc/nix]# sudo chmod 777 /etc/nix/nix.conf chmod: changing permissions of '/etc/nix/nix.conf': Read-only file system I remember this is some filesystem / Linux kernel utility to change ...
3
votes
1answer
193 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 ...
0
votes
1answer
97 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@...
0
votes
1answer
69 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/...
3
votes
0answers
41 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
39 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
224 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-...
17
votes
3answers
3k 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 ...
1
vote
4answers
968 views

How to install Python pip on Nixos?

I can't seem to find the appropriate package that install's pip on Nixos?
1
vote
1answer
102 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 ...
3
votes
2answers
390 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
1answer
127 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/...
0
votes
2answers
211 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 ...
7
votes
2answers
534 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-...
1
vote
1answer
29 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
123 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
2answers
210 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' ...
3
votes
1answer
597 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
129 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 ...
3
votes
2answers
257 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
130 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" - ...
4
votes
1answer
874 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
260 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. ...
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 ...
13
votes
2answers
1k 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 ...
3
votes
1answer
700 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
408 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
0answers
316 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
2answers
138 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 ...
0
votes
2answers
859 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 ...
3
votes
0answers
626 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 ...
6
votes
1answer
3k 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
886 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....
2
votes
1answer
750 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
166 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 ...
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 ~/...
7
votes
1answer
1k views

Local Nix cache is ignored because NAR info file lacks a signature

[partially solved here: https://plus.google.com/110416349762686874861/posts/PVGHL1Tpeb9; but not entirely] I want to use one of my NixOS machines as a cache for the packages, to not pull everything ...
1
vote
1answer
88 views

How do I maintain a clean system compiling package not in the main channel in Nixos?

I wish to install a program that is not available through the main channel in Nixos. How do I ensure that the proper dependencies will be installed, ideally in a way that is described in a ...
9
votes
1answer
1k views

How do you install a one-off package in NixOS?

I've got a NixOS box that I keep on the nixos-16.03 channel. I want the machine to stay in a mostly-stable state, and so I am wanting to avoid switching to the nixos-unstable channel. However, I ...