!UUqahLbShAYkkrXmKs:matrix.org

DevOS

34 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
@aynish:sealight.xyz@aynish:sealight.xyzim in a nix-shell in /etc/configuration and don't import bud in any of my profiles / hosts or users09:14:46
@aynish:sealight.xyz@aynish:sealight.xyzit happens when using bud rebuild my-host switch09:14:58
@aynish:sealight.xyz@aynish:sealight.xyzi grepped through the repo looking for a definition of nixosModule or reboundBud but I couldn't find any?09:16:11
@aynish:sealight.xyz@aynish:sealight.xyzalso 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@aynish:sealight.xyznvm 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@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@aynish:sealight.xyz1. main11:40:51
@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

Show newer messages


Back to Room ListRoom Version: 6