ScottHDev4 has quit [Quit: Ping timeout (120 seconds)]
ScottHDev4 has joined #nixos-dev
<aanderse>
infinisil: do you have a few minutes to take a look at a module and chat? i have questions about your free form stuff and how it might be applied to the logrotate module (master, not stable branch)
<infinisil>
aanderse: Yeah in a bit
<aanderse>
infinisil++
<{^_^}>
infinisil's karma got increased to 335
<aanderse>
much appreciated :D
<infinisil>
:D
AlwaysLivid has quit [Remote host closed the connection]
AlwaysLivid has joined #nixos-dev
orivej has quit [Ping timeout: 265 seconds]
<infinisil>
aanderse: Got time now
<aanderse>
ok cool
<aanderse>
the module used to have a simple `.config` lines option
<aanderse>
that was it
<aanderse>
someone made a PR to structure it a bit more
<aanderse>
file format for logrotate is relatively simple, just specify your log files followed by some key + values
<aanderse>
cool... so this should just magically work eh? :)
<aanderse>
regarding your "Hmm priority"
<aanderse>
are you strongly inclined to think that would be better?
<infinisil>
Well listOf doesn't allow overriding at all
<infinisil>
Of other definitions
<infinisil>
But I guess it is more natural still
<aanderse>
gonna be really hard to override with attribute set
<aanderse>
key has to match exactly
<aanderse>
it is always nice to do that sort of thing in nix language itself...
<aanderse>
but sometimes the shoe just doesn't fit
<infinisil>
Alternatively you could put the path into the set as well
<infinisil>
And give an arbitrary name as key
<aanderse>
hmm
<infinisil>
So e.g. `{ myAppLogs = { path = "/var/log/myapp/*.log"; priority = 10; ...; }; }`
<aanderse>
the ability to merge would be really valuable... currently a couple of our services that can't log to journald and create their own log files don't get rotated
<aanderse>
`httpd` is an example
<aanderse>
you need to configure log rotation, but if we were to use the module to do so the user can't override it
<infinisil>
Hm yeah
<aanderse>
i found that out the hard way a long time ago when a prod server crashed from a **massive** log
<aanderse>
i just assumed my os would do something sane like rotate logs for me, like every other os i've ever used :S
<aanderse>
so maybe there is value in reconsidering this...
<infinisil>
But that's not in nixpkgs yet, and the interface is not very easy to get
<aanderse>
well feature freeze coming up... need to figure this out soon i guess :p
<infinisil>
With this you could do `{ myAppLogs = { path = ...; }; myAppSpecialLog = lib.dag.entryAfter [ "myAppLogs" ] { path = ...; }; }`
<infinisil>
aanderse: If you can be bothered, I'd use the attrsOf with priority and path options, otherwise I'd stick with listOf for now
<aanderse>
even just `{ httpd = { path = ...; }; }` and then having the user able to merge with `httpd` would be good i guess
<aanderse>
you're convincing me
<aanderse>
:P
<infinisil>
:D
<infinisil>
I should go ahead with my RFC to deprecate listOf altogether
<infinisil>
And make better replacements for it
<aanderse>
oh boy... :S
<aanderse>
i'll need to read that one carefully to agree, i'm sure
<aanderse>
heh
<aanderse>
oh... ok better replacement, nevermind
<aanderse>
👍️
ScottHDev4 is now known as ScottHDev
<infinisil>
E.g. all `listOf str` could be replaced with an `attrsOf bool`, but with the twist that `[ "foo" "bar" ]` would still automatically get changed into `{ foo = true; bar = true; }`
ScottHDev is now known as Guest62892
<infinisil>
So backwards compatible and overridable
* aanderse
works on logrotate PR
Guest62892 is now known as ScottHDev4
<aanderse>
thanks again for the help :)
<infinisil>
Np :)
bennofs has joined #nixos-dev
<eyJhb>
Anybody have time to merge this - https://github.com/NixOS/nixpkgs/pull/95804 ? Basic change for the androidenv `generate.sh` script, which did not quote the URLs of the fetchurl :)