Questions tagged [nixos]
NixOS is a Nix-based Linux distribution.
504
questions
0
votes
0
answers
26
views
Error loading a shared library when trying to run a Clojure project in NixOS
I am trying to run a super simple Clojure project in NixOS 23.05.
The project.clj file contains:
(defproject fsm "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url &...
0
votes
1
answer
113
views
How to properly install and configure PyCharm IDE in NixOS?
In NixOS, I have chosen to install pycharm-community via the NixOS configuration adding these lines to configuration.nix:
environment.systemPackages = [
pkgs.jetbrains.pycharm-community
];
...
0
votes
1
answer
51
views
How do I access the nixos (or nix-darwin) config from within a home-manager module?
How do I access the NixOS config from within a home-manager module, imported automatically by home-manager? When I use config, it's home-manager config, not NixOS config.
I have a home-manager module ...
0
votes
1
answer
15
views
NoClassDefFoundError when attempting to use openCV in java while running NixOS
I'm trying to follow a tutorial on the use of openCV in java while also learning how to use NixOS.
I have the following flake:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/...
0
votes
0
answers
56
views
NixOS home-manager ssh config permissions
Having a weird issue with ssh config using the hyper terminal
Using home-manager I set up matchBlocks
home-manager.users.me = { pkgs, ... }: {
programs.ssh.enable = true;
programs.ssh.matchBlocks =...
1
vote
1
answer
66
views
How to create an ad-hoc NixOS package in configuration.nix
I'm trying to use a NixOS package that crashes upon starting. I checked the source, it appears to derive from the .deb release. The application's provider also offers an AppImage that I'd like to ...
0
votes
0
answers
36
views
NixOS Matrix Synapse
I played around with my configs and got a running synapse homeserver on NixOS.
The federation tester say everthing is ok.
I want to register a new user I got the following Error Message:
ERROR! ...
1
vote
0
answers
70
views
Setting up python env for development and debugging in nixos
I have jumped the ship from arch to nixos and for compatibility with my server I am sticking with stable channel and using home-manager, yet to try flakes!!
Setting up python environment has been the ...
2
votes
1
answer
75
views
Nginx Reverse Proxy on nixOS returns 404 when trying to load css/js
I've set up a nixOS to run an nginx as a reverse proxy for a docker-container. In the docker-container runs an golang-server which handles / with a function and also return files from the two folders ...
0
votes
1
answer
50
views
Populate NixOS VM wiith files
I work with NixOS VMs, I can add packages and services, but I struggle to add files (here some configuration and certificates, /etc, and a directory in a user).
I have tried the following:
{ config, ...
0
votes
1
answer
175
views
How to setup Asus Rog Zephyrus Keyboard on Hyprland
I'm quite new to NixOS and I'm trying to set up my laptop using Hyprland.
The problem is that I cannot get my keyboard to work properly. Some keys don't return anything when pressed (I tested it with ...
0
votes
1
answer
30
views
how to register python modules in configuration.nix file
i am in need of a system-wide python module 'akshare', which is not available in Nixpkgs and can only be fetched from Pypi, so i have tried to declare it in my-python-packages and then include it in ...
3
votes
1
answer
74
views
In nixos, what is the difference between installing from pkgs or python311Packages
I had an issue when I installed Yapf this way:
environment.systemPackages = with pkgs; [
(python311.withPackages(ps: with ps; [
toml
python-lsp-server
pyls-isort
flake8
]))
pkgs.yapf
];
This ...
1
vote
1
answer
158
views
Can't run docker without sudo on NixOS
I followed this: https://nixos.wiki/wiki/Docker, and in my configuration.nix i have
users.users.<myUsername> = { #my actual username
isNormalUser = true;
description = "<...
1
vote
0
answers
55
views
MIPS binutils on NixOS?
I'm wondering if there is an existing NixOS package for the MIPS binutils toolchain? In other words, on Ubuntu I would run: sudo apt install binutils-mips-linux-gnu, but how do I get tools like mips64-...
0
votes
1
answer
73
views
How to use sanoid --monitor-health command in NixOS
On NixOS 23.05 I'm unable to use sanoid --monitor-* commands (--monitor-health, --monitor-capacity, --monitor-snapshots) on the CLI and in scripts.
This because the configuration file sanoid relies on ...
0
votes
0
answers
123
views
Matplotlib doesn't recognize Tkinter (NixOS 23.05)
I've recently upgraded my NixOS version to 23.05, and found that Python's matplotlib doesn't recognize Tkinter.
Python 3.10.11 (main, Apr 4 2023, 22:10:32) [GCC 12.2.0] on linux
Type "help",...
0
votes
1
answer
215
views
NixOS test with local network/internet access
I have a flake.nix with some checks, one of which needs to pull some resources from outside the testing environment (internet, local network) during the run of the test. However, the tests run in a ...
1
vote
0
answers
163
views
nix flakes: what is the difference between `nix build git+file:.` and `nix build path:.`
this is a continuation of https://discourse.nixos.org/t/can-i-use-flakes-within-a-git-repo-without-committing-flake-nix/18196/37?u=srghma
IF I enable nix flakes
AND I am in the in the git repo
I found ...
1
vote
1
answer
147
views
Why is the sha256 hash of a vscode extension different if I download the `latest` version and the actual latest version (e.g. `1.2.3`)
Problem
When I download an archive from the vscode marketplace with latest as version, I get a different sha256 checksum as when I download it with the explicit latest version.
Example from nix repl ...
1
vote
2
answers
586
views
Cannot execute or install things with asdf-vm on NixOS
After moving to NixOS from Arch Linux, I installed asdf-vm (using git; commit 0adc6c1). However, I noticed that installing any rust binary fails:
$ LC_ALL=C asdf install rust stable
info: downloading ...
1
vote
1
answer
158
views
Bash broken pipe error for systemd user service
I have bash script which should exec, when specific device connected. When i launch it from terminal i have not got any problems, however, when i launch it as systemd service, i got broken pipe error.
...
0
votes
0
answers
170
views
How to set up a Nix remote builder that evaluates untrusted derivations?
I am investigating a solution to provide some remote builder services. The idea is that I want to provide the following services:
a shared nix store
a shared remote ssh builder, which can be used in ...
1
vote
0
answers
141
views
How to instal mysql-workbench on NixOS?
I’m new on NixOS and I'm using home manager to install my applications. I was trying to install mysql-workbench, that’s why i added in my home.nix the following line:
home.packages = with pkgs; [
......
0
votes
0
answers
18
views
How to construct a patch if I already know the diff?
I'm looking to build this project with patches against a current build on my machine using NixOS: https://github.com/spcmd/w3m
As the project notes, it contains diff files if anyone outside of the ...
2
votes
1
answer
279
views
How to reference systemd service unit by name in Nixos configuration?
I have a services.nix file defined which I reference/import in a Nixos config.
Which looks something like:
{ config, pkgs, ... }:
let
...
in
rec {
services.postgresql = ...;
tgsendPostgres = ...
1
vote
0
answers
62
views
cabal v2-install --lib has dependency conflicts whereas v2-build succeeds on NixOS for HStringTemplate
I am trying to solve a potential bug (removal of backslashes in templates) of the unmaintained HStringTemplate. I am using modified fork of the project, hoping to be able to eventually submit it to ...
2
votes
0
answers
180
views
How to clear the cache from `nix-env --query --json --available --file` queries in Nix and NixOS?
How can I clear the cache that comes from running nix-env queries like so?:
HASH=a7cc81913bb3cd1ef05ed0ece048b773e1839e51
nix-env --query --json --available \
--file "https://github.com/NixOS/...
0
votes
1
answer
412
views
NixOS - How to set up local Hasura instance as a declarative container with Docker / Podman virtualisation?
I have NixOS 22.11 set up on a local workstation. I use extra-container, which can run declarative containers without system rebuilds.
Here is my config for hasura.nix. It sets of the postgresql ...
0
votes
1
answer
763
views
Nix coding pattern: merging two conditional lists created with mkIf
When given two lists each of which are conditional on basis of mkIf, how to merge those two lists (akin to mkMerge for sets)?
I have run into the following pattern several times now and I cannot seem ...
2
votes
1
answer
452
views
Why do some official Nix Docker containers not have the `nixos-rebuild` command?
The following official Nix Docker containers don't have the nixos-rebuild command:
nixos/nix
nixpkgs/nix-unstable
Is there something missing from these instances of NixOS?
nixos/nix:
$ docker run --...
0
votes
1
answer
450
views
How to set up local Wordpress development environment using Nix without modifying flakes-based system configuration?
I have NixOS 22.11 set up as on a local workstation. I'm looking for a way to create a customizable and flexible local environment for Wordpress development using Nix. I want the solution to be "...
1
vote
2
answers
68
views
Automatic project build during system rebuild
I have a default.nix script. Once launched (nix-build), it downloads and builds the project from github. How can I put this script in configuration.nix to build automatically during nixos-rebuild ?
...
2
votes
1
answer
589
views
NixOS create DB (mysql, mariadb)
Trying to create a database during system configuration. I am attaching the contents of the configuration.nix file below. After running the sudo nixos-rebuild switch command, the mariadb service is ...
-2
votes
1
answer
89
views
Nixos can't install ruby2d gem
output
shell.nix
When i execute gem install ruby2d in my nix-shell it can't, because nix has no fhs. Can u help me?
1
vote
0
answers
121
views
Download go modules Nix OS
I'm downloading a program from github and trying to build it. The program is written in go and uses external modules. After running the nix script, I get an error suggesting that I use the go get ...
0
votes
1
answer
320
views
GitHub SSH key on a USB drive
I'm curious if I can put a GitHub SSH key on a USB flash drive as a singular key and remove the other SSH keys from my GitHub. I've found one source, but it doesn't necessarily specify that it's for ...
0
votes
0
answers
82
views
Convert webpages into webapps
Due to laziness, I created some web pages that I use daily as a webapp using Chrome's "Create Shortcut" functionality. This is more convenient because I can see them in a single window or on ...
1
vote
1
answer
70
views
Issue with Dancer2 dependency when building snapcast-volume-ui with Nix
I'm attempted to build a nix container for snapcast-volume-ui. I have the following snapcast-volume-ui.nix file:
{ pkgs, fetchurl, ... }:
let
snapcast-volume-ui-config = pkgs.writeTextFile {
name =...
0
votes
2
answers
332
views
override value in systemd unit
I am learning NixOS and as an experiment I am trying to override an attribute in the systemd service getty@tty1.service. Specifically, I would like to set TTYVTDisallocate=no in the [Service] section ...
0
votes
1
answer
228
views
Nix: go package in --pure mode still pointing to host's GOPATH
I'm trying to run a nix shell with the go package to test a go program. However, to ensure reproducability, I do not want the go in nix-shell to point back to any host related path or info. So, I was ...
1
vote
0
answers
461
views
why a flake.nix file prevent to nixos-rebuild
I'm trying to do this tutorial.
I've added these lines in /etc/nixos/configuration.nix
services.nginx.enable = true;
services.nginx.virtualHosts."test.local.cetacean.club" = {
root = &...
0
votes
1
answer
183
views
How to see the PATH inside a shell without opening a shell
Use the command flag looked like a solution but it doesn't work
Inside the following shell:
nix shell github:nixos/nixpkgs/nixpkgs-unstable#hello
the path contain a directory with an executable ...
3
votes
1
answer
128
views
How to Compile Agda Hello World on Nixos?
On nixos, I am trying to compile the hello world example listed in the agda documentation.
In my working directory, I have the following:
The hello-world agda program, hello-world.agda:
module hello-...
2
votes
1
answer
108
views
Is the package nixos-rebuild for a distribution different from nixos?
I've read the documentation for nix-rebuild. It look like it is only intended to use in nixos. The constant $NIX_PATH (/etc/nixos/configuration.nix) can be found only on a nixos distribution..
But in ...
0
votes
1
answer
539
views
How can I create home-nix file from my current configuration
What I think that I've understood about home-manager.
Instead of using
nix-env iA packageToBeInstalled
you write a list of package in a file (/home/nixos/.config/nixpkgs/home.nix that I from now on ...
1
vote
2
answers
201
views
What to do if nixos stay blocked after Starting systemd
I start nixos from wsl.
Sometime after the start, it get blocked
I get these lines and nothing happends after that
Copying /usr/share/applications
Copying /usr/share/icons
setting up /etc...
setting ...
6
votes
1
answer
1k
views
nix rebuild switch cause "fchmod() of /tmp/.X11-unix failed: Read-only file system"
I have restart on WSL my installation from scratch:
wsl --unregister Nixos
wsl --import NixOS .\NixOS\ nixos-wsl-installer.tar.gz --version 2
wsl -s Nixos
wsl
nixos-wsl-installer.tar.gz comes ...
2
votes
0
answers
522
views
Why can't I update nix?
I'm using nixos on wsl.
According to this link
nix --version
shoud return 2.11.0 . On my computer this is 2.8.1 Therefore I don't have the last nix version.
I've fast followed this procedure. I've ...
-1
votes
1
answer
972
views
what is ${modulesPath} is configuration.nix
In /etc/nixos/configuration.nix, I have this code
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal....