916 questions
-1 votes
1 answer
46 views
NixOS declare mounts in loop
I have a lot of NFS mounts on my system, which all have the same options. I would love to combine these to reduce code, but I am not how to do it/if it is even possible. What I have gotten so far is ...
-5 votes
0 answers
67 views
Go -race tests fail on GitHub Actions Ubuntu with ThreadSanitizer ENOMEM (works on macOS) [closed]
Post body (StackOverflow / Reddit / etc.) I’m running Go tests with the race detector in GitHub Actions via Nix, and I always hit a ThreadSanitizer allocation error on Linux runners. On macOS runners ...
Advice
1 vote
1 replies
25 views
How can I include nix packages into a nixos vm for the purpose of adding them to /nix/store without polluting the global system packages?
I'm building a nixos vm using nixos-shell and I'm using the following to add the dependencies of a example project to the vm: let appRepo = pkgs.callPackage (builtins.fetchGit { url = "...
0 votes
1 answer
66 views
Postgresql server starts in nix-shell but I can't use it (connection failed)
I want to run postgresql within a nix-shell. I followed the instructions on this page: https://mgdm.net/weblog/postgresql-in-a-nix-shell/ PostgreSQL installs properly in the shell (it's not installed ...
0 votes
1 answer
125 views
Create a link to a relative path with nix flakes
In my nixos config (with flakes and home-manager as a nixos module) I have: modules/home-manager/emacs-config (my emacs config directory as a git submodule) modules/home-manager/modules/emacs.nix (a ...
0 votes
0 answers
48 views
Nix build fails: fmtlib fetch error when building solc-0.8.25
I am trying to build dependencies with Nix, but the build for solc-0.8.25 fails because fmtlib cannot be fetched. error: builder for '/nix/store/agn4bj4gl1zih62jdc4hx54dbdkywzqg-solc-0.8.25.drv' ...
0 votes
1 answer
117 views
Packaging two scripts with system dependencies for NixOS deployment?
In my quest to get to know Nix and NixOS better, I'm going to try moving a small utility I have onto my NixOS server. There are two components to this utility: A Perl script, which requires both (a) ...
0 votes
1 answer
65 views
Hackage google-oauth2 package override local google-oauth2 when using haskell.nix
Building project withnix build '.?submodules=1#daemonPull' -L output following log. warning: Git tree '/Users/liuzichao/titanflow' is dirty warning: ignoring the client-specified setting 'build-users-...
0 votes
2 answers
198 views
How to find path to a library installed through nix flake
I am working on a c++ project using nix flakes, this is the basic flake I have developed : { description = "flake for an autonomous rover"; inputs = { nixpkgs.url = "github:...
0 votes
0 answers
189 views
CMake ERROR in building a package in nix flake
I am currently working on a c++ project using nix flakes. I am using a state machine library known as YASMIN (https://github.com/uleroboticsgroup/yasmin). While trying to build this package in nix I ...
1 vote
0 answers
284 views
SDL program can't find available video device on NixOS
I'm using NixOS and trying to learn SDL, yesterday I got a code example to build and work but today it stopped working, I tried rebuilding everything in a different directory with no success. I'm ...
2 votes
1 answer
191 views
undefined homeDirectory in nix-darwin flake
I am trying to set up my mac M1 with nix-darwin and home-manager, this is the minimal flake that I am starting from: { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; ...
1 vote
1 answer
150 views
How to call host's nix inside a docker file?
My goal is to share my host nix (daemon and /nix) to several docker in order to reuse files etc... How can I do it in a secure way (i.e. without allowing the docker to run with high privileges)?
0 votes
0 answers
66 views
How to package resource files using cabal2nix?
I want to package a Cabal project for NixOS. In the package directory, I put the default.nix file with the following content: { pkgs ? import <nixpkgs> { }, ... }: pkgs.haskellPackages....
0 votes
2 answers
317 views
How to add values to a list at specific locations in Nix?
I would like to add certain strings to a list based on a conditional in Nix. For context, I am using this to conditionally have different Waybar modules. At the moment, I have a solution, but I feel ...