Skip to main content

Questions tagged [nix]

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

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

Which Nix Install Mode?

I am thinking about install nix on my laptop that is running Manjaro. I will be the only one using the laptop. I've read the differences on the Nix install page about mult-user vs single-user. ...
drsnark's user avatar
  • 101
0 votes
1 answer
8 views

Conflicting settings value for Nixos service when defined within Nixos declarative containers

Within my nixos config I have a container defined: containers.finderdbreplica = { config = { config, pkgs, ... }: { services.postgresql = { ... services.postgresql = { ...
Chris Stryczynski's user avatar
0 votes
0 answers
13 views

How do I test to see if the Nix daemon is running and accepting requests?

(I'm asking here about the Nix package manager, not NixOS.) What code (in Bash, or similar) can I run to see if the Nix daemon is running and able to accept requests from the current user? Ideally ...
cjs's user avatar
  • 698
0 votes
0 answers
13 views

Trouble installing mupdf with nix package manager

I am trying to use nix package manager which is supposed to be a better than apt. As an example I tried to delete mupdf, my pdf file viewer using sudo apt-get remove --purge mupdf and install it with ...
ecjb's user avatar
  • 455
0 votes
1 answer
56 views

File listing all the packages installed with Nix package manager

I just installed nix package manager on Ubuntu 22.04 LTS and I was wondered if there exist a file which lists all the packages installed with nix (in order for example to list all the packages ...
ecjb's user avatar
  • 455
0 votes
0 answers
43 views

Best practices to install binaries inside nix-shell

I'm preparing a Nix derivation for tenv version manager. Steps nix-build and nix-shell work fine, I can run tenv inside the nix-shell. But the purpose of tenv is installing needed versions of binaries ...
nmishin's user avatar
  • 151
0 votes
1 answer
115 views

Installing KDE Plasma 5 through Nix

I am trying to install KDE Plasma 5 (for compatibility reasons) on Arch Linux (installed through EndeavourOS) without using pacman, as, from what I can tell, it is already updated to Plasma 6 and ...
IS4's user avatar
  • 223
0 votes
0 answers
21 views

nixos and application versions state conflicts

I have been getting into the warm waters of Nixos... One of the questions the Nixos document does not appear to address is application state. There is, of course, application configuration, which is ...
George's user avatar
  • 101
0 votes
1 answer
124 views

Nix - creating multiple profiles for one user

What is the correct way to create multiple nix profiles for one user? I want to configure them differently and switch between them automatically with tools like direnv. This is the only documentation ...
mq7's user avatar
  • 101
0 votes
0 answers
169 views

`No such file or directory:` ruff. but file exists

I am using nixOS and I have a flake.nix. I use pre-commit to run ruff. my pre-commit config: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.4 hooks: - id: ruff ...
linuxNewbie's user avatar
0 votes
2 answers
166 views

In Nix, how to make one derivation depend on another next to it?

I'm currently trying to package some closed-source software into Nix derivations. The app is distributed as a large pile of .deb files, and most of them contain libraries that the other parts of the ...
Danya02's user avatar
  • 121
0 votes
1 answer
71 views

Nix pkgmanager: Profile path on single-user installation (non-NixOS)

I tried to switch generations in the nix package manager with nix-env --switch-generations 33, but because I'm an idiot, I accidentally did nix-env --switch-profile 33, and now I can't use nix. I can ...
TSJNachos117's user avatar
0 votes
0 answers
181 views

Configure vscode in Nixos

My Nixos uses tmpfs as the root filesystem, and I want to configure VSCode in Home Manager. I want to ask you, which files or folders should VSCode persist? vscode.nix: { pkgs , ... } @ args: { ...
Xiaoer's user avatar
  • 1
0 votes
1 answer
181 views

NixOS rebuild fails because some directories according to NIX_PATH do not exist

When I try to rebuild NixOS, it fails because it can't find some directories according to NIX_PATH. This happens since I tried to switch to the channel nixos-unstable from 23.11 and accidentally added ...
matj1's user avatar
  • 41
1 vote
1 answer
59 views

Use axel to get source instead curl for fetchurl in NixOS

I'm trying to start a shell with Cuda. I have following shell.nix file { pkgs ? import <nixpkgs> { } }: pkgs.mkShell { name = "cuda-env-shell"; buildInputs = with pkgs; [ ...
s1n7ax's user avatar
  • 418
0 votes
0 answers
45 views

NixOS QEMU VM does not appear in `virsh` on Debian

I am running the Nix package manager on a Debian system. On this Debian system, I use Nix to start a QEMU VM running NixOS, following this tutorial: https://github.com/pdtpartners/nix-snapshotter#...
Peter Becich's user avatar
-1 votes
1 answer
69 views

Why is it not possible for one user to inject a Trojan horse into a package that might be used by another user?

https://nixos.org/manual/nix/stable/introduction.html says Multi-user support Nix has multi-user support. This means that non-privileged users can securely install software. Each user can have a ...
Tim's user avatar
  • 103k
-3 votes
1 answer
98 views

Does Nix solve the DLL hell problem differently from other more popular package managers for Debian or Arch?

https://nixos.org/manual/nix/stable/introduction.html says about Nix that Multiple versions You can have multiple versions or variants of a package installed at the same time. This is especially ...
Tim's user avatar
  • 103k
0 votes
0 answers
67 views

How shall I understand the synopsis of this command?

https://nixos.org/manual/nix/stable/command-ref/nix-shell.html Synopsis nix-shell [--arg name value] [--argstr name value] [{--attr | -A} attrPath] [--command cmd] [--run cmd] [--exclude regexp] [--...
Tim's user avatar
  • 103k
-2 votes
1 answer
76 views

How should this table of dependencies be read? [closed]

https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-reference says A dependency is said to be propagated when some of its other-transitive (non-immediate) downstream dependencies also ...
Tim's user avatar
  • 103k
-1 votes
2 answers
137 views

How shall I understand dependency propagated? [closed]

https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-reference says A dependency is said to be propagated when some of its other-transitive (non-immediate) downstream dependencies also ...
Tim's user avatar
  • 103k
1 vote
1 answer
85 views

How to preprocess output of any CLI Tool in realtime?

For context, what I am trying to do is add a preprocessor to a REPL, more specifically, nix repl. Although this would probably apply to any other REPL like application. The reason for it is that I ...
Mathias Sven's user avatar
0 votes
1 answer
53 views

Does nix-build affect user environment?

nix-env for installation and uninstallation of a package doesn't change the current user environment, but creates a new one. nix-build builds a derivation, which can also install a package. Does it ...
Tim's user avatar
  • 103k
0 votes
1 answer
76 views

How to change appearance of nix-env packages installed on non nixOS?

I installed vscode using nix-env command, nix-env -iA nixpkgs.vscode. My system is dark. But, VS Code using light file portal and weird default cursor theme for Xorg. While it's not a big deal, but, I ...
Abid Hasan's user avatar
0 votes
1 answer
238 views

NixOS <crypt.h> missing when installing a Perl module from CPAN

I'm fairly new to NixOS, but I'm trying to install App::cpm from CPAN. I run the following: cpan -i App::cpm It chugs for a little bit then, it fails on Build::Tiny: crypt.h: No such file or ...
Rawley Fowler's user avatar
0 votes
0 answers
229 views

why does running nixos-rebuild switch --upgrade gives symlink error after switching to unstable channel?

Nevermind, i fixed it, by manually running nix-channel update before running nixos-rebuild switch --upgrade I am trying to upgrade from nix-23.05 to unstable but I'm getting some weird errors. Heres ...
somethingsomething89's user avatar
1 vote
0 answers
97 views

What relationship and difference are between `nix-env --install` and `nix-build`?

What relationship and difference are between nix-env --install and nix-build? Does nix-env --install build the derivatives specified to it, i.e. perform the job of nix-build?
Tim's user avatar
  • 103k
1 vote
1 answer
173 views

How to ensure that NixOS configuration will build or use the same package versions in the future?

In Software packaging and distribution for LHCb using Nix, the authors write: In order to facilitate this use, software must be stable for long periods; much longer than even Long Term Support ...
homocomputeris's user avatar
0 votes
1 answer
138 views

How to add documentation to Git package in NixOS?

git help some-alias prints the alias configuration value, for example: $ git help aliases 'aliases' is aliased to '!git config --get-regexp '^alias\.' | cut --delimiter=. --fields 2-' I'd like to ...
l0b0's user avatar
  • 51.9k
0 votes
1 answer
112 views

How to get a map of filename without extension to file contents from a directory path in configuration.nix?

Basically, I want to pull my config.programs.config.alias entries into separate .bash files and read them dynamically when building the configuration. A representative subset of the current ...
l0b0's user avatar
  • 51.9k
2 votes
0 answers
200 views

auto-patchelf could not satisfy dependency libQt5SerialPort.so.5

I am trying to run Qt Design Studio 2.3.1 Community on NixOS. My nix derivation code: flake.nix: { description = "Qt Design Studio"; inputs = { nixpkgs.url = "github:NixOS/...
satk0's user avatar
  • 151
2 votes
2 answers
601 views

How to find values within Nix configuration

I recently started using NixOS version 23.05.885.bb8b5735d6f. I see some (predefined) expressions in the configuration, but I don't know what could be the actual value bound to these. For instance, I ...
user avatar
0 votes
0 answers
1k views

Building Nixos config where I merge two attribute sets with mkMerge results in error of "The option `imports' does not exist. Definition values..."

What I'm trying to do: I'm trying to have a Nixos configuration defined, that can be Installed (this would be the configuration-pineapple.nix file) Installed/run as a VM, by setting some additional ...
Chris Stryczynski's user avatar
-1 votes
1 answer
159 views

nix-shell default.nix: How to install rPackages.data_table with the zlib dependency?

I have a multi-user installation of nix on ubuntu 22.04. I'm trying to develop an R package that depends on data.table, but am unable to install data.table with zlib headers so that I can use the ...
basesorbytes's user avatar
2 votes
1 answer
564 views

How to set locale in Nix shell on Ubuntu?

To demonstrate locale support in Ubuntu: vagrant init ubuntu/jammy64 vagrant up vagrant ssh sudo apt-get -y install hello language-pack-nb LC_MESSAGES=nb_NO.UTF-8 hello This prints the expected, ...
l0b0's user avatar
  • 51.9k
6 votes
2 answers
5k views

How to pin a package version with `nix-shell`?

From what I understand, I can use a given version of Nix packages using the -I flag. But I would like to know if it is possible within a single shell.nix conf to have something like: git v2.1.2 htop ...
hacb's user avatar
  • 61
0 votes
1 answer
329 views

how to change a var env value with nix

here is my default.nix: with import <nixpkgs> {}; { cimgEnv = stdenv.mkDerivation { name = "cimgdev"; buildInputs = [ pkgconfig stdenv cimg xorg.libX11 boost jdk gradle (opencv4....
Bussiere's user avatar
1 vote
1 answer
448 views

How to run `zsh-newuser-install` without modifying existing files

The top-level problem I want to solve is to run zsh-newuser-install configuration script. This is what's executed when zsh opens for the first time and sees no .zprofile/.zshrc/... files. I don't want ...
zaabson's user avatar
  • 33
1 vote
1 answer
255 views

How to launch nix-shell with package with a long name

nix-env -iA nixpkgs.python311 it works But when i do a nix-shell -p nixpkgs.python311 or a nix-shell -p python3-3.11.1 visibly there are problem in the name and arg nix-shell -p python3-3.11.1 ...
Bussiere's user avatar
0 votes
0 answers
480 views

.desktop files for packages installed using Nix are broken

I've recently installed Filezilla and Keepass using Nix on Kubuntu 22.10 and symlinked my ~/.nix-profile/share/applications to /usr/share/applications, so that the apps appear in the application menu. ...
coolguy123's user avatar
0 votes
1 answer
238 views

Nix shell with customized dependencies

I now understand how to write a basic shell.nix the a project that I am developing. I have something like this: { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ ...
Timmy's user avatar
  • 101
0 votes
1 answer
185 views

How to create a list of system packages with their description?

I need to create a file with the list of all packages installed system-wide. I can see in the repl that pname and meta are available for each package nix-repl> emacs.pname "emacs" nix-...
andreoss's user avatar
  • 120
0 votes
1 answer
282 views

How to synchronize files between a NixOS declarative container and local system path (equivalent of docker-compose volumes functionality)?

I have NixOS 22.11 set up on a local workstation. I use extra-container package, which can run declarative NixOS containers like imperative containers, without system rebuilds. I'm trying to run a ...
protob's user avatar
  • 251
2 votes
1 answer
694 views

How to install Nix "silently" without having to answer to prompts? (e.g., to install it from a shell script)

I have a script that needs to be run on brand new virtual machines, but it depends on Nix being present, and I don't want to manually install it every time.
toraritte's user avatar
  • 1,102
1 vote
0 answers
135 views

yubikey-agent not running on login

According to man configuration.nix, enabling services.yubikey-agent should start yubikey-agent on login: services.yubikey-agent.enable Whether to start yubikey-agent when you log in. Also sets ...
rampion's user avatar
  • 1,669
0 votes
0 answers
361 views

Installing DWM on gentoo

I was just trying to install dwm on my gentoo machine but I keep on encountering the same problem every time I make clean install. The error is... drw.c:5:10: fatal error: X11/Xlib.h: No such file or ...
sherbit fish's user avatar
1 vote
0 answers
257 views

Install of nix via nix-installers breaks system on Fedora 37

I tried to install the Nix package manager on my Fedora 37 machine. Having read about some issues with installing Nix with the install script on Fedora and other OS, using Selinux, I chose install via ...
Cutú Chiqueño's user avatar
0 votes
1 answer
298 views

SSH not possible when using fish (installed through Nix) as shell

Using the nix package manager, I've installed fish for my login shell. I've added the shell to /etc/shells: $ bat /etc/shells | grep --color=auto fish /home/ajgringo619/.nix-profile/bin/fish This ...
ajgringo619's user avatar
  • 3,384
1 vote
4 answers
3k views

How to install and run docker with nix

I'm using Debian on WSL. Nix is already install. I install docker with this command: nix-env -iA nixpkgs.docker I want to start the daemon : systemctl start docker Failed to connect to bus: No such ...
Pierre-olivier Gendraud's user avatar
3 votes
1 answer
1k views

Unable to run alacritty using nix

.nix-profile/bin/alacritty Error: Error creating GL context; Received multiple errors: Could not create EGL display object `glXQueryExtensionsString` found no glX extensions Error: &...
nk2's user avatar
  • 51