Questions tagged [nixos]

NixOS is a Nix-based Linux distribution.

NixOS is a Linux distribution based on Nix, a functional programming language. It supports atomic upgrades, rollbacks and multi-user package management, and it has a declarative approach to system configuration management that makes it easy to reproduce a configuration on another machine.

Home page: https://nixos.org/

505 questions
14
votes
2 answers

What nix channel is subscribed to by default

I installed the nix package manager on my machine (macOS 10.12.6 Sierra) several weeks ago. I want to update mylocal nixpkgs collection to bring it in sync with any upstream updates in the channel. My understanding is that this can be achieved by…
b73
  • 1,377
  • 2
  • 14
  • 25
14
votes
3 answers

NixOS - Module imports with arguments

Let's say I have my NixOS configuration.nix set up as follows: {config, pkgs, ...}: { services.openssh.enable = true; } I now want to have a second file called networking.nix which sets my hostname based on an argument. {config, pkgs, hostname,…
lschuermann
  • 862
  • 1
  • 7
  • 17
13
votes
3 answers

error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

I've used sh <(curl -L https://nixos.org/nix/install) --daemon to install Nix. After installation completed run nix-shell -p nix-info --run "nix-info -m" to verify the installation. It returns the following error Output warning: Nix search path…
Anto
  • 153
  • 1
  • 7
13
votes
1 answer

nixos installation issue,'command not found: nix'

I deleted /nix and started a fresh install of nix, however after installing nix install nix (MACBook Pro M1 arm64 BigSur) with sh <(curl -L https://nixos.org/nix/install) I run $ nix but I get the output zsh: command not found: nix , same for…
Neo
  • 717
  • 2
  • 11
  • 26
13
votes
5 answers

How to install NPM end-user packages on NixOS?

Is there a way to install NPM command line tools on NixOS? [root@ip-xxx-xxx-0-27:~/teros/ntrs-cli]# sudo npm i -g typescript npm WARN checkPermissions Missing write access to…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
13
votes
5 answers

stack build error: attribute ‘ghc822’ missing, at (string):1:53

I am attempting to build my haskell project on NixOS. Running $ stack build gives the following error. $ stack build error: attribute ‘ghc822’ missing, at (string):1:53 (use ‘--show-trace’ to show detailed location information) What does this error…
mherzl
  • 5,624
  • 6
  • 34
  • 75
12
votes
2 answers

How do I select GCC version in nix-shell?

I am requesting GCC 8, but I get GCC 7 instead. $ nix-shell -p gcc8 [nix-shell:~]$ gcc --version gcc (GCC) 7.3.0 What is going on?
user7610
  • 25,267
  • 15
  • 124
  • 150
12
votes
1 answer

An Overview of Nix/OS Architecture?

While the Nix/OS wiki and manuals provide a lot of excellent information, I am still having trouble getting an architectural overview. Apologies for the quantity and naivity of the questions; feel free to answer a subset: 1. What constitutes a Nix…
Ixxie
  • 1,393
  • 1
  • 9
  • 17
12
votes
4 answers

Configure nix-shell to use a shell other than Bash?

I'm on NixOS 15 and nix-shell v1.10. I use Zsh as my main shell now, and would like to use it in conjuction with Oh-My-Zsh within the nix-shell as well when I'm working in development environments built by a Nix expression. If it helps, here is one…
josiah
  • 1,314
  • 1
  • 13
  • 33
11
votes
1 answer

DPI Scaling on NixOS with LightDM + XMonad

I've stripped the xserver configuration on my HiDPI laptop down to just: displayManager: lightdm (autologin, no greeter) windowManager: xmonad desktopManager: none (xterm disabled) And everything is working fine apart from DPI scaling in some…
Jordan Mackie
  • 1,193
  • 10
  • 17
11
votes
2 answers

Loading dependencies from nixpkgs-unstable with nix-shell

I am on NixOS 16.09 and I want to use packages which are currently only in nixpkgs-unstable / nixos-unstable. Using nix-channel --add, I was able to add nixpkgs-unstable to my (user) channels and use it to install the latest version of some packages…
Zimm i48
  • 2,901
  • 17
  • 26
11
votes
1 answer

Can a service be run in nix-shell

I work under NixOS, and I love it so far. For my coding projects, I'm trying to achieve separate development environments. So for example for my Scala/node.js project, I have written default.nix for nix-shell : with import {}; { …
KaC
  • 613
  • 6
  • 14
10
votes
3 answers

dockerd not running on nixos

I installed docker on nixos, using: nix-env -i docker after that, dockerd was not running, so I started the daemon manually with: dockerd and in the logs, I see: WARN[2019-06-26T01:02:31.784701442Z] could not change group /var/run/docker.sock…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
10
votes
2 answers

Nixos: How do I get get a python with debug info included with packages?

I'm trying to do cython debugging on NixOS. I can easily install cython in a nix-shell (chosen for simplicity of example), like this: $ nix-shell -p 'python27.withPackages( p: [ p.cython ])' $ cat…
Henry Crutcher
  • 2,137
  • 20
  • 28
10
votes
3 answers

Setting up Kubernetes on NixOS

On NixOS is is easy to set up Kubernetes by a single line of config: services.kubernetes.roles = ["master" "node"]; This installs both the master and node components on the local system and therefore creates a nice little working local kubernetes…
michas
  • 25,361
  • 15
  • 76
  • 121
1
2
3
33 34