Code Monkey home page Code Monkey logo

Comments (7)

Artturin avatar Artturin commented on June 8, 2024 2

is it possible to use a different flake for comma (instead of nixpkgs)?

implemented in 17a4f33

from comma.

Artturin avatar Artturin commented on June 8, 2024 1

I wonder if the .contains("nixpkgs") should be .contains("nixpkgs=") in order to differentiate when nixpkgs is explicitly specified, or just happens to be in the path of a different entry?

fixed e27a636 thanks for the report

from comma.

Artturin avatar Artturin commented on June 8, 2024

Currently we're checking if NIX_PATH contains nixpkgs(users usually remove it if using flakes) and determining if we should use flakes or channels

.contains("nixpkgs");

what is the output of echo $NIX_PATH

from comma.

Tungsten842 avatar Tungsten842 commented on June 8, 2024

Currently we're checking if NIX_PATH contains nixpkgs(users usually remove it if using flakes) and determining if we should use flakes or channels

.contains("nixpkgs");

what is the output of echo $NIX_PATH

❯ echo $NIX_PATH
/home/quantmint/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels

Isn't there a better way to find out if a user is using flakes? I use flakes, but NIX_PATH is set by default.
Also, is it possible to use a different flake for comma (instead of nixpkgs)?

run_cmd.args([format!("nixpkgs#{}", choice)]);

from comma.

fmoda3 avatar fmoda3 commented on June 8, 2024

I ran into this same issue. I use flakes, and my NIX_PATH is

/Users/fmoda3/.nix-defexpr/channels:darwin-config=/Users/fmoda3/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/root/channels

which happens to contain "nixpkgs" in one of the entries, making comma think I am using channels.

To fix it, i had to add nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; to my flake, to force a nixpkgs entry that points to my flake.

After this addition, NIX_PATH becomes

/Users/fmoda3/.nix-defexpr/channels:darwin-config=/Users/fmoda3/.nixpkgs/darwin-configuration.nix:nixpkgs=/nix/store/v0vq1p4c17x97w2py57xanh4nlh4v4cn-source:/nix/var/nix/profiles/per-user/root/channels

I wonder if the .contains("nixpkgs") should be .contains("nixpkgs=") in order to differentiate when nixpkgs is explicitly specified, or just happens to be in the path of a different entry?

from comma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.