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
drakonis_ has joined #nixos-dev
Drakonis__ has joined #nixos-dev
drakonis has quit [Ping timeout: 256 seconds]
Drakonis__ has quit [Quit: Leaving]
drakonis has joined #nixos-dev
betawaffle has quit [Ping timeout: 260 seconds]
angerman has quit [Read error: Connection reset by peer]
emilazy has quit [Ping timeout: 246 seconds]
angerman has joined #nixos-dev
drakonis1 has joined #nixos-dev
emilazy has joined #nixos-dev
georgyo has quit [Ping timeout: 240 seconds]
drakonis_ has quit [Read error: Connection reset by peer]
drakonis2 has joined #nixos-dev
claudiii_ has quit [Ping timeout: 246 seconds]
drakonis1 has quit [Ping timeout: 260 seconds]
betawaffle has joined #nixos-dev
georgyo has joined #nixos-dev
claudiii_ has joined #nixos-dev
angerman has quit [Ping timeout: 256 seconds]
angerman has joined #nixos-dev
orivej has joined #nixos-dev
ryantrinkle has joined #nixos-dev
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos-dev
drakonis2 has quit [Ping timeout: 264 seconds]
drakonis2 has joined #nixos-dev
cole-h has quit [Ping timeout: 264 seconds]
cole-h has joined #nixos-dev
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-dev
drakonis2 has quit [Read error: Connection reset by peer]
drakonis1 has joined #nixos-dev
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #nixos-dev
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
drakonis has quit [Read error: Connection reset by peer]
fps has joined #nixos-dev
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
alp has joined #nixos-dev
rajivr has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-dev
cole-h has quit [Quit: Goodbye]
orivej_ has joined #nixos-dev
orivej has quit [Ping timeout: 264 seconds]
andi- has quit [Ping timeout: 260 seconds]
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
Shados has quit [Quit: Shados]
Shados has joined #nixos-dev
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
lopsided98 has quit [Quit: No Ping reply in 180 seconds.]
lopsided98 has joined #nixos-dev
teto has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
__monty__ has joined #nixos-dev
Cale has quit [Ping timeout: 256 seconds]
alp has joined #nixos-dev
Cale has joined #nixos-dev
<asymmetric> it used to be possible to download latest nix at https://releases.nixos.org/nix/latest/install
<asymmetric> but not anymore
<asymmetric> this could be useful for travis and other ci setups to get the latest version
<asymmetric> any idea why it was removed?
asymmetric has left #nixos-dev ["Leaving"]
asymmetric has joined #nixos-dev
<eyJhb> asymmetric: https://nixos.org/nix/install is the latest, right?
<eyJhb> Can't that be used
<asymmetric> ah yes, thx
<eyJhb> Np
<eyJhb> But for anyone looking here https://nixos.org/download.html under more, old releases page is dead
<eyJhb> And that might be the reason that what asymmetric said does not work
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
julm has quit [Ping timeout: 258 seconds]
julm has joined #nixos-dev
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
<manveru> damn flakes are so neat :)
<{^_^}> nixops#1365 (by adisbladis, 22 hours ago, merged): Flake support
<manveru> oh my
<manveru> i am atm combining flakes with terranix :)
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
FRidh has joined #nixos-dev
<manveru> guess i gotta step up my game to make it as pretty as that...
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
<rnhmjoj> do you have any idea why in a NixOS test `machine.screenshot()` shows a black screen with blinking cursor instead of the bootloader (grub) screen?
<rnhmjoj> this is foiling my attempts of testing grub password protection
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos-dev
andi- has joined #nixos-dev
<rnhmjoj> ironically, i can see grub on the (serial?) console output
<srk> rnhmjoj: maybe /boot/grub/grub.cfg needs adjusting a bit to handle vm graphics, it does some graphics init at start
zarel has quit [Ping timeout: 256 seconds]
zarel has joined #nixos-dev
<rnhmjoj> srk: i wonder if i could just use the console output and implement a `wait_for_console_text`
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-dev
<srk> rnhmjoj: yup, sounds better than doing OCR
<srk> there's machine.shell already used by .execute su it shouldn't be that hard
<rnhmjoj> srk: thanks, i take a look
<clever> rnhmjoj: in linux, you can also read the text consoles in /dev/
<clever> [root@system76:~]# hexdump -C /dev/vcs1
<clever> rnhmjoj: i believe this contains the full text from tty1
orivej has quit [Ping timeout: 246 seconds]
drakonis has joined #nixos-dev
orivej has joined #nixos-dev
drakonis1 has quit [Ping timeout: 264 seconds]
<domenkozar[m]> what kind of anti-patterns have you noticed in Nix language?
evanjs has quit [Read error: Connection reset by peer]
<Profpatsch> domenkozar[m]: `rec {}` in any form
<Profpatsch> `with` in any form
drakonis_ has joined #nixos-dev
evanjs has joined #nixos-dev
drakonis has quit [Ping timeout: 256 seconds]
<adisbladis> What Profpatsch said :)
<rnhmjoj> clever: thank you, i didn't know about /dev/vcs1
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-dev
<kloenk> The new nix-command feature has some sort of plugins. Does anybody have an example plugin?
Jackneill has quit [Ping timeout: 256 seconds]
Jackneill has joined #nixos-dev
<domenkozar[m]> I agree about rec :)
<gchristensen> domenkozar[m]: trying to do /everything/ with nix
orivej has quit [Ping timeout: 256 seconds]
FRidh has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
FRidh has joined #nixos-dev
FRidh has quit [Quit: Konversation terminated!]
FRidh has joined #nixos-dev
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #nixos-dev
<domenkozar[m]> right now I'm focused only on the language
<srk> what's wrong with rec? :)
<adisbladis> srk: It's counter intuitive, especially around overrides.
<srk> hmm, ok. but fixed points are kind-of first class nix citizen
<adisbladis> drv = (mkDerivation rec { name = "${pname}-${version}"; pname = "hello"; version = "1.0"; })
<adisbladis> drv.overrideAttrs(old: { version = "1.1"; })
<adisbladis> Will not override name
<kloenk> I once saw rec in an flake output function. Just there because we do it everywhere
<srk> adisbladis: thanks, makes sense
<adisbladis> srk: It's pretty much equivalent to `let pname = "hello"; version = "1.0"; in (mkDerivation { name = "${pname}-${version}"; }) ` anyway
<adisbladis> In the `let` version I think the override behaviour is more obvious
* srk agrees
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-dev
<Profpatsch> srk: rec is a superfluous language feature.
<Profpatsch> It can be completely replaced by `let`
<Profpatsch> In addition, it makes it too easy to introduce recursion with the wrong shadowing.
<Profpatsch> Also, it conflates symbols with attribute names
<Profpatsch> A stray `rec` has fouled many a day
* Profpatsch is firmly in the “distinguish let and letrec” camp by now
<adisbladis> "A stray `rec` has fouled many a day" :D
<adisbladis> I remember `rec` being a great source of confusion for me while finding my way in the nix ecosystem
<adisbladis> It didn't behave at all the way I thought it would.
<Profpatsch> … until you found how `let` and `with` interact? :)
<adisbladis> Profpatsch: I've taken to calling `rec` "syntactically dishonest"
<Profpatsch> okay listen guyse, how about we remove let and rec and just use with everywhere
<adisbladis> Oh no
<adisbladis> with is also evil :/
<Profpatsch> And have a special `with` form which makes it possible to recursively define what you put implicitly in scope!
<Profpatsch> \o/
<Profpatsch> one keyword to rule them all
<kloenk> adisbladis: with can be helpfull. but only if you put it on only one array like packages
<Profpatsch> Okay, this is approaching Scala levels of implicit absurdity, gonna stop.
<NinjaTrappeur> domenkozar[m]: nix directly tied to the language, but abusing FOD is a pretty severe anti-pattern.
<domenkozar[m]> FOD?
<NinjaTrappeur> +1 for the "with" argument.
<NinjaTrappeur> sorry, Fixed Output Derivation
<adisbladis> domenkozar[m]: Fixed-output derivations
<domenkozar[m]> NinjaTrappeur: that sounds more like design pitfals
<domenkozar[m]> rather than anti-patterns
<domenkozar[m]> those are meant to help the user be better at Nix and avoid traps
<domenkozar[m]> vs what would I do if I designed Nix again
<domenkozar[m]> different audience :)
orivej_ has joined #nixos-dev
<adisbladis> domenkozar[m]: Hmm, who is your target audience?
<gchristensen> okay but are you taking these as notes for later? :P
orivej has quit [Ping timeout: 264 seconds]
<adisbladis> Abusing FODs are not really a language anti-pattern. But it's becoming more and more common in nixpkgs.
<NinjaTrappeur> right :)
<NinjaTrappeur> I'dd add the // operator
<adisbladis> How so ?
<NinjaTrappeur> it does not perform a deep merge by default, it bite me up quite a few times.
<NinjaTrappeur> *bit me up
<domenkozar[m]> Good point :)
das_j has joined #nixos-dev
ajs124 has joined #nixos-dev
Scriptkiddi has joined #nixos-dev
<domenkozar[m]> oh an nested quotes!
<{^_^}> domenkozar/nix.dev#31 (by domenkozar, 4 minutes ago, open): Anti pattern: // operator
<{^_^}> domenkozar/nix.dev#32 (by domenkozar, 3 minutes ago, open): Anti pattern: nesting multi-line quotations
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos-dev
justanotheruser has quit [Ping timeout: 272 seconds]
<Profpatsch> NinjaTrappeur: If you are going to suggest lenses I’m gonna hit you :)
<NinjaTrappeur> 🤣
<Profpatsch> Dhall has the very nice /\ operator which merges structs recursively
<Profpatsch> > printf '{ a = { b = 42 } } /\ { a = { c = 23 } }' | dhall
<{^_^}> error: syntax error, unexpected $undefined, expecting ')', at (string):316:8
<Profpatsch> { a = { b = 42, c = 23 } }
<Profpatsch> however: > printf '{ a = { b = 42 } } /\ { a = {} }' | dhall
<Profpatsch> Error: Field collision on: a
<Profpatsch> 1│ /\ { a = {} }
<Profpatsch> ah lol, I’m dumb, {} is the empty record type, {=} is the empty record
<Profpatsch> > printf '{ a = { b = 42 } } /\ { a = {=} }' | dhall
<{^_^}> error: syntax error, unexpected $undefined, expecting ')', at (string):316:8
<Profpatsch> { a.b = 42 }
<Profpatsch> Better example of not merging scalars: > printf '{ a = { b = 42 } } /\ { a = 23 }' | dhall
<Profpatsch> Error: Field collision on: a
<Profpatsch> 1│ /\ { a = 23 }
<NinjaTrappeur> aha
<NinjaTrappeur> nix-repl> lib.recursiveUpdate { a = { b = 42; }; } { a = 42; }
<NinjaTrappeur> { a = 42; }
<NinjaTrappeur> oops
<NinjaTrappeur> oh, no nevermind, it make sense
<NinjaTrappeur> "The recursion stops when one of the attribute values is not an attribute set, in which case the right hand side value takes precedence over the left hand side value. "
<Profpatsch> yeah, for varying definitions of “sense” :)
<NinjaTrappeur> yeah
<NinjaTrappeur> as alway
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 246 seconds]
justanotheruser has joined #nixos-dev
<{^_^}> domenkozar/nix.dev#33 (by domenkozar, 1 minute ago, open): Add rec anti pattern
Jackneill has quit [Ping timeout: 256 seconds]
Jackneill has joined #nixos-dev
rajivr has quit [Quit: Connection closed for inactivity]
orivej has joined #nixos-dev
<domenkozar[m]> merged and opened one for <..> syntax: https://github.com/domenkozar/nix.dev/pull/34
<{^_^}> domenkozar/nix.dev#34 (by domenkozar, 3 minutes ago, open): <nixpkgs> anti pattern
<mdlayher> hey all! i'm going live at https://twitch.tv/mdlayher to work on a NixOS channel metadata Prometheus exporter in Go that could be used to power status.nixos.org! feel free to stop by and chat!
drakonis has joined #nixos-dev
<gchristensen> mdlayher++
<{^_^}> mdlayher's karma got increased to 1
drakonis1 has joined #nixos-dev
drakonis_ has quit [Read error: Connection reset by peer]
drakonis has quit [Ping timeout: 272 seconds]
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-dev
drakonis has joined #nixos-dev
<abathur> anyone know what would cause "Failed to get unit file state for nix-daemon.service" (and again for nix-daemon.socket) errors on nix install? (https://staging.travis-ci.org/github/abathur/resholved/jobs/760746#L232)
drakonis1 has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 264 seconds]
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 272 seconds]
orivej has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
<Ericson2314> anyone aware of problem with `nix copy` on darwin?
<kloenk> Ericson2314: there is this open issues. maybe that does help? https://github.com/NixOS/nix/issues/3372
<{^_^}> nix#3372 (by lheckemann, 15 weeks ago, open): ssh-ng:// much slower for copying than ssh://
<Ericson2314> kloenk: this is just one machine file://
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-dev
<Profpatsch> domenkozar[m]: lgtm
<Profpatsch> One thing that is a bit confusing is that the big page title is “Nix Configuration Language”
<Profpatsch> But this is about pitfalls
zarel has quit [Ping timeout: 240 seconds]
zarel has joined #nixos-dev
alp has joined #nixos-dev
zarel has quit [Quit: ZNC 1.7.5 - https://znc.in]
zarel has joined #nixos-dev
teto has quit [Quit: WeeChat 2.8]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
<abathur> Ericson2314: by problem, you do mean that it's slow as in the issue? not working at all?
<Ericson2314> abathur: it apprently fails trying to delete temp files taht don't exist
<abathur> no good answer as I've never used nix copy; but I had a thought if it was just slow :P
<Ericson2314> abathur: thanks anyways
<Ericson2314> saw the problem on linux too, so maybe it won't be so bad to debug
cole-h has joined #nixos-dev
zarel has quit [Ping timeout: 264 seconds]
zarel has joined #nixos-dev
justanotheruser has quit [Ping timeout: 256 seconds]
drakonis has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
<mdlayher> here's what i came up with today. it's not done yet but i just wrapped my stream because i have to take off for a while
<mdlayher> let me know what you think and feel free to open issues, thanks!
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #nixos-dev
justanotheruser has joined #nixos-dev
MichaelRaskin has joined #nixos-dev
teto has joined #nixos-dev
alp has joined #nixos-dev
greizgh has quit [Quit: greizgh]
greizgh has joined #nixos-dev
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
drakonis_ has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-dev
drakonis_ has joined #nixos-dev
luc65r has joined #nixos-dev
<luc65r> Hi
<luc65r> I'm tring to build my system with gcc10 and binutils 2.34: https://github.com/NixOS/nixpkgs/pull/89793. That broke systemd too...
<{^_^}> #89793 (by luc65r, 4 days ago, open): Bump gcc to gcc10 and binutils to 2.34
<luc65r> Most of the services (like journalctl) fail with code 127
orivej has quit [Ping timeout: 264 seconds]
<luc65r> But I can launch them manually without any problem
<luc65r> Does any have an idea of what is going on?
orivej has joined #nixos-dev
das_j has quit [Quit: killed]
ajs124 has quit [Quit: killed]
Scriptkiddi has quit [Quit: killed]
Scriptkiddi has joined #nixos-dev
ajs124 has joined #nixos-dev
das_j has joined #nixos-dev
luc65r has quit [Remote host closed the connection]
luc65r has joined #nixos-dev
janneke_ has joined #nixos-dev
janneke_ is now known as janneke`
orivej has quit [Ping timeout: 246 seconds]
orivej_ has joined #nixos-dev
janneke has quit [Ping timeout: 272 seconds]
orivej_ has quit [Ping timeout: 260 seconds]
FRidh has quit [Quit: Konversation terminated!]
alp has joined #nixos-dev
tokudan has quit [Remote host closed the connection]
tokudan has joined #nixos-dev
luc65r has quit [Read error: Connection reset by peer]
luc65r has joined #nixos-dev
luc65r has quit [Client Quit]
janneke` is now known as janneke
globin has joined #nixos-dev
justanotheruser has quit [Ping timeout: 264 seconds]
__monty__ has quit [Quit: leaving]
Jackneill has quit [Ping timeout: 240 seconds]
Jackneill has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-dev
julm has quit [Ping timeout: 258 seconds]
drakonis1 has joined #nixos-dev
drakonis_ has quit [Read error: Connection reset by peer]
drakonis2 has joined #nixos-dev
julm has joined #nixos-dev
drakonis1 has quit [Ping timeout: 272 seconds]
alp has quit [Remote host closed the connection]
alp has joined #nixos-dev
alp has quit [Remote host closed the connection]
alp has joined #nixos-dev
drakonis_ has joined #nixos-dev
drakonis2 has quit [Ping timeout: 246 seconds]
justanotheruser has joined #nixos-dev
drakonis1 has joined #nixos-dev
drakonis_ has quit [Ping timeout: 260 seconds]
alp has quit [Ping timeout: 272 seconds]
justanotheruser has quit [Ping timeout: 240 seconds]