914 questions
Advice
1
vote
1
replies
31
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
74
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
180
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
50
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
126
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
73
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
238
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
205
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
331
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
229
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
179
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
74
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
380
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 ...
1
vote
1
answer
857
views
rust toolchain error on NixOS when installed via nix
I recently switched to NixOS and installed the Rust toolchain (rustup, cargo, rustc) using the Nix package manager.
However, when I try to open my pre-configured Neovim setup, I get the following LSP ...
1
vote
1
answer
54
views
Space makes difference when evaluating in nix repl
In nix repl, I know why f: f outputs "<lambda>". But why f:f outputs "f:f"?