!9IQChSjwSHXPPWTa:lix.systems

Lix

1117 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-rooms309 Servers

Load older messages


SenderMessageTime
15 Mar 2026
@blokyk:matrix.orgzoë (she/her)it does make me wonder: does it still have the "0.00MiB removed" bug?21:11:53
@blokyk:matrix.orgzoë (she/her) the nix repl stuff for derivations is also almost exactly the thing i put on my "to open issue about" list x) 21:13:19
@blokyk:matrix.orgzoë (she/her)this is looking like it'll be a great release :D21:13:46
@blokyk:matrix.orgzoë (she/her)

i do have a few tiny nits when it comes to the flakes settings prompt (lix#682)

  1. it's not immediately obvious that y, A, n and N are the things you should type, in my experience that's generally indicated by putting [bracket] around the options (like [y]es for now / [A]llow always / [n]o / [N]o to all), but it also hinders readability so it's a tradeoff (another option is having a secondary [y/A/n/N] prompt after the list of options, but that makes an already long line even longer, so you'd have to put it on a new line for the best experience)
  2. having a difference between n and N is a little confusing, i think [R]eject all or [D]isallow all might be a better idea (and could makes the prompt case-insensitive in general, if that's okay)
  3. english is my second language, so i am NOT an expert on this, but "Allow always" sounds slightly more awkward than "Always allow," which still has the same letter/prefix (and imo makes the prompt easier to parse because you only need to pay full attention to the first word of each to get the sentiment, i personally had to do a double take, especially with the tiny, uncapitalized and unemphasized no)
    again, these are all nits, and i understand we're pretty close to release now (and it's my fault for not keeping up with the issue for it earlier), so it's just general feedback
22:00:07
16 Mar 2026
@draupnir:lix.systems@draupnir:lix.systemschanged room power levels.09:59:28
@netali:cuties.devJenny joined the room.11:35:42
@vczf:matrix.orgvczf

Is __findFile override no longer possible in lix?

I’m trying to use the angle bracket syntax for the den library (https://den.oeiuwq.com/guides/angle-brackets/) which would help cut down on the verbosity

(Den is a really neat way to structure cross platform nix code btw. Nonflakes fully supported)

I note that lix has a builtin for findFile, while cppnix does not. I didn’t see a release note specifically calling out module.args.__findFile as removed. Just one asking for feedback on use cases last year

21:53:17
@raitobezarius:matrix.orgraitobezariusit is possible21:54:23
@vczf:matrix.orgvczf I may just need to set my nix path 21:56:08
@blokyk:matrix.orgzoë (she/her)can you show a sample from the file you're trying to do it in?21:56:56
@blokyk:matrix.orgzoë (she/her) * can you show a sample from the file you're trying to do it in? i'm not very familiar with den by it seems like it works with the module system, so are you sure the __findFile symbol is available in the scope you're trying to use the <bracket> syntax in? 21:59:43
@vczf:matrix.orgvczf I think this should work?
{
  den,
  libdna,
  ...
}:
{
  _module.args.__findFile = den.lib.__findFile;
  den.hosts.x86_64-linux.null.users.core = {};
  den.aspects.null = {
    nixos = {
      system.stateVersion = "26.05";
    };
    includes = [
      <transience>
      (den.aspects.security._.autologin "core")
    ];
  };
}
22:22:47
@blokyk:matrix.orgzoë (she/her) hmm, i don't think so, because the __findFile isn't in the lexical scope of the rest of the code; have you tried putting it in the parameter list at the top? 22:23:34
@blokyk:matrix.orgzoë (she/her) * hmm, i don't think so, because the __findFile isn't in the lexical scope of the rest of the code; have you tried putting __findFile in the parameter list at the top? (i.e. { den, libdne, __findFile, ... }: ...) 22:23:57
@blokyk:matrix.orgzoë (she/her) * hmm, i don't think so, because the __findFile isn't in the lexical scope of the rest of the code; have you tried putting __findFile in the parameter list at the top? (i.e. { den, libdna, __findFile, ... }: ...) 22:24:01
@blokyk:matrix.orgzoë (she/her)or if you don't want to mess with module args, you can always have a let binding for it, i'm pretty sure that should work22:24:58
@vczf:matrix.orgvczf I also tried putting it in the top-level default.nix that evaluates everything
let
  sources = import ./npins;
  with-inputs = import sources.with-inputs sources {
    # uncomment for local checkout on CI
    #den.outPath = ../den;
  };

  outputs =
    inputs:
    (inputs.nixpkgs.lib.evalModules {
      modules = [
        (inputs.den.flakeModule)
        (inputs.import-tree ./den)
        ({ imports = [ ./lib ]; })
        ({ den, ... }: {
          _module.args.__findFile = den.lib.__findFile;
        })
      ];
      specialArgs = {
        inherit inputs;
        inherit (inputs) self;
      };
    }).config;

in
with-inputs outputs
22:25:18
@blokyk:matrix.orgzoë (she/her) *

or if you don't want to mess with module args, you can always have a let binding for it, i'm pretty sure that should work:

{ den, ... }:
let __findfile = den.lib.__findFile; in {
  den.aspects.null = ...
}
22:25:58
@vczf:matrix.orgvczfThis is probably something I should ask vic directly, assuming that __findFile works the same in lix as cppnix22:27:12
@blokyk:matrix.orgzoë (she/her) since __findFile has to be in each file's lexical scope, you have to explicitly import it in each one, either by explicitly having it in your module's param list or by having a let binding or something to put it in scope 22:27:20
@vczf:matrix.orgvczfI got it22:28:52
@vczf:matrix.orgvczfThanks!22:28:56
@blokyk:matrix.orgzoë (she/her):D22:29:08
@vczf:matrix.orgvczfI didn't understand what was meant by the file's lexical scope22:29:37
@blokyk:matrix.orgzoë (she/her)yes sorry i should have been clearer ;-; it's a hard concept to explain ^^;22:29:57
@blokyk:matrix.orgzoë (she/her)it doesn't help that den's docs omit that part22:30:29
@blokyk:matrix.orgzoë (she/her)* it doesn't help that den's docs omit that part :/22:30:31
@vczf:matrix.orgvczfLooking again, it's there just not clear if you don't already know. I am also working on improving the docs22:31:23
@piegames:flausch.socialpiegamesImprove the docs all you want, but that part was never meant to be API in the first place22:34:13
@raitobezarius:matrix.orgraitobezariusyeah, it's an API abuse22:34:49

Show newer messages


Back to Room ListRoom Version: 10