<gchristensen>
nix-shell and /etc/nixos/confiuration.nix
jgertm has quit [(Ping timeout: 260 seconds)]
<tilpner>
Fare - Do you actually to use nix-env, or do you just want different channels?
<tilpner>
Fare - If you do want nix-env, you would put something like import path/to/your/local/nixpkgs {} or import <nixpkgs> {} (with NIX_PATH set accordingly) into ~/.nix-defexpr/nixpkgs.nix and delete other entries in that directory as needed
<tilpner>
Fare - But if you only want nix-env as a way to mix channels, that's not needed. You can mix channels with just configuration.nix too
<tilpner>
s/actually/actually want/
deep-book-gk_ has joined #nixos
deep-book-gk_ has left #nixos []
ottidmes has quit [(Quit: WeeChat 1.7.1)]
fikse has joined #nixos
<yegortimoshenko>
gchristensen: by the way, saw your pr with zfs install tests, thanks, going to use it as a template for my configuration.nix :-)
<grahamc>
Oh cool I'm glad. I thought I forgot to merge it.
<yegortimoshenko>
oh ok then!
eacameron has quit [(Remote host closed the connection)]
<yegortimoshenko>
do you have any strong opinion on zfs?
fikse has quit [(Ping timeout: 240 seconds)]
<grahamc>
Strong? No. It is a good FS though.
tmaekawa has joined #nixos
riclima has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<yegortimoshenko>
just had an irrecoverably corrupted HFS+ file system a week ago
<yegortimoshenko>
so now i'm super stoked about using ZFS on a laptop, with nice backups, snapshots, data integrity and all
riclima has joined #nixos
ebzzry has joined #nixos
<gchristensen>
nice, make sure to follow 3-2-1 rule though if the data is very very important
deep-book-gk_ has joined #nixos
deep-book-gk_ has quit [(K-Lined)]
eacameron has joined #nixos
Fare has quit [(Ping timeout: 260 seconds)]
ericsagnes has quit [(Quit: WeeChat 1.8)]
ericsagnes has joined #nixos
ebzzry has quit [(Ping timeout: 255 seconds)]
<yegortimoshenko>
i use backblaze b2 :-) and mostly data i store is just a cache. what i really want to avoid is silent data corruption, i don't store full backups forever, they get phased out after some time.
deep-book-gk_ has joined #nixos
deep-book-gk_ has left #nixos []
Supersonic112 has quit [(Disconnected by services)]
Supersonic112_ has joined #nixos
Supersonic112_ is now known as Supersonic112
fikse has joined #nixos
<clever>
yegortimoshenko: zfs snapshots are great to have a rolling backup system
riclima has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
takle has joined #nixos
Wizek_ has quit [(Ping timeout: 248 seconds)]
sary has quit [(Ping timeout: 248 seconds)]
s33se_ has joined #nixos
takle has quit [(Ping timeout: 260 seconds)]
s33se has quit [(Ping timeout: 248 seconds)]
mbrgm has quit [(Ping timeout: 260 seconds)]
mbrgm has joined #nixos
drakonis has joined #nixos
sary has joined #nixos
rigelk has joined #nixos
et4te has joined #nixos
<et4te>
whats a working AMI to use with Hydra?
zeus_ has quit [(Remote host closed the connection)]
drakonis has quit [(Remote host closed the connection)]
drakonis has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] adisbladis opened pull request #27556: Use more Vulnix dependencies from pythonPackages (master...pythonpackages_vulnix) https://git.io/v7kqT
<clever>
cwre: so the default kernel uses this set of patches
<cwre>
clever: ahh, awesome.
<cwre>
Thank you. I'll have to work on this tomorrow.
Ivanych has joined #nixos
<JameySharp[m]>
What should I read or look at if I want to use NixOS to build read-only disk images for embedded Linux applications, like what people use Yocto for? I gather the NixOS tests do this to build qemu images, and I guess NixOps kind of does it. What should I study first?
sary_ has quit [(Ping timeout: 240 seconds)]
sary has joined #nixos
jsgrant has quit [(Read error: Connection reset by peer)]
jsgrant has joined #nixos
proteusguy has joined #nixos
rigelk has joined #nixos
rigelk has quit [(Changing host)]
rigelk has joined #nixos
eacameron has quit [(Remote host closed the connection)]
jsgrant has quit [(Remote host closed the connection)]
rigelk has quit [(Ping timeout: 240 seconds)]
Infinisil has quit [(Ping timeout: 260 seconds)]
takle has joined #nixos
takle has quit [(Ping timeout: 260 seconds)]
simukis has joined #nixos
rardiol1 has quit [(Quit: Leaving.)]
endformationage has quit [(Quit: WeeChat 1.7)]
jgertm has joined #nixos
iyzsong has joined #nixos
zeus_ has quit [(Remote host closed the connection)]
jgertm has quit [(Ping timeout: 248 seconds)]
ebzzry has joined #nixos
ambro718 has joined #nixos
ambro718 has quit [(Read error: Connection reset by peer)]
FRidh has joined #nixos
FRidh has quit [(Client Quit)]
mudri has joined #nixos
Jackneill has joined #nixos
ebzzry has quit [(Ping timeout: 260 seconds)]
NightTrain has quit [(Quit: Lost terminal)]
Ivanych has quit [(Ping timeout: 240 seconds)]
<Olgierd>
hi, what happened to spotify?
<srhb>
Olgierd: What do you mean?
<srhb>
Olgierd: Ah, they removed the current package.
<srhb>
Olgierd: I'll bump it immediately..
sary has quit [(Remote host closed the connection)]
eacameron has joined #nixos
eacameron has quit [(Ping timeout: 260 seconds)]
<srhb>
Olgierd: Hm, apparently not so simple
takle has joined #nixos
sary has joined #nixos
ng0 has joined #nixos
<Olgierd>
srhb: I'm happy to help, my knowledge of nix is very limited though
sary has quit [(Ping timeout: 255 seconds)]
<srhb>
Olgierd: The problem is that updating to the newest package causes spotify to segfault on startup, and I'm not sure why
<srhb>
I'll push the branch, perhaps more people can take a look
<srhb>
Unfortunately, something has changed, so the build needs revising, and I'm not sure how to identify what
sary has joined #nixos
<Olgierd>
btw, is there an equivalent of configuration.nix for my .nix-profile?
<srhb>
Olgierd: No, unfortunately not, there are no declarative user profiles (yet) but a number of people are working on various projects that might do it
<srhb>
home manager is one such project
hexagoxel has quit [(Quit: ZNC 1.6.5+deb1 - http://znc.in)]
hexagoxel has joined #nixos
7GHABKVR3 has joined #nixos
<7GHABKVR3>
[nixpkgs] Mic92 closed pull request #27469: programs.zsh.ohMyZsh: add `package` option to make package overrides on module-base easier (master...oh-my-zsh/make-pkg-configurable) https://git.io/vQxXc
7GHABKVR3 has left #nixos []
07EABB46C has joined #nixos
<07EABB46C>
[nixpkgs] Mic92 pushed 2 new commits to master: https://git.io/v7klE
<07EABB46C>
nixpkgs/master 95bf0cc Maximilian Bosch: programs.zsh.ohMyZsh: add `package` option to make package overrides on module-base easier
<srhb>
WilliamHamilton: I think runInteractiveProcess must do that
<WilliamHamilton>
but with no avail, it seems not to find nix-shell
<srhb>
WilliamHamilton: Why not simply run the program from within a shell that already has it on PATH instead of hard coding it in?
<WilliamHamilton>
*** Exception: nix-shell: runInteractiveProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
<WilliamHamilton>
right, because I should write a shell.nix in that case, right? I'm only calling `stack --nix` for now
<srhb>
I don't know how Stack works (in my experience "not") but that's what you would do in a nixified build, yes.
<WilliamHamilton>
ok, thanks, that's a direction worth exploring, srhb
<srhb>
WilliamHamilton: I'll try making a minimal example for you
<WilliamHamilton>
of a shell.nix file?
<srhb>
Yeah
<WilliamHamilton>
wait, I can obtain one of those from the haskell-R guys, that I know is working (I'd prefer to use your patience for further questions :))
<srhb>
I hope someone from in here will take a look later today.
arjen-jonathan has joined #nixos
thc202 has joined #nixos
<Olgierd>
thank you!
joehh has joined #nixos
bennofs has joined #nixos
<Olgierd>
and… #basics how do I build a package from nixpkgs working tree? nix-build ~/nixpkgs/pkgs/…/evolution.nix fails:
<Olgierd>
error: cannot auto-call a function that has an argument without a default value (‘stdenv’)
<srhb>
Olgierd: In general you find its top level attribute (as specified in pkgs/top-level/all-packages.nix usually)
<srhb>
then, nix-build . -A thatAttribute
<srhb>
Olgierd: so, nix-build ~/nixpkgs -A evolution
<Olgierd>
ok, and now how do i add it to my configuration.nix? since copying the expression is impractical (it relies on some other files in nixpkgs), and nixos-rebuild switch -I ~/nixpkgs uses the already-built derivation (from binary cache)
<srhb>
Olgierd: If you can use nixos-rebuild switch like that, it would be -Inixpkgs=/home/foo/nixpkgs
Ivanych has joined #nixos
jonte has joined #nixos
<srhb>
Olgierd: It won't use the binary cache if it picks up your altered derivation correctly
magnetophon has quit [(Ping timeout: 260 seconds)]
ng0 has quit [(Quit: Alexa, when is the end of world?)]
<bennofs>
is there a tool like `less` that'll fallback to `cat` without printing an annoying "terminal not fully functional" warning?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/v7k4Q
<NixOS_GitHub>
nixpkgs/master a6bcc15 Eric Sagnes: blackbox: init at 1.20170611
<NixOS_GitHub>
nixpkgs/master dc841b7 Joachim F: Merge pull request #27559 from ericsagnes/pkg/blackbox...
NixOS_GitHub has left #nixos []
esorijgea has joined #nixos
deltasquared has joined #nixos
<esorijgea>
Hi! Is there any way for NixOS to reply to Bonjour messages, so that one can set up my-nix-box.local on a network?
<deltasquared>
esorijgea: avahi.
<deltasquared>
avahi is a daemon which listens to bonjour
<deltasquared>
I've been using it for ages
<deltasquared>
"ping hydrocarbon.local" is so much nicer than IP addresses :)
<deltasquared>
you can even set up the nss module so your host running the daemon can ping other bonjour devices.
<esorijgea>
deltasquared: that's what I think :-). I'm not finding anything on Avahi in the nixos manual. Can research and set it up myself, but if you have the config handy I'd be very thankful to read it!
<deltasquared>
esorijgea: if I might also humbly suggest the archlinux wiki's page on the subject. The installation isn't appropriate of course, but the configuration may be of help
<deltasquared>
to be fair though, it should just work out of the box more or less
<deltasquared>
(unless you've got a whitelist firewall, that was fun to debug...)
<deltasquared>
start daemon, and it responds to lookups for $(cat /etc/hostname).local
sary has quit [(Ping timeout: 255 seconds)]
seppellll has joined #nixos
cinimod has joined #nixos
ison111 has quit [(Ping timeout: 260 seconds)]
seagreen has quit [(Ping timeout: 246 seconds)]
<WilliamHamilton>
srhb: update: in the end I solved my problem with `stack --nix` (although I learned a lot from the detour); interesting note: the command `stack --nix` calls itself from inside `nix-shell`, so in the end I was able to do just "z3"
<srhb>
WilliamHamilton: Great :)
<WilliamHamilton>
srhb: thank you for the help :)
<srhb>
WilliamHamilton: You're welcome :)
simendsjo has joined #nixos
<joepie91>
deltasquared: watching that google tech talk about Rust now; I made the mistake of scrolling down to the comments, however...
<deltasquared>
joepie91: I've said it before and I'll say it again, youtube comments are cancer
<joepie91>
dunning-kruger levels through the roof
<joepie91>
deltasquared: these are *particularly* bad though
<deltasquared>
joepie91: it's possible one could correlate "memory leak" with "it'll blow up after just being left alone for a while"
<joepie91>
yeah, but that is not a safety issue :P
erictapen has joined #nixos
<deltasquared>
joepie91: so yeah I guess they misunderstood the kind of safety
<deltasquared>
I for one would love to write programs that could never OOM but that's tricky to say the least. but at least my program won't exihibit "spooky behaviour" due to UB
* srhb
wonders if there's a #nixos-offtopic of if it's becoming necessary
<deltasquared>
srhb: well no-one's asked a question in a bit, if that happens we'll shut up
<simendsjo>
Trying to update some packages with a 120kB/s connection takes quite a long time :)
<deltasquared>
simendsjo: ever had the curl meter show negative? that was interesting
<srhb>
deltasquared: Some people monitor the channel to see if there's ongoing developing discussion or requests for help. :)
<srhb>
I think the actual output is unrelated to the segfault
<srhb>
and harmless.
<joepie91>
argh, spotify again
<joepie91>
that thing just keeps breaking
<srhb>
joepie91: Yes :/
simendsjo has quit [(Quit: ERC (IRC client for Emacs 25.1.1))]
<deltasquared>
srhb: I'd disagree on that output being harmless. lack of symbol info with a prop. binary is likely to wind up with version mismatches
<srhb>
We should get an infiltration team to convert some of their devs to nix.
<joepie91>
srhb: my initial suggestion would be "do an strace and see if it does anything that fails that should not be failing"
<srhb>
deltasquared: Can you expand on that? I don't know much about it.
<srhb>
joepie91: Yeah, I did, it wasn't obvious to me at least, but I'll try to dig deeper.
<srhb>
Thanks
<joepie91>
srhb: also, sometimes things segfault because of missing libs that are linked on runtime; in that case, you may want to feed the strace output into https://git.cryto.net/joepie91/find-missing-files
<deltasquared>
srhb: drawing from my arch linux experience here. the rolling distro nature means that proprietary binaries stuck on older lib versions like to crash a lot
<joepie91>
(git clone, npm install, then pipe your strace -f output into `node find.js`)
<deltasquared>
steam has been the only app I've ever seen not get this
seppellll has joined #nixos
<srhb>
joepie91: Thanks, that's useful!
<srhb>
deltasquared: But does missing info mean that the version isn't there or that it's too new?
<joepie91>
srhb: it prints a report after the strace input EOFs; the section at the end (missing libs) is of particular interest, although 1) it may include some items that were optional and 2) it may also be crashing on a read of a non-library file (eg. project config files for XNA stuff)
<deltasquared>
srhb: the missing info just makes it harder to determine if it is the issue I'm referring to
<joepie91>
srhb: so you'll still have to do some manual digging, but it'll give you some pointers
pie__ has quit [(Read error: Connection reset by peer)]
pie_ has joined #nixos
<srhb>
MISSING LIBRARIES: (none)
<srhb>
oh hang on, does strace go to stderr
<joepie91>
srhb: and the other categories are not empty?
<joepie91>
yes
<joepie91>
I usually 2> to a log file and then feed the log file into find.js but you can also do 2>&1 if you don't expect stderr and stdout to get mixed up
<joepie91>
before piping
<srhb>
joepie91: Thanks.
<deltasquared>
joepie91: btw (brief offtopic I know) I read that thing on "expert beginner", and know I realise I absolutely must give those things I dismiss in programming a try first if only to avoid that trap
<deltasquared>
*s/know I/now I/ damnit
phinxy has quit [(Read error: Connection reset by peer)]
JagaJaga has joined #nixos
<joepie91>
deltasquared: 'try everything once' etc. :P
seppelllll has joined #nixos
<deltasquared>
I know the language I'll be trying first. javascript.
<joepie91>
deltasquared: not much coverage of JS as a language yet, but I've written a bunch of stuff about Node as well as some of the common traps/misunderstandings in JS: https://gist.github.com/joepie91/95ed77b71790442b7e61
<joepie91>
(perpetual work in progress)
<joepie91>
so that might be of use
<srhb>
ack.. Some missing opengl libs. Shouldn't those be impure anyway
<deltasquared>
opengl... oh bloody hell
<deltasquared>
srhb: I think they would be because of the "plugin" system for mesa
<joepie91>
deltasquared: if there's one bit of advice I can give for JS: don't try to produce 'classes', not with the ES6 class keyword, not with constructors, and not with prototypes; object literals, when used correctly, are a very powerful tool that will help a lot to produce reliable/maintainable code
takle has quit [(Remote host closed the connection)]
ng0 has joined #nixos
<deltasquared>
joepie91: understood. I was thinking of mucking around with "lambda" functions anyways
<deltasquared>
oh, it'll be fun not having to give a shit about lifetimes for once
<joepie91>
deltasquared: JS does not have classes, every 'class' implementation there is including the ES6 'class' keyword is just syntactic sugar on top of prototypes, and really the only reason it's there is to make JS look less alien to people coming from other languages; there are no technical benefits to using them whatsoever
<joepie91>
(in JS)
seppellll has quit [(Ping timeout: 260 seconds)]
<joepie91>
heh
<joepie91>
deltasquared: and well, functions are values etc.
<joepie91>
so there's not really such a thing as 'lambda functions'
<joepie91>
it's just functions used in a different way
<joepie91>
they're all the same thing under the hood
iyzsong has quit [(Read error: Connection reset by peer)]
<deltasquared>
it relates to C++ lambdas (the capturing variables part) is all, so it's the word I refer to
<deltasquared>
closures, then.
<joepie91>
deltasquared: that's not a distinct thing in JS, though; everything uses lexical scope
<joepie91>
scoping rules are the same everywhere as well
<deltasquared>
right, this be bookmarked for later
<joepie91>
deltasquared: just giving you a pile of stuff to look at :D
<deltasquared>
... bugger, I should have enabled my link saver
<joepie91>
I write all my code with the intention to be as readable as possible, to be useful as real-world example code, hence the link to that project :P
erictapen has quit [(Ping timeout: 260 seconds)]
<joepie91>
as that's a real-world application that uses abstractions fairly heavily
zarel has joined #nixos
sary has joined #nixos
zarel has quit [(Client Quit)]
<joepie91>
and that shows how scoping rules work in JS, as well as 'working with object literals'
<srhb>
joepie91: That find thing is really useful, can't we have that packaged up?
<srhb>
:)
<joepie91>
srhb: eventually(tm), it needs more polishing first :P
<srhb>
Ok :)
zarel has joined #nixos
ixxie has quit [(Ping timeout: 240 seconds)]
<joepie91>
srhb: it's a big pile o' regex right now, basically written ad-hoc as I was debugging a few games while packaging
<srhb>
The only thing it shows missing now is libwidevinecdmadapter.so
<joepie91>
want to make that a bit more robust
<joepie91>
oh dear
<joepie91>
DRM
<srhb>
Which it should include on its own, as far as I can see
<deltasquared>
how the fuck does drm work on linux
<srhb>
deltasquared: "not"
<joepie91>
the same way any DRM works; it does not
<joepie91>
it just tries really hard to look like it does
<joepie91>
:p
cinimod has quit [(Ping timeout: 255 seconds)]
<srhb>
I tried explicitly adding $out/share/spotify to the wrapped LD_LIBRARY_PATH (that's where libwidevinecdm.so is located) -- no dice
<deltasquared>
could be worse... at least there's no ARM TrustZone code or something
<joepie91>
srhb: anyway, I've had some issues with a game where it tried to load a library from ./ but that referred to the working directory
<joepie91>
hm
<joepie91>
srhb: grep the strace output for libwidevinecdm.so to see all its search paths?
<srhb>
joepie91: Good idea, thanks
<joepie91>
I should probably make find.js interactive at some point
<joepie91>
ability to look at attempted search paths and stuff like that
<srhb>
joepie91: Bingo, it does not even try to look there
<joepie91>
srhb: make sure that you're also patching bundled libraries where necessary
<joepie91>
I had this issue with one game
<joepie91>
which iirc linked from one bundled lib to another
<joepie91>
and that broke in some way
<joepie91>
hold on..
<joepie91>
on which note, proprietary games are great testbeds for figuring out bizarre library linking approaches
<srhb>
Manually creating the file it's looking for gets me a black window instead of segfault, so I guess that's part of the way!
<joepie91>
:p
<srhb>
No doubt :P
<joepie91>
the amount of weird shit games do is astounding
<joepie91>
XNA and Unity are especially fun :
<joepie91>
:P*
<srhb>
XNA... *shudder*
<deltasquared>
it always seems to be the latest big titles doing the crazy shit.
<joepie91>
got that working, though
<joepie91>
XNA that is
<deltasquared>
most of valve's software is relatively sane in my experience
<joepie91>
(yes, it has a hardcoded /home path, hence unpolished, that needs to become a pre-run script)
<joepie91>
srhb: anyway, make sure to do that interpreter patch for all bundled libs, and see if that fixes it
<srhb>
cannot find section .interp
<srhb>
Uh oh
<joepie91>
that's... not promising
<joepie91>
lol
<srhb>
Guess which module.
<joepie91>
I have no idea whether that's normal behaviour or not; I've figured this out through a very partial understanding of shared libraries and trial-and-error :P
<joepie91>
widevine!
<srhb>
Yeah ._.
<joepie91>
isn't DRM great :P
<joepie91>
srhb: can you gist your current expression?
<deltasquared>
"I'm convinced DRM is the root of all that sucks in software"
<deltasquared>
citation: dunno lol
<srhb>
joepie91: In a moment, yeah. It looks like it ought to know about libstdc++ as well
<deltasquared>
righty, rsync setup time
<deltasquared>
I should say I'm probably not going to be helpful in this situation because I tend to go knee-jerk stallman on worse days
<deltasquared>
MUH FREE SOFTWARE etc.
joehh has quit [(Ping timeout: 240 seconds)]
<joepie91>
deltasquared: I strongly dislike proprietary software and actively work to replace it with non-proprietary software (ambiguous terminology intentional), but there are still practical concerns to keep in mind :P
<joepie91>
but I don't use Steam or Spotify myself, for example
sary has quit [(Ping timeout: 240 seconds)]
<srhb>
Yeah no, no idea what's going on. The only change I've made now that I've reduced it back is adding your patchelf of the .sos
<srhb>
Which breaks the build because of the patchelf error
<deltasquared>
joepie91: dw I have a degree of pragmatism.
Filystyn has joined #nixos
Filystyn has quit [(Changing host)]
Filystyn has joined #nixos
erictapen has joined #nixos
simendsjo has joined #nixos
deltasquared has quit [(Quit: Leaving)]
mudri has quit [(Ping timeout: 255 seconds)]
<joepie91>
srhb: was widevine there in the previous version?
<srhb>
joepie91: Afraid I don't know.
<srhb>
Oh actually, it's still in my sore
<srhb>
store*
<srhb>
Yes, it was
simendsjo has quit [(Quit: ERC (IRC client for Emacs 25.1.1))]
<srhb>
So I guess that makes it less likely to be the cause
<joepie91>
hm
<joepie91>
srhb: can you check whether they're identical library versions? and whether ldd says they link to the same thing?
b has joined #nixos
<joepie91>
things*
<srhb>
Here's something interesting. Running the old spotify placed the widewine thing in ~/.cache/spotify/... and now the new version does not complain about it missing, but still segfaults
<srhb>
gurrr
simendsjo has joined #nixos
joehh has joined #nixos
<srhb>
I don't think it's widevine anymore at least
<bennofs>
srhb: hmm
<bennofs>
[41463.303254] traps: .spotify-wrappe[27514] general protection ip:7f1c45ae1ce4 sp:7ffff2a26ee0 error:0
<bennofs>
[41463.303258] in libcef.so[7f1c4437b000+6e67000]
<bennofs>
[41463.306091] .spotify-wrappe[27484]: segfault at 0 ip 00000000005f5d07 sp 00007ffcaa5e68c8 error 6 in .spotify-wrapped[400000+23e8000]
<srhb>
oho
tmaekawa has quit [(Ping timeout: 260 seconds)]
<bennofs>
where does libcef come from?
<srhb>
bennofs $out/share/spotify
<bennofs>
I just figured out something really cool how you can debug wrapped programs with gdb: set exec-wrapper
<joepie91>
bennofs: what's that do?
<bennofs>
joepie91: Set a wrapper for running programs.
<bennofs>
The wrapper prepares the system and environment for the new program.
<bennofs>
joepie91: it gets called by gdb to exec the program
<srhb>
Oh cool
<joepie91>
bennofs: and how does gdb determine what the 'real' program is?
<bennofs>
joepie91: so you can set exec-wrapper to wrapper.sh, and let wrapper.sh ignore the first arg (program name) and just call the wrapped nix prog
<bennofs>
joepie91: you need to set both exec-wrapper and file
<joepie91>
ah
iyzsong has joined #nixos
<joepie91>
so it just hooks into whichever is the first child process that matches the specified file as path?
<joepie91>
or am I misunderstanding? :P
<bennofs>
haven't investigated so much
<bennofs>
spotify just ignores its args
<joepie91>
also brb
<bennofs>
so I could just do: set exec-wrapper result/share/spotify and file result/share/spotify/.spotify-wrapped
<bennofs>
and it worked .)
rigelk has joined #nixos
seppelllll has quit [(Ping timeout: 255 seconds)]
soeirgj has joined #nixos
<soeirgj>
ixos
Ivanych has quit [(Ping timeout: 260 seconds)]
pie_ has quit [(Remote host closed the connection)]
pie_ has joined #nixos
mudri has joined #nixos
rardiol1 has joined #nixos
WilliamHamilton has quit [(Ping timeout: 260 seconds)]
soeirgj has quit [(Remote host closed the connection)]
jmiven has joined #nixos
oesirgja has joined #nixos
Filystyn has quit [(Remote host closed the connection)]
oesirgja has left #nixos ["ERC (IRC client for Emacs 25.1.1)"]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] grahamc pushed 1 new commit to release-17.03: https://git.io/v7k2U
<NixOS_GitHub>
nixpkgs/release-17.03 0c1c07e adisbladis: c-ares: 1.12.0 -> 1.13.0 for CVE-2017-1000381...
NixOS_GitHub has left #nixos []
<gchristensen>
adisbladis is doing great work
erictapen has quit [(Ping timeout: 260 seconds)]
Gravious has quit [(Quit: leaving)]
<srhb>
Hmm. There are comments in the spotify builds that seem to imply that we were once following stable, not testing spotify. I wonder if we should regress to stable simply to get *a* working spotify, though of course the downgrade might surprise a fair amount of people
<gchristensen>
sounds like we should upgrade to stable :)
<srhb>
I'll try to see if I can get that to work then.
<hyphon81>
srhb: I did those. (1) virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enableKVM = true; virtualisation.libvirtd.qemuOvmf = true; in configuration.nix.
<srhb>
hyphon81: And if I can boot an iso on virtd with that, it works?
vcunat has joined #nixos
<gchristensen>
vcunat!
<hyphon81>
srhb: I use virt-manager installed with nox. and (2) in virt-manager, setting to use OVMF and chipset Q35. then Strage Disk is VirtIO, and CD-ROM is SCSI or SATA.
<srhb>
hyphon81: I can't get virt-manager to work, can I use virt-install instead?
__monty__ has joined #nixos
<hyphon81>
srhb: No I did not attempt virt-install command. I think the virt-manager use same API.
eacameron has joined #nixos
<hyphon81>
I could boot with virt-manager then I didn't use OVMF.
<srhb>
bennofs: Hmm, I think I tried that earlier, but I'll give it a go
<srhb>
bennofs: Yeah, still segfaults.
<srhb>
bennofs: I tried with the libcef.so from the stable version too, also segfaults.
<bennofs>
srhb: why the heck does it work here then? o.o
<srhb>
bennofs: I... Don't know :|
<bennofs>
oh, I accidently downgraded...
<bennofs>
should've run a git status
<srhb>
Ah!
ixxie has joined #nixos
rigelk has quit [(Ping timeout: 240 seconds)]
rardiol1 has quit [(Quit: Leaving.)]
alunduil has joined #nixos
fikse has joined #nixos
iyzsong has quit [(Ping timeout: 260 seconds)]
<alunduil>
I'm using nix-shell for haskell development. When I add CouchDB to my dependencies nix-shell fails to due to failing tests (cannot connect to a running couchdb). Is there an easy way to disable testing for just that package?
<srhb>
alunduil: Using overrides yes. You can just override it for that shell file
<alunduil>
srhb, have an example I could peek at? I assume it's similar to the overrides in the nixpkgs manual just want to be sure I'm not missing details.
eacameron has joined #nixos
<srhb>
alunduil: something like let myCouchDb = couchdb.override { doCheck = false; }
<bennofs>
is there any way to inject some command line args when a binary calls execve(/proc/self/exe, hardcoded...) ?
ixxie has quit [(Ping timeout: 255 seconds)]
<clever>
bennofs: you might be able to use libredirect (from nixpkgs) to redirect /proc/self/exe to a shell script
<alunduil>
srhb, thanks! I'll give it a shot. If I hit any hurdles I may bother you some more.
<srhb>
alunduil: Feel free :)
<hyphon81>
srhb: Are you using QEMU 2.9? Now, I'm using version 2.8.1.1 in nixpkgs.
<alunduil>
srhb, alternatively is there a nice way to allow the build process to access a service listening on the machine?
seppellll has joined #nixos
<srhb>
alunduil: That sounds impure. tests do it with virtual machines.
<alunduil>
srhb, that's what I thought.
cinimod has joined #nixos
<srhb>
alunduil: If it can be spun up locally in the build, it would be fine
fikse has quit [(Ping timeout: 246 seconds)]
<srhb>
hyphon81: Yes, 2.9
<alunduil>
srhb, hmm, can I specify that for testing services.couchdb.enable must be true but then have it removed for other purposes? I'd think not.
<alunduil>
clever, so not for package installation in general?
<clever>
yeah
<srhb>
yeah, no? :-)
<alunduil>
clever, srhb, that's what I thought. Thanks for clarifying.
* srhb
is more confused now
<alunduil>
srhb, sorry, I was thinking something crazy.
<srhb>
Hehe :-)
<alunduil>
srhb, I'll do the sane thing and bypass the tests.
cinimod` has joined #nixos
cinimod has quit [(Ping timeout: 260 seconds)]
<srhb>
Uh oh..
<srhb>
blk_update_request: I/O error, dev sdb, sector 110274048
<srhb>
That's not nice...
simendsjo has quit [(Quit: ERC (IRC client for Emacs 25.1.1))]
koserge has quit [(Ping timeout: 260 seconds)]
<LnL>
I'm getting ‘nar/<sha>.nar.xz’ missing from binary cache for some builds
gwang has joined #nixos
<alunduil>
srhb, is it best to place that override in default.nix (per the manual's recommendations on setting up haskell environments)? Can that approach work with cabal2nix?
<srhb>
alunduil: I honestly have no opinion. If I use it often I might override it in my user environment, in ~/.config/nix/overlays/haskell.nix
<LnL>
any ideas what that's about?
<alunduil>
srhb, alright. I think I can override it with an inherit and a let expression. Trying that now.
<srhb>
alunduil: If I'm doing it per-project, I'll probably do it in default.nix. And I don't "regenerate" with cabal2nix, so after the first time I edit them by hand.
<ottidmes>
This is not NixOS specific, but I will ask anyway, in shells, if you have: event_based_producer | command, and would want command to exit after receiving N lines, how can you kill the producer once you have received N lines? The N lines part coud be done with head -n <N>, but how to kill the producer directly afterwards
<srhb>
ottidmes: Does the program terminate on its own when stdout is closed?
<ottidmes>
srhb: The producer does, yes, but it would mean it would wait for the next event, before it realizes it can be closed, at least that how this producer behaves
<srhb>
ottidmes: I would fix the producer to shutdown properly when stdout is closed.
<srhb>
If possible
vcunat has quit [(Quit: Leaving.)]
<ottidmes>
srhb: Fair enough, that would be better behavior. I will try and see if I can fix that, thanks! If it were not possible, would there have been a general workaround?
Sonarpulse has joined #nixos
pie_ has quit [(Ping timeout: 240 seconds)]
<gchristensen>
ottidmes: there is no nice way to do it, what is the problem with head -n N?
<srhb>
ottidmes: Any other workaround would just replace "stdout got closed" with some other signal.
<gchristensen>
^ what is the problem with one extra event being sent?
<et4te>
keep getting HostKeyVerification failed on Hydra for private repos, tried adding all the keys i could think of in pubkeys.. does anyone know which pubkey hydra uses for builds or where its configured?
<ottidmes>
srhb: Yeah ok, so e.g. named pipes, and then write the producer to the named pipe, get the PID of the producer, pipe the named pipe in the command, and in the command call kill with the producer PID
<gchristensen>
wtf
<srhb>
ottidmes: That seems hopelessly complicated compared to just piping and closing on stdout is gone :P
<alunduil>
srhb, do you know what the symbol is that I need to override on? I tried both nixpkgs.pkgs.haskell.packages.CouchDB and nixpkgs.haskellPackages.CouchDB but both result in an error. I can paste the error if you think it'll be helpful.
<gchristensen>
et4te: the problem is that your builder can't verify the host where it is trying to find the code
<ottidmes>
srhb: True, but do you have any other general fix? I mean, if producer was closed source or some such
<gchristensen>
et4te: on your builder as whatever user hydra runs as, ssh to the place it is fetching the sourcec
<srhb>
ottidmes: No, I think it'd depend on the software at hand
<srhb>
alunduil: Which package is pulling in couchdb if you're not doing it manually?
<ottidmes>
gchristensen: For my particular use case it would not matter to produce an additional event, but there might situations were e.g. the producer is resource heavy and you would want it to quit sooner rather than later, it is just hypothetical
<gchristensen>
ottidmes: sounds not worth exploring or fixing
<alunduil>
srhb, I am doing it manually but I was trying to avoid overwriting the generated cabal2nix result.
<gchristensen>
if it matters a lot, tell producer exactly how many you want
<alunduil>
srhb, I noticed that the generated file takes the package as an argument and the way I've written default.nix can pass that argument.
<srhb>
alunduil: If it's getting pulled in from your cabal2nix result, then its name is there
fikse has joined #nixos
<srhb>
alunduil: In the argument list.
<alunduil>
srhb, that is all correct. I want to do the override in the call to callPackage though.
<srhb>
alunduil: I don't follow, sorry.
<ottidmes>
gchristensen: I disagree, I want my script to behave correctly, and even if I can get away with such a side effect, I'd rather not have, it might come back to haunt me later on. And if there was common fix, it is good to know about that kind of stuff, since it is a pretty general situation
<gchristensen>
there is not and it is not
<alunduil>
srhb, let me put a paste together real quick.
<srhb>
alunduil: ok :)
<gchristensen>
the common solution is to let the producer receive the closed stdout signal
<ottidmes>
gchristensen: Well, pretty general, might be subjective, I just happend to come across it a few times already in just my last few scripts, so yeah
<alunduil>
srhb, default.nix that I want to add the override to:
<gchristensen>
"there might situations" "it is just hypothetical"
ng0 has quit [(Quit: Alexa, when is the end of world?)]
<srhb>
alunduil: So in that callPackage, you will need { CouchDB = YourCouchDB; }
<alunduil>
srhb, yep, but what is YourCouchDB?
<ottidmes>
gchristensen: That was in response to cost, but the reason I said it was to stop you from moving the conversation to something irrelevant to me
<gchristensen>
ok
<alunduil>
srhb, I know I need to use override on the original CouchDB to get the one I want.
<srhb>
alunduil: Where you've done something like let YourCouchDB = nixpkgs.pkgs.haskell.packages.${compiler}.CouchDB.overrideAttrs (oldAttrs: { doCheck = false })
<gchristensen>
anyway, it is off topic anyway. you could go in #yourshellhere
<et4te>
gchristensen: on hydra master I can clone from the git repo weirdly enough, on the slave its failing with fork: cannot allocate memory when dloading git
<srhb>
alunduil: Or since it's a haskell package, you can use haskell.lib.dontCheck
<alunduil>
srhb, That's what I was looking for.
<srhb>
alunduil: Good :)
<alunduil>
srhb, can you show me what the use of haskell.lib.dontCheck would look like?
<ben>
is there a nix command / flag to evaluate a nix expression and print out a reduced form without necessarily putting anything into the store? i feel like there oughta be but im blanking
<alunduil>
srhb, beautiful. Thanks! I think that'll do it.
<srhb>
alunduil: :)
<ben>
non-interactive nix-repl i guess
<ottidmes>
gchristensen: No need, thanks to srhb suggestion, which you made as well, I will fix the producer and I already thought of a general fix as I mentioned before
phreedom has quit [(Ping timeout: 240 seconds)]
<alunduil>
srhb, that seems to have done the trick. Thanks again!
<srhb>
alunduil: Welcome.
<ottidmes>
et4te: You mean nix.binaryCachePublicKeys = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ];
<bennofs>
ben: but depending on expr, this may also cause some paths to be put into the store (for example, if you do: "${some/path}/foo"
<ben>
yeah i'm cool with that i think
jmiven has joined #nixos
<et4te>
ottidmes: no basically the problem is that whilst checking out repos, even if I add the SSH keys specifically to github, the clones don't work
phreedom has joined #nixos
<ben>
ok concretely i want to eval something that has a secret in it that doesnt need to go into the store
<et4te>
ottidmes: the only way i got it to work was by using App password but thats not ideal
<ben>
so hmm
<gchristensen>
et4te: please paste the error you're seeing
<et4te>
ghcristensen: its just 'Host key verification failed' on hydra UI when running a jobset
<et4te>
the actual code is the same as hydra-tutorial basically
TheNumb has joined #nixos
<et4te>
it even copies the id from the dir after being generated
<et4te>
adding this pubkey to git though didnt solve the issue
<gchristensen>
et4te: again the problem is the user performing the checkout can't ssh to the server because it doesn't trust the server, not because the server doesn't trust the client
<bennofs>
ben: oh, why
<bennofs>
ben: why do you need to use nix for this? :o
<ben>
bennofs: b/c i like the nix lang as a cuter json
<et4te>
gchristensen: you mean the slave not trusting master?
<bennofs>
ah ok :D
ison111 has joined #nixos
<gchristensen>
no
<ben>
super non-critical toy project ;)
<gchristensen>
where is the repo you're trying to clone?
<et4te>
bitbucket
cinimod` has quit [(Ping timeout: 240 seconds)]
<bennofs>
ben: well, as long as you don't use builtins.runCommand or "${deriv}" you should be fine
<gchristensen>
ok, you're cloning via ssh?
<et4te>
yes
<gchristensen>
so it runs `ssh git@bitbucket.com ...` as part of doing that, right?
<et4te>
yeah
<ben>
i expect i can't use import either, which might make it not so nice, actually
<gchristensen>
et4te: if you run `ssh et4te@gsc.io` you see a prompt saying ssh "hasn't seen the host before, do you want to trustit?" right?
<et4te>
yeah, i just ran that on the slave and its saying i have access apparently to the repo
pie_ has joined #nixos
<bennofs>
ben: you can use import, but not import-from-derivation
<gchristensen>
et4te: where _EXACTLY_ do you see the HostKeyVerification error?
<ben>
bennofs: ah, i had it in my head that mentioning a path as a parameter to import would necessarily copy the file at that path to the store
<et4te>
as an Input in hydra
<ben>
cool!
jmiven has quit [(Quit: co'o)]
<gchristensen>
et4te: so you must accept the key as the user on the _hydra master_ that performs the fetching
<et4te>
gchristensen: so its hydra master not slave that does that?
<gchristensen>
yes
<et4te>
ahh
<gchristensen>
et4te: and you should do it as the `hydra` user
<et4te>
gchristensen: how do you make sure hydra user does it?
<gchristensen>
et4te: or maybe hydra-queue-runner
<gchristensen>
su hydra-queue-runner - ?
jmiven has joined #nixos
<LnL>
^ yes it's the hydra-queue-runner
<butchery>
can anyone recommend a little http server with live reloading thats already in nixpkgs? I normally use something from npm but I'd rather not
<gchristensen>
what is live reloading?
<butchery>
as in it forces a browser refresh when a file changes, for doing front end dev/testing
<gchristensen>
interesting
<adisbladis>
gchristensen: Pong
<gchristensen>
adisbladis: great work on the kde stuff :D
<adisbladis>
Thanks =) Mostly automated though ;)
jonte has quit [(Ping timeout: 260 seconds)]
ixxie has quit [(Quit: Lost terminal)]
LinArcX has joined #nixos
<hyphon81>
OK, I understand.
mkoenig has quit [(Remote host closed the connection)]
<hyphon81>
In virt-install, adding "--machine pc-q35-2.9". And QEMU instances black out is occured.
<hyphon81>
So, in old OVMF (version 2014-12-10), we can't use machine type Q35 with OVMF.
jonte has joined #nixos
<srhb>
hyphon81: Good job figuring it out :)
sorcus has joined #nixos
gwang has quit [()]
fikse has quit [(Ping timeout: 255 seconds)]
takle has quit [(Remote host closed the connection)]
<hyphon81>
Hmm, it is hard for GPU passthrougher. And we are minority. Generally, this setting is not needed?
TheNumb has left #nixos []
jonte has quit [(Remote host closed the connection)]
LinArcX has quit [(Read error: Connection reset by peer)]
riclima has joined #nixos
jonte has joined #nixos
kiloreux has joined #nixos
kiloreux_ has joined #nixos
<kiloreux_>
How can use opencv with python when installed through nix ?
<kiloreux_>
I am getting a dependency missing error message
<kiloreux_>
and it's probably using the old opencv installed through ubuntu
ng0 has quit [(Quit: Alexa, when is the end of world?)]
<hyphon81>
Could I create a new issue for updating OVMF package? Now, we can't use Q35, this is hard to PCI passthrough...
<gchristensen>
you bet you can
zarel_ has quit [(Quit: Leaving)]
zarel has joined #nixos
pie_ has quit [(Ping timeout: 240 seconds)]
<FRidh>
kiloreux: how did you "install" python and opencv?
<__monty__>
I'm considering switching from stack to nix for haskell development because I like the ideas behind nix and because binaries would be welcome since I'm working on an aging machine and install/compile times get ridiculous once you hit swap. Three questions: 1) Does nix cover stackage or maybe even hackage or would I end up using nix+cabal or nix+stack? 2) Would the equivalent of a cabal file or
bennofs has joined #nixos
<__monty__>
stack.yaml+cabal file be a package? 3) How about things like cabal sandbox and stack ghci, are there equivalents?
FRidh has quit [(Read error: Connection reset by peer)]
<rvolosatovs>
hey everyone, I want to be able to use newer versions of some packages, that are in a channel and some additional packages, which do not exist in any of them. Currently I simply maintain my own fork of nixpkgs, to which I pull from channels/nixos-17.03 and have my own commits based on top. Pros: simple, commits are going to automatically disappear once changes get merged to `17.03` Cons: I have to maintain and manually update the
<bhipple[m]>
LnL: Beautiful that's exactly what I wanted. Thanks!
pie_ has joined #nixos
<rvolosatovs>
Can I use overlays for that? Eventually versions of my packages can become outdated and it's harder to contribute, no(I have to manually copy everything to my fork)?
<LnL>
you can also use man configuration.nix
<rvolosatovs>
*newer versions than
<rvolosatovs>
how do you guys do that?
<clever>
rvolosatovs: you can do that with either normal packageOverrides, or overlays
acertain has quit [(Quit: WeeChat 1.9)]
acertain has joined #nixos
<rvolosatovs>
clever: ok, but then I have to manually check if the version of a pkg in my overlay/override is not older than the one in the channel, right? there's effectively only one <nixpkgs> in my environment
<rvolosatovs>
which is the overriden one
<clever>
the override/overlay will have priority, and will have the final say in what is used
<clever>
but you could put an if statement into it, that checks the version of the old package
<rvolosatovs>
yeah, I had an idea about that, but was not sure if that'd work
<clever>
it should
<rvolosatovs>
I have to apply it on every package then?
<clever>
nope
<clever>
foo = if (old.foo.name == "foo-1.2.3") then old.foo else old.foo.overrideAttrs (drv: { src = ...; });
<clever>
i think
<rvolosatovs>
hmm, cool, thanks! I'm just starting with Nix - but what I'd want to do would be to loop over a set of packages, which may need to be updated and remove the ones, for which version in `super` of the overlay is higher
<rvolosatovs>
you think that'd be possible?
<clever>
comparing the version numbers would be more tricky
<rvolosatovs>
no handy helpers for that?
<clever>
some, but version numbers vary so much that it doesnt always work right
<rvolosatovs>
ok, thanks a lot! I will try if let's see if it works out.
[0x4A6F] has quit [(Quit: [0x4A6F])]
__monty__ has left #nixos []
jtojnar has quit [(Read error: Connection reset by peer)]
fikse has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] hhomar opened pull request #27570: docker: add libseccomp to build (master...docker-seccomp) https://git.io/v7kQO
NixOS_GitHub has left #nixos []
rigelk has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] domenkozar pushed 2 new commits to master: https://git.io/v7kQG
<mpickering>
but I was confused by "extends" and the recursion between extensible-self and haskellPackages
rigelk has quit [(Remote host closed the connection)]
risz has joined #nixos
<simpson>
silver_hook: You should be fine.
takle has joined #nixos
deltasquared is now known as is2nickname4me
eacameron has joined #nixos
is2nickname4me has left #nixos ["Leaving"]
<kiloreux>
Hey, Can I use opencv with python having installed on opencv through nix and using the standard python with Ubuntu ?
<domenkozar>
mpickering: it's machinery to add fixed-point combinator and overridability to haskell package sets
<silver_hook>
simpson: Yeah, I’m not concerned about dual-booting per se. But more which of the two distros will take over updating Grub :p
<domenkozar>
mpickering: you're trying to use hoogle with haskellPackages?
rigelk has joined #nixos
rigelk has quit [(Changing host)]
rigelk has joined #nixos
<simpson>
silver_hook: Huh, that's the kind of thing that I think of when I think of dual-booting concerns. I don't know the answer, sorry.
<mpickering>
I want to 1) Know how it works so I can write something similar for another tool 2) Fix the documentation if it is out of date
<domenkozar>
mpickering: can you show me how are you trying to use it? :)
<mpickering>
So I want to know what the proper way is to "build all the dependencies of my project, my project and then generate a hoogle database of everything"
<mpickering>
that appears to be what I want thanks
<mpickering>
I always feel bad if I come onto IRC and just ask my very lazy high-level question but it always seems faster than working it out myself and avoids people trying to guess what I am trying to do
<gchristensen>
X-Y problem avoidancce :)
<domenkozar>
mpickering: that's the major problem we have, everyone relies on IRC instead of docs
<domenkozar>
mpickering: but it's not you that's the problem :)
<gchristensen>
its our docs that are the problem
<domenkozar>
yes
<domenkozar>
although haskell docs are pretty good compared to others
<mpickering>
yes they are
<mpickering>
and I should have read them again first
<clever>
silver_hook: nixos needs to generate the grub.conf far more often, you can usualy get away with just putting the other distro into grub.conf via the extraConf option in nixos
<domenkozar>
mpickering: also that snippet probably needs to be updated in the hoogle.nix
<mpickering>
Is it within nix's scope to also start a web server which serves the hoogle indexes?
<etu>
I would need the binary called cask for mode development
<silver_hook>
clever: I was thinking something similar, yes. And if I eventually get rid of NixOS, I can probably get Mageia to override Grub again.
<silver_hook>
I wonder if updating Mageia would override Grub though.
<mpickering>
clever: I see, so I add that to my config.nix but it will always serve a static set of packages rather than dynamically serving the output of ghcWithHoogle?
<clever>
mpickering: you would need to update the packages config to list all of the packages you want, and then nixos-rebuild to update the docs
magnetophon has quit [(Read error: Connection reset by peer)]
ottidmes has quit [(Quit: WeeChat 1.7.1)]
<mpickering>
Cheers
<silver_hook>
Haha, who’s the brilliant dude who put Neo2 layout into the NixOS manual? :D
<silver_hook>
Does NixOS support booting from a LVM volume inside a LUKS-encrypted disk?
<silver_hook>
I couldn’t find that option in the manual
<clever>
silver_hook: my laptop is booting with zfs on lvm on luks
<joepie91>
silver_hook: I have a vague mental note that says "yes" but I don't know how
<silver_hook>
clever: ZFS on LVM on LUKS on a laptop? …and I thought I’m crazy :p
<clever>
silver_hook: luks for encryption, lvm because i know swap on zfs is bad, and i didnt want 2 luks partitions
<silver_hook>
clever: Sounds impressive, but why? I mean ZFS inside LVM?
<clever>
and zfs for zfs
<silver_hook>
clever: Ah, OK, that _kinda_ makes sense then :)
<clever>
so the lvm just splits the luks up into zfs and swap
<silver_hook>
Does running ZFS on a laptop make any sense?
<clever>
i now have the option to use zfs send to backup the entire system
<LnL>
depends on why you do it
<clever>
it also has snapshots, so i have undo for almost any file
erictapen has joined #nixos
<silver_hook>
clever: And compared to Btrfs it’s more mature. But doesn’t it eat up a craptonne of RAM?
<clever>
silver_hook: oddly, the laptop with 2gig of ram performs "better" then the desktop with 16gig of ram
<silver_hook>
OLo
<gchristensen>
silver_hook: if you go against the advice and enable dedupe (you should not enable dedupe) it works great even in low ram situations
<clever>
sure, it gets io bound in swap all the time, but it recovers
<clever>
but the desktop, it just hangs, it doesnt even try to use the swap
<silver_hook>
Odd
<clever>
and the desktop has 64gig of NVME swap
<avn>
clever: it works stable, as long as swap not on zfs
<clever>
avn: none of the machines have swap on zfs
<silver_hook>
Anyway, so I guess you need to include the LVM-in-LUKS booting into the configuration.nix as well …does anyone have it somewhere at hand?
<sphalerite[m]>
Gtk seems to be playing up recently — I no longer get a highlight on my selection in firefox and other gtk applications look rather odd too. Has anything related to that changed recently on 17.03?
kiloreux_ has quit [(Remote host closed the connection)]
kiloreux has quit [(Remote host closed the connection)]
<rvolosatovs>
can I convert ("./foo" + "/bar") into absolute path in Nix? `builtins.toPath` also takes absolute path as parameter
<clever>
rvolosatovs: just do (./foo + "/bar")
qmm has joined #nixos
<clever>
an unquoted path has several special properties, and you can concat more to it and keep those
<rvolosatovs>
hmm, I have tried that and I got `syntax error, unexpected '+'`
<clever>
can you paste the exact code you tried?
<silver_hook>
Do I see correctly that Kleopatra is now packaged in NixOS?
<gchristensen>
silver_hook: it is not packaged, srcs.nix is the sources for all kde things, but it isn't actually packaged -- able to be built
<clever>
nix-repl> ./result/ + "/bar"
<clever>
error: syntax error, unexpected '+', at (string):1:11
<clever>
rvolosatovs: this is a path, a division operator, an addition operator, and a string
<silver_hook>
gchristensen: So if I wanted Kleopatra on NixOS I’d have to write a package/expression for it first?
<gchristensen>
yeah
<silver_hook>
gchristensen: And the same for KMail?
<gchristensen>
kmail is in progress, there is a PR from ttuegel on github. ... look at his open PRs (search for is:pr is:open author:ttuegel)
<rvolosatovs>
clever: that was exactly what I tried to do, thanks for clarification!
<yegortimoshenko>
hi, i want to write a bot that automatically fixes project homepage URLs in derivations in NixOS/nixpkgs, either via web.archive.org or by following the redirect, would any of the guys with commit access approve it?
<silver_hook>
gchristensen: Nice. I see Kleopatra there as well :)
<qmm>
hello, i am trying to build my first nix package. it's a haskell package. cabal build fails stating these dependencies are missing: postgresql-simple >=0.5.2.1 && <=0.5.3.0 i can use cabal install --only-dependencies just fine
<qmm>
nix-build fails with postgresql-simple >=0.5.2.1 && <=0.5.3.0 builder for ‘/nix/store/lkjnyivc83fx3c214x0i5kcsv3q8c27p-testpackage-HEAD.drv’ failed with exit code 1 error: build of ‘/nix/store/lkjnyivc83fx3c214x0i5kcsv3q8c27p-testpackage-HEAD.drv’ failed
<silver_hook>
Neat, we have someone at Akademy. This shoulds speed up the packaging of KDE :D
<silver_hook>
gchristensen: Akademy is KDE’s annual conference. It’s pretty big.
<gchristensen>
OH! Cool!
<silver_hook>
Hahaha, the “NixOS guy going to Akademy” is none other than Jos van den Oever XD
<silver_hook>
I didn’t know Jos uses NixOS nowadays.
Guest25033 has joined #nixos
Guest25033 has left #nixos ["ERC (IRC client for Emacs 25.2.1)"]
arjen-jonathan has quit [(Ping timeout: 240 seconds)]
zeus_ has joined #nixos
<gchristensen>
oh wow, cool
<qmm>
oh! i realized that i never added the dependency to my .nix file :)
eacameron has quit [(Remote host closed the connection)]
<yegortimoshenko>
also, if someone thinks it's a bad idea (or just muda) i'd also like to hear this. i'd like to send one pr with changes per week so that reviewing it doesn't take much dev time. and one URL update per commit so that they are easily reversable.
hyphon81 has joined #nixos
justelex has quit [(Ping timeout: 255 seconds)]
Infinisil has joined #nixos
takle has quit [(Remote host closed the connection)]
takle has joined #nixos
erictapen has quit [(Ping timeout: 240 seconds)]
<gchristensen>
yegortimoshenko: don't submit too many PRs at once, one change per commit
mudri|srcf has joined #nixos
<gchristensen>
yegortimoshenko: do you have an example PR?
eacameron has joined #nixos
<gchristensen>
I wish I had a project to learn haskell on :) books never do it for me unless I already have something in mind.
takle has quit [(Ping timeout: 240 seconds)]
<yegortimoshenko>
gchristensen: not yet, but it's going to be a single pr once per week with a few commits. first pr will probably be large but others won't. it'll also use git history to generate the correct web.archive.org link. i might implement a diff mechanism so that if page has changed too much it requires manual approval (to filter out expired domains with a registar page on it). i haven't started working on it yet, i
<yegortimoshenko>
thought i might drop by before implementation to see that you are ok with it
<gchristensen>
this will only change project URLs when they're dead links?
<yegortimoshenko>
when they're dead or when they have a permanent 301 redirect to a new site
<gchristensen>
very cool sounding
<gchristensen>
yegortimoshenko: I'd suggest sending one PR with ~5 updates so they're really easy to verify and so reviewers build up trust in your diffs
<gchristensen>
a big PR will be tough to accept
sheenobu has joined #nixos
<sheenobu>
been awhile
<yegortimoshenko>
got you, i'll set a limit to 5 per pr per week :-) thanks!
<sheenobu>
i've got some crazy person ideas about using Nix without nixpkgs. Any easy way to bootstrap that? Just build/install nix and make sure nix-env -qaP shows nothing?
<Infinisil>
sheenobu: default nix uses nixpkgs as far as i know
<gchristensen>
heya sheenobu
<sheenobu>
hey gchristensen
<Infinisil>
sheenobu: What's your end goal?
<sorcus>
error: cannot auto-call a function that has an argument without a default value (‘stdenv’) - why package doesn't build?
<sheenobu>
I made a project that is sort of like a DSL for dotfile management. I want to build something similar but for complex projects and microservices
<clever>
sheenobu: this is a bare-bones derivation that doesnt use the stdenv directly
<clever>
sheenobu: in the same directory is a txt showing the output you can expect
<sheenobu>
okay thanks clever . i think you and gchristensen were the ones who guided me on nix-home =)
<Infinisil>
sorcus: You might have done something like building a package file in nixpkgs directly with nix-build <file>, which doesn't work because these files are all functions
eacameron has quit [(Remote host closed the connection)]
<clever>
sheenobu: and then it runs that busybox on this script, which uses busybox to unpack the tar, and patchelf to fix everything to refer to its new $out
<Infinisil>
sorcus: You probably want to use `callPackage <path/to/file> {}` instead.
<sheenobu>
my initial iteration of this tried to generate a docker image but i didn't have access to the docker daemon from Nix (build isolation). There should be new OCI or runC tooling to build the docker image without needing the daemon
<rvolosatovs>
any idea why ` self: super: {foo = let callPackage = { path }: super.callPackage path; in callPackage ./foo { };}` in overlay gives "value is a path while a set was expected" ? what am I doing wrong?
<Infinisil>
rvolosatovs: That's not valid nix syntax
<mudri>
I can set variables, but I don't want to overwrite the other PATH entries.
<Infinisil>
mudri: Yes, environment.variables.PATH = "<what you want to add to path>"
<clever>
mudri: for PATH, i would just create a buildEnv based derivation, and nix-env -iA it
<clever>
mudri: then it lands in ~/.nix-profile/bin/ which is already in PATH
<rycee[m]>
If you have any questions about home manager, let me know :-)
<Infinisil>
rycee[m]: OHhh, it's by you :D Nice
<mudri>
clever: aah, yes, I do something vaguely like that for packages, so I can see it working.
<mudri>
But it will append, rather than overwrite, right?
<rycee[m]>
Infinisil: Thanks! :-)
<clever>
mudri: the buildEnv would atomicaly replace the last buildEnv you had by the same name
darlan has joined #nixos
darlan has quit [(Client Quit)]
zarel has quit [(Ping timeout: 240 seconds)]
arjen-jonathan has quit [(Ping timeout: 240 seconds)]
dualinity has joined #nixos
<dualinity>
hi
ng0 has joined #nixos
sary has joined #nixos
eacameron has joined #nixos
zarel has joined #nixos
<mudri>
Also, something that has been catching me out: is it true that the default.nix for something I'm developing shouldn't take arguments without default values?
<mudri>
So, such a default.nix is different from the default.nixes found in nixpkgs.
<gchristensen>
it doesn't matter, but nix-build . will be easier if they all have defaults
<mudri>
gchristensen: I ask because I always get “error: cannot auto-call a function that has an argument without a default value (‘lib’)” from nix-build.
<gchristensen>
exactly
<mudri>
Is that what you mean by the opposite of “easier”?
justelex has joined #nixos
<mudri>
And so, what are some good practices?
<mudri>
I usually end up with a default.nix, a shell.nix, and a pkg.nix or something.
<mudri>
Where pkg.nix is like a nixpkgs default.nix.
<mudri>
And I forget what's different about shell.nix.
<joepie91>
another tiny contribution to nixpkgs issue cleanup :P
<gchristensen>
:)
impredicative has joined #nixos
<gchristensen>
speaking of which, if anyone has PRs they'd like merged, I'll take a look
dualinity has quit [(Remote host closed the connection)]
<mpickering>
If I am packing something which says "run a script" and it has a shebang at the top with an absolute path, what is the right fix for this?
<joepie91>
containing this little snippet of text...
<joepie91>
"This document is still far from complete."
<joepie91>
so this gives a pretty good idea of the state of documentation of Linux userland :P
<Infinisil>
joepie91: Heh, well time to read the source :P
<joepie91>
anyway, all freedesktop stuff is pretty poorly documented
<gchristensen>
joepie91: "the code is self documenting"
<joepie91>
but at least it *is* documented, to some degree
<joepie91>
there's plenty stuff that just isn't...
<joepie91>
at all..
<joepie91>
anywhere...
<joepie91>
yet used in every major Linux distro...
<joepie91>
:(
<joepie91>
gchristensen: yeah, I've heard that one before
<Infinisil>
Maybe someone will eventually learn a lot about dbus and its internals and write better docs
<joepie91>
gchristensen: *somehow*, that statement seems to always originate from people stuffing their code with 'clever' tricks
<joepie91>
Infinisil: yeah, that's more or less what I'm doing
<joepie91>
:p
<gchristensen>
joepie91: it is easy, just a 5-level deep ternary. its just one line, what is wrong with you? :)
<joepie91>
hehe
<joepie91>
anyway, that'll be my documentation rant for tonight
<gchristensen>
<3
<joepie91>
I guess my "investigate why themes are broken" is just going to be rolled into a day of learning about GNOME themeing because I need to know more about that anyway
endformationage has joined #nixos
<joepie91>
Eventually(tm)
<Infinisil>
joepie91: Have fun :D
<Infinisil>
My evening consists of studying for my examl
<Infinisil>
exams
<Infinisil>
currently doing functional programming and formal methods :D
<rvolosatovs>
now I just need to add more packages and find a way to override python
slack1256 has quit [(Remote host closed the connection)]
<Infinisil>
joepie91: I'm jealous
<cwre>
So how can I install flashplayer,etc on my firefox?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] jfrankenau opened pull request #27573: iosevka: Build from source (master...build-iosevka) https://git.io/v7kpp
NixOS_GitHub has left #nixos []
<cwre>
I thought I figured it out by putting config options in it, but that didn't rebuild firefox.
Guest89 has quit [(Quit: My Mac has gone to sleep. ZZZzzz…)]
<joepie91>
Infinisil: why's that? :P
Guest89 has joined #nixos
hiratara has quit [(Ping timeout: 246 seconds)]
<Infinisil>
joepie91: I feel like if I'd start learning about Rust or something else that interests me a lot, I'd get obsessed for a while and I'd waste all my time, while I really should be studying for exams
<joepie91>
Infinisil: well, I mean, I don't have exams to study for, thankfully :P
<joepie91>
and it's my weekend, so there's no problem getting lost in Rust
<clever>
cwre: firefox.enableAdobeFlash = true; in whatever config.nix your firefox is based around
<joepie91>
usually my 'learning about a thing' caps out at about 2 days anyway
<clever>
cwre: how is firefox installed?
<joepie91>
then I get distracted because ~shiny~ and go do something else, and return to the original thing later
<cwre>
clever: /etc/nixos/configuration.nix
<clever>
cwre: then it has to go under nixpkgs.config.firefox.enableAdobeFlash = true;
hiratara has joined #nixos
Guest89 has quit [(Read error: Connection reset by peer)]
<cwre>
Then I import that file in /etc/nixos/configuration.nix
<cwre>
Nothing happened when I rebuilt and restarted firefox.
<cwre>
Unrelated, why is my performance so bad? My computer is struggling to run Atom, Discord, Telegram, GPDMP, Konsole, and Telegram.
<clever>
cwre: i think your setting nixpkgs.config.config.firefox
<cwre>
clever: ahh, thanks
<clever>
also, check 'top' and see what is using the cpu and ram
<clever>
M and P to adjust the sort order
<cwre>
clever: barely any ram
Filystyn has quit [(Quit: Konversation terminated!)]
<Infinisil>
cwre: Maybe it's because of almost all of these apps are using electrum.. I think
<Infinisil>
s/of//
<cwre>
Infinisil: that would affect RAM
<cwre>
Not performance.
<cwre>
I don't have much RAM usage.
* cwre
knows RAM usage an performance are linked
<Infinisil>
cwre: I also had much CPU usage with such apps
<cwre>
But the amount of RAM would be way higher if that were the case.
<cwre>
I'm only sitting around 20-30% cpu for cores
<Infinisil>
cwre: But yeah, check top/htop to see what's using it
<cwre>
*sigh*
<cwre>
error: cannot download flash_player_npapi_linux.x86_64.tar.gz from any mirror
ryanartecona has joined #nixos
<clever>
cwre: and yeah, adobe is free to break it by just deleting the tar, and nix will demand you get the exact right version
<clever>
ive just not turned flash on
<cwre>
Netflix kinda requies that.
<clever>
netflix doesnt use flash
<cwre>
It's yelling at me for some reason. Assumed with was Flash.
<clever>
netflix uses widevine on chrome and something else on firefox
cherrybl0ss0m_ has joined #nixos
<clever>
chromium.enableWideVine = true; has worked for me in the past
<cherrybl0ss0m_>
anyone familiar with setting up the configuration for Hydra's GithubPulls plugin?
<clever>
obviously, thats for the chromium package (not google-chrome or firefox)
<clever>
cherrybl0ss0m_: yes
<cherrybl0ss0m_>
I have the following in my hydra.conf under /var/lib/hydra:
<clever>
cherrybl0ss0m_: https://github.com/cleverca22/hydra-configs in here are the declarative configs for everything on my hydra, half of them have pull-request support setup
<sheenobu>
what i did for chrome flash and widevine is install chrome in a docker container and run that
<sheenobu>
whenever i want to watch netflix
<sheenobu>
cause that's the only time i run into issues
<mpickering>
Is there a way to run clone a github repository whilst in the "buildPhase"?
<clever>
sheenobu: i just use an android device for netflix
<mpickering>
Permission is denied because of lack of ssh key
<cherrybl0ss0m_>
I am setting up a server
<cherrybl0ss0m_>
I need to give it the github_authorization for my private org
<avn>
most awful thing which I do -- was docker with old firefox, old java and cisco webex ;)
<sheenobu>
mpickering yeah nix shouldn't allow you to access ssh keys from a buildPhase. what are you trying to accomplish and why do you think a git clone will help?
<clever>
cherrybl0ss0m_: create an xml section called <github_authorization> that contains "orgname = token <sha1>"
<clever>
sheenobu: fetchgitPrivate expects <ssh-auth-sock> to point to a unix socket for an ssh agent
<sheenobu>
right
<clever>
sheenobu: but the ssh-agent in the ssh package, actively rejects any connection coming from the "wrong" user
<clever>
so the git running as nixbld1 cant use it
<clever>
the socat in my gist will proxy it over
<clever>
and root is exempt from that safety
<clever>
so ssh-agent thinks socat (running as root) is doing the requests, and allows it
<sheenobu>
and that will be available during the build phase? or just during fetchgitPrivate?
<clever>
just during fetchgitPrivate
<clever>
and only if it runs on the local machine (build slaves will break it)
<mpickering>
I'm confused now, is the right thing to do create a derivation A which packages the right commit from the "submodule" and then in derivation B, depend on A and then unpack it somehow into the right place?
<clever>
mpickering: you just do src = fetchgitPrivate { ... };
<avn>
clever: I try to kill my laziness, and public my fetchgitCustom, which can use predefined deploy keys as well (and works with chroots/sandboxes)
<clever>
mpickering: and now you have a second derivation, being used as the source for the first
<sheenobu>
clever right but if the build scripts want to git clone some repos...
<cwre>
Eh, I think I'm going to give up on this. The functional model for OS is interesting, but incredibly aggravating when trying to get annoying applications to work that are entirely for ease of use. I'll be using nix for my project server, but definitely not for my desktop distro.
<clever>
sheenobu: then you need to disable that, and copy the source in during postUnpack
<slack1256>
does anybody know if qt ships with a xcb module on nixos?
<clever>
ah
<LnL>
don't think bash/substituteInPlace can do regex
<LnL>
but that's usually nice for paths, etc.
hiratara has joined #nixos
<dtz>
Bash has regex and iirc used in a few places in nixpkgs
<dtz>
=~
<dtz>
But yeah substituteInPlace is for literals only afaik
slack1256 has quit [(Remote host closed the connection)]
ng0 has quit [(Quit: Alexa, when is the end of world?)]
slack1256 has joined #nixos
silver_hook has quit [(Ping timeout: 240 seconds)]
thc202 has quit [(Ping timeout: 276 seconds)]
<JameySharp[m]>
slack1256: If I'm reading the nixpkgs source right, qt5 is built with libxcb except on Darwin/OS X. Is that what you wanted to know?
deep-book-gk_ has joined #nixos
deep-book-gk_ has left #nixos []
propumpkin is now known as contrapumpkin
tokudan has quit [(Quit: Leaving)]
Jackneill has quit [(Remote host closed the connection)]
<Fare>
Hi. Does anyone use bluetooth audio on nixos? I can't seem to get it to work. Device is connected on bluetooth itself, but audio device does not appear in alsamixer and sound is still sent to the builtin audio device
<Infinisil>
Fare: I have it working for me
<Infinisil>
Fare: Are you using pulseaudio?
eacameron has joined #nixos
<sorcus>
Infinisil: After adding "stdenv ? pkgs.stdenv" to nix file package builds. X-)
eacameron has quit [(Ping timeout: 255 seconds)]
<Fare>
Infinisil, I believe I am. Should I? Should I not? Need I add something to its configuration?
eacameron has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] NeQuissimus pushed 1 new commit to master: https://git.io/v7IvX
<NixOS_GitHub>
nixpkgs/master 869bb2e Tim Steinbach: linux-copperhead: 4.12.2.a -> 4.12.3.a
NixOS_GitHub has left #nixos []
eacameron has quit [(Ping timeout: 260 seconds)]
eacameron has joined #nixos
jgertm has quit [(Ping timeout: 240 seconds)]
lassulus_ has joined #nixos
ninja_in_neopren has quit [(Ping timeout: 260 seconds)]
erictapen has quit [(Ping timeout: 246 seconds)]
lassulus has quit [(Ping timeout: 255 seconds)]
ninja_in_neopren has joined #nixos
<slack1256>
JameySharp[m]: yeah, that helps a lot
eacameron has quit [(Ping timeout: 248 seconds)]
eacameron has joined #nixos
lassulus_ is now known as lassulus
lassulus has quit [(Changing host)]
lassulus has joined #nixos
<jackhill>
Hi, do I understand correctly that NixOS support x86 and amd64? Any other arches? What's involved in porting Nix?
markus1199 has joined #nixos
eacamero_ has joined #nixos
eacameron has quit [(Ping timeout: 255 seconds)]
<Infinisil>
Fare: I'm using pulseaudio and it works, but I had to set up bluetooth with `bluetoothctl`
markus1189 has quit [(Ping timeout: 260 seconds)]
<Fare>
Yeah, I eventually got it to work using rfkill, bluetoothctl and pavucontrol.
<slack1256>
jackhill: yeah for now official x86 and amd64. There are some post on porting to arm but nothing recently
<Fare>
Looking to a cli alternative to pavucontrol.
<slack1256>
Fare: pacmd?
<Infinisil>
Fare: pactl
<Infinisil>
Ah
eacamero_ has quit [(Ping timeout: 248 seconds)]
<jackhill>
slack1256: thanks
<Infinisil>
pacmd is a REPL, pactl uses command line options
<slack1256>
nice
<slack1256>
soon(tm): pa-repl
<Infinisil>
Fare: Oh and there is blueman, a GUI for bluetoothctl
eacameron has joined #nixos
slack1256 has quit [(Remote host closed the connection)]
<Infinisil>
Damnit, I hate it when nix doesn't include the manpage to a command
<mpickering>
If I override patchPhase will setting "patches" no longer apply patches?
<Infinisil>
mpickering: Need to look at the nix source how it works, depends on the package
<LnL>
yes, you should use prePatch or postPatch
<Infinisil>
Ah but yes, what LnL said
<Infinisil>
probably
<mpickering>
make sense
<mpickering>
*makes
ison111 has quit [(Ping timeout: 248 seconds)]
<mpickering>
Not sure why it wasn't like that to start with
<mpickering>
as I just copied a random derivation as a template :P
eacameron has quit [(Ping timeout: 260 seconds)]
<LnL>
you should generally use the pre/post hooks instead of overriding the entire phase
<mpickering>
ok, now here's a puzzler. I added cmake to my buildDepends and it started trying to patch CMake files but fails to do so causing the whole build to fail
eacameron has joined #nixos
<Infinisil>
mpickering: So what was the error?
rvolosatovs has quit [(Ping timeout: 260 seconds)]
<mpickering>
CMake Error: The source directory "/tmp/nix-build-kythe-0.0.26.drv-41/kythe-38380e8" does not appear to contain CMakeLists.txt.
<Infinisil>
mpickering: So where is the file instead for this project?
<mpickering>
I don't understand why it is doing anything though? It is running doing the configurePhase
jgertm has joined #nixos
<Infinisil>
mpickering: It might be something with having cmake as a build-time dependency, because you wouldn't have that without a cmake project
rtjure has joined #nixos
<Infinisil>
Which means it needs to be patched (which can be done automatically)
<mpickering>
There are lots of CMakeLists files but none in the root directory
<Infinisil>
mpickering: Well how do you build the project then?
<Infinisil>
It has to have some instructions
<mpickering>
Using bazel
eacameron has quit [(Ping timeout: 248 seconds)]
<mpickering>
Let me check the scripts
<mpickering>
tbh I don't really know how it is built but I need to package it..
<Infinisil>
mpickering: Do you have a link to the project or is it private?