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.
358 questions
0
votes
0
answers
11
views
Chronic USB MIDI Controller Connectivity Inconsistency
I have a strange issue (which may in fact be a hardware issue, but I will get to that), where my MIDI controller (Hammer 88 keyboard) periodically cuts out with the following dmesg output:
[ 268....
0
votes
1
answer
77
views
Running sudo from a systemd service
Hi I'm running a script using a self hosted github action runner but when I try to run a sudo command I get the error:
sudo: The "no new privileges" flag is set, which prevents sudo from ...
0
votes
3
answers
143
views
Audio device profile is changed by different applications
Since recently I have a issue where starting an application that needs access to my microphone changes my audio profile set up in pavucontrol from "Pro Audio" to something else.
This ...
0
votes
0
answers
28
views
nix builds wrong package
Using nix build with the flake.nix below, the build should fail since the references github repository does not exist.
Yet, whenever I build the flake, while it shows ecsdsddsdse.fghfghfghfghgfh as ...
1
vote
1
answer
79
views
Changing the GNUPG home directory on NixOS
I'm setting up NixOS 24.05 and I'm using the equivalent version of Home Manager. I'm trying to move the directory for GNUPG to $HOME/.local/share/gnupg also known as $XDG_DATA_HOME/gnupg. I know that ...
0
votes
0
answers
30
views
remote encryption nixos server not reachable
I'm trying to setup my server to start remotely. The problem is, it is not reachable, so I can't specify a Password to decrypt my drive.
I don't now what the problem is here wake on lan works. I also ...
0
votes
1
answer
59
views
docker command not found by systemd service
I am on nixos, but this shouldn't be relevant for this problem.
I created a systemd service which starts a docker container (open-webui). Even before logging in, the container starts and the web ui ...
0
votes
0
answers
89
views
How to run a Python script in “eww.yuck” as “deflisten” on NixOS?
I'm trying to setup notifications using eww on NixOS and have succeeded in making eww show a window in the top left using this code (eww.yuck config file):
(defwindow notifications
:monitor ...
0
votes
1
answer
102
views
Can't enable home manager in WSL NixOS
I'm trying to setup home manager in NixOS running in WSL. However, it seems my import is not working correctly. I'm not sure what I'm missing. Google and ChatGPT were of no use here.
My /etc/nixos/...
0
votes
0
answers
52
views
NixOS fails to boot after install in dual boot
After installing NixOS via usb, in a separate partition of 80 GB, I boot through GRUB and get the following log:
:: running early hook [udev]
Starting systemd-udevd version 255.3-1-arch
:: running ...
2
votes
1
answer
122
views
How to route between three containers connected by two networks in series
I'm running into some issues with routing between docker networks. Hence, I broke the problem down into a simpler case but it is still not working. Can you tell me what I am doing wrong?
The Setup
...
0
votes
1
answer
152
views
How do Change behaviour of the side buttons on my mouse?
I have two mice. One is a Logitech MX Anywhere 3. The other is a Lenovo Pro Bluetooth Mouse.
They both the normal two buttons, a single clickable vertical scroll wheel and two extra buttons on the ...
0
votes
1
answer
41
views
Conflicting settings value for Nixos service when defined within Nixos declarative containers
Within my nixos config I have a container defined:
containers.finderdbreplica = {
config = { config, pkgs, ... }:
{
services.postgresql = {
...
services.postgresql = {
...
0
votes
0
answers
116
views
Why does running openvpn fail here?
I am following https://protonvpn.com/support/linux-openvpn to use it on NixOS.
First, install openvpn and openresolv in a nix shell
$ nix-shell -p openvpn openresolv
these 4 paths will be fetched (3....
1
vote
0
answers
66
views
cooling system malfunctioning while using NixOS [closed]
My cooling system isn't functioning properly on NixOS. I checked the hardware monitor on MSI motherboard but I can't see anything which allows me to adjust fan settings.
how do I create a custom ...
0
votes
0
answers
58
views
How to speed up full man DB search?
man-db's man --global-apropos/man -k is slow. man --global-apropos --where RestrictNamespaces takes around 30 seconds on a fairly beefy laptop with an NVMe. Compare to find $(manpath | tr : '\n') -...
0
votes
0
answers
116
views
Best practices to install binaries inside nix-shell
I'm preparing a Nix derivation for tenv version manager.
Steps nix-build and nix-shell work fine, I can run tenv inside the nix-shell.
But the purpose of tenv is installing needed versions of binaries ...
0
votes
0
answers
53
views
Why do most linux distros fail and put me into emergency shell?
I have tried to install both Arch (archinstall and classic method) and NixOS many times. The installer works fine for both, though I had to use the gnome installer for NixOS. I will copy all of my ...
1
vote
1
answer
146
views
How is it possible for dconf and gsettings to disagree about a setting?
While investigating this issue I ran into something really weird:
❯ gsettings get org.gnome.desktop.wm.preferences num-workspaces
4
❯ dconf read /org/gnome/desktop/wm/preferences/num-workspaces
'1'
...
0
votes
1
answer
113
views
nixos live usb boot stuck at Probing EDD (edd=off to disable)... ok
When trying to boot from a NixOS live usb with 23.11, gnome for x86_64:
On a Asus C236 WSI Motherboard with this BIOS:
$ ls -l /sys/class/dmi/id/bios* ...
1
vote
1
answer
365
views
How to revert NixOS channel version back to the version used in specific boot entry (generation)?
I'm running NixOS unstable, and I've done nixos-rebuild boot --upgrade few times, and figured out some app is broken. It is probably some temporary incompatibility / breaking change in dependencies, ...
0
votes
0
answers
28
views
nixos and application versions state conflicts
I have been getting into the warm waters of Nixos...
One of the questions the Nixos document does not appear to address is application state. There is, of course, application configuration, which is ...
0
votes
1
answer
815
views
How do I Get My Fingerprint Sensor to work with SDDM Login in NixOS (Plasma 6)
My fingerprint sensor works fine, in fact it works quite well except when it comes to SDDM. I use fprintd and systemd.
I have looked online for solutions, one involved changing some code in a systemd ...
0
votes
0
answers
323
views
`No such file or directory:` ruff. but file exists
I am using nixOS and I have a flake.nix. I use pre-commit to run ruff.
my pre-commit config:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
...
-1
votes
1
answer
65
views
using rsync to measure difference between filesystems?
I'm running some expiriments to test filesystem differences, for example upgrading an older nixOS version and newer one to the same flake/configuration, as well as the same with debian and ansible. I'...
0
votes
0
answers
13
views
Disable hibernate until next reboot
I have a dedicated GPU on my laptop (Microsoft Surface Book 1) which is running nixos, with systemd. The GPU is detachable and power management is a bit of a mess. So I have a script that awakens the ...
0
votes
0
answers
86
views
Unlocking only specific ZFS datasets at boot
I have the following datasets in a ZFS pool:
NAME USED AVAIL REFER MOUNTPOINT
rpool 3.68G 185G 192K none
rpool/FOO 3.43M 185G 192K none
...
0
votes
0
answers
173
views
os-prober finds nixos, but it doesn't appear in grub menu
If I run update-grub it sees all the OSes on my machine (Mint, Windows (work), Windows (games) and NixOs):
➜ ~ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/...
0
votes
0
answers
253
views
How to debug Wake-on-lan not working sometimes?
Could somebody point me to any strategies for debugging wake-on-lan?
I use nixOS, gnome, sometimes and put my desktop to suspend via the corner menu, sometimes it goes to suspend via inactivity.
...
0
votes
0
answers
489
views
Configure vscode in Nixos
My Nixos uses tmpfs as the root filesystem, and I want to configure VSCode in Home Manager. I want to ask you, which files or folders should VSCode persist?
vscode.nix:
{ pkgs
, ...
} @ args:
{
...
0
votes
1
answer
307
views
NixOS rebuild fails because some directories according to NIX_PATH do not exist
When I try to rebuild NixOS, it fails because it can't find some directories according to NIX_PATH. This happens since I tried to switch to the channel nixos-unstable from 23.11 and accidentally added ...
0
votes
0
answers
164
views
Nautilus / Gnome Files says there is no app installed for any file type unless launched from console
As the title says. I can't open any file using nautilus.
When I click on Select App on the dialog above it shows some irrelevant applications instead of Gnome Text Editor, for example. (Of course I ...
1
vote
1
answer
82
views
Use axel to get source instead curl for fetchurl in NixOS
I'm trying to start a shell with Cuda. I have following shell.nix file
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
name = "cuda-env-shell";
buildInputs = with pkgs; [
...
0
votes
0
answers
38
views
NixOS Postgresql authentication not being updated
I have the following snippet in my configuration.nix:
services.postgresql = {
enable = true;
authentication = lib.mkForce ''
# GENERATED
host all all 0.0.0.0/0 md5
host all ...
0
votes
2
answers
115
views
Sometimes printing is completed without printing
I have a Brother laser printer DCP-1612W and when I print some PDFs with images the job is flagged as completed even if nothing was printed (but the printer makes some noise).
I'm using brlaser driver....
-1
votes
1
answer
105
views
Is it necessary to update the channel before rebuild switch?
https://nixos.org/manual/nixos/stable/#sec-ad-hoc-packages says
Packages come from the NixOS channel. You typically upgrade a package
by updating to the latest version of the NixOS channel:
$ nix-...
0
votes
0
answers
603
views
Ignoring XDG_SESSION_TYPE=wayland on Gnome trying to run Rescuetime on NixOS
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use
QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Y tried
QT_QPA_PLATFORM=wayland rescuetime
QT_QPA_PLATFORM=xcb rescuetime
But I have the ...
-2
votes
1
answer
78
views
How should this table of dependencies be read? [closed]
https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-reference says
A dependency is said to be propagated when some of its
other-transitive (non-immediate) downstream dependencies also ...
-1
votes
2
answers
144
views
How shall I understand dependency propagated? [closed]
https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-reference says
A dependency is said to be propagated when some of its other-transitive (non-immediate) downstream dependencies also ...
0
votes
1
answer
64
views
Does nix-build affect user environment?
nix-env for installation and uninstallation of a package doesn't change the current user environment, but creates a new one.
nix-build builds a derivation, which can also install a package. Does it ...
1
vote
1
answer
241
views
How can this binary install be done in NixOS?
https://calibre-ebook.com/download_linux says
calibre has a binary install that includes private versions of all its
dependencies. It runs on 32-bit and 64-bit Intel compatible machines.
To install ...
0
votes
1
answer
319
views
NixOS <crypt.h> missing when installing a Perl module from CPAN
I'm fairly new to NixOS, but I'm trying to install App::cpm from CPAN.
I run the following:
cpan -i App::cpm
It chugs for a little bit then, it fails on Build::Tiny:
crypt.h: No such file or ...
-2
votes
1
answer
139
views
What do "derivation" and "build" mean?
The manpage of nix-build says:
The nix-build command builds the derivations described by the Nix expressions in paths.
What does "derivation" mean? Is it the same as "package"? ...
1
vote
0
answers
117
views
What relationship and difference are between `nix-env --install` and `nix-build`?
What relationship and difference are between nix-env --install and nix-build?
Does nix-env --install build the derivatives specified to it, i.e. perform the job of nix-build?
2
votes
0
answers
594
views
Randomly loosing Internet connection after a few minutes/hours in Linux / NixOS
I have been dual-booting Linux for about three weeks now, and this issue is keeping me from fully switching because I have to reboot my computer approximately every hour. On Linux, I experience random ...
1
vote
1
answer
696
views
How to configure ANSI text colors for NixOS console?
I'm on NixOS-unstable (as of 2023 Oct 1st). How can I configure the text colors for the default NixOS console, as the terminal supports ANSI?
I tested what the colors look like by installing text-ansi ...
1
vote
1
answer
213
views
How to ensure that NixOS configuration will build or use the same package versions in the future?
In Software packaging and distribution for LHCb using Nix, the authors write:
In order to facilitate this use, software must be stable for long
periods; much longer than even Long Term Support ...
0
votes
1
answer
154
views
How to add documentation to Git package in NixOS?
git help some-alias prints the alias configuration value, for example:
$ git help aliases
'aliases' is aliased to '!git config --get-regexp '^alias\.' | cut --delimiter=. --fields 2-'
I'd like to ...
0
votes
1
answer
172
views
How to get a map of filename without extension to file contents from a directory path in configuration.nix?
Basically, I want to pull my config.programs.config.alias entries into separate .bash files and read them dynamically when building the configuration. A representative subset of the current ...
1
vote
0
answers
339
views
NixOS, Can't get display to work from 4070 TI and Boot into Text caused by Enabling Nvidia Video Drivers
I’m trying to set up my new build to use the GPU for the display output instead of the built-in display of the motherboard and I can’t seem to get it to work. That is to say that when I plug in a ...