!9IQChSjwSHXPPWTa:lix.systems

Lix

1102 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
22 Oct 2025
@rosssmyth:matrix.orgrosssmyth They were talking about derivation serialization, which is different from Nix expression serialization. You can view derivation serialization if you run something like nix derivation show nixpkgs#hello (for JSON), while the usual serialization of derivation is to ATerm, a weird old format you can view with something like nix eval nixpkgs#hello.drvPath | xargs cat. These are the "*.drv" files references sometimes. 21:44:57
@rosssmyth:matrix.orgrosssmyth * They were talking about derivation serialization, which is different from Nix expression serialization. You can view derivation serialization if you run something like nix derivation show nixpkgs#hello (for JSON), while the usual serialization of derivation is to ATerm, a weird old format you can view with something like nix eval nixpkgs#hello.drvPath | xargs cat. These are the "*.drv" files referenced sometimes. 21:45:22
23 Oct 2025
@emilazy:matrix.orgemily "I’d so much prefer writing Nix over JSON any day, but last time I checked (way over a year ago) that was not supported use case." sounds like just fromJSON/toJSON to me? 00:19:58
@emilazy:matrix.orgemilya stable JSON serialization format for Nix derivations would not help with writing Nix over JSON00:20:12
@emilazy:matrix.orgemilyunless the JSON you want to write happens to be exactly what the stable JSON derivation format would be :)00:20:24
@arianvp:matrix.orgArianThe context here is i want to record build provenance info in Rekor. For which i need some canonical serialization of the build. I was using the json serialization now. But i think ATerm might be more honest?00:41:48
@arianvp:matrix.orgArianI guess I'll just also notarize the version of Lix used and then it doesn't matter wtf I do00:42:27
@raitobezarius:matrix.orgraitobezariusgood00:44:45
@rainbowcat:xmr.seRcat 🏳️‍🌈🏳️‍⚧️ changed their profile picture.10:54:17
@lillecarl:matrix.orglillecarl
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:27]❌1 ❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix build --file guests/ctest.nix 
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:43]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --raw --file guests/ctest.nix
error:
       … while generating the eval command output

       error: cannot coerce a function to a string: «lambda @ /home/lillecarl/Code/nix-csi/guests/ctest.nix:1:1»

Why is it that I can build this file but not eval it? I just wanna get the storePath during eval

{
  pkgs ? import <nixpkgs> { },
  dinix ? import <dinix>,
}:
pkgs.hello # simplified for brevity
12:56:26
@lillecarl:matrix.orglillecarl *
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:27]❌1 ❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix build --file guests/ctest.nix 
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:43]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --raw --file guests/ctest.nix
error:
       … while generating the eval command output

       error: cannot coerce a function to a string: «lambda @ /home/lillecarl/Code/nix-csi/guests/ctest.nix:1:1»

Why is it that I can build this file but not eval it? I just wanna get the storePath when evaluating

{
  pkgs ? import <nixpkgs> { },
  dinix ? import <dinix>,
}:
pkgs.hello # simplified for brevity
12:56:53
@raitobezarius:matrix.orgraitobezarius.outPath ?12:57:25
@raitobezarius:matrix.orgraitobezariusalso12:57:35
@raitobezarius:matrix.orgraitobezariusi don't think nix eval does auto call semantics12:57:44
@raitobezarius:matrix.orgraitobezariusyou need to apply the function12:57:51
@lillecarl:matrix.orglillecarl
[15:00:59]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --impure --raw --expr 'import ./guests/ctest.nix {}'
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped⏎   

Thanks! I think I can make it work with this 😄

13:01:33
@lavender.pet:voip.vera-visions.comlavender.pet changed their profile picture.13:15:50
@lavender.pet:voip.vera-visions.comlavender.pet changed their profile picture.13:19:05
24 Oct 2025
@cjablons:matrix.orgcjab joined the room.02:01:05
@522_:catgirl.cloud522 it/its ⛯ΘΔ

lix module overlay without flakes question: i'm experimenting with removing flakes from my system but am running into an issue where some override accesses the lix.rev of the lix argument, which doesn't exist (i'm using npins, it's called .revision)

nixpkgs.overlays = [
  (import "${sources.lix-module}/overlay.nix" {
    lix = sources.lix // {
      # rev = sources.lix.revision;
    };
    versionSuffix = "-pre-${builtins.substring 0 12 sources.lix.revision}";
  })
];

in my configuration.nix gets me

error: attribute 'rev' missing
at /nix/store/bbl3a77bpxlqml9sqclz2ax2fqvgj1y3-source/overlay.nix:120:62:
   119|           __intentionallyOverridingVersion = true;
   120|           version = "2.94.0-lix-${builtins.substring 0 7 lix.rev}";
      |                                                              ^
   121|

(with my hacky fix for this commented out)

10:46:28
@522_:catgirl.cloud522 it/its ⛯ΘΔspecifically it only happens when adding colmena to my system, since that causes nix-eval-jobs to be evaluated(which this is an overlay for)10:47:18
@molly:chronomorphism.euMolly

i had a similar problem a while back, iirc this is a known issue. the fix which i think raito recommended was:

((import "${pins.lix-module}/overlay.nix") { lix = { outPath = pins.lix; rev = "dirty"; }; })
11:41:02
@522_:catgirl.cloud522 it/its ⛯ΘΔ so basically what i did, intentionally give it the rev it wants, ig? 11:42:59
@522_:catgirl.cloud522 it/its ⛯ΘΔ(idk how much the rev matters here, but i might as well give it the commit sha because i do have that)11:43:27
@522_:catgirl.cloud522 it/its ⛯ΘΔis there an issue for this so i can link to it in my config?11:43:39
@522_:catgirl.cloud522 it/its ⛯ΘΔah, https://git.lix.systems/lix-project/lix/issues/90611:44:18
@522_:catgirl.cloud522 it/its ⛯ΘΔ oh but that seems to suggest applying a patch that has been merged 11:45:25
@522_:catgirl.cloud522 it/its ⛯ΘΔah, https://git.lix.systems/lix-project/nixos-module/issues/56 seems more appropriate11:46:05
@m0tholith:matrix.orgm0tholith joined the room.14:24:48
@m0tholith:matrix.orgm0tholith hey everyone, im getting into using lix on nixos using the "advanced change" config, and im having trouble since i use the pipes feature. can i keep using pipes or do i have to stop using the,? 14:26:36

Show newer messages


Back to Room ListRoom Version: 10