xelxebar has quit [Remote host closed the connection]
xelxebar has joined #nixos
<kalbasit>
in nixpkgs, is there a way I can access nix's configuration such as`substituters` or `trusted-public-keys`?
<kalbasit>
is there a builtins or a function for such an access?
<gchristensen>
no
<gchristensen>
what are you trying to do? sounds interesting
reallymemorable has joined #nixos
<kalbasit>
I want to write `~/.config/nix/nix.conf` to include our private cache but I want to include any existing substituter/trusted-public-key to avoid overriding things
riz71 has joined #nixos
<gchristensen>
how about extra-substituters ?
<kalbasit>
or does nix end up merging options from `/etc/nix/nix.conf` and `~/.config/nix/nix.conf`? ๐ค
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
reallymemorable has quit [Client Quit]
<kalbasit>
gchristensen: interesting option. I would have to also add trusted-substituters right?
<{^_^}>
[nixpkgs] @immae opened pull request #85733 โ nixos/texlive: Fix texlive for ghostscript 9.50 โ https://git.io/Jfk8f
<kalbasit>
there isn't one for the trusted public keys though
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
<gchristensen>
the substituters need to be listed in the root nix.conf either way for them to be trusted
<kalbasit>
I see. Alright so back to "hey follow this and edit that" :-)
proofofkeags has quit [Remote host closed the connection]
jluttine has joined #nixos
<gchristensen>
kalbasit: you could write out a config you like at /etc/nix/kalbasit.conf
<gchristensen>
and then ...
<gchristensen>
tell the user to add `include /etc/nix/kalbasit.conf` to the end of their nix.conf
<cole-h>
Is `include` a standard feature of all *.conf? It never occurred to me that that could be done in nix.conf, even though I've seen it in other *.conf
<jackdk>
I am having trouble using buildBazelPackage. nix-build is falling over due to `bazel` trying to run `/bin/bash`. Is there a guide on how to drive this function anywhere? All I could really find was https://logs.nix.samueldr.com/nixos/2018-09-28#1605560; which 404s for me
<{^_^}>
[nixpkgs] @jonringer pushed commit from @Lucus16 to master ยซ python3Packages.simpleaudio: init at 1.0.4 ยป: https://git.io/Jfk8O
<kalbasit>
gchristensen: that's interesting. I did not know about `include`. That may work! I assume the file can be anywhere and not just in `/etc` right?
<gchristensen>
kalbasit: yeah
<kalbasit>
hurray!
<gchristensen>
also it supports "!include /path/to/..." and the '!' says don't error if it doesn't exist
<cole-h>
That doesn't sound safe, but I don't know what I'm talking about
<gchristensen>
yeah, I don't think itis great
<kalbasit>
that's even better as the file may not exist if it got garbage collected
<kalbasit>
it's mostly for lorri actually. Any `nix-shell` or `nix-build` I do I explicitely set substituters with `--option`
<cole-h>
Do `include`s clobber or merge? e.g. if `trusted-users = @wheel` in nix.conf and `trusted-users = someguy` in include.conf, which one takes effect? Order-dependent?
<{^_^}>
[nixpkgs] @jonringer pushed commit from @evanjs to master ยซ pythonPackages.pyroma: init at 2.6 ยป: https://git.io/Jfk8G
copy has quit [Read error: Connection reset by peer]
copy has joined #nixos
<kalbasit>
cole-h: that's a good question, curious as well
<gchristensen>
I assume list things append and not list things clobber but I don't know!
<{^_^}>
[nixpkgs] @nh2 opened pull request #85735 โ journald service docs: Add helpful comments about the journal getting full โ https://git.io/Jfk8C
<hackerfoo>
And tab completion even works for nix-build, which is cool.
<hackerfoo>
(on the generated attributes)
<kalbasit>
cole-h: the answer is clobber
morgrimm has quit [Ping timeout: 240 seconds]
<cole-h>
kalbasit++ Thanks for reporting back.
<{^_^}>
kalbasit's karma got increased to 2
<hackerfoo>
Couldn't you use that to generate `~/.config/nix/nix.conf`? You could make an expression to generate dot files in your home directory. I think someone has done something like that.
<kalbasit>
hackerfoo: that was my first instinct, but given that about 200 people are using Nix on their machines I cannot assume that no one has added their own set of substituters. Setting it in the `~/.config/nix/nix.conf` seem to clobber whatever is at /etc/nix/nix.conf
<hackerfoo>
kalbasit: I mean, you can parse `/etc/nix/nix.conf` and convert the data to a nix expression in a derivation, import that and then append what you want, and write `~/.config/nix/nix.conf` in another derivation.
blibberblob has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates ยซ hackage-packages.nix: automatic Haskell package set update ยป: https://git.io/Jfk89
<riz71>
trying to use arrayfire, managed to get the package built but i'm not sure how to get the af headers into the buildInputs of a haskell project
<kalbasit>
hackerfoo: right I see what you mean now. That could work to an extent (for instance include statements)
<kalbasit>
it should work 99% of the time though as I doubt anyone is using include
<kalbasit>
hackerfoo++ thanks!
<{^_^}>
hackerfoo's karma got increased to 1
<riz71>
https://github.com/arrayfire/arrayfire-haskell/blob/master/default.nix is the file i built and af is the derivation i need but i'm not sure if i'm overloading the package correctly to point to the version of array fire i built because no matter how i point my release.nix to this it can't find the headers for af
<jackdk>
Okay, made some progress on my bazel problem, but the project I'm trying to build (sorbet) is failing to fetch `@llvm_toolchain` as it fails to detect host version. Anyone here have bazel + nixos experience?
<gchristensen>
unless you write the stuff to an output, like $out, it is all deleted
<qy[m]>
ah, ok
ris has quit [Ping timeout: 256 seconds]
<dsx>
cole-h: one bumpy upgrade later, it works perfectly. Thank you!
<jackdk>
"execvp(/build/output/external/com_grail_bazel_toolchain/toolchain/tools/llvm_release_name.py, ...)": No such file or directory - hm. this error is telling. even if I put python in the `nativeBuildInputs` I still get it, which seems weird
<clever>
jackdk: what is the #! in that file?
reallymemorable has quit [Quit: reallymemorable]
<jackdk>
clever: `#!/usr/bin/env python`
<clever>
jackdk: /usr/bin/env doesnt exist in the sandbox, you have to run patchShebangs on it
gustavderdrache has quit [Quit: Leaving.]
<jackdk>
clever: okay. how can I do that when it's something that bazel downloads and tries to run?
<clever>
jackdk: tell bazel to download only, patch it, then tell it to run things
<cole-h>
dsx: ;) What was the actual problem? Trying to install 20.03 HM on 19.09 NixOS?
reallymemorable has joined #nixos
<dsx>
cole-h: pretty much yes.
justanotheruser has quit [Ping timeout: 272 seconds]
<jackdk>
clever: you can do that!?
<cole-h>
Hah. That's what I was trying to get at with the nix-channels commands and stuff x) Sorry I wasn't being completely clear, but happy that you eventually got there
<clever>
jackdk: youll need to find flags for bazel to force it to do that
<jackdk>
clever: so it looks like buildBazelPackage has this logic built-in: it tries to create a -deps derivation first by running `bazel fetch`, which means that it wants to write this python script as part of that fetch, putting us in an IFD-esque situation
<dsx>
cole-h: thanks again! That could have been much worse otherwise :)
<clever>
jackdk: you can probably just patch it in the 2nd derivation, without any IFD
<jackdk>
sorry, it runs that python script to decide what llvm to download
Kyndig has joined #nixos
<kalbasit>
has anyone installed a proxy for `cache.nixos.org` in their home? At some point I added an nginx to do just that but I had to update my configurations everywhere to use http:// instead of https:// but I also broken any system that did not have that set :(
<clever>
jackdk: that will just fail, because any llvm it downloads wont be patched correctly
<clever>
jackdk: you need to stop it from trying to download an llvm
<Kyndig>
So, I don't fully understand the whole hydra/build/release process, but shouldn't the just-released 20.03 channel include versions of the packages which build successfully?
<Kyndig>
I've been waiting for the release because build-managers/ninja was broken
justanotheruser has joined #nixos
<Kyndig>
404 error for a patch
proofofkeags has joined #nixos
<Kyndig>
but 20.03 still has the same old version of the build
jarlg has quit [Quit: WeeChat 2.6]
<Kyndig>
whereas unstable has a new version that's fixed
<worldofpeace>
the output of the fetchpatch derivation is likely cached
<Kyndig>
and wondering if in general i should be tracking unstable
<Kyndig>
because I have to rebuild entir esytem
<Kyndig>
system
<Kyndig>
i don't own the machine
<clever>
Kyndig: unstable should be cached by hydra
<Kyndig>
have to build ~/nix
<clever>
oh
tertl3 has joined #nixos
<clever>
you want something like nix-user-chroot then
<Kyndig>
i can use that either
<jackdk>
okay, this is a bloody nightmare, and I'm changing tack. If i install sorbet through bundler, I get "not found" errors running it. Usually when I see this I think "patchelf" but ldd seems to look OK? pastebin to follow
<Kyndig>
kernel doesnt' support namespaces
<Kyndig>
so must build everything
<Kyndig>
so i find these kinds of issues
<clever>
jackdk: what does `file` say about the given binary? ldd wont show the most important part
<energizer>
if your system doesnt support namespaces and you dont have root, then you need to rebuild everything, right?
<cole-h>
worldofpeace: I can send a PR to 20.03 that fetches the patch from ninja-build proper instead of the fork (that no longer exists)
<worldofpeace>
cole-h: thanks
<cole-h>
Hash stays the same which is nice.
<worldofpeace>
ahh, should be no rebuild
<cole-h>
I mean the patch's hash
<Kyndig>
sorry. I'm building all nixpkgs in my home directory on an old linux box that I don't control. the Kernel doesn't allow me to run Proot and the like; so I have to rebuild to move /nix into ~/nix.
<jackdk>
clever: awesome, that worked.
<worldofpeace>
that means it can go right to the release branch
<jackdk>
clever++
<{^_^}>
clever's karma got increased to 398
<jackdk>
tyvm
<qy[m]>
has anyone here experimented with ccache on nix?
<qy[m]>
ccacheStdenv etc.
evertedsphere has joined #nixos
<clever>
qy[m]: it only really works in nix-shell or if your allowing massive impurities into the sandbox
<qy[m]>
yeah, thought it'd be pretty nasty :/
<qy[m]>
there's something i compile pretty much every day, but it's extremely modular (shared libraries) so it would be mighty nice if i could have a derivation per module
<qy[m]>
just, nix isn't really good on that kinda thing
<clever>
qy[m]: i just break the project up into smaller shared libraries, and put each into its own drv
snicket has quit [Ping timeout: 240 seconds]
<qy[m]>
unless i'm missing something obvious
<clever>
qy[m]: next time it builds a given library twice, record each .drv file, and run nix-diff on the pair, to see why it rebuilt it
<qy[m]>
sounds easier said than done, it's an autotools project
<qy[m]>
actually, i may have misspoken, the libraries are part of the codebase (/modules directory) so they're baked into the makefile. maybe i can just extremely poorly emulate the makefile and drop each .so in a derivation instead?
<qy[m]>
not quite as painful, but definitely not clean
<qy[m]>
but then each of those derivations still depends on the original configure steps
<clever>
qy[m]: yeah, thats harder to split up
<clever>
qy[m]: and because its all one derivation, changing any file rebuilds all of them
<qy[m]>
right, yeah.
<qy[m]>
so i was right originally, nix isn't built for this kind of thing
<clever>
qy[m]: in this case, i would just run `make` inside `nix-shell` most of the time
<qy[m]>
unless i do something dirty like IFD output-hashed derivations for each source file :')
<worldofpeace>
cole-h: approved
<cole-h>
โจ worldofpeace
<{^_^}>
worldofpeace's karma got increased to 149
<qy[m]>
eh, would be nice, but i'm sort of rebuilding it for sketchy production use
<cole-h>
Also, that "rebuilds: 0" label was so nice to see.
<qyliss>
qy[m]: depends on the builder
<qyliss>
not sure it's on by default for just plain mkDerivation
sigmundv_ has quit [Ping timeout: 256 seconds]
<cole-h>
(it's so trippy to see "qyliss" reply to "qy[m]" lol)
<qyliss>
But it is for buildRustPackage, buildPythonPackage, etc.
bgamari has joined #nixos
<qy[m]>
ah, ok
<cole-h>
worldofpeace: At risk of being annoying, I think the two openssl PRs should get the security label, if you have a moment ^^; #85734 and #85732
<Kyndig>
cole-h, worldofpeace : thanks guys; I didn't even expect a response, let alone a fix so quick
nek0 has joined #nixos
<cole-h>
:^)
<qy[m]>
i don't suppose anyone knows a quick way to run something in an tmpfs/overlayfs'd chroot of the current fs tree?
<qy[m]>
basically i want to run something with full filesystem access but no actual filesystem side-effects
<qy[m]>
totally ephemeral
Kyndig has quit [Remote host closed the connection]
<infinisil>
qy[m]: Are you perhaps using zfs?
<qy[m]>
nope
<qy[m]>
btrfs
<qy[m]>
but i'd assume there'd be something slightly higher level than that anyway
<infinisil>
With zfs at least, one could make a snapshot and mount that somewhere
<infinisil>
Or alternatively a `zfs clone`, which is like a writable snapshot
<infinisil>
Nah there's nothing like that for NixOS. NixOS in general doesn't like messing with arbitrary paths
proofofkeags has joined #nixos
<qy[m]>
yeah, i could probably do similar with btrfs, but i was thinking like a namespacey kernel utility might be handier and more generic
<infinisil>
Hmm, there is overlayfs
<qy[m]>
i reckon i could sketch out something easily using unshare, chroot, tmpfs and overlayfs, if keeping mounts below root wasn't a requirement, but i'm just surprised nobody already has
h0m1 has quit [Ping timeout: 252 seconds]
<infinisil>
First time I see somebody wanting this
<infinisil>
But I can imagine this being very powerful
h0m1 has joined #nixos
<hackerfoo>
Overlay filesystems are useful with a read-only filesystem underneath.
<qy[m]>
correction, someone almost certainly has, it's just not well known :p
<hackerfoo>
Various implementations have come and gone over the years, but it's never really caught on.
<qy[m]>
yeah
<qy[m]>
they don't make sense without a read-only filesystem underneath :p
<qy[m]>
i do remember unionfs and aufs{,3}, but overlayfs seems pretty well used these days
<qy[m]>
and it got mainlined
<hackerfoo>
One use was to allow a Linux system to run from a read-only disc.
<qy[m]>
yeah, i think those squashfs-based livecds still do that
riz71 has quit [Remote host closed the connection]
<hackerfoo>
I'll check overlayfs out, thanks.
EdLin has joined #nixos
<EdLin>
hi
<zannzen>
I probably just missed this in the docs somewhere but is there an easy way to force nixos to upgrade a package? I've got llvm-10 and 7 installed but 7 is in the `current-system` dir even after `nixos-rebuild switch --upgrade`
<EdLin>
I'm having problems opening the manual in the new nixos for GUI release
<EdLin>
it keeps opening in kate rather than in a browser
<EdLin>
even using Firefox to open it doesn't work
<EdLin>
I guess this is a polish issue if you have internet access on the disk since you can browse the instructions on web?
<qy[m]>
turning on PID user namespaces is actually handy for convenience you know. i can now use pkill/killall without fear of killing stuff that's actually important
<ornxka>
if ive got a low-power machine that does its building on another computer, and i want to have its nixpkgs as directory/git clone of the actual repo for easy editing, whats the best/easiest way to do this?
<ornxka>
(i dont want to keep the nixpkgs repo on the low-power machine, it would take ages to even copy over)
<zannzen>
infinisil I was hoping to get a base version so I could e.g. spin up a vps at some point with my dev environment ready to go
<ornxka>
is there a better solution than sshfs, or tarballing the repo, serving it on http, and using it as a channel?
<qy[m]>
zannzen: see also llvmPackages_latest
<infinisil>
zannzen: How did you install those packages?
<{^_^}>
[nixpkgs] @JoshuaFern opened pull request #85744 โ dosbox-staging: init at v0.75.0-rc1 โ https://git.io/JfkRZ
<zannzen>
`/etc/nixos/configuration.nix` and `nixos-rebuild switch`
<zannzen>
infinisil
<infinisil>
zannzen: And how do you determine that you're still using version 7?
<qy[m]>
which is actually up to date
<qy[m]>
god knows what's going on with llvmPackages itself
<qy[m]>
i feel like it would be smart to just do a treewide replace of llvmPackages for llvmPackages_7 so llvmPackages can be updated, and we don't get new packages by the day depending on the old version, making upgrading even more of a PITA
<qy[m]>
because that replace would theoretically be effectless
<zannzen>
infinisil running `llvm-config --version` showed that llvm was pointing at v 7 after installing clang (which is v 7) even after removing clang
gentauro has quit [Read error: Connection reset by peer]
<infinisil>
zannzen: What's `which llvm-config`?
gentauro has joined #nixos
<zannzen>
infinisil both before and after it was `/run/current-system/sw/bin/llvm-config`
<zannzen>
however after specifying `llvm_10` manually it's not updated
<zannzen>
*now
<hackerfoo>
ornxka: I think builders-use-substitutes will work.
<hackerfoo>
In nix.conf
<infinisil>
zannzen: So after removing clang, your system config doesn't refer to clang/llvm anymore at all and you still got the llvm-config binary?
<zannzen>
qy[m] thanks I'll take a look at that one also
<ornxka>
ooh
<ornxka>
ill have a look at that thx!
azdle has joined #nixos
<zannzen>
infinisil i had llvm and clang specified in the `environment.SystemPackages` list
* ornxka
google "nixos substitutes" and get "alternatives to nixos"
<zannzen>
adding clang downgraded my llvm-config to 7, removing it kept it at 7 though
spacefrogg has quit [Quit: Gone.]
aw has quit [Quit: Quitting.]
sarcasticadmin has quit [Ping timeout: 260 seconds]
aw has joined #nixos
<infinisil>
I'm even more confused now
<infinisil>
How about just trying to get to a clean state first, removing everything that's necessary so you don't have llvm-config in your PATH anymore
spacefrogg has joined #nixos
nwspk has quit [Quit: nwspk]
<zannzen>
ok, removed all packages that might have llvm depend on them, and it's no longer in path
nwspk has joined #nixos
proofofkeags has joined #nixos
<infinisil>
Nice
<infinisil>
zannzen: So now, adding `pkgs.llvm_10` should install version 10
<infinisil>
Hopefully
<infinisil>
(btw I asked for removing the packages so we know it's not being added to PATH by some other module)
<zannzen>
yep, sorry maybe it got lost that does indeed work
<zannzen>
the issue I think is the llvm (not specified) seems to point to llvm-7.1.0 which I was not aware of
<zannzen>
at least running `nix-env -qaP llvm` seems to indicate as much
<ornxka>
so i guess the idea is, you want foo on low-power machine, so on builder you tell it to build foo according to its own nix expression, then on the low-power machine you do nix-env -iA bar and itll get the bar you built
<ornxka>
next step is learning how to cross compile for i686
<zannzen>
infinisil qy[m] thanks for the hep with that, pretty new to nix in general so of course it was something simple to miss heh
<infinisil>
Np :)
<infinisil>
bsima: Can't, need to get it from outside
<infinisil>
Like with another function argument
<infinisil>
or by referring to pkgs bound outside the overlay
<rotaerk>
nvidia prime, both offline mode and sync mode
<rotaerk>
I have modesetting and nvidia in the videoDrivers list
<colemickens>
Any HM + Sway users? My swaylock doesn't accept my PW? I assume it's a PAM thing?
vika_nezrimaya has joined #nixos
<rotaerk>
but when I try to run alacritty, it says it couldn't create the GL context; "Could not create EGL display object" and "`glXQueryExtensionsString` found no glX extensions"
<cole-h>
colemickens: Are you using swaylock as a systemd unit?
<rotaerk>
I had issues like this before, and I got it working with kernel 5.3 by just not using nvidia's drivers. had only "modesetting" in the videoDrivers list. this was with kernel 5.3
<rotaerk>
but after I upgraded nixos, 5.3 was no longer available, so I tried 5.4 and 5.6 ... and now it doesn't work
<rotaerk>
so I'm trying nvidia's drivers again, and no improvement
<cole-h>
colemickens: If so: I had the same issue (though not NixOS). I just solved it by using swaylock/swayidle directly in my sway config.
<colemickens>
cole-h: I'm actually not running it as a unit, just from my config file like I had normally (though I'm processing it with Nix so I have the full store path for swaylock, etc).
<infinisil>
rotaerk: I need to relog/reboot for those alacritty errors, rather annoying
<rotaerk>
I've done lots of rebooting
<rotaerk>
in the process of trying out different configurations
<colemickens>
cole-h: do you have programs.sway.enabled still?
<colemickens>
at the system level? I think it's necessary to get the PAM config lined up correctly
<rotaerk>
though, perhaps it's just alacritty ... is there a better way to test that the graphics drivers are working correctly? perhaps it's some other problem
<cole-h>
colemickens: (not on NixOS lol)
<rotaerk>
I do think it might be *better* than it was at least ... I was getting weird distortion in the context menus in firefox, when I just had modesetting
<rotaerk>
but with nvidia enabled, it seems fine
<cole-h>
I think I uploaded my sway hm config before, but I'll do it again
<colemickens>
/boot cole-h
<cole-h>
:D
<colemickens>
nah, it's alright. that explains somethings.
<colemickens>
I've got my setup all replicated in HM. This swaylock/PAM is sorta the last issue. I know some other folks also choose not to use swaylock at all, in favor of something more systemd-specific (generic?)
<cole-h>
Oh, the reason why it works is probably because it's still pulling Arch's swaylock, not Nixpkgs' :D
<colemickens>
I think it's more that if you're using Arch's swaylock that you're getting the /etc/pam.d/swaylock file.
<cole-h>
If I try to run it manually from `nix-shell -p swaylock` I get: "2020-04-21 20:50:09 - [pam.c:101] pam_authenticate failed: authentication information unavailable"
<cole-h>
(after I `pkill swaylock` from ssh)
<colemickens>
This isn't provided by just install Sway in nixos/home-manager. In NixOS, the sway module activates it. I guess I'm just disappointed to have to keep activating machine-level configs for my user-WM.
<cole-h>
I see
<qy[m]>
rycee: could you reset the flake branch to e13bd1e79372c58cc1e86e45bdf304f4b6770fe3 when you're next free (already rebased)
<colemickens>
it feels like there's a bit of tension between what goes in HM vs in nixos/nixpkgs. not my favorite, but a pretty minor complaint. I'm quite enjoying HM otherwise.
<energizer>
i dont undersand why most of the hm modules can't be provided in nixos directly
<energizer>
not that i really care, just seems like unnecessary duplication of labor
<cole-h>
colemickens: Well, if you ever figure out the swaylock issue, be sure to `,tell` me, please :^)
<rotaerk>
hmm well, I have optimus prime in offload mode. if I run glxgears, it says it can't "get an RGB, double-buffered visual"
<rotaerk>
if I run `nvidia-offload glxgears` (using the nvidia-offload script suggested by the nixos wiki), it creates a window, but doesn't render any gears
tertl3 has quit [Quit: Connection closed for inactivity]
slack1256 has quit [Remote host closed the connection]
<rotaerk>
huh. my own vulkan project successfully rendered a textured quad, though
<rotaerk>
*facepalm* upgrading alacritty got it to work...
<rotaerk>
updating *
<rotaerk>
think I need to start uninstalling stuff from via nix-env and move it into configuration.nix so it gets updated automatically...
<peelz>
oh wait that only works with a specialized `callPackage`, like `libsForQt5.callPackage`
<FRidh>
peelz: typically one wants as precise parameters as possible, but when its about functions (or packages) that belong to a set and that are tightly coupled its better to pass in that set. With stdenv that's what we do, pass in the set (although actually stdenv is a derivation).
jakobrs has joined #nixos
<jakobrs>
Is there any mechanism for specifying patches applied to nixpkgs in the configuration.nix file?
<peelz>
FRidh: right, although I was questioning the two different approaches since, according to some PRs, `mkDerivation` was preferred over `stdenv.mkDerivation`. But then I realized that was a qt5-specific thing.
<peelz>
FRidh: `libsForQt5.mkDerivation` passes its own `mkDerivation` for some reason(?)
<peelz>
oh wait, I've been testing on different nixpkg branches
<jakobrs>
Also, are the changes to the system theme intentional in 20.03?
<jakobrs>
I mean, applications display as though they are minimised when they're not focused
<peelz>
jakobrs: would help if you specified the DE. Also regarding your earlier question, overlays is what you're looking for: https://nixos.wiki/wiki/Overlays
<jakobrs>
yeah, plasma
<jakobrs>
I don't think overlays let you override service definitions, though
<peelz>
no you can't patch modules afaik
<peelz>
it would probably be rather brittle anyway
<jakobrs>
yeah
<makefu>
either define your own module (say "config.mynick.myservice") or blacklist the upstream module and import your own (copy-pasted) module definition
<jakobrs>
Can I
jmeredith has quit [Quit: Connection closed for inactivity]
<jakobrs>
when you set, say, "services.udev.packages = [ package ];", services.udev.packages gets merged with that same option from other modules
<jakobrs>
Can I _remove_ instead of add values to a list that way?
<peelz>
defining your own module is the way to go (unless you have absolutely no other choice)
<jakobrs>
So I'd just copy-paste the relevant file into /etc/nixos/custom-module.nix, and modify it slightly to not conflict with the "upstream" version?
linarcx has joined #nixos
morgrimm has joined #nixos
<srhb>
jakobrs: You can disable the upstream module.
<colemickens>
peelz ls ~/.config/obs-studio/plugins/v4l2sink/
<colemickens>
I remote update, cherry-pick'd the last two commits, rebuilt and the plugin stopped working. Dropped those two commits, rebuilt, back to working.
<peelz>
colemickens: oh the bin folder ends up here: `~/.config/obs-studio/plugins/v4l2sink/share/obs/obs-plugins/v4l2sink/bin/64bit/v4l2sink.so`
morgrimm has quit [Ping timeout: 256 seconds]
jakobrs has quit [Quit: WeeChat 2.8]
<colemickens>
all I know is after I pulled the commits onto my nixpkgs and rebuilt, the bin folder was no longer linked under my config obs-studio dir managed by HM.
<colemickens>
I'll use nixpkgs-review pr and see what's up.
<betaboon>
i want to build a docker-image with dockerTools that contains a python-application. so i define `contents=pkgs.pythonPackages.mypackage` and `config.Cmd = "/bin/mypackage"` but that ends up in `No module named mypackage`. do i have to create an env? or do i have to put `python.withPackages` as content? anyone knows ?
<{^_^}>
[nixpkgs] @zimbatm opened pull request #85750 โ srcOnly: fix invocation and document โ https://git.io/JfkaS
<FRidh>
betaboon: use python.withPackages, and refer it in config.Cmd, no need to atit to contents then
<benny>
after a long wait the latest push seems to have caused grahamofBorg to build this PR, if someone has time to review it :-) https://github.com/NixOS/nixpkgs/pull/84350
<{^_^}>
[nixpkgs] @domenkozar closed pull request #51274 โ nixos/test/ipv6: Specify port in curl โ https://git.io/fprTh
morgrimm has joined #nixos
maddo has joined #nixos
<nicksloan>
I'm struggling with python 3.8 and virtualenv from nix stable on MacOS. Can't seem to find a relevant issue, but creating a virtual environment fails every time with a message about sys.prefix being misconfigured. Has anyone seen that yet?
avn has joined #nixos
morgrimm has quit [Ping timeout: 258 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
Jackneill has joined #nixos
Jackneill has quit [Max SendQ exceeded]
<{^_^}>
[nixpkgs] @symphorien opened pull request #85761 โ unison: fix unison-fsmonitor wrapper in an empty PATH โ https://git.io/JfkMW
Maxdamantus has quit [Ping timeout: 260 seconds]
<hyper_ch>
gchristensen: ping
<{^_^}>
[nixpkgs] @marsam opened pull request #85762 โ nodejs-14_x: init at 14.0.0 โ https://git.io/JfkM0
knupfer has quit [Remote host closed the connection]
b has joined #nixos
<{^_^}>
[nixpkgs] @sbourdeauducq opened pull request #85763 โ svgwrite: do not mark as broken โ https://git.io/JfkMK
Jaxon has joined #nixos
<Jaxon>
I'm having trouble logging in using Github as a method of authentication
<dingo>
Jaxon: by chance you are in a country with USA-trade restrictions?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzzโฆ]
<{^_^}>
[nixpkgs] @Mic92 opened pull request #85764 โ nodePackages: switch to 12 โ https://git.io/JfkMH
<Jaxon>
Nop i'm in Egypt so that shouldn't be the problem
<gchristensen>
Jaxon: what are you trying to log in to?
<Jaxon>
nixos wiki
<Jaxon>
the options are login with either a wiki account (i have no idea what it's) or with github so i went with the github option, it redirects me to the site and i authorize however when it redirects back to the wiki all i see is errors
<Jaxon>
on the wiki it shows Internal Error and then there's a generated log in red
<gchristensen>
maybe ask in #nixos-wiki Jaxon?
<Jaxon>
ok thank you
<gchristensen>
yep!
Jaxon_ has joined #nixos
<{^_^}>
[nixpkgs] @lourkeur opened pull request #85765 โ onionshare: init at 2.2 โ https://git.io/JfkDJ
reallymemorable has joined #nixos
Jaxon has quit [Quit: Leaving]
Jaxon_ has quit [Client Quit]
cosimone has quit [Remote host closed the connection]
m0rphism has quit [Quit: WeeChat 2.7.1]
cosimone has joined #nixos
<seku>
gchristensen : hi, read through your ZFS dataset blog post, very insightful, i'll give it a try setting up the datasets as you propose! what would you use for swap tho? a dedicated zvol without checksumming? something else?
<{^_^}>
[nixpkgs] @alyssais pushed to master ยซ mblaze: install msuck and mblow ยป: https://git.io/Jfk9Y
<jtojnar>
peelz it is to make sure all the qt libraries a package links against are compatible. If you use a Qt library, you should use it.
<peelz>
oh, so it passes its own qt5 parameter?
<peelz>
the other obs plugins don't use that though. maybe they don't use qt libs?
<jtojnar>
(it does not matter in your case at the moment since you use only qt5.qtbase but might be problematic if we add other qt dependencies in the future and forget to add qt's callpackage)
<peelz>
so which is it? keep it or leave it? :P
<peelz>
* remove it
<jtojnar>
peelz it passes things like qtbase as the argument
<peelz>
ah so should I depend on qtbase instead of qt5.qtbase?
<jtojnar>
keep it and use qtbase directly instead of qt5.qtbase
<jtojnar>
yup
<peelz>
gotcha, makes sense
<jtojnar>
the main point is to not need to get everything from qt5 attrset (qtbase instead of qt5.qtbase) and to make it harder to shoot yourself in the foot by overriding the qt version used by one library forgetting about another one (e.g. upgrading qtbase to 5.13 but leaving qtxml at 5.12)
<aanderse>
to-configuration.nix how can i test those?
<vika_nezrimaya>
obviously you try to switch the configuration!
<vika_nezrimaya>
in a VM of course
<{^_^}>
[nixpkgs] @blitz opened pull request #85772 โ Use Open Watcom to build VirtualBox BIOS โ https://git.io/JfkHL
<vika_nezrimaya>
may nixos tests help you
<vika_nezrimaya>
probably
cosimone has joined #nixos
gustavderdrache has joined #nixos
<aanderse>
vika_nezrimaya: assuming you're talking to me... there are a bunch of things that are substituted in that script so i can't just call it
<vika_nezrimaya>
Maybe you could use NixOS test framework, I mean
<vika_nezrimaya>
it probably tests that file you're talking about too
aswanson has joined #nixos
remirol is now known as lorimer
relaxmax has joined #nixos
<peelz>
jtojnar: so should I update it to the latest rev? I prefer staying on the release because it looks cleaner but up to you
lmz has joined #nixos
morgrimm has joined #nixos
beb has joined #nixos
_viz_ has quit [Remote host closed the connection]
<lmz>
Hi All! I have a question about unload a part of the config. Imagine I want to generate a cert using Let's encrypt. I want to use a new DNS check. For that I need to add a DNS server to my cfg. Is there a mechanism to unload that DNS server after cert has been generated?
<lmz>
Something similar to python contect managers:
Orbstheorem has left #nixos ["WeeChat 2.3"]
<lmz>
with open('file')
katie_- has joined #nixos
Orbstheorem has joined #nixos
katie_ has quit [Ping timeout: 265 seconds]
domogled has quit [Remote host closed the connection]
wspthr has quit [Read error: Connection reset by peer]
fusion809 has quit [Remote host closed the connection]
Maxdamantus has quit [Ping timeout: 250 seconds]
wspthr has joined #nixos
civodul has joined #nixos
wspthr has quit [Read error: Connection reset by peer]
Maxdamantus has joined #nixos
<beb>
Hey, I'm currently trying to tweak the default.nix for unity3d to give me a specific version of unity, that I need for uni. That seems to go quite well, the package builds fine, but when I start unity-editor, I get an error claiming that libnss3.so cannot be found even though nss is in lib.makeLibraryPath and is in the original version from
<beb>
nixpkgs. I changed nothing about nss. Any idea why the library cannot be found?
wspthr has joined #nixos
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
<hyper_ch>
gchristensen: are you awake?
<gchristensen>
hyper_ch: yeah
<hyper_ch>
gchristensen: in your blog entry, is there a reason you do not take /etc/nixos as persistent dataset?
ixxie has quit [Ping timeout: 256 seconds]
ixxie has joined #nixos
<{^_^}>
[nixpkgs] @costrouc opened pull request #85773 โ pythonPackages.cloudflare: init at 2.6.5 โ https://git.io/JfkQ0
<gchristensen>
hyper_ch: I store my nixos configuration in ~/projects/github.com/grahamc/nixos-config
<hyper_ch>
also another thing that is unclear to me: at the end of nixos-install it asks for root password... won't that be written directly to the passwd/shadow file? (or do you specify it also in the configuration.nix?)
<hyper_ch>
because after reboot, when you roll back, /etc/passwd and /etc/shadow would be gone
<gchristensen>
I specify the root password in the configuration
<hyper_ch>
ok :) never done that
<hyper_ch>
last thing: you could use zfs mount for /home -- test it and it works. The benefit is, you could then setup easily datasets for users
<gchristensen>
cool
relaxmax has quit [Ping timeout: 256 seconds]
<hyper_ch>
since I have to stress test my new ecc box a little bit I thought I give your setup a chance and those were the few things that came to my mind
<gchristensen>
cool :)
<hyper_ch>
(I even used uefi install now but did just put whole /boot on a usb thumbdrive)
<gchristensen>
impressive
<hyper_ch>
also created a boot dataset then where I just rsync every hour from the thumbdrive :)
vidbina_ has quit [Ping timeout: 256 seconds]
<gchristensen>
cool :)
<gchristensen>
sounds good
<hyper_ch>
(I just like to give full disks to zfs and not partion them manually)
<{^_^}>
[nixpkgs] @geistesk opened pull request #85775 โ Revert "st: copy config file in 'prePatch' instead of 'preBuild'" โ https://git.io/JfkQr
<{^_^}>
[nixpkgs] @magnetophon opened pull request #85776 โ fverb: init at unstable-2020-04-04 โ https://git.io/Jfk7v
<mac>
Hello. I am a new NixOS user and I am trying to get nvidia prime offload working on a muxless optimus laptop. It works fine in Arch so there is no problem with linux and the hardware in general. I installed latest release version of nixos (20.03) but apparently nvidia offload is not available there so I tried to switch to unstable channel but that
<mac>
does not seem to work for me. I probably just made a stupid mistake, how do you correctly switch your whole os to another main channel?
<hyper_ch>
mac: how did you switch to unstable?
cosimone has quit [Remote host closed the connection]
<mac>
Ah, thanks! I confused the nixpkgs channel and nixos channel so I guess I did not switch at all :) will try again
<hyper_ch>
are you using nixos or nixpkgs?
<mac>
NixOS. But I have been reading a lot about both and got a little confused since I am new I guess.
<mac>
Now it is building my new config. Exciting!
<hyper_ch>
mac: I made myself small scripts and put them into /etc/nixos
<hyper_ch>
to switch between them :)
<mac>
Good idea
<infinisil>
I feel like I see channel-related problems on a daily basis here
<hyper_ch>
infinisil: that's only because you're always in here :)
<infinisil>
That certainly helps :P
<infinisil>
But they really are way too confusing, and I can't wait for them to not be a thing anymore
<hyper_ch>
gchristensen: btw, nixos complains about this line from your blog post: boot.initrd.postDeviceCommands = lib.mkAfter '' (haven't added the rollback so far and wanted to do it now): error: undefined variable 'lib' at /etc/nixos/configuration.nix:34:36
lmz has quit [Remote host closed the connection]
<infinisil>
hyper_ch: Add lib to the function arguments at the top of the file
<hyper_ch>
but gchristensen did not say so in his blog post :)
<infinisil>
Hm I guess, though it is pretty standard
<hyper_ch>
also, I noticed the default installer configuration.nix still uses i18n.consoleKeyMap and i18n.consoleFont instead of console.keyMap and console.font.... should I open a bug report?
<hyper_ch>
gchristensen: trying to reboot now with the rollback
<immae>
infinisil: does the channel end of life has a date? (my colleagues have many issues with them too, I cannot wait for it to end :D )
proofofkeags has joined #nixos
<hyper_ch>
why would it end?
<infinisil>
hyper_ch: That was just fixed recently
<{^_^}>
#85643 (by petabyteboy, 1 day ago, merged): nixos/tools: adapt for renamed console options
<hyper_ch>
ah ok... the iso generated is from last saturday
<infinisil>
*very* recently, only just merged :2
<hyper_ch>
time to update my iso then
<immae>
hyper_ch: the things that lies in ~/.nix-defexprs and related to nix-channel commands are deprecated arenโt they?
<hyper_ch>
immae: /me eyes infinisil
<immae>
(thatโs the part that is constantly confusing my colleagues and I pray for it to end :p )
<infinisil>
Nah that's still the current way to do things
<immae>
isnโt it NIX_PATH ?
<hyper_ch>
gchristensen: ok, rollback of rootfs worked... but for some reasons it had issues with the remote host fingerprint... that seemed to have changed
<hyper_ch>
btw, from #zfsonlinux there's an interesting thought. "[16:12] <Caterpillar> both my CentOS+ZFS NAS and my desktop computer have USB 3.1 Gen 2. Has anybody every connected two machines with that protocol? I could enjoy 10 Gbit/s bandwidth without having to buy a 10 Gbit/s network card adapter"
<Yaniel>
I have used usbnet before
<hyper_ch>
gchristensen: ok, host fingerprint remains... probably was all my testing and setting back before
<Yaniel>
that would probably work here too
lunik1 has quit [Quit: :x]
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
rogue_koder has joined #nixos
<infinisil>
immae: NIX_PATH should point to ~/.nix-defexprs by default
<peelz>
jtojnar: well I have a problem now... I can't get obs-studio to pick up the plugin at all :(
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzzโฆ]
<jtojnar>
peelz did it work before
<jtojnar>
?
<peelz>
jtojnar: yes
<peelz>
I've upgraded to 20.03 and it hasn't worked since
<immae>
infinisil: yes, but I heard that using ~/.nix-defexprs at all was deprecated and that we should instead use full urls, I may have misunderstood
<peelz>
jtojnar: I tested with the original derivation (the one on master) and it doesn't pick up the plugin either
<infinisil>
I do have `{ nixos = import <nixpkgs> {}; }` in ~/.nix-defexpr/default.nix so I can still use normal nix-env commands if I need it or need to test something (though that rarely happens)
<peelz>
jtojnar: my very first version still seems to works however (before any of the changes on the PR)
wfranzini has quit [Remote host closed the connection]
<peelz>
so that's good news
<immae>
infinisil: yes me too, you gave me that trick some times ago, which definitely ended any channel-related command as far as I am concerned :)
wfranzini has joined #nixos
<infinisil>
:D
lzmartinico has joined #nixos
<immae>
(but I still have to teach my colleagues which get often confused with the channels)
Kyndig has joined #nixos
<peelz>
can't wait till channels are gone from my config
<peelz>
I'm still debating whether I should use flakes or work with a pinned nixpkgs
<immae>
peelz: if you want pinned nixpkgs you can do it now, see infinisilโs suggestion as to what to put in ~/.nix-defexpr/default.nix (to make nix-env keep working)
<peelz>
immae: huh? I was under the impression using a pinned nixpkgs in configuration.nix resulted in impure side effects
<peelz>
also I'm not sure how to replace the top-level argset and have a reference to `config`
<infinisil>
Where ../external/nixpkgs is the version I use for NixOS
realrokka_ has quit [Quit: rip]
<peelz>
what does cleanSource do? o_O
<immae>
peelz: Iโm a bit surprised about impure side-effect, it doesnโt make much difference if your NIX_PATH points to a fixed source
realrokka has joined #nixos
<infinisil>
peelz: Just removes the .git directory and some other thinsg like that
<infinisil>
The nixpkgs repo would be half a gig otherwise :P
<peelz>
immae: oh right, I guess it works if you build with a different NIX_PATH -- I was talking about hardcoding a nixpkgs reference inside of configuration.nix
<peelz>
infinisil: true lol
<Kyndig>
If I defined a users.users.blah.home in my configuration.nix, shouldn't I be able to use that variable in a string elsewhere in the config? (like authPassFile = "${users.users.blah.home}/.gmail-ssmtp-authpass")
<peelz>
infinisil: is there a clean way to pin a nixpkgs from the configuration.nix expression (100% pure and no dependency on env vars)?
<infinisil>
Kyndig: Yeah, add the `config` argument at the top of the module, then you can use `config.users.users.blah.home`
<infinisil>
peelz: Nope
<infinisil>
Well
<peelz>
infinisil: no or "yes but it's complicated"?
<peelz>
:D
<infinisil>
Hm nah
<peelz>
hahaha
<peelz>
soooo flakes?
<immae>
Hmm yes there is?
<infinisil>
peelz: Simple reason is that you need a nixpkgs to even evaluate your configuration.nix
<immae>
ah uh
domogled has quit [Remote host closed the connection]
<immae>
sorry I spoke too quickly
<infinisil>
I guess you could have a command that evaluates configuration.nix with a "bootstrapping" nixpkgs to get the actual nixpkgs, then uses that to evaluate it again
<peelz>
infinisil: that's a shame... couldn't you exclusively use builtins to fetch nixpkgs and use that to bootstrap another config file?
domogled has joined #nixos
nschoe has quit [Quit: No Ping reply in 180 seconds.]
<peelz>
hehe
<peelz>
but I'd have to split it into two different files, right?
nwspk has quit [Quit: nwspk]
nschoe has joined #nixos
codygman has quit [Read error: Connection reset by peer]
<Kyndig>
infinisil: thx; that got rid of the undefined variable issue, but now I have infinite recursion
nwspk has joined #nixos
codygman has joined #nixos
<{^_^}>
[nixpkgs] @jakobrs opened pull request #85779 โ nixos/libinput: Add package and xf86inputlibinput.package options โ https://git.io/Jfkdf
<infinisil>
peelz: Not necessarily. You could do e.g. `config.system.build.nixpkgs = fetchTarball { ... }` in configuration.nix to specify the nixpkgs version, then evaluate that with a bootstrapping nixpkgs like `nix-instantiate --eval --read-write-mode /path/to/bootstrap/nixpkgs/nixos -A config.system.build.nixpkgs` to get the pinned nixpkgs, then set nixpkgs=$result in NIX_PATH and do a normal nixos-rebuild
<infinisil>
switch
nwspk has quit [Client Quit]
<infinisil>
Kyndig: Need to see tho whole code to help with that
andreas303 has quit [Ping timeout: 240 seconds]
oida has quit [Ping timeout: 240 seconds]
jb55 has quit [Ping timeout: 240 seconds]
snicket has quit [Ping timeout: 240 seconds]
KeiraT has quit [Ping timeout: 240 seconds]
klntsky has quit [Ping timeout: 240 seconds]
gxt has quit [Ping timeout: 240 seconds]
corpix has quit [Ping timeout: 240 seconds]
xelxebar has quit [Ping timeout: 240 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
CMCDragonkai_ has quit [Quit: Connection closed for inactivity]
<Kyndig>
infinisil: yeah, thx; I won't bother you with that, but is there in general a way to make the error message print out the recursive cycle?
nwspk has joined #nixos
est31 has quit [Ping timeout: 240 seconds]
phreedom has quit [Ping timeout: 240 seconds]
<peelz>
infinisil: but that still depends on changing the environment vars or did I misread?
<infinisil>
Kyndig: --show-trace
codygman has quit [Read error: Connection reset by peer]
drakonis has joined #nixos
<infinisil>
peelz: You can also do `nixos-rebuild switch -I nixpkgs=$result`
<infinisil>
I guess that's still kind of changing env vars
codygman has joined #nixos
<peelz>
infinisil: ah gotcha
jakobrs has joined #nixos
smatting has quit [Ping timeout: 265 seconds]
nwspk has quit [Client Quit]
<Kyndig>
infinisil: cool; that should help
infandum has joined #nixos
nwspk has joined #nixos
lunaa has joined #nixos
<infinisil>
Kyndig: Feel free to ask me if you don't know further, I'm pretty used to spotting/fixing inf rec :P
lunik1 has joined #nixos
<lunaa>
Has anyone used the printer options for configuration.nix?
<{^_^}>
[nixpkgs] @emilazy opened pull request #85780 โ p7zip: remove non-free RAR support โ https://git.io/Jfkdn
zupo has joined #nixos
smatting has joined #nixos
<lunaa>
I'm not sure what the "*" in ensurePrinters.*.whatever is supposed to be...
<peelz>
infinisil: I'm still trying to wrap my head around that `system.build.nixpkgs` thing. I'm not sure I get it. Why do you need to do it in two steps?
<immae>
peelz / infinisil: nixos-rebuild mostly does a nix-build, so if you look at its source (itโs a bash script) we might transform the nix-build command into one that would not make use of nixpkgs but instead would load a fetchTarball content no?
<infinisil>
peelz: The system.build.* option is just an option you can use to assign arbitrary things, NixOS doesn't look at arbitrary keys in that set, neither does it look at the "nixpkgs" key. So assigning that in your configuration.nix doesn't do anything other than "exporting" a variable for stuff outside the module to see
o1lo01ol_ has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @blitz opened pull request #85781 โ Add spike integration test to nixosTests โ https://git.io/JfkdB
<peelz>
jtojnar: btw I figured out what happened. It had to do with the way I symlinked the derivation output to my plugins folder. For some reason on 19.09 obs would recursively look for `bin/64bit`, but it didn't anymore on 20.03 ;P
o1lo01ol1o has joined #nixos
<infinisil>
peelz: Though I feel like this approach might not work unless you turn off option checking as well (with config._module.check = false), since the options you set in configuration.nix might not be valid in the bootstrapping nixpkgs
<infinisil>
Or it might fail for another reason, haven't tested it. This is really just a hack :P
<infandum>
Building a haskell package using developPackage, how do I jailbreak a dependency?
<peelz>
infinisil: yeah this sounds like a massive hack haha
<lunaa>
infinisil: So you can put just anything as *?
<infinisil>
immae: Oh yeah that would work, would need a way to configure which nixpkgs to use still though
<infinisil>
Might be simpler to just have /etc/nixos/nixpkgs.nix which specifies that
<immae>
infinisil: yes I though of something like `let src = builtins.fetchTarball {... }; in with import "${src}/nixos" {}; config.system.build.nixos-rebuild`
<peelz>
infinisil: so in order to avoid any extra build steps, I could have my `configuration.nix` import a nixpkgs tarball and use that to load the actual config file?
<immae>
this would not depend on any environment variable (except that nixos contains some references to <nixpkgs> so actually it will still use them)
<peelz>
infinisil: just confirming if this is a sound idea :P
<infinisil>
immae: Hm, I wouldn't do it like that
<infinisil>
lunaa: Hold on, I'll take a look at that later :)
<{^_^}>
[nixpkgs] @cdepillabout pushed 2 commits to staging-20.03: https://git.io/JfkdK
<nschoe>
I'm just wondering if you had something in mind that could make a gtk (and also qtbase)-based app crash on launch :)
<nschoe>
Hi everyone, just a shot in the dark: I'm trying to make a nix derivation for an application. It builds okay but when I execute it, it crashes immediately on launch. All I've got is a few " GLib-CRITICAL **" error messages. Bu the kindofwhich I always have, on basically all gtk apps.
phreedom has joined #nixos
<infinisil>
immae: Hm, not sure how to do it better nicely, without duplicating what nixos-rebuild odes
cosimone has quit [Remote host closed the connection]
oida has joined #nixos
<immae>
infinisil: yes it was just a sketch, nixos-rebuild does many other things indeed
cosimone has joined #nixos
cosimone has quit [Client Quit]
cosimone has joined #nixos
<immae>
Iโm just fascinated by all the mecanisms in place so I looked into it :D
<{^_^}>
[nixpkgs] @alyssais pushed commit from @emilazy to master ยซ p7zip: remove non-free RAR support ยป: https://git.io/Jfkd9
o1lo01ol1o has joined #nixos
<infinisil>
immae: peelz: How about this: You have a rebuild script that does `nixos-rebuild -I nixpkgs=/etc/nixos/nixpkgs.nix "$@"`, and you specify `import (fetchTarball { ... })` in /etc/nixos/nixpkgs.nix
<peelz>
infinisil: hmm I think I would rather have a bootstrap configuration.nix (I might be overengineering this but oh well lol)
andreas303 has joined #nixos
<immae>
(and youโd have to deal with all the builtins.getEnv in nixpkgs too, which may have side effects)
<peelz>
infinisil: argh actually you're right, this is much cleaner
<infinisil>
peelz: EVen with the bootstrapping thing I suggested, you'd still need a rebuild script fyi
<infinisil>
lunaa: The type of `hardware.printers.ensurePrinters` is `list of submodules`, this means that the .*. in the option path just means like a list element
<peelz>
infinisil: why would a rebuild script be needed? impurities?
philr_ has quit [Ping timeout: 240 seconds]
<infinisil>
peelz: To do the bootstrapping step, the nix-instantiate --eval I mentioned
<peelz>
infinisil: sorry if I'm making you repeat yourself, I'm a bit tired :P
<{^_^}>
[nixpkgs] @adisbladis opened pull request #85782 โ p7zip: Make unfree features (rar support) optional โ https://git.io/JfkFU
<infinisil>
(a normal nixos-rebuild just uses the nixpkgs from NIX_PATH after all, something needs to be wrapped around it to not make it do that)
<{^_^}>
[nixpkgs] @FRidh pushed commit from @primeos to staging ยซ python3Packages.cryptography: 2.9 -> 2.9.1 ยป: https://git.io/JfkFL
<lunaa>
so like `{ [Element = that] [element = other] }`? I'm not sure how to do that..
cosimone has quit [Remote host closed the connection]
<peelz>
infinisil: well what I'm saying is that you can do `import "${fetchTarball {...}}/nixos" { configuration = import ./actual-configuration.nix; }` no?
<Kyndig>
infinisil: so I found the offending recursion, but I'm not sure what to do about it. I'm trying to do: filesystems."${config.users.users.blah.home}/some/mount = ..."
reallymemorable has quit [Quit: reallymemorable]
CMCDragonkai1 has joined #nixos
<infinisil>
Kyndig: Got the full file and error?
cosimone_ has joined #nixos
<Kyndig>
i wrote that wrong: filesystems."${config.users.users.blah.home}/some/mount" = ...
cosimone has quit [Read error: Connection reset by peer]
<peelz>
infinisil++ bookmarked the link. thanks for the help!
<{^_^}>
infinisil's karma got increased to 261
<infinisil>
:D
growpotkin has joined #nixos
<immae>
infinisil++
<{^_^}>
infinisil's karma got increased to 262
<{^_^}>
[nixpkgs] @FRidh pushed 104 commits to staging-next: https://git.io/JfkFw
erasmas has joined #nixos
<Kyndig>
ugg; if it's not one thing, it's another. Issues with clipboard now I have to fix before can get a pastebin done..
<{^_^}>
[nixpkgs] @flokli pushed 4 commits to release-19.09: https://git.io/JfkFM
<immae>
(in the local one)
<infinisil>
immae: Nope! Only the hash of the secret
<immae>
ohhh
glittershark has quit [Ping timeout: 240 seconds]
<Kyndig>
infinisil: ok: it's definately the mount though, proven by commenting it out: https://pastebin.com/e7dzJ7N9
<infinisil>
immae: E.g. my wireguard config references /nix/store/vjy7xbjqdx0pw0wxjijlgy0a4gkfmjqx-secret-client-private, which is a symlink to /var/keys/client-private, but the hash of the secret is incorporated into the hash of the /nix/store path
numkem has joined #nixos
<infinisil>
Meaning whenever the secret changes, I get an automatic restart of all affected services as with all other changing /nix/store paths, even though the secret will never be in the store
<numkem>
what can I use in an expression to use as `$src` a local archive?
<immae>
I see
<immae>
I turned the problem many ways in my head but I didnโt think of symlinks :D
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
reallymemorable has joined #nixos
justanotheruser has quit [Ping timeout: 265 seconds]
<peelz>
infinisil: oh that's pretty clever :P
turion has quit [Ping timeout: 272 seconds]
vidbina_ has joined #nixos
<peelz>
does clever not get annoyed whenever someone uses the word "clever"? lol
<peelz>
ping ping ping
<infinisil>
Kyndig: Hm, that's unfortunate, it's a combination of multiple things that makes this not work
realrokka has quit [Read error: Connection reset by peer]
<Kyndig>
infinisil: kinda figured, it has to do with the order of module evaluations?
<infinisil>
peelz: I think he set it up to only get pinged if it's the first word :P
<{^_^}>
[nixpkgs] @guilhermehas opened pull request #85784 โ Adding --local-interfaces flag in Agda build โ https://git.io/JfkbU
<peelz>
infinisil: lol hopefully
CptCaptain has quit [Quit: WeeChat 2.8]
<infinisil>
Kyndig: Nah. One problem in the cycle at least is that the option system.build.* is strict in attribute values. This means when you want to evaluate `system.build.toplevel` (the final NixOS system result), you also need to evaluate all other attributes like `system.build.fileSystems`
cosimone_ has quit [Remote host closed the connection]
cosimone_ has joined #nixos
reallymemorable has quit [Quit: reallymemorable]
<infinisil>
Wait I don't think that's it actually
<infinisil>
Never mind
cosimone_ is now known as cosimone
<Kyndig>
infinisil: sounds like it's not something easily worked around and I'm not quite ready to dive into how the nixos build works. I'll just a variable set to a string for my home dir for now. Thanks though
reallymemorable has joined #nixos
<infinisil>
Yeah but the problem is similar in nature. That sounds good as a workaround for now, though I fear that it's not easily fixable even
<{^_^}>
[nixpkgs] @adisbladis merged pull request #85782 โ p7zip: Make unfree features (rar support) optional โ https://git.io/JfkFU
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzzโฆ]
<infinisil>
numkem: Would be good to have more context for your question
AmandaC_ has joined #nixos
<evanjs>
but you should be fine just linking to a local file... you can use ./. to refer to the current dir; can't remember the syntax off the top of my head, but I think this should work for archives as well
<evanjs>
numkem: right right, I just don't see anything else in tree using it atm
<numkem>
infinisil: my bad, what I'd like to do is to create a package to use the automated patchelfHook from an archive I have that contains binary but isn't only anywhere (so I can't use fetchurl/fetchGithub)
<numkem>
evanjs: me neither but it makes sense since nixpkgs is focussed on getting external sources
AmandaC_ is now known as AmandaC
Kyndig has quit [Remote host closed the connection]
sarcasticadmin has joined #nixos
jakobrs has quit [Quit: WeeChat 2.8]
cole-h has joined #nixos
Acou_Bass has quit [Ping timeout: 256 seconds]
Acou_Bass has joined #nixos
realrokka has quit [Read error: Connection reset by peer]
<steell>
anyone here have experience getting an external display working with nvidia optimus?
<steell>
one that shares the same X session as the builtin intel display?
<numkem>
evanjs: say I want to make a pakcage based on a local archive that isn't available by a way fetchurl could get it, what would you suggest doing?
<hodapp>
who are the resident Rustaceans? I am trying to figure out how to work effectively with tools that ordinarily assume one has 'rustup' available or require a stdlib path manually given
<hodapp>
e.g. the Rust plugin for IntelliJ IDEA
shibboleth has quit [Quit: shibboleth]
<hyper_ch>
do we have samba-vfs-modules?
CMCDragonkai1 has quit [Ping timeout: 256 seconds]
<Yaniel>
hodapp: RUSTUP_HOME and CARGO_HOME should solve that I think
<hodapp>
Yaniel: IIRC, I've been told here I shouldn't be using rustup as it just interferes
<Yaniel>
depends on what you are doing
<Yaniel>
if it's a dev workstation then you probably *want* to use rustup since it lets you control the used toolchain on a per-project basis
mrpi has quit [Quit: killed]
das_j has quit [Quit: killed]
ajs124 has quit [Quit: killed]
Scriptkiddi has quit [Quit: killed]
<Yaniel>
i.e. install rustup from nixpkgs and be on your way
abathur has joined #nixos
<numkem>
hodapp: I managed to make rust work in emacs last week-end by using direnv and lorri. Emacs just picked up the new PATH and saw the executables
<Yaniel>
it stays in ~/{.cargo, .rustup, .multirust}
<hodapp>
numkem: 'work in emacs' now?
<Yaniel>
and the rustup binary can be wherever
<hodapp>
Yaniel: hm, maybe I'll try again and see if I run into issues
<Yaniel>
if you want to package stuff then this is irrelevant anyway
<hodapp>
I'm just trying to get some integration with IntelliJ and Emacs
<Yaniel>
what integration?
<Yaniel>
nix or rust
<numkem>
hodapp: the key is direnv and lorri, once lorri is tracking a folder where you source code is (lorri creates a shell.nix by default)
<numkem>
hodapp: once I open a file in that folder, emacs loads the .envrc file and the rust binarries becomes available. or like Yaniel says, you can just install the rust package and make it globally available in your configuration.nix
<hodapp>
Yaniel: Rust integration with IntelliJ IDEA, and with Emacs via Racer or RLS
<Yaniel>
hodapp: for that the easiest way is installing rustup from nixpkgs I think
<hodapp>
Yaniel: for both?
<Yaniel>
and make sure your PATH contains ~/.cargo/bin when launching IDEA/emacs
<Yaniel>
yes
<hodapp>
I'll try that... cargo was already in my path, rustup was not
mrpi has joined #nixos
das_j has joined #nixos
ajs124 has joined #nixos
Scriptkiddi has joined #nixos
<Yaniel>
if you want fancier nix integration then what numkem said
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
peelz has quit [Remote host closed the connection]
<{^_^}>
nix-community/poetry2nix#90 (by RaitoBezarius, 1 day ago, open): Enable global preference for wheels for top-level functions
peelz has joined #nixos
<evanjs>
hodapp: there is also #nixos-rust
<numkem>
hodapp: lorri is why I made the full switch to NixOS after more than 10 years on Arch. It makes my life so much easier. I do use emacs for everyting tho, so your milage may vary
adev has quit [Quit: Quitte]
<evanjs>
eh lorri works great in most places
<evanjs>
if anything, emacs took the most effort out of the envs I've used so far
<simpson>
direnv works without lorri, too; it's possible to incrementally automate environment setup.
<hodapp>
numkem: I also use Emacs for pretty much everything, but I have had more than a few rough spots trying to get good language integration in NixOS; I know I ran into this with C, C++, and Go
<evanjs>
numkem: yeah I figured that's sort of what you'd be trying to do.
<hodapp>
evanjs: hey, thanks
<numkem>
hodapp: go is my main language so I cheated and installed it globally
<evanjs>
numkem: it might be as easy as "src = /path/name.tar.gz" haha
<numkem>
evanjs: seriously? I'll have to try that out, thanks!
<evanjs>
I did the same for rustup using the moz_overlay stable channel
<{^_^}>
[nixpkgs] @NeQuissimus pushed 13 commits to master: https://git.io/JfkAf
<evanjs>
Those are my two primary resources for the moz overlay stuff IIRC
<nicksloan>
has anyone seen anything like this? https://github.com/NixOS/nixpkgs/issues/85791 Can't shake the feeling I'm doing something wrong since no one else seems to be talking about it
<{^_^}>
#85791 (by nicksloan, 1 minute ago, open): Python 3.8 and virtualenv 16.7.9 don't seem to work together
<evanjs>
Basically, it uses the same sources as rustup. I have autoUpgrade set to run every 6 hours, so my system will always have the newest stable rust as of the last ~6 hours or so. It's nice for lorri and etc as it will basically upgrade your rust toolchain for your project environment whenever it detects new stuff (and the TTL of the tarball or etc expires, etc)
<nschoe>
Do I need to take a break or isn't it packaged indeed?
<nschoe>
Hi everyone, I can't seem to find qt-sqlite (or qsqlite, theqt driver for sqlite) packaged for NixOS.
<numkem>
I've started looking into elixir and it got me quite exited. I was wondering if any efforts has been done to support packaging elixir packages? I've seen there is a request to package elixir-ls which is the LSP server for elixir
<hodapp>
however I have rather little experience with Erlang & Elixir myself
dingenskirchen has quit [Quit: dingenskirchen]
<numkem>
hodapp: fantastic find, BEAM isn't something I remember just yet, just started reading about it
<numkem>
hodapp++
<{^_^}>
hodapp's karma got increased to 6
<hodapp>
woo!
dsg has joined #nixos
<hodapp>
Elixir is one of those languages I kind of sort of want to learn, but have rather little use for because of how much of what I write is more on the heavy numerical side
sarcasticadmin has joined #nixos
<hodapp>
though much of what I do in Go could probably be done in Elixir/Erlang
koleesch has joined #nixos
arianvp has quit [Quit: WeeChat 2.6]
arianvp has joined #nixos
<numkem>
hodapp: I picked it last weekend because I tried to get haskell working on nix through LSP and emacs and i got frustrated
<numkem>
hodapp: I was on a quest to learn a new language but preferably a functional one
<FRidh>
nicksloan: its a recurring issue but just not easy to fix
<hodapp>
numkem: oh, I used Haskell tooling on Emacs before I used NixOS and it was pretty frustrating then, though I managed to work with it eventually
<nicksloan>
FRidh: bummer. Do you happen to know if the virtualenv rewrite improves the situation at all?
<numkem>
hodapp: my problems was more related to the overlay missing a match between the hie-wrapper and the current ghc version and the fact that the other lsp provider (forgot the name) is currently marked as broken
<numkem>
hodapp: I do see your comparaison between Go and Elixir in terms concurrecy but I'd like to learn a functional language and have fun with it (still love Go but it's... verbose)
<hodapp>
numkem: yeah, that is about as much in common as they have
<{^_^}>
[nixpkgs] @worldofpeace opened pull request #85795 โ pantheon.wingpanel-indicator-datetime: patch in a lot of fixes โ https://git.io/Jfkxv
vika_nezrimaya has quit [Quit: ERC (IRC client for Emacs 26.3)]
<FRidh>
nicksloan: no
<FRidh>
nicksloan: this is because we create a nix python env, using a similar mechanism as v(irtual)env. Using both collides.
<FRidh>
nicksloan: but I posted some things on the related issues, you should be fine using just venv directly
<rnmhdn>
I don't get anything whatsoever in dmesg when I plug the device in and out. my kernel version from pacman is the same as the one from uname -r. lsblk -f and fdisk -l show nothing. the device and cable are fine. I've tested it on a windows machine an hour ago right after noticing that it was not recognised on my laptop. lsusb also doesn't show anything.
<rnmhdn>
I think it's because it has a certain filesystem that I don't have installed on my laptop.
<rnmhdn>
any idea how I can find some information about this device?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @mweinelt to master ยซ babeld: 1.9.1 โ 1.9.2 ยป: https://git.io/Jfkxi
knupfer has quit [Quit: knupfer]
<rnmhdn>
I'm certain that there is no issue with the hardware. and also when I plug it in I get the same noises that I always used to get. the only thing that has changed is that I've uninstalled a lot of packages since last time I used this device.
<rnmhdn>
also I tested two other devices on that port and they worked just fine but I know that this device that is not working has a different filesystem from the others
domogled1 has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace pushed to release-20.03 ยซ pantheon.wingpanel-indicator-datetime: patch in a lot of fixes ยป: https://git.io/Jfkx1
domogled has quit [Ping timeout: 240 seconds]
domogled1 is now known as domogled
brainacid has left #nixos [#nixos]
chagra_ has joined #nixos
<{^_^}>
[nixpkgs] @worldofpeace merged pull request #84673 โ Use qt5's mkDerivation in packages that otherwise crash โ https://git.io/Jvxfe
<{^_^}>
[nixpkgs] @worldofpeace pushed 33 commits to master: https://git.io/JfkxQ
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzzโฆ]
<infandum>
I'm getting an error: error: unable to download '/nix/store/3996c82637wqpghnz92k9r4y3rjz99aj-streaming-commons-0.2.1.2': URL using bad/illegal format or missing URL (3)
<infandum>
<infandum>
Using pkgs.haskellPackages.callHackage "streaming-commons" "0.2.1.2"
cosimone has quit [Remote host closed the connection]
<infandum>
That folder does exist in /nix/store, though
<nschoe>
Yet my application, having qtbase as an nix dependency doesn't find this driver. Am I missign smth obvious?
<nschoe>
I can see the .so file in the outputs of qtbase.
<nschoe>
Hi everyone, I'm packaging an application that needs Qt sqlite driver. From reading the doc, it is in qtbase (if compiled with -system-sqlite, which qtbase is).
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
peelz has quit [Remote host closed the connection]
mzan has joined #nixos
mzan has quit [Client Quit]
dingenskirchen has quit [Quit: dingenskirchen]
<qy[m]>
riot seems to think i was pinged
<qy[m]>
it appears these rumours were greatly exaggerated
<hodapp>
I don't see anyone pinging you in between this and your last message
<cole-h>
(Also, should the manual version be 20.03pre-git?)
<andi->
cole-h: it should fit to my currenct nixpkgs revision that I used to build the system
cfricke has quit [Client Quit]
<cole-h>
I mean, right now
<cole-h>
It's 20.03pre-git on the site, even though 20.03 is released
o1lo01ol1o has quit [Ping timeout: 256 seconds]
cosimone_ has joined #nixos
<nschoe>
I'm asking because qmake -query produces a weird result: QT_INSTALL_PLUGINS:/build/qtbase-everywhere-src-5.12.7/$(out)/$(qtPluginPrefix) and I don't think it's valid :/
<nschoe>
(if anyone has knowledge about how qt works :) 0
<{^_^}>
#85504 (by samueldr, 4 days ago, open): [20.03]ย Linux latest is for the previous release
rogue_koder has quit [Ping timeout: 256 seconds]
FRidh has quit [Quit: Konversation terminated!]
mac has quit [Remote host closed the connection]
hlolli__ has quit [Remote host closed the connection]
rogue_koder has joined #nixos
<freeman42x[m]>
is there any software for Nix which can be used to search and install / uninstall packages stored in configuration.nix or user level configs? if not I or someone needs to build one, wasting too much time with current workflow
<energizer>
freeman42x[m]: not sure i understand the question. what problem are you having?
o1lo01ol1o has joined #nixos
<waleee-cl>
sounds like he wants a nix-env that appends/removes packages in eg. environment.systemPackages
<freeman42x[m]>
energizer: read my question again and ask what is not clear so I can help you. What I said is very clear to me
<freeman42x[m]>
`sounds like he wants a nix-env that appends/removes packages in eg. environment.systemPackages` exactly and does sudo nixos-rebuild switch or equivalent command for user level Nix config
<energizer>
freeman42x[m]: are you saying you want a command that edits configuration.nix for you?
sm has left #nixos ["ERC (IRC client for Emacs 27.0.50)"]
<energizer>
yeah ok
<freeman42x[m]>
energizer: see above. Yes, and it runs nix commands to install / uninstall those changes
mehlon has joined #nixos
<energizer>
not aware of one but seems easy enough. i'd probably have it manage the package list in a toml file
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @savannidgerinel to master ยซ fitnesstrax: init at 0.1.0 (#83336) ยป: https://git.io/JfIvb
konobi has joined #nixos
<sm[m]>
freeman42x: agreed
chloekek has quit [Ping timeout: 260 seconds]
<shreyansh_k>
Hello, which package should I install to get EWS (Microsoft Exchange) support in Kmail?
cosimone_ has quit [Quit: Terminated!]
<{^_^}>
[nixpkgs] @mmilata opened pull request #85805 โ [19.09] Use qt5's mkDerivation in packages that otherwise crash โ https://git.io/JfIvh
Darkmatter66_ has quit [Ping timeout: 264 seconds]
zupo has joined #nixos
cosimone has joined #nixos
CRTified has quit [Quit: Gateway shutdown]
Darkmatter66 has joined #nixos
<freeman42x[m]>
I find it every weird that there is no popular GUI software for such an useful usecase, basically any Nix user could benefit grom software that saves them time on searching, installing and uninstalling software without having to drop in to temrinal
<gchristensen>
I guess I don't install stuff like that much
<mehlon>
well yeah I guess nixos isn't yet popular enough for someone to make that
<energizer>
fwiw i'm not dropping into terminal to make changes, i'm in the terminal by default
dermetfan has joined #nixos
<MichaelRaskin>
energizer++
<{^_^}>
energizer's karma got increased to 9
drakonis has joined #nixos
<mehlon>
maybe if someone makes a company like canonical and redhat, but specifically for desktop nixos
<mehlon>
then we'll finally get a GUI for nixos
<simpson>
Maybe the patterns of old are not good; maybe control panels are an antipattern.
<energizer>
if you just want a gui for finding and installing packages it's probably an afternoon's worth of work?
<MichaelRaskin>
Now there is even nixos-manager that seems to do exactly that
<{^_^}>
[nixpkgs] @MetaDark closed pull request #59293 โ qbittorrent: add python as a runtime dependency for tracker search โ https://git.io/fjqRo
<ixxie>
mehlon: I was considering something like that... I think there is a lot of potential there
mzan has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @kraem opened pull request #85806 โ [20.03] linux: version bumps โ https://git.io/JfIJv
<infandum>
I finally got it to build! However, when running, I'm getting: Error: package or namespace load failed for 'stats' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/lib/R/library/stats/libs/stats.so': liblapack.so.3: cannot open shared object file: No such file or directory. I have pkgs.liblapack in my buildInputs and nativeBuildInputs, what's missing?
<infandum>
<clever>
infandum: you need to patch it to look i the right place, buildInputs dont magically appear in /usr/lib, /usr/lib just never exists
<kitemikaze>
hello, could someone give me an hint how I could override an options that is already defined in an import ?
<jtojnar>
cole-h it will not work since substituteAll produces a separate derivation
<kitemikaze>
let say, imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ]; and I want to override: boot.loader.grub.device = "/dev/vda"; I didn't notice when I did the install but my device is /dev/sda .... an now I'm afraid the boot will break on my next rebuild
<infandum>
It's not there as a runtime dependency?
drakonis has quit [Quit: WeeChat 2.8]
<clever>
infandum: its only a runtime dependency if the /nix/store/hash-stats path appears within the final output of your build
<clever>
kitemikaze: lib.mkForce can override any nixos option
<kitemikaze>
clever: thanks I will try !
<jtojnar>
cole-h inherit out will not work since you likely do not have out in scope, and if you define `out = mkDerivation { ... }` and try to use it in patches, you will get dependency cycle
<infandum>
clever: It's R, so what I have right now is just pkgs.R pkgs.rPackages.ggplot2 pkgs.rPackages.ggplot2 pkgs.rPackages.devtools pkgs.rPackages.cowplot pkgs.rPackages.jsonlite pkgs.rPackages.edgeR in my buildInputs
<infandum>
<clever>
infandum: does the string "/usr/lib/R/library/stats/libs/stats.so" appear anywhere in the source?
<infandum>
Stats is built in with R
<clever>
not sure then
<infandum>
clever: What do you mean in the source?
ramses_ has joined #nixos
<infandum>
The default.nix for what I'm building or for R?
<clever>
infandum: the source code for the R program
drakonis has joined #nixos
<infandum>
that's quite a lot of code
<clever>
infandum: grep
b has quit [Ping timeout: 260 seconds]
dsx has quit [Quit: dsx]
<numkem>
say I need zenity in the package I'm trying to create, but it would have to be available in PATH for that package, is there a way to do that?
operator-name has joined #nixos
<numkem>
tried buildInputs already
<clever>
numkem: wrapProgram
<numkem>
clever: duh, thank you, I'm still getting used to all the bits and pieces
<ramses_>
I am building a docker container using the nixos/nix image in which I install a python application using nix-build. Is there anything more than "nix-collect-garbage -d" that I can do to minimise the size of the resulting image? I ahve the impression that quite a lot is still staying behind in the nix store
<ramses_>
E.g. paths like /nix/store/bk0xkwc74jh0zrb63ly5n0p7lhjnvdwh-nixpkgs-20.03.1422.1e90c46c2d9
<raboof>
ramses_: 'nix why-depends' can help in figuring out why certain paths are in there
linarcx has joined #nixos
<freeman42x[m]>
clever: are you cleverca22, if yes, dunno if you remember me :)
<{^_^}>
[nixpkgs] @garbas opened pull request #85809 โ vdirsyncer: fix failing test โ https://git.io/JfIUq
<raboof>
ramses_: I haven't built docker images with nix yet, only LXC images, so I might be off here - but afaics nix-depends works on any nix path, not just packages, so might still be helpful
<raboof>
Not sure what the 'gc root' of a docker image is - for my LXC image it was the init script
<{^_^}>
[nixpkgs] @jonringer pushed commit from @rycee to master ยซ jwt-cli: 3.0.1 -> 3.1.0 ยป: https://git.io/JfIUa
<infinisil>
Ah yeah, in the context this is about using an older nixpkgs revision
<clever>
infinisil: yeah, you can point nix-channel to a rev
<kini>
This isn't really a nixos question, but not sure where to ask it... Does anyone know how repology detects new versions? The package acl2 had an upstream release a few days ago, so I figured the r-ryantm bot would have made a PR to upgrade it in nixpkgs, but it hasn't, because repology hasn't detected the upstream release yet.
<cole-h>
clever: and $out is properly set/available in postPatch, right?
<cransom>
otherwise, it's usually setting NIX_PATH=nixpkgs:pathtowhateveriwantedpinned
<clever>
cole-h: $out is set during every phase
<cole-h>
Good to know. Thanks. โจ clever
<{^_^}>
clever's karma got increased to 399
<infinisil>
I'll just tell the person that they should start pinning their nixpkgs in their projects
<energizer>
kini: not very helpful i know but...it's open source so you can look
<{^_^}>
[nixpkgs] @johnae opened pull request #85813 โ The systemd unit for k3s should differ between agents and servers โ https://git.io/JfIT0
<jtojnar>
cole-h maybe we could introduce something to the generic builder that would replace the placeholder references during patchPhase
<kini>
energizer: Haha, I actually did try to skim through their code on github, but couldn't find anything about individual packages, though I did find some sql scripts... I wonder if it just learns of packages when they show up in at least one repo it's watching, rather than having an a priori list of packages to track
packer has joined #nixos
<pie_[bnc]>
anyone know how to fix this?:
<pie_[bnc]>
No journal files were opened due to insufficient permissions.
<pie_[bnc]>
Failed to search journal ACL: Operation not supported
<pie_[bnc]>
$ journalctl --user-unit pulseaudio
zupo has joined #nixos
<pbogdan>
are you on zfs by any chance pie_[bnc] ?
<cole-h>
clever: So that would be `substituteInPlace file --subst-var out`, right?
<clever>
cole-h: i think so
<clever>
infinisil: 2019-11-17 03:49:22< clever> wedens[m]: if you `nix-channel --add https://githib.com/nixos/nixpkgs/archive/REV.tar.gz nixos`, and then `nix-channel --update nixos`, it will fetch the given rev
<ramses_>
Is there any way to delete the nix channel from the nix store? I did nix-channel --remove and I see nothing left in my gcroots, but still I have a path " /nix/store/58l27cl4pks1v25c8q7yfpfq0hnzc1v6-nixpkgs-20.03pre194957.bef773ed53f" in my nix store taking up 170MB
<ramses_>
And I have only two gcroots left, but nix why-depends says none of them depend on this path
<mehlon>
maybe nix-channel --update ?
<ramses_>
So it seems as if channels are treated specially
<ramses_>
mehlon: tried that followed by a collect-garbage -d, path is still there
<clever>
ramses_: run `nix-store --query --roots` on the given path
<clever>
ramses_: what does it report?
<pie_[bnc]>
pbogdan: yes
<Xe>
ramses_: run nix-collect-garbage as root
<ramses_>
clever: error: path '/nix/store/58l27cl4pks1v25c8q7yfpfq0hnzc1v6-nixpkgs-20.03pre194957.bef773ed53f' is not valid
<ramses_>
Xe: it's a docker container, there is only root
<clever>
ramses_: then any garbage collection should get rid of it, with no arguments
<ramses_>
clever: yeah, but it doesn't...
<clever>
ramses_: its probably safe to rm -rf it, in this case
<ramses_>
clever: the output of nix-collect-garbage -d actually says that it deletes the path, but then it says 0 MiB freed and the path is still there
<ramses_>
The issue is that this is in a docker container and I want to clean this up during the docker build, so a bit annoying if the hash will change
<clever>
ramses_: nix can generate docker images directly
<ramses_>
clever: if I run rm -rf, it actually does delete it
mallox has quit [Ping timeout: 240 seconds]
bqv has quit [Quit: WeeChat 2.8]
<clever>
ramses_: dockerTools.buildImage lets you directly build a docker image, with only the things you want
<ramses_>
clever: I know, I make the container for a colleague who doesn't want to install nix on his machine, but our servers run nixos.
<pie_[bnc]>
pbogdan: thats probably it
<ramses_>
Don't ask..
<clever>
ramses_: you could run nix in docker to build a docker image
<pie_[bnc]>
pbogdan: wow.
<ramses_>
clever: hah... using a multi-stage build... That's not a bad idea
<clever>
ramses_: lines 74-92 creates a docker image with the listed tools
<clever>
you can either just stop there, and put everything you want into that image
<clever>
ramses_: or you can move to step 2, lines 95-102 create a 2-layer image, with some more binaries in the 2nd layer (so you can reuse the 1st layer on future `docker pull`s)
<clever>
ramses_: or you can just go nuts and use dockerTools.buildLayeredImage, which dynamically generates as many layers as you want (but you have less control of the borders)
<ramses_>
clever: I'm trying to imagine how this will work. Can I have a dockerfile that will use this to build an image? Or I would have to copy the resulting image out of a container?
<clever>
ramses_: i would just manually launch an interactive docker shell into a container that has nix
<clever>
ramses_: and use docker volumes to sneak the final .tar.gz out to the host
<clever>
then just build it like normal, using nix
<clever>
ignore the docker tooling as much as possible!
<ramses_>
clever: Yeah, the problem is that I need to have something seamless for my colleagues, nix is very scary to them
bjth has joined #nixos
<ramses_>
I managed to have all our servers run nixos, but their dev environment is more difficult
<clever>
ramses_: linux or darwin?
<bjth>
Hello! I was wondering if anyone could help me getting the Vulkan Samples from Khronos to run on nixos. I am haivng troubles with the vulkan loader.
<ramses_>
Some darwin, some windows
<ivegotasthma>
hello, I whenever I look for a package with `nix search hello` I get `nixos.hello` packages and then a full duplicate of the results with `nixpkgs.hello`
<clever>
ramses_: ack!, the nix+docker build process only really works on linux
<ivegotasthma>
I'm on unstable and I have only 2 branches, unstable and home-manager, any idea why the duplication with nixpkgs is happening?
<clever>
ramses_: id say they should all just use a standard "dev environment" based on docker, and nix will already be available in that
<clever>
ramses_: on windows and darwin, docker just runs a linux VM, and then runs plain linux docker within that
<ramses_>
clever: yeah, I would really liketo just be able to give them a dockerfile and tell them to build and run it, so they don't have to worry about how the app gets build
<ramses_>
It's a bit messy, it would be easier if they would just run a nixos VM
<ramses_>
But so, we are back to doing an ls of the nix store, identify the lingering path, and rm -rf it
<clever>
ramses_: docker also has a way to map its unix socket into a container
<clever>
ramses_: so you can just `docker load < result/something.tar.gz` from within docker itself
<kalbasit>
if I see this warning on a single-user installation on Darwin, is it benign? `warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy`
{`-`} has joined #nixos
<ivegotasthma>
would be cool to see doas replacing sudo
seanparsons has joined #nixos
zertox has joined #nixos
puck has joined #nixos
rizary has joined #nixos
otti0815 has quit [Ping timeout: 265 seconds]
NieDzejkob has quit [Remote host closed the connection]
<ivegotasthma>
energizer: is there a way I can remove nixpkgs from the NIX_PATH?
<clever>
ivegotasthma: `sudo -u foo command` to run something as somebody
unacceptable has joined #nixos
smatting has quit [Ping timeout: 264 seconds]
<energizer>
ivegotasthma: why?
linuus has joined #nixos
<ivegotasthma>
I don't want to see duplicated packages in nix search
davean has quit [Ping timeout: 265 seconds]
sveitser2 has quit [Ping timeout: 265 seconds]
<ivegotasthma>
I see both nixos and nixpkgs results
<ivegotasthma>
for every search I run
<clever>
ivegotasthma: what does `echo $NIX_PATH` say?
NieDzejkob has joined #nixos
<cole-h>
ivegotasthma: If you see nixpkgs in `sudo nix-channel --list`, maybe removing it will help you?
<clever>
ramses_: then you can build it, and: du --apparent-size -h --max=0 -c $(nix-store -qR ./result ) | sort -h
<clever>
ramses_: that will tell you how big the closure is, and what is making it so big
infandum has quit [Remote host closed the connection]
<clever>
ramses_: you can then use `nix why-depends ./result /nix/store/hash-glibc-locales` to find out why something is included, and begin adding overrides to make it not be included
glittershark has joined #nixos
<clever>
ramses_: you can likely also remove a lot of the things in that list
<{^_^}>
[nixpkgs] @teto merged pull request #85814 โ luaPackages.luaexpat: unbreak, it builds just fine โ https://git.io/JfITp
<{^_^}>
[nixpkgs] @teto pushed commit from @andir to release-20.03 ยซ luaPackages.luaexpat: unbreak, it builds just fine ยป: https://git.io/JfIIc
<{^_^}>
armin: import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<clever>
cole-h: there may be other things that are making it behave in a non-normal way
<armin>
clever: ty!
mehlon has quit [Quit: Leaving]
<ramses_>
clever: with only my python application, it comes down to 143MB, which is better
o1lo01ol1o has joined #nixos
<ramses_>
clever: with only my python application, it comes down to 143MB, which is better
<clever>
ramses_: and now try loading the docker image and see if its usable
<cole-h>
clever: Hm, could it be due to all the `sed`s in `postInstall`? e.g. `sed -i "s|bc|${bc}/bin/bc|"`
smatting has joined #nixos
<clever>
cole-h: that entirely ignores the propagatedBuildInputs, and just inserts an absolute path into the code
<clever>
cole-h: which is how i would do things
<clever>
,runtimedeps cole-h
<{^_^}>
cole-h: In order of preference: Patch source OR ((if it uses PATH -> wrap with new $PATH) AND (if it uses dlopen, (patchelf --set-rpath in postFixup OR wrap with new LD_LIBRARY_PATH)))
ramses_ has quit [Quit: Connection closed]
<cole-h>
I'm more confused on why, if I remove the postInstall and keep the propagatedBuildInputs, fish functions just fine (tested in VM)
chagra_ has quit [Ping timeout: 265 seconds]
ramses_ has joined #nixos
<clever>
cole-h: is the final bin/fish a shell script or a binary?
<cole-h>
A binary.
<clever>
cole-h: when you run strings on it, what paths do you see to the things it wants to run?
o1lo01ol1o has quit [Ping timeout: 260 seconds]
<cole-h>
The things it needs these binaries for are inside fish scripts
o1lo01ol1o has joined #nixos
<cole-h>
Which is why I think it might be better to `wrapProgram` it...
bjth has quit [Remote host closed the connection]
<clever>
cole-h: either patch the scripts, or wrapProgram
nerosnm has joined #nixos
<ixxie>
when NixOS is setup on a VM, its networking devices are determined by the VM configuration right?
justanotheruser has quit [Ping timeout: 256 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzzโฆ]
fendor has quit [Read error: Connection reset by peer]
maddo has quit [Quit: See ya]
shabius_ has joined #nixos
Nikita has joined #nixos
nikivi has quit [Read error: Connection reset by peer]
aveltras has quit [Quit: Connection closed for inactivity]
konobi has quit [Read error: Connection reset by peer]
konobi_ has joined #nixos
koleesch has quit [Read error: Connection reset by peer]
guts has joined #nixos
koleesch has joined #nixos
koleesch has quit [Read error: Connection reset by peer]
koleesch has joined #nixos
koleesch has quit [Read error: Connection reset by peer]
koleesch has joined #nixos
<guts>
hello! I have a system where the boot drive is dead, but the system is still booted. I've got a USB stick I want to put the new /boot on, and I was planning on nixos-install on my live system. is that safe?
Vikingman has joined #nixos
<infinisil>
lovesegfault: Could probably do `pythonInterpreters = mapAttrs (name: value: value.override { ... }) super.pythonInterpreters` in an overlay
<clever>
guts: if your trying to change the /boot for the running os, you dont want nixos-install
<clever>
guts: just fix the config, mount the right thing to /boot, and nixos-rebuild
<guts>
it will make sure everything that it needs is there?
<clever>
guts: you may want `nixos-rebuild --install-bootloader`
<guts>
ahhh, that's probably what I want. thanks!
<clever>
guts: thats what --install-bootloader manages, as long as the right thing is mounted to /boot
gustavderdrache has joined #nixos
koleesch has quit [Read error: Connection reset by peer]
<ramses_>
clever: I ended up implementing both methods, they can choose between a slower build with a smaller resulting image (image build by nix in a container, then loaded), or a faster build but a bigger resulting image (native docker build)
<ramses_>
I'll see what they prefer
smatting has quit [Ping timeout: 240 seconds]
<ramses_>
Thanks for your help!
koleesch has joined #nixos
koleesch has quit [Read error: Connection reset by peer]
<ramses_>
Building the image with nix in the container is quite a bit slower because dockerTools seems to have quite some dependencies which are downloaded every time the build is started. This could be avoided by preinstalling this in a docker image made for building, but this would increase the complexity even more
<clever>
ramses_: i was thinking a docker container with state that can persist, so nix can cache things
<ramses_>
Hmm, a volume for the nix store
<clever>
ramses_: i was thinking just a normal container, start vs exec
<ramses_>
Ok, that's for tomorrow, it's 1h30 am here