!9IQChSjwSHXPPWTa:lix.systems

Lix

1079 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms291 Servers

Load older messages


SenderMessageTime
14 Oct 2025
@crop_tech:matrix.orgcrop if i simply use this
{ pkgs, ... }:
{
  nix.package = pkgs.lixPackageSets.stable.lix;
}
in my system configuration...
is not picked up ... now it uses nix again
18:49:23
@k900:0upti.meK900What is "it"?18:51:48
@sofiedotcafe:matrix.orgSofie 🏳️‍⚧️ (she/her)

Well, I did it like this (an overlay, for the other Nix related packages too)

packages = {...} // lib.listToAttrs (
        lib.mapAttrsToList
          (name: val: {
            name =
              let
                replacedNames = {
                  lix = "nix";
                };
              in
              if pkgs.lib.hasAttr name replacedNames then pkgs.lib.getAttr name replacedNames else name;
            value = val;
          })
          (
            lib.filterAttrs (
              _: v: lib.isDerivation v
            ) inputs.nixpkgs.legacyPackages.${system}.lixPackageSets.git
          )
      );
18:53:05
@crop_tech:matrix.orgcropso this is not correct? https://lix.systems/add-to-config/18:54:09
@k900:0upti.meK900That is correct18:54:22
@sofiedotcafe:matrix.orgSofie 🏳️‍⚧️ (she/her)Yra18:54:30
@k900:0upti.meK900Where are you seeing Nix?18:54:32
@sofiedotcafe:matrix.orgSofie 🏳️‍⚧️ (she/her) * 18:54:34
@k900:0upti.meK900And under what conditions18:54:38
@sofiedotcafe:matrix.orgSofie 🏳️‍⚧️ (she/her)I just did a little of my own overlay stuff18:54:46
@sofiedotcafe:matrix.orgSofie 🏳️‍⚧️ (she/her)To make it do automatically for all of those packages in that set18:54:58
@crop_tech:matrix.orgcrop after is switched and only used the one lines to configure lix 18:55:09
@k900:0upti.meK900What exact command are you running that tells you it's Nix?18:55:28
@k900:0upti.meK900And what is the output?18:55:31
@crop_tech:matrix.orgcropnix --version18:56:21
@crop_tech:matrix.orgcrop nix (Nix) 2.28.5 18:56:40
@crop_tech:matrix.orgcropi used before the lix-module with lix from the cache ... which is not recommended anymore ...18:57:26
@crop_tech:matrix.orgcrop* i used before the lix-module with lix from the nixpkgs-cache ... which is not recommended anymore ...18:57:36
@k900:0upti.meK900Are you sure you're importing that module into your config?18:57:58
@k900:0upti.meK900 What does which nix output? 18:58:06
@crop_tech:matrix.orgcrop/run/current-system/sw/bin/nix19:01:21
@crop_tech:matrix.orgcrop i tried now two more things ...
1 set nix.package to a random package
fails as expected at a check for the version
2 set nix.package to pkgs.lix (which i am not sure if it even exist)
is again just using nix
19:03:04
@crop_tech:matrix.orgcrop* i tried now two more things ... 1 set nix.package to a random package fails as expected at a check for the version 2 set nix.package to pkgs.lix is again just using nix19:03:57
@k900:0upti.meK900That's strange19:08:09
@k900:0upti.meK900 Are you maybe setting it somewhere else with mkForce 19:08:09
@k900:0upti.meK900 Can you open your config in a repl and check options.nix.package.definitionsWithLocations? 19:08:19
@crop_tech:matrix.orgcropi found that i put nix in the systemPackages ... and i because before changed nix to lix in the overlay it would still use the same one ... sorry for the noise19:12:31
15 Oct 2025
@charles:computer.surgeryCharles

Half baked idea for a new pair of builtins: builtins.restrictNamespace and builtins.restrictedNamespace (feel free to suggest a different color for the bikeshed). Here's the basic idea:

Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + 1);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in 6. Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + foo);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in an eval error about foo being inaccessible in a restricted namespace. Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + foo);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

hits the builtins.throw case.

Not sure how this would/should interact with builtins.scopedImport.

Motivation for wanting this is that it allows you to restrict the names available to some expression without forcing that expression to be moved into a different file. Good idea, bad idea, thoughts?

01:02:23
@charles:computer.surgeryCharles *

Half baked idea for a new pair of builtins: builtins.restrictNamespace and builtins.restrictedNamespace (feel free to suggest a different color for the bikeshed). Here's the basic idea:

Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + 1);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in 6. Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + foo);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in an eval error about foo being inaccessible in a restricted namespace. Evaluating this:

let
  foo = 4;
  bar = x: x + foo;
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

hits the builtins.throw case.

Not sure how this would/should interact with builtins.scopedImport.

Motivation for wanting this is that it allows you to restrict the names available to some expression without forcing that expression to be moved into a different file. Good idea, bad idea, thoughts?

01:03:10
@charles:computer.surgeryCharles *

Half baked idea for a new pair of builtins: builtins.restrictNamespace and builtins.restrictedNamespace (feel free to suggest a different color for the bikeshed). Here's the basic idea:

Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + 1);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in 6. Evaluating this:

let
  foo = 4;
  bar = builtins.restrictNamespace (x: x + foo);
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

results in an eval error about foo being inaccessible in a restricted namespace. Evaluating this:

let
  foo = 4;
  bar = x: x + foo;
in

if !(builtins.restrictedNamespace bar)
  then builtins.throw "bar's namespace is required to be restricted"
  else bar 5

hits the builtins.throw case.

Not sure how this would/should interact with builtins.scopedImport.

Motivation for wanting this is that it allows you to restrict the names available to some expression (in this case a function, but ideally this'd work for any expression) without forcing that expression to be moved into a different file. Good idea, bad idea, thoughts?

01:03:50

Show newer messages


Back to Room ListRoom Version: 10