Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
6
votes
1
answers
5022
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][1], but after `sudo nixos-rebuild switch` I'm still able to `su -` with the old password. [1]: https://gitlab.com/victor-engmark...
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-rebuild switch
I'm still able to su -
with the old password.
l0b0
(53368 rep)
Jul 23, 2019, 10:09 AM
• Last activity: Jul 30, 2025, 07:04 PM
6
votes
3
answers
2372
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](https://github.com/NixOS/nixos-hardware/pull/207#issuecomment-727668837) and [Arch](https://wiki.arch...
## 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](https://github.com/NixOS/nixos-hardware/pull/207#issuecomment-727668837) and [Arch](https://wiki.archlinux.org/index.php/Dell_XPS_13_(9310)) have reported Bluetooth working with this model, however, I'm having difficulty finding the right kernel configuration necessary to get this working on NixOS.
## My Configuration
I have enabled the following kernel configuration params with the following patch added to
boot.kernelPatches
in my nix configuration:
# Extra config required for Bluetooth.
{
name = "enable-qca6390-bluetooth";
patch = null;
extraConfig = ''
BT_QCA m
BT_HCIBTUSB m
BT_HCIBTUSB_AUTOSUSPEND y
BT_HCIUART m
BT_HCIUART_QCA y
'';
}
I'm loading the related modules like so:
boot.kernelModules = [ "bluetooth" "btqca" "btusb" "hci_qca" "hci_uart" ];
It should go without saying that I have:
hardware.bluetooth.enable = true;
I also have:
hardware.enableRedistributableFirmware = true;
which, enables the [firmwareLinuxNonfree
](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/all-firmware.nix#L46) package, which in turn adds the firmware from the [linux-firmware](https://github.com/NixOS/nixpkgs/blob/a1ea95ba042964875bdb985d70934aca19ba0c6e/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix#L8) repo, which in turn includes the [necessary QCA firmware](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca) .
## The Problem
This firmware can be observed being loaded in the dmesg
output of two separate Ubuntu users [here](https://github.com/NixOS/nixos-hardware/pull/207#issuecomment-727860836) and [here](https://askubuntu.com/questions/1299154/dell-xps-13-9310-bluetooth-wont-find-anything) , both of which report working Bluetooth. However, I am unable to observe it being loaded in mine.
For reference, here is the dmesg
output from a user with working Bluetooth:
[ 2.349008] Bluetooth: Core ver 2.22
[ 2.349019] Bluetooth: HCI device and connection manager initialized
[ 2.349023] Bluetooth: HCI socket layer initialized
[ 2.349024] Bluetooth: L2CAP socket layer initialized
[ 2.349028] Bluetooth: SCO socket layer initialized
[ 2.394642] Bluetooth: HCI UART driver ver 2.3
[ 2.394644] Bluetooth: HCI UART protocol H4 registered
[ 2.394645] Bluetooth: HCI UART protocol BCSP registered
[ 2.394654] Bluetooth: HCI UART protocol LL registered
[ 2.394655] Bluetooth: HCI UART protocol ATH3K registered
[ 2.394660] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 2.394702] Bluetooth: HCI UART protocol Intel registered
[ 2.394734] Bluetooth: HCI UART protocol Broadcom registered
[ 2.394742] Bluetooth: HCI UART protocol QCA registered
[ 2.394743] Bluetooth: HCI UART protocol AG6XX registered
[ 2.394748] Bluetooth: HCI UART protocol Marvell registered
[ 2.416321] Bluetooth: hci0: setting up ROME/QCA6390
[ 2.420348] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2.444937] Modules linked in: snd_pcm qrtr ns snd_seq_midi snd_seq_midi_event ath11k_pci(+) mhi snd_rawmidi ath11k hci_uart qmi_helpers btqca i915(+) snd_seq btrtl uvcvideo mac80211 snd_seq_device btbcm btintel snd_timer videobuf2_vmalloc dell_wmi drm_kms_helper input_leds videobuf2_memops dell_smbios videobuf2_v4l2 cec dcdbas snd efi_pstore serio_raw rc_core videobuf2_common hid_sensor_als i2c_algo_bit hid_sensor_trigger ucsi_acpi(+) cfg80211 fb_sys_fops industrialio_triggered_buffer processor_thermal_device typec_ucsi dell_wmi_descriptor kfifo_buf hid_sensor_iio_common intel_rapl_common soundcore industrialio wmi_bmof videodev mei_me libarc4 syscopyarea cros_ec_ishtp 8250_dw mc hid_multitouch sysfillrect mei cros_ec sysimgblt intel_soc_dts_iosf typec mac_hid bluetooth ecdh_generic ecc int3403_thermal int340x_thermal_zone acpi_pad intel_hid acpi_tad int3400_thermal acpi_thermal_rel sparse_keymap sch_fq_codel parport_pc ppdev drm lp parport ip_tables x_tables autofs4 hid_sensor_hub
[ 2.756645] Bluetooth: hci0: QCA Product ID :0x00000010
[ 2.756647] Bluetooth: hci0: QCA SOC Version :0x400a0200
[ 2.756647] Bluetooth: hci0: QCA ROM Version :0x00000200
[ 2.756648] Bluetooth: hci0: QCA Patch Version:0x00000d2b
[ 2.756650] Bluetooth: hci0: QCA controller version 0x02000200
[ 2.756651] Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv
[ 3.584055] Bluetooth: hci0: QCA Downloading qca/htnv20.bin
[ 3.777754] Bluetooth: hci0: QCA setup on UART is completed
[ 3.998318] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 3.998319] Bluetooth: BNEP filters: protocol multicast
[ 3.998321] Bluetooth: BNEP socket layer initialized
[ 14.108234] Bluetooth: RFCOMM TTY layer initialized
[ 14.108238] Bluetooth: RFCOMM socket layer initialized
[ 14.108242] Bluetooth: RFCOMM ver 1.11
And here is the output of dmesg | grep -i blue
on my machine:
[ 4.363188] Bluetooth: Core ver 2.22
[ 4.363199] Bluetooth: HCI device and connection manager initialized
[ 4.363201] Bluetooth: HCI socket layer initialized
[ 4.363203] Bluetooth: L2CAP socket layer initialized
[ 4.363205] Bluetooth: SCO socket layer initialized
[ 4.379230] Bluetooth: HCI UART driver ver 2.3
[ 4.379231] Bluetooth: HCI UART protocol H4 registered
[ 4.379232] Bluetooth: HCI UART protocol BCSP registered
[ 4.379238] Bluetooth: HCI UART protocol LL registered
[ 4.379256] Bluetooth: HCI UART protocol Intel registered
[ 4.379260] Bluetooth: HCI UART protocol QCA registered
[ 20.090546] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 20.090553] Bluetooth: BNEP socket layer initialized
As you can see, my Bluetooth setup never performs this step or any of the following hci0
steps:
[ 2.416321] Bluetooth: hci0: setting up ROME/QCA6390
Unsurprisingly, as a result, I'm unable to enable Bluetooth in my GNOME settings GUI, and bluetoothctl
shows nothing:
$ bluetoothctl list
$ bluetoothctl devices
No default controller available
## Questions
From my understanding, the firmware should be automatically loaded in the case that BT_QCA
is enabled and the firmware exists, both of which should be happening as a result of my aforementioned nix configuration.
Is this assumption correct?
Am I missing a necessary step required to trigger the hci0
lines shown above?
Any advice or ideas on how to progress would be greatly appreciated!
## System info
$ nix-shell -p nix-info --run "nix-info -m"
- system: "x86_64-linux"
- host os: Linux 5.10.2, NixOS, 21.03pre259798.84917aa00bf (Okapi)
- multi-user?: yes
- sandbox: yes
- version: nix-env (Nix) 2.3.10
- channels(root): "nixos-21.03pre259798.84917aa00bf, home-manager-20.09"
- nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
$ lsmod | grep -i bt
btusb 57344 0
btrtl 24576 1 btusb
btbcm 20480 1 btusb
btintel 28672 2 hci_uart,btusb
btqca 20480 1 hci_uart
bluetooth 589824 13 btrtl,btqca,btintel,hci_uart,btbcm,bnep,btusb
usbcore 270336 5 xhci_hcd,usbhid,uvcvideo,btusb,xhci_pci
$ lspci
00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 01)
00:04.0 Signal processing controller: Intel Corporation Device 9a03 (rev 01)
00:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller (rev 01)
00:07.0 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt PCI Express Root Port #0 (rev 01)
00:07.2 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt PCI Express Root Port #2 (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Device 9a0d (rev 01)
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt USB Controller (rev 01)
00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt NHI #0 (rev 01)
00:0d.3 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt NHI #1 (rev 01)
00:12.0 Serial controller: Intel Corporation Tiger Lake-LP Integrated Sensor Hub (rev 20)
00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20)
00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 (rev 20)
00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 (rev 20)
00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20)
00:19.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #4 (rev 20)
00:19.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #5 (rev 20)
00:1c.0 PCI bridge: Intel Corporation Device a0b8 (rev 20)
00:1d.0 PCI bridge: Intel Corporation Device a0b3 (rev 20)
00:1e.0 Communication controller: Intel Corporation Tiger Lake-LP Serial IO UART Controller #0 (rev 20)
00:1f.0 ISA bridge: Intel Corporation Tiger Lake-LP LPC Controller (rev 20)
00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
01:00.0 Non-Volatile memory controller: Toshiba Corporation Device 011a
56:00.0 Unassigned class [ff00]: Qualcomm Device 1101
57:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01)
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0c45:672a Microdia Integrated_Webcam_HD
Bus 003 Device 002: ID 27c6:533c Shenzhen Goodix Technology Co.,Ltd. FingerPrint
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
## Further Reference
In case they help as a reference, here are the links to the default kernel configurations for [NixOS](https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/common-config.nix) , [Debian](https://salsa.debian.org/kernel-team/linux/blob/master/debian/config/config) and [Arch](https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux) .
Here is my WIP [PR](https://github.com/NixOS/nixos-hardware/pull/207) aimed at adding support for the XPS 9310 to NixOS that will include this work.
Here is [my previous post](https://discourse.nixos.org/t/how-to-include-and-use-external-firmware-in-nixos-config-bluetooth-for-qca6390/10471/3) to the NixOS discourse forum asking for help with this issue, yet to receive a response as of writing this.
mindTree
(263 rep)
Dec 29, 2020, 12:39 AM
• Last activity: Jul 30, 2025, 05:58 AM
5
votes
0
answers
348
views
What does it mean to "cancel" a command in the linux kernel and how can one do so?
### Context I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by `lsusb` as `ID 33fa:0010 USB2.0-BT`, but is not detected by KDE/Plasma's bluetooth daemon. I dug deeper and found an [Ubuntu bug report][1] with the exact same problem and diagnosis as me. As of t...
### Context
I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by
lsusb
as ID 33fa:0010 USB2.0-BT
, but is not detected by KDE/Plasma's bluetooth daemon.
I dug deeper and found an Ubuntu bug report with the exact same problem and diagnosis as me. As of today, the last post links to an AskUbuntu post with a vexingly vague answer:
> I patch my kernel source to cancel command hci_read_local_ext_features
in the hci_init2[]
and hci_init3[]
in file hci_sync.c
. It worked.
So, I downloaded and unpacked the 6.15.7 kernel source from cdn.kernel.org , opened the corresponding file in Keta... and was lost like a lamb.
Question: What does it mean to "cancel" a command in the linux kernel and how can one do so?
Please, do tell me if my question is too vague or whether more information should be provided.
Seth Martin
(51 rep)
Jul 26, 2025, 02:21 AM
• Last activity: Jul 27, 2025, 01:45 AM
4
votes
2
answers
3231
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` takes quite a few seconds to run. Is there a quicker alternative to rebuild just a subset of my Nixo...
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
takes quite a few seconds to run. Is there a quicker alternative to rebuild just a subset of my Nixos configuration? I did notice a --fast
parameter - however this does not seem to make much of any difference.
Chris Stryczynski
(6603 rep)
Feb 16, 2019, 11:32 AM
• Last activity: Jul 24, 2025, 07:07 PM
0
votes
0
answers
52
views
Problem with touchpad lag running Linux on X1 carbon gen 7
I bought this second hand laptop one month ago (Lenovo X1 carbon gen7) and I started installing Arch Linux on it and I noticed there was a problem with the touch pad. The touchpad works at the end but lags something and the feeling is not smooth as it has to be normally, I cannot explain my issue be...
I bought this second hand laptop one month ago (Lenovo X1 carbon gen7) and I started installing Arch Linux on it and I noticed there was a problem with the touch pad. The touchpad works at the end but lags something and the feeling is not smooth as it has to be normally, I cannot explain my issue better than this. So now I tried another OS, I'm trying NixOS and I still have the same issue.I also tried to change battery cause maybe the old battery could cause some issues but nothing. So I decided to ask you that maybe you know what can be the problem.
From the dmesg --level=err,warn I got the following:
[ 0.281813] Transient Scheduler Attacks: MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.
[ 0.700594] pnp 00:09: disabling [mem 0x000c0000-0x000c3fff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[ 0.700601] pnp 00:09: disabling [mem 0x000c8000-0x000cbfff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[ 0.700605] pnp 00:09: disabling [mem 0x000d0000-0x000d3fff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[ 0.700608] pnp 00:09: disabling [mem 0x000d8000-0x000dbfff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[ 0.847790] hpet_acpi_add: no address or irqs in _CRS
[ 0.881477] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[ 3.262763] booting system configuration /nix/store/rh1r691mrs6v1hzrz7vdiwr7jscr6965-nixos-system-nixos-25.05.806427.32a4e8794210
[ 4.637919] resource: resource sanity check: requesting [mem 0x00000000fed10000-0x00000000fed15fff], which spans more than pnp 00:06 [mem 0xfed10000-0xfed13fff]
[ 4.637923] caller snb_uncore_imc_init_box+0x86/0xe0 [intel_uncore] mapping multiple BARs
[ 4.944104] i801_smbus 0000:00:1f.4: SMBus is busy, can't use it!
[ 5.125487] iwlwifi 0000:00:14.3: WRT: Overriding region id 0
[ 5.125492] iwlwifi 0000:00:14.3: WRT: Overriding region id 1
[ 5.125494] iwlwifi 0000:00:14.3: WRT: Overriding region id 2
[ 5.125496] iwlwifi 0000:00:14.3: WRT: Overriding region id 3
[ 5.125498] iwlwifi 0000:00:14.3: WRT: Overriding region id 4
[ 5.125500] iwlwifi 0000:00:14.3: WRT: Overriding region id 6
[ 5.125502] iwlwifi 0000:00:14.3: WRT: Overriding region id 8
[ 5.125504] iwlwifi 0000:00:14.3: WRT: Overriding region id 9
[ 5.125506] iwlwifi 0000:00:14.3: WRT: Overriding region id 10
[ 5.125508] iwlwifi 0000:00:14.3: WRT: Overriding region id 11
[ 5.125510] iwlwifi 0000:00:14.3: WRT: Overriding region id 15
[ 5.125512] iwlwifi 0000:00:14.3: WRT: Overriding region id 16
[ 5.125514] iwlwifi 0000:00:14.3: WRT: Overriding region id 18
[ 5.125516] iwlwifi 0000:00:14.3: WRT: Overriding region id 19
[ 5.125518] iwlwifi 0000:00:14.3: WRT: Overriding region id 20
[ 5.125519] iwlwifi 0000:00:14.3: WRT: Overriding region id 21
[ 5.125522] iwlwifi 0000:00:14.3: WRT: Overriding region id 28
[ 5.223140] spi-nor spi0.0: supply vcc not found, using dummy regulator
[ 5.781228] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred
[ 6.890891] Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.
[ 7.941680] nvme nvme0: using unchecked data buffer
[ 51.874573] intel_pch_thermal 0000:00:12.0: CPU-PCH current temp [58C] higher than the threshold temp [50C], S0ix might fail. Start cooling...
[ 60.615650] intel_pch_thermal 0000:00:12.0: Wakeup event detected, abort cooling
[ 153.163522] intel_pch_thermal 0000:00:12.0: CPU-PCH current temp [50C] higher than the threshold temp [50C], S0ix might fail. Start cooling...
[ 2611.805595] warning: `ThreadPoolForeg' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
Where the error is just:
[ 4.944104] i801_smbus 0000:00:1f.4: SMBus is busy, can't use it!
If you can help me also to understand how to diagnose and solve these problems it would be really nice, thanks in advance.
---
I also tried to blacklisted the i2c_i801 module and the error doesn't appear anymore but the lag of the touchpad still persist.
---
After three days of work I realize that maybe the problem of SMBus has nothing to do with the touchpad. And the problem with the touchpad is another one but I really cannot solve it. I can show you the journalctl -p 3 results:
lug 22 19:11:28 nixos kernel: i801_smbus 0000:00:1f.4: SMBus is busy, can't use it!
lug 22 19:13:17 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details
lug 22 19:13:25 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details
lug 22 19:13:26 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details
lug 22 19:15:44 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details
lug 22 19:17:01 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.27.1/touchpad-jumping-cursors.html for details
lug 22 19:17:01 nixos kwin_wayland: kwin_libinput: Libinput: event12 - SYNA8005:00 06CB:CD8C Touchpad: WARNING: log rate limit exceeded (5 msgs per 24h). Discarding future messages.
So, there is this problem with libinput that maybe makes the touchpad lagging. Please help me :(.
michael pasqui
(101 rep)
Jul 17, 2025, 05:07 PM
• Last activity: Jul 22, 2025, 05:53 PM
5
votes
1
answers
2656
views
Java SDK on NixOS for IntelliJ
I have recently installed NixOS on my machine, for Java development I have added IntelliJ CE 14.1.5 and the Oracle JDK 8. However IntelliJ does not automatically recognize the path to the Java SDK readlink -f $(which java) /nix/store/...-oraclejdk-8u60/bin/java when selecting /bin/ in the "Select Ho...
I have recently installed NixOS on my machine,
for Java development I have added IntelliJ CE 14.1.5 and the Oracle JDK 8.
However IntelliJ does not automatically recognize the path to the Java SDK
readlink -f $(which java)
/nix/store/...-oraclejdk-8u60/bin/java
when selecting /bin/ in the "Select Home Directory for JDK" it does not accept it.
I have been searching around for some time now but I can't really find the right stuff to get it working.
Any help is appreciated.
user138984
(51 rep)
Oct 17, 2015, 05:54 PM
• Last activity: Jul 19, 2025, 10:04 AM
0
votes
1
answers
2047
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 handshake initiation to peer 1 (192.248.152.91:58338) This seems to work correctly if I set allowed IPs t...
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 handshake initiation to peer 1 (192.248.152.91:58338)
This seems to work correctly if I set allowed IPs to something other than
0.0.0.0
- my understanding is it will only send connections to these ips via the wireguard VPN.
networking.firewall = {
enable = false;
};
# Enable Wireguard
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.66.66.2/32" ];
listenPort = 58338; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
privateKey= "************************";
peers = [
{
publicKey = "***************";
presharedKey = "*****************";
allowedIPs = [ "0.0.0.0/0" ];
#allowedIPs = [ "10.66.66.1" "94.130.178.87" ];
endpoint = "192.248.152.91:58338"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
persistentKeepalive = 25;
}
];
};
};
I've read through https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577/4 however even after adding an ip route with ip route add 192.248.152.91 via 10.66.66.1 dev wg0
it does not seem to have any change in behaviour.
root@nixos> ip route ~
default dev wg0 scope link
default via 10.0.2.2 dev eth0 proto dhcp src 10.0.2.15 metric 202
10.0.2.0/24 dev eth0 proto dhcp scope link src 10.0.2.15 metric 202
192.248.152.91 via 10.66.66.1 dev wg0
Chris Stryczynski
(6603 rep)
Mar 7, 2021, 12:14 PM
• Last activity: Jul 15, 2025, 01:00 PM
-2
votes
0
answers
46
views
Deleting immutable distro
I was using windows and tried to install nixos on my external hard drive. After some problems with partitioning the drive stopped being bootable. I want to erase the drive and continue using it but windows does not let me do anything with it because it is read only now. Is there any way to reset it?
I was using windows and tried to install nixos on my external hard drive.
After some problems with partitioning the drive stopped being bootable. I want to erase the drive and continue using it but windows does not let me do anything with it because it is read only now. Is there any way to reset it?
Andrey Maerov
(1 rep)
Jul 8, 2025, 11:38 AM
2
votes
2
answers
681
views
NixOS: Ensure root-level folder exists
At work we tend to keep our large code workspaces under a /scratch folder. Is there a NixOS option to declare such a folder/file should exist? I know about environment.etc which will setup symlink from /etc into the nix store. Otherwise I'd have to resort to declare some systemd boot-up script, doin...
At work we tend to keep our large code workspaces under a /scratch folder.
Is there a NixOS option to declare such a folder/file should exist?
I know about environment.etc which will setup symlink from /etc into the nix store.
Otherwise I'd have to resort to declare some systemd boot-up script, doing mkdir -p and so on - which feels ugly.
eisbaw
(121 rep)
Jul 22, 2022, 08:30 AM
• Last activity: Jul 7, 2025, 01:58 PM
20
votes
4
answers
27628
views
How to auto mount / permanently mount external devices on NixOS
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using `ntfs-3g` in `/mnt`. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that. In NixOS, how should one set up a...
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using
ntfs-3g
in /mnt
. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that.
In NixOS, how should one set up automounting of external partitions, preferably using configuration.nix
?
stefkin
(338 rep)
Jun 30, 2015, 06:50 PM
• Last activity: Jul 7, 2025, 01:56 PM
0
votes
0
answers
93
views
Suspend fails because of the wifi module
When trying to suspend my laptop (HP Elitebook X G1a) with `systemctl suspend` or closing the lid it turns off the screen and back on again a few times before giving up. I'm using NixOS with a 6.12.32 kernel, with Hyprland, but it also happens on TTY. Unloading the module with `modprobe -r mt7925e`...
When trying to suspend my laptop (HP Elitebook X G1a) with
systemctl suspend
or closing the lid it turns off the screen and back on again a few times before giving up.
I'm using NixOS with a 6.12.32 kernel, with Hyprland, but it also happens on TTY.
Unloading the module with modprobe -r mt7925e
enables the suspend to complete, but I'd rather see why it doesn't work by itself. Also have the latest bios updates for my laptop. Hardware probe says the chip "works" and is supported since 6.7
I also tried using 6.14 and 6.15, adding acpi kernel params
I tried a lot of things, but I can't seem to find a solution.
Thanks in advance!
This is the output of journalctl -p err
when trying to suspend
Jul 03 16:44:00 barlow kernel: mt7925e 0000:c2:00.0: Message 00020007 (seq 1) timeout
Jul 03 16:44:00 barlow kernel: mt7925e 0000:c2:00.0: PM: pci_pm_suspend(): mt7925_pci_suspend [mt7925e] returns -110
Jul 03 16:44:00 barlow kernel: mt7925e 0000:c2:00.0: PM: dpm_run_callback(): pci_pm_suspend returns -110
Jul 03 16:44:00 barlow kernel: mt7925e 0000:c2:00.0: PM: failed to suspend async: error -110
Jul 03 16:44:00 barlow kernel: PM: Some devices failed to suspend, or early wake event detected
Jul 03 16:44:05 barlow kernel: mt7925e 0000:c2:00.0: Message 00020007 (seq 2) timeout
Jul 03 16:44:05 barlow kernel: mt7925e 0000:c2:00.0: PM: pci_pm_suspend(): mt7925_pci_suspend [mt7925e] returns -110
Jul 03 16:44:05 barlow kernel: mt7925e 0000:c2:00.0: PM: dpm_run_callback(): pci_pm_suspend returns -110
Jul 03 16:44:05 barlow kernel: mt7925e 0000:c2:00.0: PM: failed to suspend async: error -110
Jul 03 16:44:05 barlow kernel: PM: Some devices failed to suspend, or early wake event detected
Jul 03 16:44:05 barlow systemd-sleep: Failed to put system to sleep. System resumed again: Connection timed out
Jul 03 16:44:05 barlow systemd: Failed to start System Suspend.
Niko
(1 rep)
Jul 3, 2025, 03:01 PM
2
votes
2
answers
3285
views
In NixOS, is there a way to use Rofi instead of Dmenu when invoking Passmenu?
I'm using the `pass` package for password management. The `passmenu` command that comes with it uses `dmenu`, but I'd like for it to use Rofi instead. I saw [on the Arch wiki](https://wiki.archlinux.org/index.php/Rofi#Rofi_as_dmenu_replacement) that it's possible to use rofi as a drop-in dmenu repla...
I'm using the
pass
package for password management. The passmenu
command that comes with it uses dmenu
, but I'd like for it to use Rofi instead. I saw [on the Arch wiki](https://wiki.archlinux.org/index.php/Rofi#Rofi_as_dmenu_replacement) that it's possible to use rofi as a drop-in dmenu replacement, but the path structures of NixOS are so complex that I'm having a hard time figuring this out. Should I create a new package for it? Or is there a way to update [the original pass package](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/pass/default.nix) so that it uses rofi instead?
Jonathan
(1330 rep)
Sep 11, 2018, 04:28 PM
• Last activity: Jun 30, 2025, 07:03 AM
30
votes
3
answers
20144
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?
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?
Chris Stryczynski
(6603 rep)
Dec 17, 2018, 03:32 PM
• Last activity: Jun 19, 2025, 10:36 PM
0
votes
1
answers
43
views
Making library available in NixOS to build makefile projects
I want to install the python package `wolfcrypt` under a python virtual environment (venv) as a one-off test to build a bootloader using wolfBoot As many other python packages, it requires the python header files to bind and link properly. This is usually find as the package `python-dev` in debian o...
I want to install the python package
wolfcrypt
under a python virtual environment (venv) as a one-off test to build a bootloader using wolfBoot
As many other python packages, it requires the python header files to bind and link properly. This is usually find as the package python-dev
in debian or python-devel
on red hat distros.
Do I have to write a .nix
file to do this one-off test?
I know I am [supposed to use nix-shell
](https://discourse.nixos.org/t/explain-how-do-system-c-libraries-and-headers-are-located/53669/2) in some capacity, but I simply don't understand where to get the libraries from and how to have them available when building the project.
I use nix-shell -p
to solve these kind of troubles usually, but I cannot find the package for the python library or the other libraries I need.
What is the simplest way to get references to those libs and perform a build with make
, or in my case a pip install wolfcrypt
?
Thank you for your time
AlexLoss
(183 rep)
May 7, 2025, 09:19 PM
• Last activity: May 22, 2025, 09:42 AM
0
votes
1
answers
3085
views
How to properly set QT_STYLE_OVERRIDE env var in GNOME on NixOS?
I have a question about theming for Qt apps on Gnome. I'm running NixOS with Gnome, using Home Manager and Flakes. My theme is Adwaita-dark, but I've noticed that some Qt apps such as VLC do not have a dark theme applied. I tried tweaking all `qt` related settings in `home.nix`, but it didn't work....
I have a question about theming for Qt apps on Gnome.
I'm running NixOS with Gnome, using Home Manager and Flakes. My theme is Adwaita-dark, but I've noticed that some Qt apps such as VLC do not have a dark theme applied.
I tried tweaking all
qt
related settings in home.nix
, but it didn't work.
I got a clue to what the issue was when I ran qt5ct
and it showed this message:
Please remove the QT_STYLE_OVERRIDE environment variable (current value: adwaita).
The QT_QPA_PLATFORMTHEME environment variable is not set correctly (current value: gnome, required value: qt5ct).
I finally found a workaround by adding the following to configuration.nix
:
environment.variables = {
"QT_STYLE_OVERRIDE" = pkgs.lib.mkForce "adwaita-dark";
};
And now it works, Qt apps have the dark theme.
However, this feels like a messy hack and I'd like to understand how to do it properly, if possible. Has anyone dealt with this before?
user22311319
(1 rep)
Jul 30, 2023, 11:23 PM
• Last activity: May 18, 2025, 01:03 PM
5
votes
1
answers
2496
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 {}; in { environment.systemPackages = [ unstable-pkgs.chromium ] } This shows that `import {};` stands in for `pkgs` in my configuration, but what if I want to do the same thing...
I know that I can install a package from the unstable channel like this:
{ config, pkgs, ... }:
let
unstable-pkgs = import {};
in
{
environment.systemPackages = [ unstable-pkgs.chromium ]
}
This shows that
import {};
stands in for pkgs
in my configuration, but what if I want to do the same thing for programs
or services
?
Matthew Piziak
(442 rep)
Mar 23, 2019, 08:13 AM
• Last activity: May 16, 2025, 06:02 PM
0
votes
0
answers
90
views
Receiving email with OpenSMTPD fails with 550 Invalid recipient
I am trying to set up a mailserver using OpenSMTPD. My configuration is: ``` listen on enp4s0f2 action "save" maildir "/mail/%{rcpt}" match for rcpt-to regex ".*" action "save" ``` /mail is globally rwx. journalctl logs for when an email arrives: ``` Apr 28 08:06:31 greysky smtpd[44423]: info: OpenS...
I am trying to set up a mailserver using OpenSMTPD. My configuration is:
listen on enp4s0f2
action "save" maildir "/mail/%{rcpt}"
match for rcpt-to regex ".*" action "save"
/mail is globally rwx.
journalctl logs for when an email arrives:
Apr 28 08:06:31 greysky smtpd: info: OpenSMTPD 7.5.0-portable starting
Apr 28 08:07:00 greysky smtpd: a99185e682bda8d6 smtp connected address=209.85.218.43 host=mail-ej1-f43.google.com
Apr 28 08:07:01 greysky smtpd: a99185e682bda8d6 smtp failed-command command="RCPT TO:" result="550 Invalid recipient: "
Apr 28 08:07:01 greysky smtpd: a99185e682bda8d6 smtp disconnected reason=quit
where domain.com is the server's domain.
I am using NixOS, in case that is relevant.
Мatthew Kharlip Teytelboym
(1 rep)
Apr 28, 2025, 12:15 PM
• Last activity: Apr 28, 2025, 12:31 PM
6
votes
2
answers
4932
views
cURL does not recognize certificate
At our company they enforce a web proxy which breaks SSL connections and replaces the certificate by its own fake certificate. (To be precise it uses a proxy cert which is signed by the company cert.) In order to download from a https URL I therefore have to make my system trust that fake certificat...
At our company they enforce a web proxy which breaks SSL connections and replaces the certificate by its own fake certificate. (To be precise it uses a proxy cert which is signed by the company cert.)
In order to download from a https URL I therefore have to make my system trust that fake certificate (or disable certificate checking).
I therefore added both the proxy cert and the company cert to both
/etc/ssl/certs/ca-bundle.crt
and /etc/ssl/certs/ca-certificates.crt
. (Both link to the same file.)
Now downloading with wget
works fine, however downloading with curl
does not work, because curl
is not able to verify the certificate:
* Rebuilt URL to: https://company.net/
* Hostname was NOT found in DNS cache
* Trying 172.18.111.111...
* Connected to 172.18.111.111 (172.18.111.111) port 3128 (#0)
* Establish HTTP proxy tunnel to company.net:443
> CONNECT company.net:443 HTTP/1.1
> Host: company.net:443
> User-Agent: curl/7.39.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* Proxy replied OK to CONNECT request
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-bundle.crt
CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* SSL certificate problem: self signed certificate in certificate chain
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
What might be wrong? How can I debug further?
michas
(21862 rep)
Mar 6, 2015, 12:15 PM
• Last activity: Apr 23, 2025, 12:02 PM
1
votes
1
answers
12851
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 sound generating/music library called [csound][1] and I'm seeing a strange issue. I'm using a layer over...
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 sound generating/music library called csound and I'm seeing a strange issue.
I'm using a layer over csound via Haskell; the library is called
csound-expression
and it merely generates a csound file based on some Haskell code, and then runs it via csound.
As per my understanding; csound then routes the audio to Alsa, which on my system, attempts to route it via PulseAudio's default
device.
Now, something strange happens on my system.
1. After a fresh boot, if I run the csound related code, I hear sound. _But_, once I've stopped that piece of code from running, no other application seems to be able to connect to PA anymore. Checking with systemctl --user status pulseaudio.service pulsaudio.socket
reveals that the service is dead and it has exhausted the max. no. of tries to start up.
2. After a fresh boot; if I run some other application, say pavucontrol
; I can now connect to the PA service but my haskell csound code can no longer connect. It instead, exits with:
haskell
λ> dac . osc $ 200
0dBFS level = 32768.0
--Csound version 6.13 (double samples) Jan 1 1970
[commit: none]
libsndfile-1.0.28
UnifiedCSD: tmp.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
Elapsed time at end of orchestra compile: real: 0.001s, CPU: 0.001s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.001s, CPU: 0.001s
displays suppressed
0dBFS level = 1.0
orch now loaded
audio buffered in 256 sample-frame blocks
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
*** Cannot open device 'default' for audio input: Connection refused
Failed to initialise real time audio input
inactive allocs returned to freespace
end of score. overall amps: 0.00000
overall samples out of range: 0
1 errors in performance
Elapsed time at end of performance: real: 0.169s, CPU: 0.004s
---
In case 1 (above); I see something interesting in the logs but I'm limited by my understanding of how PA works, how Alsa works and how both of these work together:
Dec 16 09:28:16 quasar-nixos-tr systemd: Starting Sound Service...
Dec 16 09:28:16 quasar-nixos-tr pulseaudio: E: [pulseaudio] socket-server.c: bind(): Address already in use
Dec 16 09:28:16 quasar-nixos-tr pulseaudio: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Dec 16 09:28:16 quasar-nixos-tr pulseaudio: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.
Dec 16 09:28:16 quasar-nixos-tr systemd: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 09:28:16 quasar-nixos-tr systemd: pulseaudio.service: Failed with result 'exit-code'.
Dec 16 09:28:16 quasar-nixos-tr systemd: Failed to start Sound Service.
Dec 16 09:28:16 quasar-nixos-tr systemd: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.
Dec 16 09:28:16 quasar-nixos-tr systemd: pulseaudio.service: Scheduled restart job, restart counter is at 4.
Dec 16 09:28:16 quasar-nixos-tr systemd: Stopped Sound Service.
Dec 16 09:28:16 quasar-nixos-tr systemd: Starting Sound Service...
Dec 16 09:28:17 quasar-nixos-tr pulseaudio: E: [pulseaudio] socket-server.c: bind(): Address already in use
Dec 16 09:28:17 quasar-nixos-tr pulseaudio: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Dec 16 09:28:17 quasar-nixos-tr pulseaudio: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Failed with result 'exit-code'.
Dec 16 09:28:17 quasar-nixos-tr systemd: Failed to start Sound Service.
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Dec 16 09:28:17 quasar-nixos-tr systemd: Stopped Sound Service.
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Start request repeated too quickly.
Dec 16 09:28:17 quasar-nixos-tr systemd: pulseaudio.service: Failed with result 'exit-code'.
---
The user here is in the audio
and sound
groups and I'm using NixOS; which likely has no bearing on this issue.
Can anyone help with what could be going on here?
---
Also note that; in case 2; alsamixer
lists all devices correctly.
Idkt
(123 rep)
Dec 16, 2019, 09:19 AM
• Last activity: Apr 20, 2025, 10:00 PM
0
votes
1
answers
52
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 the package, it just builds paho-mqtt (that was referenced there a while ago). Apparently, my nix...
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 the package, it just builds paho-mqtt (that was referenced there a while ago).
Apparently, my nix installation somehow remembers the repository referenced a while ago (paho-mqtt) and always fetches that, regardless of what I actually write as owner and repo.
I have already removed /nix
and reinstalled without any results.
Does anyone have an idea why it fetches the wrong repo?
{
description = "Nix flake for packaging modpoll (a Poetry application) from GitHub";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; # Latest Nixpkgs
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, poetry2nix }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
pname = "modpoll";
version = "1.2.0";
updatedPahoMqtt = pkgs.python3Packages.buildPythonPackage rec {
pname = "dsfsdfsdf";
version = "fghfghfghfghgfh";
format = "setuptools";
src = pkgs.fetchFromGitHub {
owner = "ecsdsddsdse";
repo = "pdsfsdfsdfh";
rev = "sdfsdfsdf";
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rh";
};
};
app = pkgs.python3Packages.buildPythonPackage rec {
inherit version pname;
pyproject = true;
dependencies = [
updatedPahoMqtt
pkgs.python3Packages.poetry-core
];
src = pkgs.fetchPypi rec {
inherit pname version;
sha256 = "sha256-t69tvHqQNeNs3iErcq49Rcq2LtCiQkmNiVxhGZtMaF8=";
};
};
in
{
packages.x86_64-linux.default = app;
};
}
Daniel D.
(65 rep)
Sep 3, 2024, 11:11 AM
• Last activity: Apr 9, 2025, 05:33 PM
Showing page 1 of 20 total questions