rycee changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/rycee/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
andi- has quit [Ping timeout: 260 seconds]
andi- has joined #home-manager
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #home-manager
malSet has quit [Read error: Connection reset by peer]
malSet has joined #home-manager
cole-h has quit [Quit: Goodbye]
quinn has quit [Quit: ZNC 1.7.5 - https://znc.in]
dermetfan has joined #home-manager
asymptotically has joined #home-manager
__monty__ has joined #home-manager
asymptotically has quit [Quit: Leaving]
asymptotically has joined #home-manager
cjpbirkbeck has joined #home-manager
<KarlJoad> rycee: How did you manage to get the `name` attribute in the `accounts.email.accounts` set to also be the index of the set? What allows me to say `accounts.email.accounts.<name>` to specify that email account?
<__monty__> Hmm, what do you mean? accounts.mail.accounts = { "<name>" = { some = options; }; }
<KarlJoad> __monty__: Yeah, that thing. I'm working on mbsync to get multiple channels supported on a per-account basis. I want to be able to specify groups by their <name> and their consituent channels by <name>?.
<KarlJoad> I have gotten the core submodules built, but right now, they are unnamed, so "indexing" them is difficult.
<__monty__> I'm not sure what you're having trouble with. You just decide that a certain attrset will only have attrs of a specific type so the names don't matter for disambiguation and then you can just access them using listAttrs or attrValues etc.
<KarlJoad> From the backend, yes. For the one doing the configuration, having a name for the group/channel will be useful. Let me push the code I've changed up, and you can take a look at it. I'm not quite sure how to take what you're saying and put it into code.
<__monty__> People just specify whatever name they want. Nix attributes can have spaces even if you put them in "quotes."
<KarlJoad> I understand. To make it clearer, with mbsync, I roughly want the user to be able to say `accounts.email.accounts.<aname>.mbsync.groups.<group-name>.channel.<cname>`, maybe without the `channel` at the end.
<__monty__> Easy, accounts.email.account."a name".mbsync.groups."group name" = { channel = { "c name" = channelconfigurationattrset; }; "other more different group attribute" = otherattrset; }; Done.
<KarlJoad> That's exactly what I want the be able to say at the end. But how do I get "group name" to be an "index" for `groups`?
<KarlJoad> That's the beginning of the new configuration. There are additional bindings defined in the `let` block for actually configuring a group and a channel.
<__monty__> Look at other modules that allow you to specify things by name I guess.
<KarlJoad> Wait... I think I just got it to work the way I want to.
<KarlJoad> At least, when I generate the documentation, it looks the way I want it to.
<__monty__> \o/
<KarlJoad> But, in the REPL, I get some errors. Have to look into those now.
asymptotically has quit [Ping timeout: 240 seconds]
<nicolas[m]> `types.submodule` also accepts a function where the first argument is the name of the attribute when used with `types.attrOf`. Example: `types.submodule (name: { } )`
<nicolas[m]> I don't know whether the index is used with `types.listOf`
<nicolas[m]> * `types.submodule` also accepts a function where the first argument is the name of the attribute when used with `types.attrsOf`. Example: `types.submodule (name: { } )`
<KarlJoad> nicolas[m]: I got it working the way I wanted to. I needed to assign the name argument to the option to make it work the way I wanted. I'm now trying to generate the text.
<KarlJoad> Now I'm stuck trying to get these nested sets to play nicely.
<infinisil> nicolas[m]: It's `types.submodule ({ name, ... }: ...)` btw
<nicolas[m]> oh it's actually a set? thanks
quinn has joined #home-manager
<g[m]3> should `services.gpg-agent` be setting GPG_AGENT_INFO ? I don't have GPG_AGENT_INFO (or SSH_AGENT_PID) set, and I'm wondering if that's what's missing (SSH_AUTH_SOCK is being set)
<g[m]3> i am managing bash in home-manager
ardumont has quit [Ping timeout: 260 seconds]
ardumont has joined #home-manager
cole-h has joined #home-manager
<g[m]3> should bash be listed by `home-manager packages` ?
<KarlJoad> rycee: How hard of a rule is "Maintain backward compatibility"?
KarlJoad` has joined #home-manager
KarlJoad has quit [Quit: Konversation terminated!]
cole-h has quit [Quit: Goodbye]
__monty__ has quit [Quit: leaving]
<KarlJoad`> The only reason I ask is because I have rewritten mbsync to use multiple channels per account, and that was a fairly major refactor from what was there originally.
<KarlJoad`> Also, is there any possibility of making a dark-themed manual?
dermetfan has quit [Ping timeout: 240 seconds]
<energizer> KarlJoad`: man home-configuration.nix
<KarlJoad`> energizer: Are you saying that I should just use the man-page, or that there is a setting to generate a dark-theme option?
<energizer> KarlJoad`: i'm saying you can use the man page if you like
<energizer> also, there are dark theme browser extensions
<KarlJoad`> I know I can. It's just that the CSS on the text makes it easier to interpret what was written. Having certain things be teletype and others normal is nice.
<KarlJoad`> Plus, an extension just for dark-theming websites seems silly.
<energizer> ok
<KarlJoad`> I'm not complaining. I'll use the man-page, but a darker theme on the manual couldn't be too hard, right?
<energizer> my view is that if you want dark themes on websites it is easier to configure your website viewer than to configure all the websites
<KarlJoad`> That is fair.
<KarlJoad`> I just feel that it is a bit strange that programming/programming-like websites/documentation don't have dark modes nowadays.