Questions tagged [nixos]

NixOS is a Nix-based Linux distribution. Thanks to Nix, 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.

Filter by
Sorted by
Tagged with
2
votes
0answers
20 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. ...
2
votes
0answers
20 views

How can I set the swappiness value of the Linux kernel with Nixos?

Following the brief mention of vm.swappiness in https://nixos.org/nixos/manual/options.html: I've tried setting: boot.kernel.sysctl = { "vm.swappiness" = 0;}; Within the usual hardware-...
1
vote
0answers
25 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,...
0
votes
0answers
11 views

How to install/configure icons for Digikam in NixOS?

Digikam is missing many of its icons: How do I install/configure them without running a full KDE desktop? I tried installing oxygen-icons5, but that didn't seem to make any difference. And the ...
0
votes
0answers
14 views

How to mount internal drives as a normal user in NixOS?

In for example Thunar I can just click on an external USB drive to mount it under /run/media/$USER/[something]. The fact that the mount point is created dynamically is a great side effect. But for any ...
0
votes
1answer
23 views

How to enable `git gui` in NixOS?

I've installed git and tk, and I'm able to run git citool to display the Git GUI and create a single commit, after which the application exits. Unfortunately the git gui command itself says git: '...
0
votes
0answers
29 views

In NixOS, how can I install the latest Jupyterlab?

I've tried running pypi2nix -V 3 -e jupyterlab==1.0.0, but it fails with "failed to build ipykernel." Is there another way I can install the 1.0.X version of jupyterlab? Edit: I'm getting closer. ...
2
votes
1answer
78 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-...
1
vote
0answers
10 views

How to limit repeated connections in NixOS?

Is it possible to achieve the equivalent of the following Puppet in NixOS' configuration.nix without networking.firewall.extraCommands? firewall { '200 limit incoming SSH connections to 6 per minute':...
1
vote
1answer
52 views

How to configure a useable screen locker in Awesome+LightDM+NixOS?

I've been using Awesome+LightDM with the GTK greeter on Arch Linux for some years, and I'm in the process of moving to NixOS. One issue with this has been the screen locker. I've mapped Windows-l to ...
1
vote
0answers
39 views

Why doesn't sshd work on my Nixos on Raspberry Pi?

My configuration.nix looks like this: { config, pkgs, lib, ... }: { imports = [<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix>]; # NixOS wants to enable GRUB by default boot....
0
votes
1answer
24 views

How can I move my nixops source files?

I kept my nixops source files in one directory, but then I decided to move them to another directory. How can I tell nixops that the source files have changed? Can I just change the nixEprs row in ...
1
vote
1answer
87 views

Is there a way to have hibernate and encrypted swap on nixos?

There's a way to get encrypted swap + hibernate on Ubuntu. There's also a way to get encrypted swap on nixos (use randomEncryption.enable = true), and a way to make hibernate to swap. Is there a way ...
0
votes
2answers
35 views

Nixos: how to install deps in jupyter notebook?

I'm trying to install Jupyter notebook on NixOs, but I can't find how to install numpy, and other libraries into jupyter. For now I added in my configuration.nix something like: { config, pkgs, ... }:...
0
votes
1answer
24 views

Access forbidden on Apache webserver on NixOS

For the purpose of running a webserver on my NixOS installation, I have included the following in my configuration.nix. (Note that I have very little experience with setting up servers and have not ...
0
votes
0answers
41 views

Why is the postgresql `libpq.so.5` shared library not being found on Nixos?

I'm trying to get an executable to work, it's currently running fine on one Nixos host, but not the new one. On old host: [root@XenonKiloCranberry:~/blog]# ldd app linux-vdso.so.1 (...
0
votes
1answer
60 views

NixOs: use services on non-nixos OS, eventually with only user rights

I'd like to know how to be able to run a service described like in a module on a non-Nix OS. For example let's say I have the file: {config, pkgs, ... }: { systemd.user.services.mytestservice = { ...
5
votes
1answer
287 views

Different methods to run a non-nixos executable on Nixos

What are the different methods to run a non-nixos executable on NixOs? I'd like to see also the manual methods.
0
votes
1answer
30 views

Running a different configuration.nix file into a virtual machine from a non-nixos operating system

In the amazing nixos, it is possible to launch a lightweight container that will run a system whose configuration.nix file is different from the host configuration by using: nixos-rebuild build-vm -I ...
3
votes
2answers
66 views

Making a Simple Deb Package NixOS Compatible (Mathematica's wolframscript) [duplicate]

Consider this simple debian package: wolframscript.deb (to inspect you'll have to click the download link for Linux). After unpacking, it has the following file structure: ├── opt │   └── Wolfram │   ...
0
votes
1answer
88 views

NixOS: Modifying config files on a buildFHSUserEnv environment

On NixOS, I'm using a FHS environment to supply libraries (unixODBC and sqlite-odbc) to libreoffice. { pkgs ? import <nixpkgs> {} }: ( pkgs.buildFHSUserEnv { name = "odbc-sqlite-libreoffice";...
1
vote
3answers
57 views

How to tell when a NixOS system was first installed?

I have a computer that is running NixOS, and has been for a number of years. Is there a way to tell when exactly the system was installed? The first generation has been GCed ages ago, so I can't just ...
0
votes
4answers
338 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
26 views

How do I set up scanning from an HP OfficeJet Pro on NixOS?

I have cups printing working on NixOS with my HP OfficeJet Pro 8610. But how do I get scanning working with, say, simple-scan?
0
votes
1answer
101 views

Is NixOS configuration gittable?

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
70 views

configure grub to handle two nixos installations

I am attempting to install and dualboot two nixos systems, but I am having trouble understanding how to configure GRUB properly to make it work. It might seem strange that I want to dual boot two ...
2
votes
2answers
139 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
133 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 ...
0
votes
1answer
24 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-...
2
votes
0answers
47 views

Configuring programs and services from unstable channel in NixOS

I know that I can install a package from the unstable channel like this: { config, pkgs, ... }: let unstable-pkgs = import <unstable> {}; in { environment.systemPackages = [ unstable-pkgs....
1
vote
1answer
65 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
0answers
33 views

How to set layout toggle on <win+caps> in configuration.nix?

How can I set layout toggling on <win+caps> in NixOS configuration.nix only?
0
votes
1answer
40 views

NixOS: recover /boot mount info after overwriting hardware-configuration.nix

In my NixOS configuration I ended up accidentally overwriting my hardware-configuration.nix. While sudo nixos-generate-config regenerates one, for me the regenerated version appears to be missing the ...
0
votes
0answers
106 views

How to boot to single user mode in nixos

On a nixos installation how does one boot into single user mode? On a typical linux installation one would set rw init=/sysroot/bin/sh on the bootloader. But nixos being nixos, it has a path that ...
0
votes
1answer
34 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
72 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 ...
1
vote
1answer
146 views

How to add an additional configuration file to an existing nix derivation?

Using the linux distribution nixos, I have 2 similar problems: I have to add my custom_syntax_color_scheme.vim file to the existing /share/vim/vim80/colors folder in the nix store from existing ...
2
votes
1answer
121 views

How to add a file to /etc in NixOS?

What is the NixOS-way to put a configuration file in /etc? E.g. I want to drop /etc/nanorc. I found some forum entries talking about programming it into /etc/nixos/configuration.nix, but could not ...
3
votes
1answer
407 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
63 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
211 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
96 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" - ...
0
votes
0answers
143 views

NixOS + docker nginx + dnsmasq for local somethingsomething.dev domains

I have been configuring NixOS as a dev machine lately (and so far I really love it). I was planning of using a nginx image as reverse proxy to route all *.dev requests to running docker images. This ...
1
vote
1answer
727 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-...
4
votes
1answer
596 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
187 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
152 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
91 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
0answers
383 views

How can I get my laptop's internal speakers to work correctly on NixOS?

As far as I can tell, the subwoofers on my Lenovo Yoga C930 aren't being engaged at all on NixOS, which results in a really flat sound. The speakers sound great when I reboot into Windows 10. How can ...
1
vote
1answer
332 views

How can I get bluetooth speakers to work with pulseaudio in NixOS?

I've managed to get my bluetooth speakers to connect, but Pulseaudio apparently doesn't recognize them as an audio device. Following advice on the NixOS Wiki, I now have this in my configuration.nix: ...