All Questions

Tagged with or or
Filter by
Sorted by
Tagged with
1
vote
2answers
34 views

How can I reference the store path of a Nix package?

I'd like to add functionality relating to the awscli command completion. In my particular case I need to source the script from /nix/store/hvx7xqvjz7r08nsb9kssh1d9s302v3sp-awscli-1.16.106/share/zsh/...
1
vote
0answers
52 views
+100

How to fix NixOS localtime service?

Setting services.localtime.enable = true; should start a "simple daemon for keeping the system timezone up-to-date based on the current location.", but it doesn't: Failed to get target of /etc/...
1
vote
1answer
27 views

How to remove need for hacks to run scrot with a keyboard shortcut?

I'd like to take screenshots with a keyboard shortcut using scrot --select. I tried adding the following to my rc.lua to use the PrintScr key for this purpose: awful.key({}, "Print", function () ...
3
votes
0answers
30 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
27 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
30 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
12 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
16 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
31 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
40 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
112 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
12 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
65 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
53 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
30 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
67 views

How can I discover and install a specific version of a package?

I have an installation of nix on a Linux system, and I have added the channel nixpkgs-unstable. I can now install packages such as gcc: % nix-env --install gcc installing 'gcc-7.4.0' ... created 78 ...
1
vote
1answer
133 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
47 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
37 views

nix package manage: can't install firefox

Tried to install firefox, at first the dependent packages were installed correctly. But at the end I got the following errors: $nix-env -i firefox-67.0.1 ... post-installation fixup Moving /nix/store/...
0
votes
1answer
33 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
1answer
60 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@...
0
votes
1answer
81 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 = { ...
6
votes
1answer
419 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
42 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
81 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
110 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
58 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 ...
1
vote
4answers
516 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
29 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?
3
votes
1answer
140 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 ...
0
votes
1answer
77 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 ...
3
votes
2answers
201 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
146 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
38 views

`df` within VPS shows available space far below provisioned space

I'm stuck on figuring out whether this is (1) a NixOS problem, (2) a Vultr problem, (3) something particular to my image. I have a Vultr VPS running custom Nix image (18.09 Jellyfish), and the ...
1
vote
1answer
25 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
59 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
78 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
37 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
45 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
119 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
41 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
77 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
172 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 ...
3
votes
1answer
139 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 ...
1
vote
2answers
280 views

How do I diagnose a failing nix-build?

How do I diagnose a nix-build failing? Currently I see output as: nix build -v warning: dumping very large path (> 256 MiB); this may run out of memory building '/nix/store/...
3
votes
1answer
467 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
80 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 ...
6
votes
2answers
844 views

Cloning builder process: Operation not permitted when using Nix (under Linux) update channel

I use Arch Linux 4.19.15-1-lts #1 SMP Sun Jan 13 13:53:52 CET 2019 x86_64 GNU/Linux. I do also have Nix installed: nix-env (Nix) 2.2. I've never had any problems until the recent update to version 2....
3
votes
2answers
218 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
105 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" - ...