Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 answer
66 views

Can't start X probably because of NVidia driver

In NixOS, I successfully installed and started both XMonad, and SwayWM a while ago. Since then, I have been using only SwayWM, and all seems good. Now I want to explore more about XMonad and so ...
user avatar
  • 89.9k
0 votes
0 answers
52 views

How can I access a flash drive without having to be root?

I was wondering how I could access a flash drive without having to be root? I am accessing it on NixOS below (and will have to access it on a printer, which may have the permission problem). $ lsblk ...
user avatar
  • 89.9k
-1 votes
1 answer
137 views

dircolor doesn't work

I was using bash's autocompletion by pressing TAB key at the end of a pathname. I was also using ls (alias ls='ls --color=auto' in ~/.bashrc). I had trouble recognizing the filenames in the color. (Is ...
user avatar
  • 89.9k
0 votes
1 answer
76 views

KDE display not working on NixOS - Thinkpad P15 Gen 2, NVIDIA RTX A4000

I'm trying to install NixOS on a new Thinkpad P15 Gen 2, and I can't get the desktop environment to show anything on my screen. Anytime I turn it on or reboot, the screen stays black until I ctrl+alt+...
user avatar
  • 101
0 votes
2 answers
35 views

How do I reference nvmeXnYpZ partitions?

I am trying to install NixOS on my MacBook following the manual (https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning-formatting) and I am stuck at the partitioning/...
user avatar
0 votes
0 answers
27 views

Control modified keys show up as wrong keys

I'm using WSL 1.0 Ubuntu inside Windows Terminal v1.11.2921.0 from a Windows machine, to SSH into a NixOS box (Linux) On Windows, I am using the Programmer Dvorak keyboard layout. I also remapped Caps ...
user avatar
0 votes
1 answer
43 views

graphical.target for specified users only

The situation is like this: I am using a Linux machine as a server, accurately a NixOS (with home-manager) on Raspberry Pi 4. Therefore I don't need a GUI always ready and eating the resources. ...
user avatar
2 votes
1 answer
110 views

Which parameters does configuration.nix take?

My /etc/nixos/configuration.nix starts with { config, lib, modulesPath, pkgs, ... }:, because that's what was in whichever example I copied. A quick search through the NixOS manual, man nixos-generate-...
user avatar
  • 46.9k
0 votes
1 answer
126 views

How to keep PS1 when using nix-shell?

nix-shell changes PS1 to its own format. [nix-shell:~/snm]$ I tried adding check for "$IN_NIX_SHELL" inside ~/.bashrc, but it didn't work. The only work around I found is to run nix-shell ...
user avatar
  • 330
1 vote
0 answers
24 views

How to avoid infinite recursion when referring to `config.users.users.default.home` in `fileSystems`?

I have a LUKS-with-LVM drive which I want to manually mount like this: Log into GNOME Start Nautilus Click on the relevant drive Submit the password To do this I've had to change the default mount ...
user avatar
  • 46.9k
1 vote
0 answers
60 views

How to use readline bindings everywhere?

Using OSX I am able to use readline-specific bindings, such as going to the beginning of the line with CTRL+A, everywhere. I recently switched to Linux (specifically NixOS) and I've been missing this ...
user avatar
0 votes
1 answer
36 views

Scroll direction configuration does not persist in NixOS

The title might be misleading but I did not found a better and shorter way to put it so here is some context. When I configure the touch-pad to scroll the natural way, it works. As soon as I reboot, ...
user avatar
  • 111
1 vote
0 answers
63 views

How can I disable coloring of bash autocompletion of `cd` in bash?

In NixOS, both ls and bash autocompletion of cd color their results in a way that makes reading the names of writable directories very difficult (is it just me?). I don't find a default ~/.bashrc that ...
user avatar
  • 81
0 votes
1 answer
33 views

Can't switch to virtual consoles as usual

On previous Ubuntu and now NixOS on Dell Inspiron-7559, I have found that the virtual consoles are unusual compared to Thinkpad. I found that I have to press Fn besides the normal key bindings, i.e. ...
user avatar
  • 81
-1 votes
1 answer
86 views

If reinstallation can still practically happen in rolling release, when does that happen?

Does rolling release differ from non-rolling release in that there is only incremental change to the system and packages, theoretically no need for reinstallation? If reinstallation can still ...
user avatar
  • 81
2 votes
1 answer
305 views

How can I change the permission of an external hard drive and access it?

I try to access an external hard drive with an ntfs filesystem from NixOS. Is it correct that I have to create a mounting point? Where do you usually create a mounting point? sudo mkdir -p /media/b/...
user avatar
  • 81
0 votes
0 answers
56 views

NixOS: how to apply a patch to GRUB 2

How to apply a patch to GRUB in NixOS? Something like boot.loader.grub.package = .... Tried this, but it didn't work nixpkgs.config = { packageOverrides = pkgs: { grub2 = (pkgs.grub2....
user avatar
  • 330
0 votes
1 answer
42 views

Does LVM make data recovery easier or harder?

Does LVM make data recovery on ext 4 easier or harder? I have to consider the risk of hdd failure. Thanks. I am going to install some Linux distribution (e.g. NixOS) on a laptop. It is already ...
user avatar
  • 81
0 votes
0 answers
43 views

Am I a member of the "users" group or not? [duplicate]

Nobody is in the "users" group: $ getent group users users:x:100: $ getent passwd "$USER" username:x:1000:100::/home/username:/run/current-system/sw/bin/bash $ groupmems -g users --...
user avatar
  • 46.9k
1 vote
0 answers
47 views

No option for printing to PDF within Wine in NixOS

Most forum posts for other distros recommend installing a "cups-pdf" package to enable printing to PDF in non-standard applications like Wine. I can't find any such package or option in ...
user avatar
  • 46.9k
2 votes
1 answer
306 views

How to attach to a tmux session on a remote machine that has been started locally on that machine?

There are two physical machines in front of me: nixos and mac. Physically typing in a terminal on nixos: nixos$ tmux ls 0: 5 windows (created Thu Sep 16 19:21:38 2021) (attached) 1: 1 windows (...
user avatar
  • 705
0 votes
0 answers
47 views

Persisting VSCode settings sync login information when not using a desktop

I use Visual Studio code with XMonad on NixOS (so I do not use any of the desktop managers). When using its "setting sync" feature (login via GitHub), VSCode fails to persist the login token,...
user avatar
0 votes
1 answer
48 views

How to temporarily disable auto-upgrade without a Nix rebuild?

While on a metered connection it would be really handy to be able to disable system.autoUpgrade without having to rebuild the entire system and use up several GB/days/$$$ worth of credit. Is this ...
user avatar
  • 46.9k
0 votes
1 answer
71 views

Grub entry to run NixOS?

I'm running Ubuntu and I want to dual boot NixOS. I used the quick install script on their site, but it didn't make a Grub entry. I have no experience with Grub whatsoever, so any help is appreciated!
user avatar
  • 55
1 vote
2 answers
253 views

How to get the size of a Nix derivation?

Is it possible to figure out the size of a derivation after building it? For example, after nixos-rebuild, how much space does the new derivation take, excluding any storage savings because of ...
user avatar
  • 46.9k
0 votes
1 answer
150 views

Nix takes forever to copy file from cache

Last night I spent a long time trying to fix my nixos configuration and failed. So today I resumed work with the existing generation, but it seems something I did has broken my nix. Now when I run ...
user avatar
1 vote
1 answer
141 views

How to list package dependents on Nix?

I get this error: Package ‘python2.7-Pillow-6.2.2’ in /nix/store/...-nixos-21.05.1590.63ee5cd99a2/nixos/pkgs/development/python-modules/pillow/6.nix:19 is marked as insecure, refusing to evaluate. ...
user avatar
  • 330
1 vote
0 answers
91 views

How to debug CUPS not sending jobs to printer?

tl;dr: Rather than just try a bunch of stuff until things work and then try another bunch of stuff next it breaks, how can I go about systematically understanding why CUPS is telling me jobs are ...
user avatar
  • 46.9k
0 votes
0 answers
226 views

How to `pyenv install` in NixOS?

The original problem: $ pyenv install Downloading Python-3.8.10.tar.xz... -> https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz Installing Python-3.8.10... BUILD FAILED (NixOS 21.05....
user avatar
  • 46.9k
0 votes
0 answers
113 views

GPG card is only available for the currently logged in user

I'm currently trying to use my YubiKey 5 NFC as a smartcard with GPG Agent on NixOS. It works fine and if I'm logged in i can access the card: $ gpg --card-status Reader ...........: 1050:0407:X:0 ...
user avatar
0 votes
1 answer
157 views

How to use official Nix Docker image to test configuration?

I'm trying to build my Nix configuration in GitLab CI, to make sure any changes have at least a chance of working in NixOS. The official Nix Docker image has a very different structure from NixOS (...
user avatar
  • 46.9k
0 votes
0 answers
22 views

keystroke in x11 cannot be repeated onpress

I am using nixOS on a 2017 Macbook pro, and I want to use a tiling window manager for my workflow. The keyboard is working normally in console, which can repeat keypress when I hold the button. But ...
user avatar
0 votes
1 answer
262 views

automount removable media using udev in NixOS

I want an udevrule to automatically mount usb sticks or sd-cards, if plugged into a terminal-computer. The way I tried to achieve this was adding an udevrule and make use of pmount's ability to mount ...
user avatar
  • 119
1 vote
1 answer
119 views

Reset NixOS container

Nixos containers can be created declaring them in the configuration.nix. Is there way to 'reset' them, hence delete all data, and recreate the container?
user avatar
1 vote
1 answer
261 views

How do I install a tarball with home-manager?

I’m really new to nix so a detailed explanation of the solution would be appreciated. I’m trying to add rnix-lsp to my home config. The instructions on the github page simply state to run a nix-env ...
user avatar
1 vote
2 answers
180 views

Issue installing input-fonts with nixOS, how to use 'nix-store --add-fixed'?

NixOS version: 20.09.3765.d6f63659a70 (Nightingale) I am trying to install Input Fonts on NixOS (which I'm pretty new to). I seem to be unable to install input-fonts on NixOS even though I have the ...
user avatar
2 votes
2 answers
93 views

How do I determine which commit a channel references with Nixos?

I'd like to figure out the commit and date that a channel references. For example how can determine that for the nixos2009 channel below? sudo nix-channel --list nixos https://nixos.org/channels/nixos-...
user avatar
0 votes
1 answer
102 views

Unable to use -lfl on NixOS

I'm new to NixOS and I'm trying to build a project which uses Flex. I get the following error if I try and build the project /nix/store/b10shv9yqbgps47y0n8x7l7bq8fmp1i6-binutils-2.31.1/bin/ld: cannot ...
user avatar
  • 111
0 votes
1 answer
959 views

Wireguard client does not complete handshake on nixos

Mar 07 12:10:16 nixos kernel: wireguard: wg0: Handshake for peer 1 (192.248.152.91:58338) did not complete after 5 seconds, retrying (try 3) Mar 07 12:10:16 nixos kernel: wireguard: wg0: Sending ...
user avatar
1 vote
1 answer
219 views

What is Nix equivalent of "guix challenge"?

In Guix user can verify reproducibility of a package with guix challenge https://guix.gnu.org/manual/en/html_node/Invoking-guix-challenge.html. What is the Nix command for that?
user avatar
  • 330
4 votes
1 answer
383 views

How to rename a network interface on NixOS?

How to rename existing interfaces to a standardized names (i.e "internet0", "dmz0", etc). The goal is to use the same names across different configuration.
user avatar
  • 330
1 vote
1 answer
1k views

How to force Nix to “install packages” by building them locally instead of downloading a pre-built binary?

By "install packages" I mean to evaluate Nix build expressions (using nix-env, nix-shell -p, etc.) to build from source instead of using a substitute. Originally posted on Stackoverflow but [...
user avatar
  • 705
1 vote
0 answers
82 views

How do I force the motherboard (instead of external gpus) to provide the monitor output?

I built a computer that has a motherboard and a couple of gpus in order to use the gpus for computation-intensive tasks. Before plugging in the gpus, I was able to operate a monitor by plugging its ...
user avatar
  • 1,209
1 vote
1 answer
712 views

How to set a system-wide gtk theme in NixOS?

Is there a way to set system-wide default GTK theme to "HighContrast" in the same manner, one can set font DPI on a system level? Here is the snippet I use for the font DPI: fonts = { ...
user avatar
  • 330
1 vote
1 answer
1k views

How to get /bin/bash on nixos

So I know I can change she-bangs to #!/usr/bin/env bash and I will do that for my scripts, but really I'd like to be able to just run the many many scripts with a #!/bin/bash she-bang. Sometimes it's ...
user avatar
0 votes
1 answer
181 views

NixOs Attribute Error with unstable package on stable release

I’m trying to install material shell which is only in unstable right now. I’m using the guide from the wiki to install a package from unstable along with this post on adding unstable without using a ...
user avatar
  • 101
6 votes
1 answer
1k views

How to enable QCA6390 Bluetooth firmware in Linux kernel?

Context I'm having difficulty getting the kernel to load the necessary Bluetooth firmware for my XPS 9310. My model has the AX500 connectivity chip, which uses the QCA6390. Users of both Ubuntu and ...
user avatar
  • 243
0 votes
1 answer
120 views

Copying to external device messes up special characters in NixOS

I have a DAP (like an mp3 player) and I am trying to sync up the contents of one of the folders on my pc to the DAP. This does work almost as intended, but something weird is happening to the ...
user avatar
0 votes
1 answer
2k views

realpath tells me my directory doesn't exist, but it does

I don't understand this behaviour of the realpath command. $ touch wombat $ ls wombat $ cd /home/amy/test $ ls wombat $ realpath --relative-to=. /home/amy/test/wombat realpath: --relative-to=.: No ...
user avatar
  • 226
1 vote
1 answer
262 views

How to redefine action for power-button on NixOS?

How to define an action (i.e sleep or hibernate) that happens when power-button pressed? I define actions for other events as follows services.upower.enable = true; services.upower....
user avatar
  • 330

1
2 3 4 5 6