All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Nix — how to use addAutoPatchelfSearchPath correctly?

I'm packaging a tool that includes some shared objects natively, and I think the right approach to add those objects to the rpath is to use the addAutoPatchelfSearchPath function to the installPhase ...
0
votes
0answers
48 views

Compiling termonad's config.hs on NixOS

I'm trying to use xmonad along with termonad on NixOS being a newbie in all of those. xmonad gave me a headache at first because installing it and ghc/stack was not enough to compile the xmonad.hs ...
0
votes
1answer
288 views

Grow a Nix-based system from scratch?

Is it possible to grow a Nix (the package manager, not nixos the distro) based linux system from scratch? More specifically: AFAIK Nix provides infrastructural packages like glibc, gcc, linux kernel, ...
1
vote
0answers
285 views

Help debugging sshfs error: “fusermount3: mount failed: Operation not permitted”

I have spent a considerable amount of time trying to debug where the issue lies but am unable to find a fix. I am working on a 32bit CentOS system and have installed sshfs and fuse via nix. When I ...
0
votes
0answers
221 views

Nixos how to configure pulseaudio config?

I'm trying to enable 5.1 audio output. My understanding is I need to add default-sample-channels = 6 to the pulseaudio config. I've tried: hardware.pulseaudio.configFile = pkgs.runCommand "default....
0
votes
0answers
15 views

How to add a file to global configuration in nixOS?

WPSOffice doesn't contain spellcheck for my native language and I need to create a directory with the dictionary inside /opt and the /nix/store route is readonly. If it's not possible, exists any ...
1
vote
1answer
33 views

How to use specific verion of nixpkgs (on macOS)?

How can I point my nix installation (on macOS) to a specific version of nixpkgs? I'm trying to ensure that my home and office computers always use the same versions of all packages.
2
votes
1answer
574 views

How to add home-manager to my configuration.nix?

I want to add the home-manager channel to my configuration.nix, then install home-manager I don't have experience with NixOS. A simple code snippet is much appreciated, if possible.
1
vote
1answer
377 views

How to use Firefox Policies in NixOs / How to add config files to a Nix package?

I need to deploy my Firefox configured and with extensions in NixOS. I want to do that declaratively (in configuration.nix) and I do not want to use home-manager. Via user profile: Configuring ...
0
votes
1answer
57 views

Nixos where is the path to my generation / system configuration derivation?

I'd like to get the root path to the generation / system configuration derivation. Is this path stored somewhere perhaps? My understanding is that there is a 'derivation' made for your system ...
4
votes
1answer
197 views

How can I determine the package version that is cached in Hydra for Nix nixpkgs?

I was trying to build an old Haskell project with an older nixpkgs channel/branch (18.03). On my first attempt of building it, I specified the compiler version as ghc843... However when building - it ...
0
votes
0answers
116 views

Nixos VM no IPv4 address assigned via dhcpcd

I'm using a vm setup with the following options: qemu.networkingOptions = [ "-device e1000,netdev=abc,mac=52:55:00:d1:55:02" "-netdev ...
0
votes
1answer
129 views

How to get the channel commit for a previous Nixos generation?

$ sudo nix-env --list-generations --profile /nix/var/nix/profiles/system ... 600 2020-01-25 21:01:11 601 2020-02-03 13:44:19 602 2020-02-09 14:06:20 603 2020-02-09 14:11:11 ...
0
votes
2answers
405 views

Setup network between VMs using tap network with Nix?

I'm trying to have a network shared between multiple VMs. I've tried adding: qemu.networkingOptions = [ "-nic user,model=virtio-net-pci" ...
2
votes
0answers
80 views

How can I ignore binary caches when running nix-channel commands?

Quite often, I'm away from home where I have a binary cache set for 192.168.0.6 and I run into errors like so: sudo nix-channel --update unpacking channels... warning: unable to download 'http://192....
1
vote
1answer
74 views

How can I list all nix store paths referenced in a build generation?

I'm trying to debug an issue where a nixos configuration on one machine, has the an application accessible in the path (it's listed in /run/current-system/sw/bin), while on another machine with the ...
0
votes
1answer
67 views

Nixos configuration use pinned nixpkgs for specific package

So my nixos-rebuild fails to build due to the recent error of: https://github.com/NixOS/nixpkgs/issues/74916 I thought I'd give a go at trying to fix this, by referencing a previous commit's package ...
0
votes
1answer
169 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
54 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....
1
vote
1answer
76 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
236 views

Debugging why nix is building a package unnecessarily when it should be in 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 ...
1
vote
1answer
239 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?
2
votes
1answer
345 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
378 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" ]; ...
1
vote
1answer
75 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
38 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
381 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
130 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
58 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
990 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-...
0
votes
1answer
174 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
3k views

How to install Python pip on Nixos?

I can't seem to find the appropriate package that install's pip on Nixos?
4
votes
1answer
376 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
2k 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
578 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 ...
1
vote
1answer
96 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
310 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
167 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
247 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 ...
4
votes
1answer
1k 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
196 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
551 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
206 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" - ...
3
votes
1answer
3k 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-...
5
votes
1answer
2k 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?
3
votes
1answer
390 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
355 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
281 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/...
3
votes
1answer
994 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
496 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 ...