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
10
votes
3 answers

What does the string / value mean in Nix?

For example in the following (which I assume is a nix expression): (import {}).haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ lens aeson turtle ]) What does reference? I also see it used in other contexts for…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
10
votes
1 answer

Need help on start using purescript on NixOS

I am trying to setup hello world project with purescript on NixOs and have couple questions, Official purescript website recommend installation via npm but there is no nixos.nodePackages.purescript, instead there are at least 2 variants I found in…
wizzup
  • 2,361
  • 20
  • 34
9
votes
3 answers

NixOS within NixOS?

I'm starting to play around with NixOS deployments. To that end, I have a repo with some packages defined, and a configuration.nix for the server. It seems like I should then be able to test this configuration locally (I'm also running NixOS). I…
user2141650
  • 2,827
  • 1
  • 15
  • 23
9
votes
2 answers

How can I install a Haskell library to be accessible via GHCi with Nixos?

I've managed to install ghc with nix-env -i ghc. I'd like to install a Haskell library now, how should this be done? For example the turtle (https://hackage.haskell.org/package/turtle) library. I've run nix-env -f "" -iA…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
9
votes
3 answers

How to `nix-build` again a built store path?

I create my own repository to fetch some git source. # packages.nix with (import {}); rec { rustcSource = fetchgit { url = https://github.com/rust-lang/rust; rev = "3191fbae9da539442351f883bdabcad0d72efcb6"; sha256 =…
Abdillah
  • 982
  • 11
  • 28
9
votes
1 answer

Inherit Attributes from Another Set in Nix Expression Language

In Nix manual's Inheriting attributes section, we have graphviz = (import ../tools/graphics/graphviz) { inherit fetchurl stdenv libpng libjpeg expat x11 yacc; inherit (xlibs) libXaw; }; xlibs = { libX11 = ...; libXaw = ...; ... } libpng…
Ben
  • 1,557
  • 13
  • 30
9
votes
3 answers

How to add labels to NixOS generations

When I boot my machine it shows all generations in a list, but naming them "Generation 49", "Generation 50", etc. Is there a way to add labels to generations, so that I can easily see later what was changed? I'd like to have something like an…
psmith
  • 2,292
  • 1
  • 19
  • 19
8
votes
1 answer

How do I supply a C library to stack on NixOS?

I have a stack-based project that depends on a couple C libraries. One of these C libraries, zlib, is available from a native NixOS package and I can put into the nix section of stack.yaml: nix: enable: true packages: - "zlib" The other is…
Jean-Paul Calderone
  • 47,755
  • 6
  • 94
  • 122
8
votes
2 answers

How can I use a nix configuration when not using Nixos?

So I've installed Nix on Arch linux and I'm able to run nix-env -i example, however how can I define a Nix configuration? As I don't have any /etc/nixos/configuration.nix file present. Is this possible? My goal here is to be able to define a…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
8
votes
2 answers

How to set an alias in nixos?

In ubuntu I had a ~/.bashrc file with a number of aliases of the form alias gs='git status' How do I set an alias in nixos?
mherzl
  • 5,624
  • 6
  • 34
  • 75
8
votes
2 answers

NixOS, Haskell, opengl : problems with building and running openGL programs

I'm experiencing a problem with GL on NixOS: the problem seems to be old, but there is still no straightforward solution yet in 2017! I'm trying to build a Haskell program using the Gloss library. I have installed gloss and everything it needs using…
samsergey
  • 228
  • 1
  • 8
8
votes
1 answer

How to install gtk themes under NixOS without hacky scripts?

I can't find a proper way of setting gtk themes under NixOS. My usual approach is lxappearance, but after installing some gtk-themes with nix lxappearance can't find them (as there is no /usr/share/themes, but the themes aren't under…
FloriOn
  • 267
  • 2
  • 12
8
votes
2 answers

NixOS install specific NodeJS version

I can see that NixOS has these versions available for install: ... nodejs-0.10-statsd-0.7.2 nodejs-0.10.42 nodejs-4.3.1 nodejs-5.9.0 ... yet systemPackages doesn't like me installing nodejs-5.9.0 as it complains that: error: syntax error,…
Alex
  • 8,093
  • 6
  • 49
  • 79
7
votes
1 answer

Where is nix.conf located when installed on OSX?

I installed nix on osx using this command: $ sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume Following instructions here: https://hydra.nixos.org/build/119559243/download/1/manual/#sect-macos-installation I'm…
Brian Yeh
  • 3,119
  • 3
  • 26
  • 40
7
votes
2 answers

Nix Pill 14: How to make callPackage overridable?

I am having trouble understanding Nix Pill 14. The author provides makeOverridable, and then challenges the user to integrate it with callPackage. makeOverridable and default.nix are provided, as follows, where makeOverridable is in the file…
webdavis
  • 83
  • 1
  • 5
1 2
3
33 34