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
0
votes
0answers
19 views

Setting up NixOS with lvmcache and LUKS-on-LVM

I'm trying to install NixOS 19.09 on a notebook. My disk setup is a 30GB SSD and a 700GB HDD. I decided that I want to use the SSD as cache for the HDD, and also that I want the entire root partition ...
0
votes
1answer
17 views

Nixos where is the path to my generation / system configuration derivation?

I'd like to get the root path to the generation / system configuration derivation. Is this path stored somewhere perhaps? My understanding is that there is a 'derivation' made for your system ...
1
vote
1answer
23 views

Set NixOS config option only when it is valid, for backwards compatibility

Occasionally, NixOS changes config options in a way that is not entirely backwards compatible. For example, nixos 19.09 did not have a programs.gnupg.agent.pinentryFlavor option, but in nixos unstable ...
0
votes
0answers
18 views

How can I determine the package version that is cached in Hydra for Nix nixpkgs?

I was trying to build an old Haskell project with an older nixpkgs channel/branch (18.03). On my first attempt of building it, I specified the compiler version as ghc843... However when building - it ...
0
votes
0answers
22 views

Nixos VM no IPv4 address assigned via dhcpcd

I'm using a vm setup with the following options: qemu.networkingOptions = [ "-device e1000,netdev=abc,mac=52:55:00:d1:55:02" "-netdev ...
0
votes
1answer
37 views

How to get the channel commit for a previous Nixos generation?

$ sudo nix-env --list-generations --profile /nix/var/nix/profiles/system ... 600 2020-01-25 21:01:11 601 2020-02-03 13:44:19 602 2020-02-09 14:06:20 603 2020-02-09 14:11:11 ...
0
votes
2answers
36 views

Setup network between VMs using tap network with Nix?

I'm trying to have a network shared between multiple VMs. I've tried adding: qemu.networkingOptions = [ "-nic user,model=virtio-net-pci" ...
2
votes
0answers
40 views

How can I ignore binary caches when running nix-channel commands?

Quite often, I'm away from home where I have a binary cache set for 192.168.0.6 and I run into errors like so: sudo nix-channel --update unpacking channels... warning: unable to download 'http://192....
0
votes
0answers
22 views

Weird behaviour in per-user SSH password authentication

I'm using NixOS. Here's my SSHd config: services.openssh.enable = true; services.openssh.passwordAuthentication = false; services.openssh.challengeResponseAuthentication = false; services....
1
vote
0answers
25 views

Installing RAM: `dmidecode` shows both DIMM and SODIMM slots on the same machine

I want to add RAM to my laptop. If I run dmidecode --type 17 (as described in Linux Check Ram Speed and Type Commands). I get the following: [jeff@jbb-dell:~]$ sudo dmidecode --type 17 [sudo] ...
1
vote
1answer
32 views

How can I list all nix store paths referenced in a build generation?

I'm trying to debug an issue where a nixos configuration on one machine, has the an application accessible in the path (it's listed in /run/current-system/sw/bin), while on another machine with the ...
1
vote
1answer
320 views

grub-install: error: failed to get canonical path of `/boot/efi'

nixos-install building the configuration in /mnt/etc/nixos/configuration.nix... copying channel... installing the boot loader... setting up /etc... updating GRUB 2 menu... mktemp: failed to create ...
1
vote
1answer
176 views

How can I get lightdm to start xmonad?

I've been running nixos with xmonad and using startx to start the xserver. However I decided I would like to have a greeter. I first tried sddm by disabling startx and enabling sddm services....
0
votes
1answer
214 views

Alsa and PulseAudio (csound): Connection Refused

I've come across a problem that has me completely stumped. First; some system info Linux quasar-nixos-tr 4.19.87 #1-NixOS SMP Sun Dec 1 08:17:47 UTC 2019 x86_64 GNU/Linux Now; I'm playing with a ...
0
votes
0answers
50 views

Nixos trouble installing R package openssl

I installed nixos recently and am still not familiar with it. I am struggling to install the R package openssl. After I enter the following command nix-shell -p R pkgconfig openssl nix-shell -p gpp ...
0
votes
0answers
37 views

How do I set up kmail in NixOS?

I have these applications installed, via my configuration.nix: kdeApplications.kmail kdeApplications.kmail-account-wizard kdeApplications.kmailtransport kmail accounts-qt and I think I have the ...
0
votes
1answer
47 views

Nixos configuration use pinned nixpkgs for specific package

So my nixos-rebuild fails to build due to the recent error of: https://github.com/NixOS/nixpkgs/issues/74916 I thought I'd give a go at trying to fix this, by referencing a previous commit's package ...
0
votes
1answer
79 views

In Nix, how can I build a package that has a Python post-install script?

I'm trying to make a Nix derivation for Foliate, and this is my first real derivation, so I don't really know what I'm doing yet. Here's what I have so far. It builds and installs, but fails with ...
0
votes
1answer
32 views

Setting up Kubespray python project on Nixos

nix-shell -p libffi openssl python37Packages.virtualenv python37Packages.virtualenvwrapper python37Packages.pip python37Packages.setuptools ... Collecting certifi>=2017.4.17 (from requests>=2.21....
0
votes
1answer
30 views

How to refer to another user's properties in Nix expression?

I want to set root's startGid and startUid to the GID and UID of another user. How can I do that without hardcoding them? I've tried several variations on the following: users.users = { root = {...
0
votes
1answer
36 views

How do I pick iBus keyboard layouts on NixOS

All additions to list of keyboard layouts made with ibus-setup have no effect, and after launching ibus-setup there is no trace of them. Having iBus enabled in configuration.nix means having no other ...
2
votes
1answer
114 views

Debugging why nix is building a package unnecessarily when it should be in nixpkgs binary cache?

I asked this question in the IRC channel, but thought I'd document it here for my own as well as other's reference. I have a shell.nix file that is taking a long time to build, in particular it seems ...
1
vote
1answer
99 views

Nixos how can I search for packages in a specific channel?

nix-env -v -qaP '*' currently returns all the packages available from all my channels. How can I specify to return packages from a specific channel for example unstable / 18.03?
1
vote
0answers
32 views

Bluetooth devices missing Manufacturer name and product name

Using blueman on NixOS to pair bluetooth device (headphones) and I am only getting a list of MAC addresses without names. I was expecting to see Apple EarPods, for example, but didn't see any names. ~...
1
vote
1answer
169 views

How to enable internet access for nixos container with private network

In my host I have: networking.nat.enable = true; networking.nat.internalInterfaces = ["ve-+"]; networking.nat.externalInterface = "wlp2s0f0u8"; In my container I have defined: ...
0
votes
1answer
143 views

How to disable binary cache for nix-env?

I was trying to figure out nix-serve / nix binary caching. At some point I added: nix = { binaryCaches = [ "https://cache.nixos.org/" "http://127.0.0.1:8899" ]; ...
0
votes
1answer
140 views

How to install Google Cloud completion in NixOS with Oh-My-Zsh?

Oh-my-zsh has a plugin option (plugins = (gcloud, ...)) which allows installing gcloud completions. When I add "gcloud" to plugins, I expect that the completion will be sourced during shell ...
1
vote
1answer
41 views

Nixos ssh with ZSH - command not found

I've got a fresh nixos VM. I have a minor issue where the PATH does not seem to be set when running commands via ssh. For example: ssh chris@192.168.0.10 'whoami' - Outputs: with zsh:1: command not ...
0
votes
1answer
20 views

client nixos error of “error: public key is not valid” when using nix-serve as binary cache

I'm running into an error of error: public key is not valid: [demo@nixos:~]$ nix-env -i ripgrep installing 'ripgrep-0.10.0' these paths will be fetched (0.00 MiB download, 4.76 MiB unpacked): /nix/...
1
vote
1answer
135 views

Nixos unable to modify or chmod nix config - '/etc/nix/nix.conf'

[root@nixos:/etc/nix]# sudo chmod 777 /etc/nix/nix.conf chmod: changing permissions of '/etc/nix/nix.conf': Read-only file system I remember this is some filesystem / Linux kernel utility to change ...
0
votes
1answer
45 views

Cannot cat .pem file inline as -i option to ssh

I am getting this error: Warning: Identity file /dev/fd/63 not accessible: Bad file descriptor. when running this command: ssh -Y 'root@ec2-54-xxx-94-xxx.us-west-2.compute.amazonaws.com' -i <(...
1
vote
0answers
138 views

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/...
2
votes
1answer
52 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
1answer
62 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
77 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
46 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
33 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
1answer
88 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
101 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: '...
1
vote
0answers
91 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
416 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
17 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
307 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 ...
2
votes
1answer
249 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....
1
vote
1answer
51 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
557 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 ...
1
vote
2answers
171 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
84 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
121 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
361 views

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

I would like to know how to run a service described, like in a module on a non-Nix OS. For example let us say I have the file: {config, pkgs, ... }: { systemd.user.services.mytestservice = { ...