| 20 Oct 2021 |
David Arnold (blaggacao) | Exporting by default was set as "sane" default since a lot of people don't care how (standardized) their front-yard looks to others. | 00:28:20 |
David Arnold (blaggacao) | Opting out for inidividual modules / overlays might strike the right balance. | 00:28:59 |
David Arnold (blaggacao) | See __dontExport = true for overlays. | 00:29:17 |
mars | I guess the other thing with profiles is that it's assumed they're not intended for export | 00:29:26 |
David Arnold (blaggacao) | That is true. | 00:29:36 |
mars | yeah i found that __dontExport attr in the source and I'm using it in a few places | 00:29:48 |
David Arnold (blaggacao) | Since they modify global state. | 00:29:51 |
David Arnold (blaggacao) | (at least when sticking with the soft guidlines) | 00:30:10 |
David Arnold (blaggacao) | (while modules would not, only the configuration soace, but not state) | 00:30:27 |
David Arnold (blaggacao) | * (while modules would not, only the configuration space, but not state) | 00:30:32 |
David Arnold (blaggacao) | We might be able to improve those contracts. | 00:31:09 |
mars | In reply to @blaggacao:matrix.org Since they modify global state. yeah so this is one place where we could make an additional distinction
I think of profiles as modules that don't declare new config options
but profiles in that sense could still use, say, mkOverridable | 00:31:11 |
mars | * yeah so this is one place where we could make an additional distinction
I think of profiles as modules that don't declare new config options
but profiles in that sense could still use, say, mkOverridable | 00:31:26 |
mars | * yeah so this is one place where we could make an additional distinction.
I think of profiles as modules that don't declare new config options.
but profiles in that sense could still use, say, mkOverridable | 00:31:37 |
David Arnold (blaggacao) | Can you have a look at: divnix/data-merge? | 00:32:10 |
David Arnold (blaggacao) | The flake.nix. | 00:32:18 |
mars | and then they'd be safe to import in the sense that they couldn't make your nixos config not evaluate just because you imported them | 00:32:19 |
David Arnold (blaggacao) | It conveys part of my thinking about config mgt and complexity. | 00:32:34 |
mars | i saw some messages about it above | 00:32:42 |
David Arnold (blaggacao) | (just for context, not saying no or yes) 😎 | 00:32:48 |
David Arnold (blaggacao) | In reply to @mars:jupiterbroadcasting.com and then they'd be safe to import in the sense that they couldn't make your nixos config not evaluate just because you imported them That is one aspect, but also importing something that can modify your state and is outside the boundary of your own repo seems hairy. | 00:33:43 |
David Arnold (blaggacao) | I fear the explosion in complexity after a few layers. 😎 | 00:34:42 |
David Arnold (blaggacao) | But, otoh, with nix people can do whatever they want, we can just empathixally encourage /discourage. | 00:35:14 |
mars | this is kinda the nature of the nixos module system though
modules all modify one big config | 00:35:48 |
David Arnold (blaggacao) | Heheh, see divnix/data-merge. | 00:36:17 |
David Arnold (blaggacao) | afk for a bot | 00:38:03 |
mars | but yeah with profiles it seems like you're going for
stuff you might paste in a configuration.nix
and you can't paste two definitions of the same option in one configuration.nix
whereas modules that are potentially upstreamable are supposed to be safe to add to your imports | 00:38:05 |
mars | * but yeah with profiles it seems like you're going for
> stuff you might paste in a configuration.nix
without much extra structure
and you can't paste two definitions of the same option in one configuration.nix
whereas modules that are potentially upstreamable are supposed to be safe to add to your imports | 00:38:52 |
mars | so i get the basic idea
modules/ for stuff you should know about about the NixOS module system before writing
profiles/ for extremely simple bits of Nix code that are basically just dumb config that you don't really have to understand anything to write
suites is, I guess, just a shorthand for importing a bunch of profiles | 00:40:59 |
mars | i don't love modules/, though, because potentially a digga user will have modules for NixOS, home-manager, nix-darwin, and (I just learned this also has modules today) devshell— which are all different module systems | 00:45:55 |