<niksnut>
siraben: I haven't done anything on that since then
cole-h has quit [Ping timeout: 240 seconds]
<siraben>
niksnut: what state did you get it up to?
<LnL>
niksnut: do you think there's a reasonable way for nix to determine whether a local install is single or multi-user?
<LnL>
new people running a nix command as sudo because they run into an issue is pretty common but that results in a bunch more problems since nix changes permissions in the store
<LnL>
I'm wondering if nix could bail out before touching anything in those cases
stigo has quit [Remote host closed the connection]
stigo has joined #nixos-dev
stoile has joined #nixos-dev
<das_j>
infinisil: Probably a question for you. Is there any reason the module system fails with `var.that.does.not.exist = mkIf false "test"`? I get that this is still an assignment to a non-existent option, but the module system strips that assignment later anyway
<das_j>
Or is that just too hard to implement and not worth the effort?
<infinisil>
das_j: I guess it would be problematic if you misspelled an option and it didn't even give an error
<infinisil>
And you can always conditionally assign options based on whether they exist with the `options` argument
<das_j>
Just stumbled over it for something like `lib.mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "20.09")`
<das_j>
huh? I can `options ?`? I always thought this results in an infinite recursion
<infinisil>
If you use optionalAttrs (and not mkIf) it shouldn't
<das_j>
cc ajs124
<infinisil>
Hm actually maybe there could be a `mkIfExists` which only assigns an option if it exists
<das_j>
While this increases complexity for only a minor benefit, I can see the benefit for myself ;)
<infinisil>
It might be an antipattern to condition assigments based on option existence
<ajs124>
in this case, we have to, because the options defaults to true, when it exists, but we want to have it false
<ajs124>
at the same time, 20.09 removed the option, but we want out code to work on 20.03 and 20.09
<das_j>
(it's services.nixosManual.showManual)
<infinisil>
Ah I see
<infinisil>
Yeah I guess for third-party backwards compat this is reasonable
<infinisil>
Although, maybe modules should expose a version of themselves, which can be checked by other modules. And backwards compat can only be broken if you increase the version
<das_j>
Well there could also be some stub thing. Something like `modules.stubOptions` which warns for each assigned option but does not fail
<das_j>
(and which does not override existing options of course)
saschagrunert has joined #nixos-dev
saschagrunert has quit [Remote host closed the connection]
cole-h has joined #nixos-dev
nschoe has joined #nixos-dev
alp has joined #nixos-dev
rajivr has quit [Quit: Connection closed for inactivity]