!9IQChSjwSHXPPWTa:lix.systems

Lix

1105 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-rooms294 Servers

Load older messages


SenderMessageTime
14 Oct 2025
@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
@raitobezarius:matrix.orgraitobezariusstatic analysis doesn't work anymore :(01:14:43
@raitobezarius:matrix.orgraitobezarius it's a with-style construct 01:14:48
@raitobezarius:matrix.orgraitobezariusit could even be said this is anti with01:14:54
@charles:computer.surgeryCharlesyeah basically lol01:15:20
@raitobezarius:matrix.orgraitobezariuswhy do you need so hard to restrict names?01:15:44
@charles:computer.surgeryCharles hm why not? to me this seems sort of similar to mod in rust except you don't get use 01:15:46
@raitobezarius:matrix.orgraitobezariusstatic analyzers needs to keep track if they have entered into a restricted scope01:16:11
@raitobezarius:matrix.orgraitobezariusso you cannot just go brrrrrrr and look at every scopes and collect variables01:16:31
@charles:computer.surgeryCharlesyeah, that's true01:16:39

Show newer messages


Back to Room ListRoom Version: 10