worldofpeace_ changed the topic of #nixos-dev to: #nixos-dev NixOS Development (#nixos for questions) | NixOS stable: 20.03 ✨ https://discourse.nixos.org/t/nixos-20-03-release/6785 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 19.09 RMs: disasm, sphalerite; 20.03: worldofpeace, disasm | https://logs.nix.samueldr.com/nixos-dev
tilpner_ has joined #nixos-dev
risson has quit [Ping timeout: 240 seconds]
sphalerite has quit [Ping timeout: 240 seconds]
risson has joined #nixos-dev
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
sphalerite has joined #nixos-dev
tv has quit [Ping timeout: 240 seconds]
tv has joined #nixos-dev
disasm has quit [Ping timeout: 265 seconds]
disasm has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
tv has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 264 seconds]
dongcarl has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
tv has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
<drakonis> can't wait to do all of my modules with the new setup
tv has quit [Read error: Connection reset by peer]
dongcarl has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
tv has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
tv has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
drakonis has quit [Quit: ZNC 1.8.1 - https://znc.in]
drakonis has joined #nixos-dev
drakonis has quit [Client Quit]
drakonis has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
tv has joined #nixos-dev
dongcarl has joined #nixos-dev
ericnoan has quit [Ping timeout: 265 seconds]
marek_ has quit [Ping timeout: 265 seconds]
V has quit [Ping timeout: 265 seconds]
niksnut has quit [Ping timeout: 265 seconds]
kraem has quit [Ping timeout: 265 seconds]
kgz has quit [Ping timeout: 265 seconds]
V has joined #nixos-dev
V is now known as Guest7215
niksnut has joined #nixos-dev
Guest7215 has quit [Client Quit]
ericnoan has joined #nixos-dev
kraem has joined #nixos-dev
V_ has joined #nixos-dev
V_ has quit [Client Quit]
V_ has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
V_ is now known as V
marek has joined #nixos-dev
kgz has joined #nixos-dev
drakonis has quit [Quit: ZNC 1.8.1 - https://znc.in]
<colemickens> how do I convert SRI hash back to the classic currently used style?
drakonis has joined #nixos-dev
<samueldr> colemickens: IIRC there's a way with nix-hash
<colemickens> idk I've been at it for a while and can't figure it out
<colemickens> lol now I got it
<colemickens> nix-hash --to-base32 --type sha256 "sha256-18R7sZfLGmtYkz24jUaq268fJO2A71p+dWvGm4DgqEw="
<colemickens> oh no my secret hash
<samueldr> you'll have to rehash everything again now
dongcarl has joined #nixos-dev
dongcarl has quit [Read error: Connection reset by peer]
dongcarl has joined #nixos-dev
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts
drakonis- has joined #nixos-dev
drakonis has quit [Quit: WeeChat 2.9]
drakonis- is now known as drakonis
<aanderse> infinisil: why didn't i notice this freeform module work until now? it looks fantastic!
justanotheruser has joined #nixos-dev
rajivr has joined #nixos-dev
cole-h has quit [Quit: Goodbye]
bennofs has joined #nixos-dev
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bennofs has joined #nixos-dev
bennofs has quit [Client Quit]
bennofs has joined #nixos-dev
bennofs has quit [Client Quit]
alp has joined #nixos-dev
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts
Mic92 has quit [Ping timeout: 246 seconds]
Mic92 has joined #nixos-dev
AlwaysLivid has joined #nixos-dev
rnhmjoj has left #nixos-dev ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
alp has quit [Remote host closed the connection]
alp has joined #nixos-dev
orivej has joined #nixos-dev
__monty__ has joined #nixos-dev
<infinisil> aanderse: The PR changed the title a couple times, and it's been sitting idle for a while :D
AlwaysLivid has quit [Remote host closed the connection]
AlwaysLivid has joined #nixos-dev
ScottHDev41 has joined #nixos-dev
ScottHDev4 has quit [Ping timeout: 240 seconds]
ScottHDev41 is now known as ScottHDev4
alp has quit [Ping timeout: 272 seconds]
ScottHDev4 has quit [Ping timeout: 256 seconds]
ScottHDev4 has joined #nixos-dev
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts
alp has joined #nixos-dev
noonien has joined #nixos-dev
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
<infinisil> I see
<aanderse> the module in master has a `paths` option: listOf submodule ...
<aanderse> the submodule options aren't exhaustive, of course, so provides an extraConfig
<aanderse> i'm wondering if we can use free form modules in a list as a top level option kinda...
<aanderse> we could make it so you do: paths = [ { settings = { free form stuff }; } { settings = { more free form stuff }; } ]
<aanderse> but i'm wondering if we can skip the `settings` bit, and just accept free form options
<aanderse> so... paths = [ { free form stuff } { more free form stuff } ]
<infinisil> Oh yeah totally, nesting under settings isn't needed
<aanderse> that way each entry in `paths` can accept some well defined options (via `mkOption`) but also free form, to cover the other values
<infinisil> Yeah that should work
<infinisil> Can get rid of the extraConfig option in the submodule
<aanderse> that was my hope
<infinisil> If it were me, I'd also change `paths` to `attrsOf (submodule ...)`
<aanderse> PR discusses that, list was chosen because of sort order being relevant
<infinisil> Oh I see
<aanderse> given "path" is the key
<infinisil> Which PR is that?
<aanderse> it doesn't make sense because "path" can be a bunch of things
<aanderse> and composable
<{^_^}> #87702 (by jslight90, 14 weeks ago, merged): nixos/logrotate: Add options for basic paths
<aanderse> so one entry could be `"/var/log/foo.log"` and another could be `"/var/log/*.log"`
<aanderse> nix will sort, and not necessarily in the way you want
<infinisil> I see, yeah I guess that makes sense
<infinisil> listOf it is then
<aanderse> the alternative is a `priority` field, which also would have been fine
<aanderse> mhm
<infinisil> Hmm priority
<aanderse> so i should change `paths.type` to `type = with types; listOf (submodule { freeFormType = attrs; options = pathOptions; });` ?
<infinisil> pathOptions itself already defines { options = .. }; but yup
<aanderse> oh, right, ok
<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> I think a good solution to ordering of attribute sets is to use rycee's DAG approach: https://gitlab.com/rycee/nur-expressions/blob/master/lib/dag.nix
<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 :)
<{^_^}> #95804 (by eyJhb, 9 minutes ago, open): androidenv: fix convert files not quoting urls
<eyJhb> So only ran on manual user interaction when someone wants to update it. Should be fairly straightforward
orivej has joined #nixos-dev
alp has quit [Remote host closed the connection]
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
AlwaysLivid has quit [Ping timeout: 272 seconds]
bennofs has joined #nixos-dev
alp has joined #nixos-dev
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts
bennofs has joined #nixos-dev
<infinisil> Merged it :) Seems like CI is on vacation
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
noonien has quit [Quit: Connection closed for inactivity]
bennofs has joined #nixos-dev
evanjs has quit [Quit: ZNC 1.8.1 - https://znc.in]
evanjs has joined #nixos-dev
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bennofs has joined #nixos-dev
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-dev
bennofs has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
orivej has quit [Ping timeout: 264 seconds]
evanjs has quit [Quit: ZNC 1.8.1 - https://znc.in]
evanjs has joined #nixos-dev
bennofs has joined #nixos-dev
cole-h has joined #nixos-dev
disasm has quit [Ping timeout: 246 seconds]
disasm has joined #nixos-dev
bennofs_ has joined #nixos-dev
bennofs has quit [Ping timeout: 256 seconds]
julm has quit [Ping timeout: 256 seconds]
julm has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-dev
drakonis1 has joined #nixos-dev
drakonis1 has quit [Client Quit]
drakonis1 has joined #nixos-dev
drakonis1 has quit [Ping timeout: 260 seconds]
rajivr has quit [Quit: Connection closed for inactivity]
armin has quit [Quit: leaving]
alp has quit [Ping timeout: 272 seconds]
orivej has joined #nixos-dev
noonien has joined #nixos-dev
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts
cole-h has quit [Quit: Goodbye]
cole-h has joined #nixos-dev
cole-h has quit [Quit: Goodbye]
__monty__ has quit [Quit: leaving]
garbas has quit [Quit: WeeChat 2.8]
garbas has joined #nixos-dev
garbas has quit [Ping timeout: 246 seconds]
tdeo has quit [Read error: Connection reset by peer]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tdeo has quit [Excess Flood]
tdeo has joined #nixos-dev
tom39291 has quit [Ping timeout: 260 seconds]
tom39291 has joined #nixos-dev
<{^_^}> firing: RootPartitionLowInodes: https://status.nixos.org/prometheus/alerts