!UUqahLbShAYkkrXmKs:matrix.org

DevOS

33 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
10 Oct 2021
@blaggacao:matrix.orgDavid Arnold (blaggacao) aynish The line shown is here: https://github.com/divnix/bud/blob/main/nixosModule.nix 14:52:47
@blaggacao:matrix.orgDavid Arnold (blaggacao)It would be nice if we could scramble together a PR with a failing test to fix this once-and-for-all.14:58:03
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @infinidoge:matrix.org
Nah it was entirely my fault. I set nixos.hostDefaults.channelName = "latest", and the latest input/channel in the flake didn't have the overlays
bud includes a nixos module. However, the bud flake exposes a constructor for that module that needs to be instantiated with bud. Something smells fishy, here.
15:10:55
@blaggacao:matrix.orgDavid Arnold (blaggacao) https://github.com/divnix/bud/blob/main/flake.nix passes this as self which for all intents and purposes is a functor here, meaning by using it as a function, the __functor is executed. 15:13:58
@blaggacao:matrix.orgDavid Arnold (blaggacao) Note that rebind is so that https://github.com/divnix/bud/blob/main/default.nix can retrieve self.budModules 15:17:52
@blaggacao:matrix.orgDavid Arnold (blaggacao) This is a pattern that I experimented with where flake.nix, becomes a pluggable OO interface: the user flake defines the data & a rebound implementation consumes it. The idea was to evenatually let such rebound implementation also modify the way how the user data is shown in nix flake show without a need to modify the nix binary. 15:20:19
@blaggacao:matrix.orgDavid Arnold (blaggacao)Sort of: "go and register yourself in the user's flake"15:20:48
@blaggacao:matrix.orgDavid Arnold (blaggacao)* Sort of: "`bud`, go and register yourself in the user's flake"15:22:13
@blaggacao:matrix.orgDavid Arnold (blaggacao) This pattern is a bit "magic" but would work beautifully, if it was prominently documented as a bud's contractr. 15:23:23
@blaggacao:matrix.orgDavid Arnold (blaggacao)The way it currently is, it's just obscure. I'm sorry. That goes against my coding values. 🤕15:23:59
@blaggacao:matrix.orgDavid Arnold (blaggacao)* `bud` includes a nixos module. However, it exposes a constructor for that module that needs to be instantiated with `bud`.15:25:04
@blaggacao:matrix.orgDavid Arnold (blaggacao) Similarily, it consumes self.overlays in case that self.budModules depend on additional packages. 15:30:34
@blaggacao:matrix.orgDavid Arnold (blaggacao) Both are optional and either pkgs or budModules can be passed directly in a functional style. 15:31:45
@blaggacao:matrix.orgDavid Arnold (blaggacao)Today, I'm not sure if trying OO on the flake interface is a good idea. It might be.15:32:11
@blaggacao:matrix.orgDavid Arnold (blaggacao)
  • pro: it makes the flake more important as a central hub/index
  • con: a bit of additional obscurity / hard to grep
15:32:56
@blaggacao:matrix.orgDavid Arnold (blaggacao)
  • pro: the concept of "registering" onto the interface keeps the interface itself cleaner (at the cost of some magic).
15:34:01
@blaggacao:matrix.orgDavid Arnold (blaggacao) Maybe the achi-error was to make flake outputs typed as part of nix in the first place. Otoh, maybe that's a good pathway for emerging standardization. 15:37:38
@blaggacao:matrix.orgDavid Arnold (blaggacao) (if only nix wasn't written in C++) 15:38:19
@aynish:sealight.xyz@aynish:sealight.xyz
In reply to @blaggacao:matrix.org
It would be nice if we could scramble together a PR with a failing test to fix this once-and-for-all.
i would write a PR with this test, since I can reliably reproduce this, but I'm not really sure how to write nix tests? happy to take resuorces and learn if you have any (will also search for examples)
15:55:10
@aynish:sealight.xyz@aynish:sealight.xyz

i cant really follow the rest, because im a noob lol. but i finally got a worknig devos install! :D

i can't quite get it to run all my home-manager configuration, I think i'm not importing it correctly? i add it to my user in suites in flake.nix, and then add that suite as an imports into my hosts file, but uhh, no luck... something for tomorrow

15:56:48
@pachumicchu:myrdd.infoPacman99If were to follow the same pattern as devshell with bud we could add an api container to digga for it. `bud.modules ` maybe also `makes.modules`16:39:41
@pachumicchu:myrdd.infoPacman99The way I see it we create instances of bud with various modules just like nixos and devshell.16:40:27
@pachumicchu:myrdd.infoPacman99But I wonder if its possible to add rebind support to the module system itself16:41:13
@blaggacao:matrix.orgDavid Arnold (blaggacao) The rebind idea was really just an exploration, and it is not a neccessity for bud to function. On the other hand it also was a way to not need any other api, that is, bud itself already fully defines it's api. 17:11:28
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @aynish:sealight.xyz
i would write a PR with this test, since I can reliably reproduce this, but I'm not really sure how to write nix tests? happy to take resuorces and learn if you have any (will also search for examples)
I guess a minimal implementation in bud's ./e2e folder would be a good start
17:12:10
@princemachiavelli:matrix.org@princemachiavelli:matrix.org David Arnold (blaggacao): Is there a matrix channel for makes development? I am wondering if exposing the makes package in an overlay would be a good idea or not.... I also want to look into adding aarch64 support. 20:54:16
@blaggacao:matrix.orgDavid Arnold (blaggacao) princemachiavelli aarch64 would be certainly neat. But I guess an overlay is not the right approach. Overlays always bear the risk of breaking some things for somebody. Allowing that to happen would be a huge marketing burden for makes. 23:28:52
@blaggacao:matrix.orgDavid Arnold (blaggacao) I don't think there is a channel yet? /cc kamadorueda ? 23:29:16
@blaggacao:matrix.orgDavid Arnold (blaggacao)I think discussion is currently mainly kept as github issues.23:29:37
@princemachiavelli:matrix.org@princemachiavelli:matrix.orgThanks. I'll have to learn more about how to use the defaultPackage, defaultApp outputs. I'm in the process of adapting a project that was using devshell to expose various scripts and environment variables. 23:41:19

Show newer messages


Back to Room ListRoom Version: 6