| 20 Jul 2025 |
@n4ch723hr3r:nope.chat | the snowfall scared me xD | 14:52:02 |
x10an14 | Ahh, right, gotten blind to my own code. Thanks, let me try. | 14:52:10 |
x10an14 | Does the same w/me... | 14:52:18 |
@n4ch723hr3r:nope.chat | { name, config, ... }: i dont think config exists in that scope, right? | 14:52:46 |
@n4ch723hr3r:nope.chat | you probably need to do fooConfs.${name}... | 14:53:26 |
@n4ch723hr3r:nope.chat | and afaik fooConfs is often named cfg in nix modules | 14:53:52 |
x10an14 | Nah, sorry, there's something I'm messing up/not getting 😅 See this paste: https://paste.sr.ht/~x10an14/653ed23dd63ba7166d4da89b315c9cce3c4f92c8 And see the comment. Here's the error when I try to nix eval .#modules.x10.device-configs:
x10an14@home-desktop ❯ : nix eval .#modules.x10.device-configs
warning: Git tree '/home/x10an14/Documents/sr.ht/nix-parts-conf' is dirty
{ "x10an14@home-desktop" = { homeManager = { entryPoint = «error: attribute 'username' missing»; homeDirectory = «error: attribute 'system' missing»; toplevelBuild = «error: The option `flake.modules.x10.device-configs."x10an14@home-desktop".homeManager.toplevelBuild' was accessed but has no value defined. Try setting the option.»; }; hostname = "home-desktop"; system = "x86_64-linux"; username = "x10an14"; }; "x10an14@nav-x10an14-t14" = { homeManager = { entryPoint = «error: attribute 'username' missing»; homeDirectory = «error: attribute 'system' missing»; toplevelBuild = «error: The option `flake.modules.x10.device-configs."x10an14@nav-x10an14-t14".homeManager.toplevelBuild' was accessed but has no value defined. Try setting the option.»; }; hostname = "nav-x10an14-t14"; system = "x86_64-linux"; username = "x10an14"; }; }
See the errors reporting missing attributes?
| 15:03:15 |
@n4ch723hr3r:nope.chat | you can also do nix repl then enter :lf . | 15:04:06 |
x10an14 | I know that, but again, I'm asking here because I don't know what I should be exploring. There's something missing in my mental model, and I'm here asking for a nudge in the right direction^^
Answering your suggestion on using the nix repl directly, how can I in the repl explore what the config attribute w/the comments look like? I only know how to explore evaluated configs/outputs in the repl
| 15:06:31 |
@n4ch723hr3r:nope.chat | {
name,
username, # <- I want access to these, that live under `config.flake.modules.x10.device-configs.<a device>,`
hostname, # <- I want access to these, that live under `config.flake.modules.x10.device-configs.<a device>,`
system, # <- I want access to these, that live under `config.flake.modules.x10.device-configs.<a device>,`
...
}:
let
ihnerit (config.flake.modules.x10.device-config.${name}) username;
in
{
options.homeManager = {
| 15:06:44 |