9 Oct 2021 |
David Arnold (blaggacao) | Ignore the readme! 😆 | 15:29:35 |
| David Arnold (blaggacao) invited kamadorueda. | 15:29:53 |
| kamadorueda joined the room. | 15:50:37 |
10 Oct 2021 |
@aynish:sealight.xyz | trying to install devos for the first time, after trying to port most my configuration to it, but I'm running into this strange error?
at /nix/store/xxzcdd9xcfi7sapi1hwjjx8mxb2b00x2-source/nixosModule.nix:31:8:
30| environment.systemPackages = [
31| (reboundBud { inherit pkgs; hostConfig = config; editableFlakeRoot = cfg.localFlakeClone; })
| ^
32| ];```
| 09:13:58 |
@aynish:sealight.xyz | * trying to install devos for the first time, after trying to port most my configuration to it, but I'm running into this strange error?
undefined variable 'reboundBud'
at /nix/store/xxzcdd9xcfi7sapi1hwjjx8mxb2b00x2-source/nixosModule.nix:31:8:
30| environment.systemPackages = [
31| (reboundBud { inherit pkgs; hostConfig = config; editableFlakeRoot = cfg.localFlakeClone; })
| ^
32| ];
| 09:14:18 |
@aynish:sealight.xyz | im in a nix-shell in /etc/configuration and don't import bud in any of my profiles / hosts or users | 09:14:46 |
@aynish:sealight.xyz | it happens when using bud rebuild my-host switch | 09:14:58 |
@aynish:sealight.xyz | i grepped through the repo looking for a definition of nixosModule or reboundBud but I couldn't find any? | 09:16:11 |
@aynish:sealight.xyz | also wondering if there's a way to define non-home manager options in the users directory? for example i configure a bunch of graphical applications and configuration through users, but also want to set some configuration options for services.xserver, but it defaults to trying home-manager.my-user.users.services.... ? | 09:17:29 |
@aynish:sealight.xyz | nvm figured it out by searching here. someone else had this issue by switching the channelName in my-host to "latest" which I had also done, and then i also included bud.enable in my-host leading to the bug. dont quite understand, but consider resolved | 09:24:44 |
@aynish:sealight.xyz | * nvm figured it out by searching here. someone else had this issue by switching the channelName in my-host to "latest" which I had also done, and then i also included `bud.enable` in my-host leading to the bug. dont quite understand, but consider resolved | 09:44:31 |
@aynish:sealight.xyz | 1. main | 11:40:51 |
David Arnold (blaggacao) | aynish The line shown is here: https://github.com/divnix/bud/blob/main/nixosModule.nix | 14:52:47 |
David 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 |
David 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 |
David 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 |
David Arnold (blaggacao) | Note that rebind is so that https://github.com/divnix/bud/blob/main/default.nix can retrieve self.budModules | 15:17:52 |
David 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 |
David Arnold (blaggacao) | Sort of: "go and register yourself in the user's flake" | 15:20:48 |
David Arnold (blaggacao) | * Sort of: "`bud`, go and register yourself in the user's flake" | 15:22:13 |
David 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 |
David Arnold (blaggacao) | The way it currently is, it's just obscure. I'm sorry. That goes against my coding values. 🤕 | 15:23:59 |
David 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 |
David Arnold (blaggacao) | Similarily, it consumes self.overlays in case that self.budModules depend on additional packages. | 15:30:34 |
David Arnold (blaggacao) | Both are optional and either pkgs or budModules can be passed directly in a functional style. | 15:31:45 |
David Arnold (blaggacao) | Today, I'm not sure if trying OO on the flake interface is a good idea. It might be. | 15:32:11 |
David 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 |
David Arnold (blaggacao) |
- pro: the concept of "registering" onto the interface keeps the interface itself cleaner (at the cost of some magic).
| 15:34:01 |
David 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 |
David Arnold (blaggacao) | (if only nix wasn't written in C++) | 15:38:19 |