sphalerite changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | NixOS 19.03 released! https://discourse.nixos.org/t/nixos-19-03-release/2652 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html https://r13y.com | 19.03 RMs: samueldr,sphalerite | https://logs.nix.samueldr.com/nixos-dev
orivej has quit [Ping timeout: 244 seconds]
sir_guy_carleton has quit [Quit: WeeChat 2.4]
Synthetica has quit [Quit: Connection closed for inactivity]
drakonis has quit [Read error: Connection reset by peer]
drakonis has joined #nixos-dev
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
drakonis has quit [Quit: WeeChat 2.4]
drakonis has joined #nixos-dev
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-dev
drakonis_ has quit [Ping timeout: 250 seconds]
roberth has quit [Remote host closed the connection]
codyopel has quit [Read error: Connection reset by peer]
worldofpeace has quit [Remote host closed the connection]
matthewbauer has quit [Remote host closed the connection]
thefloweringash has quit [Remote host closed the connection]
Ericson2314 has quit [Read error: Connection reset by peer]
nocent has quit [Remote host closed the connection]
domenkozar[m] has quit [Read error: Connection reset by peer]
bennofs[m] has quit [Remote host closed the connection]
dtz has quit [Write error: Connection reset by peer]
zimbatm has quit [Remote host closed the connection]
timokau[m] has quit [Remote host closed the connection]
Ericson2314 has joined #nixos-dev
bennofs[m] has joined #nixos-dev
dtz has joined #nixos-dev
thefloweringash has joined #nixos-dev
matthewbauer has joined #nixos-dev
worldofpeace has joined #nixos-dev
zimbatm has joined #nixos-dev
timokau[m] has joined #nixos-dev
roberth has joined #nixos-dev
n_db has quit [Remote host closed the connection]
<arianvp> Oh that is extremely useful . Thanks
<arianvp> Not all valid domain names are valid unit names I think. So I should probably escape the unit names for acme as well
pie_ has quit [Ping timeout: 258 seconds]
<arianvp> I can't actually find any documentation in systemd what constitutes a 'valid' name so I'm not sure
lopsided98 has quit [Quit: No Ping reply in 180 seconds.]
lopsided98 has joined #nixos-dev
domenkozar[m] has joined #nixos-dev
pie_ has joined #nixos-dev
pie___ has joined #nixos-dev
pie_ has quit [Ping timeout: 250 seconds]
init_6 has joined #nixos-dev
init_6 has quit [Client Quit]
<arianvp> Does anybody have any clue how the stuff in nixos/modules/misc/nixpkgs.nix works?
<arianvp> localSystem (the parameter for nixpkgs) is defined in terms of system (which is 'deprecated')
<arianvp> and localSystem is set to localSystem = { system = system; } but its description says it should be any of lib.systems.examples.*
<arianvp> but non of those have the format { system; = system; } , but { config = <>; platform = <>; }; instead
<arianvp> it's all really confsusing, and the docs contradict eachother in multiple places and have examples that don't seem correct
<gchristensen> arianvp: you probably want roberth
<arianvp> oh wait, I see localSystem has apply = lib.systems.elaborate;
<arianvp> oh no.. :D
<niksnut> arianvp: don't feel bad, I don't understand it either
<gchristensen> me either :(
<arianvp> :'D
<gchristensen> I would have expected those parameters to be passed in to the NixOS function at call time
<arianvp> basically, I wanted to get rid of the `system` paremeter in all eval-config.nix calls, as it seems redundant, but then I got really confused
<niksnut> unfortunately cross-compilation support imposes a cognitive burden even if you don't use it
<gchristensen> right
<arianvp> So I guess nixos used to only have the `system` parameter. then later `localSystem` and `crossSystem` where added, and for backwards compatibility we define those in terms of `system` ?
<gchristensen> nixpkgs itself accepts just the "system" parameter, too
<arianvp> https://github.com/NixOS/nixpkgs/issues/49765 ah yeh roberth seems to have gone down the same rabbit hole as me
<{^_^}> #49765 (by roberth, 29 weeks ago, open): nixpkgs.{system,localSystem,crossSystem} *values* are useless
<roberth> arianvp: I believe you're right about nixpkgs.nix evolution with localSystem and crossSystem added later
<roberth> IMO system should always have been the system that is produced, and only a buildSystem option needed to be added
<ekleog> IMO the localSystem / crossSystem “simplification” is a mistake and we should be using only buildPlatform/hostPlatform/targetPlatform (with build and host that default to builtins.system, and target that defaults to host)
<ekleog> like, to get a custom targetPlatform for gdb (which shouldn't be too hard in theory) I've found nothing better than gdb.override { stdenv = (import <nixpkgs> {}).stdenv.override { targetPlatform = (import <nixpkgs> {}).lib.systems.examples.riscv32; }; } ; which is… not really optimal
<dhess> Could a NixOps dev please look at https://github.com/NixOS/nixops/pull/1123 ?
<{^_^}> nixops#1123 (by azazel75, 7 weeks ago, open): Allow to add a nixpkgs prefix that isn't a path but a string
<arianvp> im not even sure what system and platform even refer to in these contexts :P
<dhess> It should be straightforward.
<Mic92> domenkozar[m]: can you give andi- also access to our systemd fork?
<gchristensen> Mic92: sure
<domenkozar[m]> sure :)
<gchristensen> go for it domenkozar[m] :)
<domenkozar[m]> done
<Mic92> cool
<andi-> thanks <3
Jackneill has quit [Ping timeout: 245 seconds]
<gchristensen> lol
delroth1 has joined #nixos-dev
delroth has quit [Ping timeout: 258 seconds]
delroth1 is now known as delroth
<arianvp> roberth: IMO, we should just drop alll those parameters from NixOS and just only allow settings pkgs
<arianvp> setting pkgs*
<arianvp> the whole nixpkgs.config module is rather confusing (IMO)
<arianvp> (I guess that is sort of what you did with the pkgs.nixos function, but I don't see why we dont make that default)
<arianvp> roberth:what are your thoughts on that, given you've been in this rabbit hole before?
Jackneill has joined #nixos-dev
<roberth> it's actually an instance of a more general issue where you want to make things easy in a module by providing a bunch of options that in turn construct something, but if you already have that something, using the ready-made thing you have is going to be very awkward
<roberth> arianvp: so if you provide an option for the whole nixpkgs.pkgs, how do you deal with modules that set nixpkgs.config. What should that mean? Does the module provide a mere suggestion that the user wants to override by setting pkgs directly? Should the nixpkgs.config now describe an assertion about nixpkgs.pkgs? Suddenly all these definitions' intents are unclear.
<arianvp> honestly I think config should be deprecated as well.
<arianvp> but that might be controversial
<arianvp> because now you cant build up the pkgs config modularily.
<roberth> yeah nixpkgs' config has no merge function, which is weird when integrating into NixOS
<roberth> the least that should be done is to write more sanity checks for the nixpkgs.nix module
<roberth> to fix the confusion, we'd need something like sum modules (as in sum types): either specify nixpkgs.pkgs or specify nixpkgs.{config,system,overlays,...}
<arianvp> yeh we need ADTs
<arianvp> nixpkgs.config is actually not used very much https://gist.github.com/arianvp/739846905a2ca48e0e207ad6735dad8f
<roberth> overlays can still be merged in (at the cost of reevaluating the nixpkgs fixpoint)
<roberth> so overlays × (pkgs + (config × system))
<roberth> (does utf-8 work for you?)
<arianvp> well, pkgs takes overlays as an argument right
<roberth> overlays * (pkgs + (config * system))
<arianvp> so why not make those people do pkgs = (pkgs { overlays = ..})
<roberth> you can call `extend` on your pkgs
<arianvp> pkgs = import <nixpkgs> { overlays = []; }
<roberth> it allows overlays to be added modularly
<roberth> but whether that's a good thing depends... on `super` dependencies
<arianvp> is that a good idea though?
<arianvp> im not convinced that is desirable
<roberth> ok, suppose we need a patched Nix for some feature in hercules-ci-agent. We'd add it to our `{,nixops-}profile.nix` that people import into their deployment specs. We could set `nix.package` to set the package for nix-daemon, but any other packages that depend on `pkgs.nix` still see the wrong version
<roberth> in such a case adding an overlay that redefines `pkgs.nix` to be the patched version ensures that the whole system has a consistent Nix version
<roberth> s/feature/hotfix
<roberth> I guess it's better than not defining the overlay, but still doesn't provide guarantees :/
Synthetica has joined #nixos-dev
FRidh has joined #nixos-dev
rsa has quit [Ping timeout: 258 seconds]
FRidh has quit [Quit: Konversation terminated!]
drakonis1 has joined #nixos-dev
drakonis1 has quit [Quit: WeeChat 2.4]
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 258 seconds]
drakonis_ has quit [Ping timeout: 252 seconds]
pie___ has quit [Ping timeout: 272 seconds]
justanotheruser has quit [Ping timeout: 272 seconds]
<matthewbauer> ekleog: you should do `(import <nixpkgs> { crossSystem = { system = "riscv32-linux"; }; }).buildPackages.gdb`
<matthewbauer> the structured system thing was IMO a bad idea
<gchristensen> structured system?
<matthewbauer> arianvp: yeah I agree on getting rid of all of the options.nixpkgs.* things. it should just be a package set. all of the extendOverlays makes things very confusing
<matthewbauer> gchristensen: i'd like to be able to do just `import <nixpkgs> { crossSystem = "riscv32-linux"; }` which is much cleaner IMO
<matthewbauer> maybe we could add compatibility for that though
<gchristensen> ah
<ekleog> matthewbauer: Hmm I guess that would work too, thanks! Though I'd love if it was possilbe to just `(import <nixpkgs> { targetPlatform = "riscv32-linux"; }).gdb`, as using `.buildPackages` look like a hack to me -- still a better hack than what I had before
<matthewbauer> ekleog: yeah maybe we can add support for that. at least some handling so `(import <nixpkgs> { target = "..."})` -> `(import <nixpkgs> { crossSystem = ""; }).buildPackages`
<matthewbauer> we don't want to go crazy with all of these options, but it seems like a nice sugar for that
<ekleog> yeah, that's why I was thinking we might be better off dropping all `system`-related names and using only `*Platform` -- would also make one less weird semantic paragraph in the docs :)
<ekleog> like `import <nixpkgs> { crossSystem = ""; }` would just become `import <nixpkgs> { hostPlatform = ""; }`
<matthewbauer> yeah honestly target and platform are poorly defined. i'd be fine with dropping the naming altogether
pie_ has joined #nixos-dev
<matthewbauer> ekleog: part of the problem is we don't really support canadian cross right now. so how should build = a, host = b, target = c be handled?
<matthewbauer> i'm not 100% if it is worth supporting though
justanotheruser has joined #nixos-dev
justanotheruser is now known as Mr_Notheruser
<clever> gchristensen: what was the link to the nixos darwin infra? i lost it again
<gchristensen> check nixos-org-configurations' mac directory
<clever> ah, thanks
<clever> gchristensen: and the initial disk image the macs boot from, does this nix code include it, or will i need to image a mac somehow?
<gchristensen> check notes.md on how the initial disk image is created
<clever> ah
<gchristensen> obviously the actual disk image is not public :)
Mr_Notheruser has quit [Ping timeout: 252 seconds]
justanotheruser has joined #nixos-dev
drakonis_ has joined #nixos-dev
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #nixos-dev
<clever> [clever@amd-nixos:~/iohk/darwin]$ nixops modify -d sarov -I nixpkgs=https://releases.nixos.org/nixos/unstable/nixos-19.09pre177651.aeb464dfd37/nixexprs.tar.xz deployment.nix
<clever> gchristensen: ive been bothered by how nixos doesnt know its own version when pinning nixpkgs to a git rev
<clever> but this tarball has the version metadata!
<gchristensen> yeah...
<clever> gchristensen: and thanks to that, i got the nix-diff down to this: https://gist.github.com/cleverca22/bba8ab876af29a93b8dcfa8c435c1b11
<gchristensen> oh nice!
<clever> i need to find a good svg pastebin, lol
<clever> gist shrank that way too much
<gchristensen> I open things in firefox and then use screenshots.firefox.com :P
<clever> xterm has a native dump to (svg|html) button
<clever> if i wanted a png, i would just use xfce and imgur
<gchristensen> nice
<clever> you can even see my xterm version in the svg source, lol
<clever> gchristensen: i also notice nixops being "weird", --build-only gave that small diff, but --copy-only gives a different diff, it added itself to the ssh keys!
<gchristensen> O.o
<clever> the none backend generates its own keypair on first deploy, and inserts it into physical.nix, to open root up
<clever> --build-only doesnt make it, but --copy-only and beyond to
<matthewbauer> does anyone have strong opinions on this: https://github.com/NixOS/nixpkgs/pull/62177 ?
<{^_^}> #62177 (by matthewbauer, 1 day ago, open): opengl: provide swrast as fallback when no GL drivers are found
<matthewbauer> it would add swrast to opengl closures so that there is a fallback when we can't find any gl drivers
<matthewbauer> I need to readd addOpenGLRunpath for libglvnd
averell has joined #nixos-dev
justanotheruser has quit [Read error: Connection reset by peer]
obadz has quit [Ping timeout: 245 seconds]
obadz has joined #nixos-dev
Synthetica has quit [Quit: Connection closed for inactivity]
drakonis_ has quit [Ping timeout: 252 seconds]