<jackdk>
samueldr: I can't approve but I can and have dropped you some bikeshed comments; HTH.
sir_guy_carleton has joined #nixos
<gchristensen>
wow I'm going to fly {^_^} to nixcon sooner than I expected
<gchristensen>
samueldr: reviewing!
<gchristensen>
samueldr: how much do you want nits to be picked?
<samueldr>
gchristensen: as much as needed in the partitioning, the others were lightly touched so they shouldn't need to
<samueldr>
and thanks to both of you
<gchristensen>
ok well disregard any feedback you don't feel like following :P
<samueldr>
gchristensen: definitely :)
<gchristensen>
I'm doing all my comments in a "review" so I don't spam it... don't worry about my comments not showing up yet.
<samueldr>
jackdk: I may answer to some of your comments with *ouf ot scope*, don't take it personally the instructions under 2.3 did not change anything at all; though I do take note for a future refactor of the whole installation instructions
<samueldr>
oh, and jackdk, this is docbook; <command> is a thing in docbook ;)
<gchristensen>
I think he's saying you missed one :)
<jackdk>
I will be grossly offended if you don't cater to my every whim! (not really)
<samueldr>
oh right silly me!
_deepfire has quit [Ping timeout: 252 seconds]
<samueldr>
(and jackdk, while it won't show a green tick, you can approve a PR with a gray tick with github, with the "Review changes" button under "Files changed")
<samueldr>
anyways, brb 30~60 minutes
<jackdk>
good to know. I'm not deep enough into nixos dev to think my opinion has that sort of weight just yet
<gchristensen>
PS: you can test partitioning instructions via `dd if=/dev/zero of=./localfile bs=1G count=4` and then run `parted` on ./localfile
<gchristensen>
"everything is a file" is pretty cool ;)
<samueldr>
though I never tested it, it reportedly could work with armv7l, but uh, nixos support with armv7l isn't there since there's no build infra for armv7l
<{^_^}>
[nixpkgs] @peterhoeg opened pull request #47842 → nixos system-activation: support activation scripts run in a user context → https://git.io/fxtrM
<kalbasit[m]>
I'm trying to bring a function from lib over on nixpkgs-unstable with this overlay `self: super: { lib = super.lib // { assertMsg = nixpkgs-unstable.lib.assertMsg; }; }` but it does not seem to work, how can I do this then?
<infinisil>
ldlework has been frustrated with this too
<infinisil>
It's possible to solve this problem (the need to import it in each file) in multiple ways
<infinisil>
(None of them simple though)
<kalbasit[m]>
so I'm importing <nixpkgs-unstable> in two places in my system now, I wonder how much of hit the eval is going to take
<infinisil>
kalbasit[m]: ah actually, you can just do `(import <nixpkgs-unstable/lib>).assertMsg`
<infinisil>
Will
<infinisil>
Be fast
<kalbasit[m]>
oh
<kalbasit[m]>
let me try that
Lisanna has quit [Quit: Lisanna]
<ldlework>
i have resolved to using overlays only for derivation related things, and I have a single utils expression which contains all my helper code which I just import to avoid all this stuff
<sir_guy_carleton>
hmm, the sha256sums in the nixos arm images was updated before the aarch64 was. this is probably why the checksum don't match?
<sevanspowell>
Hey, can I enter a `nix-shell` with a custom nixpkgs? i.e. `nix-shell -f '<mypkgs>' -p 'haskellPackages.ghcWithPackages (hp: [hp.a_package])'`
<sevanspowell>
given 'mypkgs' is on my NIX_PATH as mypkgs=/path/to/mypkgs/folder
<infinisil>
-I nixpkgs=/the/path/nixpkgs
<infinisil>
sevanspowell: ^
<infinisil>
nix-shell -p ... -I nixpkgs=...
<sevanspowell>
Darn, my default.nix in the 'mypkgs' path must be incorrect. I've tried that. I'll investigate a little more.
civodul has joined #nixos
Ariakenom_ has joined #nixos
<sevanspowell>
infinisil: Ooh actually, can I pass an overlay instead?
<infinisil>
Not like that
<Myrl-saki>
I think Nix will actually be a good language to write a (life) schedule on.
<infinisil>
But you can nix-shell any expression with `nix-shell -E '....'`
<Myrl-saki>
Oh wow.
<Myrl-saki>
Isn't Nix kinda like a modern Lisp, without the Lispiness?
<infinisil>
sevanspowell: (But then you need something like mkDerivation in it with buildInputs as the -p's)
<Myrl-saki>
infinisil: But homoiconicity and stuff!
<infinisil>
Myrl-saki: I thought so xD, nah nix really doesn't have any lispyness in it
<Myrl-saki>
infinisil: :C
<Myrl-saki>
But I wanna believe. ' ^ '
<Myrl-saki>
Anyways, that aside, I think Nix will be pretty cool for a schedule planner.
<Myrl-saki>
You can write it out as a TeX file, if you try hard enough.
<infinisil>
Myrl-saki: How exactly would this look?
<sevanspowell>
infinisil: Yeh :) Thanks. I'm just trying to create a private nixpkgs for work. I used an overlay, but now I want to pin nixpkgs for the entire private nixpkgs and overlays aren't for pinning. They just overlay :P
<infinisil>
Myrl-saki: Ohh, so as a markup language?
<Myrl-saki>
infinisil: Kinda. You "compile" the Nix to a markup language.
brejoc has joined #nixos
<Myrl-saki>
infinisil: But ultimately, it's just a set of `{ start = ...; end = ...; }`
<infinisil>
sevanspowell: indeed :P
<Myrl-saki>
I'll give it a try.
<Myrl-saki>
This would be a very nice example of "Nix without nixkpgs" IMO.
<Myrl-saki>
At least all-packages.nix
<Myrl-saki>
Would still be using lib/* though.
<Myrl-saki>
I think I'm thinking more of "Nix without derivations"
<infinisil>
Yeah, it might be a cool idea to create a nixpkgs-lib repo, which you can use instead of nixpkgs if you only need lib
<Myrl-saki>
Give me a few, like 30 mins to write this out. I kinda need something like this.
Itkovian has joined #nixos
<Myrl-saki>
This kinda makes me happy, considering that I was in a programming slump because "everything I want has already been made."
<{^_^}>
[nixpkgs] @vcunat pushed 7 commits to release-18.09: https://git.io/fxtF8
<infinisil>
I'm having a slump because there's so many things to do nobody else has done before, but I don't have the time for it all lol
<Myrl-saki>
Hm, how the hell do I parse time though, gdi.
<Myrl-saki>
There's no time to epoch in Nix, right?
<{^_^}>
[nixpkgs] @garbas pushed commit from @r-ryantm to master « haproxy: 1.8.13 -> 1.8.14 »: https://git.io/fxtbe
<Myrl-saki>
That's what I need it for anyway.
<Myrl-saki>
The nice thing about FOSS is that you only have to implement what you need. :)
Mateon2 has joined #nixos
Mateon1 has quit [Ping timeout: 246 seconds]
Mateon2 is now known as Mateon1
<Myrl-saki>
Ah, right, Nix doesn't do let destructuring. :(
<benkolera>
Is there anyone around that has nixops experience? I seem to be having a bad interaction between resources.sshKeyPairs and deployment.keys. Pebcak? Bad idea? Four files in this gist showing the nix expressions, expectations and logs. https://gist.github.com/benkolera/7e782505d552408102a84f85d832eb86
<Myrl-saki>
Oh yeah, what the hell is addContextFrom for?
<CMCDragonkai>
@sphalerite Ok so if I were to be running an NFS server, I just enable the service, and that should automatically do `boot.supportedFilesystems = [ "nfs"];`. But if I just wanted to run as client declaratively, I just put it in my `fileSystems` setting in `configuration.nix`. But If I want to run as a client interactively, then I need both `boot.supportedFilesystems = [ "nfs" ];` AND also `nfs-utils` package.
<Myrl-saki>
I don't get the technical meaning, but what is the use case?
<sphalerite>
CMCDragonkai: I don't think you need to add nfs-utils in addition to the supportedFilesystems bit to make it work interactively
<mightybyte>
Is it possible to change which version of cabal-install is used when nix-build builds Haskell packages?
sir_guy_carleton has quit [Ping timeout: 268 seconds]
<sphalerite>
CMCDragonkai: I'm not 100% sure though. I'd just try it :)
<sphalerite>
I'm very confused, it seems to take as an argument ah, uh, list, containing first the name of the executable as a string, then *a nix expression* as a string which is evaluated and passed as a string to the executable?
<sphalerite>
builtins.exec [ "echo" "(a: a) 5" ] => 5
<Myrl-saki>
Lol
<infinisil>
I'm just confused by it as well
<Myrl-saki>
It would actually also be pretty nice to write this in Prolog or something.
<sphalerite>
if only nix were implemented in a language that has very useful purity properties :D
<Myrl-saki>
Thanks.
<sphalerite>
if only nix weren't a DSL :D
<clever>
> builtins.sort (a: b: a > b) [ 1 2 3 4 ]
<{^_^}>
[ 4 3 2 1 ]
<Myrl-saki>
I'm quite comfortable with where Nix is at, TBH. :P
<clever>
> builtins.sort (a: b: a < b) [ 1 2 3 4 ]
<{^_^}>
[ 1 2 3 4 ]
aristid has joined #nixos
<clever>
of note, if you use < then nix wont even call your function, and just compare in c++
<clever>
so you get better performance
<Myrl-saki>
Ah.
<sphalerite>
yeah nix is great!
<sphalerite>
but its evaluation performance isn't :p
<Myrl-saki>
So, Nix is technically an optimizing compiler?
<sphalerite>
interpreter, no?
<clever>
this optimization happens at runtime
<Myrl-saki>
Optimizing interpreter. :P
mayhewluke has quit [Ping timeout: 260 seconds]
<Myrl-saki>
Hm.
<Myrl-saki>
Wait, let me just write it out.
<clever>
also, `function a b` is sometimes slower then `let f = function a; in f b`
<clever>
depending on the situation
<sphalerite>
infinisil: re leap seconds — AFAIUI, your function will actually return a unix timestamp 37 seconds before the start of today if you put 2018-10-04 in
mayhewluke has joined #nixos
jperras has quit [Ping timeout: 252 seconds]
<infinisil>
sphalerite: Well, I rooted the conversion at 2018-01-01
<clever>
ive heard that the amazon ntp servers will go backwards during leap seconds
<infinisil>
Sounds like fun
<srhb>
Sounds horrible, why would they do that :P
<clever>
yeah
jperras has quit [Ping timeout: 264 seconds]
<sphalerite>
right so if unix time *is* monotonous, then the leap seconds should be reflected by it being 37s higher than the "naïve" 2018-01-01 timestamp, shouldn't it?
kyren has quit [Remote host closed the connection]
kyren has joined #nixos
<srhb>
At least we haven't had any negative leap seconds yet... :D
<etu>
srhb: oh god. it's already bad enough. don't give "them" any ideas.
<srhb>
etu: :3
<srhb>
"In the theoretical case when a negative leap second occurs, no ambiguity is caused, but instead there is a range of Unix time numbers that do not refer to any point in time at all."
<srhb>
That's... fun...
rembo10 has quit [Remote host closed the connection]
rembo10 has joined #nixos
rembo10 has quit [Remote host closed the connection]
<clever>
look at the documentation about hypothetically
<clever>
that allows you to run any IO expression in zero time :P
<colemickens>
so I definitely have a bunch of "option i915 ..." in boot.extraModprobeConfig but it doesn't seem to work.
<colemickens>
how can I debug this>
<clever>
colemickens: if the driver loads too early, it may not obey that config file
<colemickens>
like if I have it in initrd
<clever>
colemickens: but if you put modname.optionname=value in the kernel params, it will override the default
<clever>
and also lets you set options for modules that arent modules anymore (compiled into the kernel)
<srhb>
clever: The Acme namespace is glorious.
<clever>
radeon.cik_support=0 amdgpu.cik_support=1 is what ive got in my cmd line
rembo10 has joined #nixos
<clever>
srhb: yeah
<colemickens>
clever: given that I'm in NixOS, and I assume that the moduel respects kernel params even if not loaded in initrd... is there ever a reason to prefer extraModprobeConfig?
<colemickens>
it seems like I'd always just want to use boot.kernelParams
<clever>
colemickens: extraModprobeConfig? can be changed at runtime and doesnt need a reboot
philippD has joined #nixos
<colemickens>
oh, ok
<colemickens>
thank you
<clever>
theres likely also a size limit for the kernel cmd line
<srhb>
I was pretty sure that actually referred to the kernel command line parameters
<clever>
srhb: oh, it may be another limit, after the 4 byte wide field
<clever>
srhb: its used in many places, and appears to mostly be a staticly sized buffer
<srhb>
Hnnngh. :-)
<clever>
it likely needs to copy the cmdline, before it has a proper heap
<clever>
but also, every platform deals with that differently, so it depends on your arch
<srhb>
sphalerite: Funny thing, there's a System.IO.Unsafe.Really.IMeanIt in ACME, but that doesn't even compare to the names of the _really_ unsafe IO operations that occupy base :P
<srhb>
clever: Yeah
<clever>
srhb: and bytestring
<srhb>
Oh yeah. accursedUnutterable?
<clever>
yep
<srhb>
That thing is scary.
<clever>
they had to include a list of 5 bugs it cuased in the warnings :P
<clever>
and i know somebody that used it, on purpose, and has yet to have a bug
<srhb>
iirc at one point it had a "people who thought they knew how to use this" counter in the comments
<sphalerite>
oh my goodness there's even a numberwang one
<sphalerite>
srhb: look at it closely.
<srhb>
LOL
<srhb>
Ok, got it...
<srhb>
Good one :P
<Myrl-saki>
Okay, back.
<Myrl-saki>
Anyone got a comment for my function?
<srhb>
sphalerite: The comment is great: "Since beginning his investigations, the author of this package has discovered that this pattern is at least as commonly used as Functor."
<srhb>
Or are you looking for the error message specifically?
<elvishjerricco>
srhb: Thought they meant "assert with error message", in which case `assert (assertMsg cond msg)` is what you're looking for Myrl-saki
<srhb>
Ah. :)
<clever>
nixos modules also have a different way of dealing with asserts
jperras has quit [Ping timeout: 272 seconds]
georges-duperon has joined #nixos
<elvishjerricco>
clever: Yea module assertions are quite nice
kyren has quit [Read error: Connection reset by peer]
<clever>
i believe they are specific to nixos though, not the module framework itself
<elvishjerricco>
aww
<clever>
its basically just an option that takes a list of sets
<clever>
and then the root derivation will throw if any are true
<clever>
and then the module system just does its thing, and allows the asserts option to refer to other options!
kyren has joined #nixos
LysergicDreams has quit [Ping timeout: 260 seconds]
Twey has joined #nixos
LysergicDreams has joined #nixos
<infinisil>
I thought about implementing warnings and assertions as a general nixos module thing
<infinisil>
Along with the ability to disable specific ones
<infinisil>
This would implicitly also allow the usage of mkRemovedOptionModule inside submodules, so options like `fileSystems.<name?>.options` could be deprecated easily
<fyuuri>
Hi. One nix packages page it says the xml2rfc package is available; but running "nix-env -iA nixos.python36Packages.xml2rfc" just yields "error: attribute 'xml2rfc' in selection path 'nixos.python36Packages.xml2rfc' not found". Does anybody know the reason?
<teto>
I've added " executableHaskellDepends = [ pkgs.jupyter ]; " to the ihaskell definition. If I do 'nix-shell -p haskellPackages.ihaskell' I can launch jupyter. If I run "nix-shell -p 'haskellPackages.ghcWithPackages(p: with p; [ ihaskell ])'", jupyter is not propagated :'(
<teto>
(nixos-unstable)
patrl has quit [Quit: WeeChat 2.2]
<infinisil>
Ah nice, alacritty 0.2.0 has arrived in nixos-unstable :D
<infinisil>
Adds scrolling support
<srhb>
Can we release soon so I can get back on unstable? :3
<infinisil>
srhb: (are you replying this to me?)
<elvishjerricco>
clever: There's also https://github.com/shlevy/nix-plugins, which gives you restricted access to `exec`. i.e. Nix code doesn't get arbitrary access; only the usages of exec in your own specified Nix
tg has joined #nixos
<jasongrossman>
infinisil: Yay.
hxrts_ is now known as hxrts
jperras has quit [Ping timeout: 252 seconds]
hotfuzz_ has quit [Ping timeout: 252 seconds]
hotfuzz_ has joined #nixos
Itkovian_ has joined #nixos
reinzelmann has quit [Quit: Leaving]
Itkovian has quit [Ping timeout: 252 seconds]
<srhb>
infinisil: Just speaking into the channel I think :P
<Myrl-saki>
clever: Ping. Can you unplug after PXE boot has, well, booted.
<clever>
Myrl-saki: depends on the rootfs
jperras has joined #nixos
<Myrl-saki>
clever: The NixOS module that you made?
<clever>
thats running from a ramdisk, so it should be fine
<Myrl-saki>
I changed nothing except for setting the network options. :P
<Myrl-saki>
clever: Thanks. Wanna hear a story?
<clever>
sure
<Myrl-saki>
clever: So, basically, I'm doing data recovery with ddrescue right now. Problem is, I don't have any disk that can fit it except my home directory.
<clever>
ah
<Myrl-saki>
clever: So I had to unplug my NixOS install and network boot my PC from my laptop.
<clever>
ive used network booting before to image a pc before wiping and installing
georges-duperon has quit [Ping timeout: 252 seconds]
jasongrossman has quit [Read error: Connection reset by peer]
jasongrossman has quit [Ping timeout: 252 seconds]
mayhewluke has joined #nixos
nckx has quit [Ping timeout: 240 seconds]
<Myrl-saki>
I had to reboot to enable hot plug.
<Myrl-saki>
Because it keeps dying. :/
init_6 has joined #nixos
<Myrl-saki>
clever: Even more story.You know that NVidia card? Well it's a fucking bitch, so the only way I can control my desktop is with my laptop, so I have to reconnect it through LAN every now and then. Maybe.
<Myrl-saki>
OTOH, I was able to blindly restart sshd and set my password while the monitor was ded.
<{^_^}>
[nixpkgs] @uskudnik opened pull request #47864 → brave: init at 0.24.0 → https://git.io/fxqBC
civodul has quit [Remote host closed the connection]
hlolli has quit [Remote host closed the connection]
jperras has quit [Ping timeout: 252 seconds]
Twey has quit [Ping timeout: 268 seconds]
<philippD>
Is there a way to increase so number of printed Log lines in the case of an error with Nix2?
<clever>
Myrl-saki: lol
jperras has joined #nixos
jperras has quit [Ping timeout: 246 seconds]
nckx has joined #nixos
<rawtaz>
when's Nix 2 going to be part of release?
<rawtaz>
not in 18.09 afaik
<srhb>
rawtaz: Nix 2 was part of stable from 18.03
johanot has quit [Quit: WeeChat 2.0]
<rawtaz>
such shame
acarrico has joined #nixos
<rawtaz>
very misinform
<rawtaz>
i thought it was a cool upcoming thing, but i guess i'll have to aim for Nix 3 then :>
<srhb>
rawtaz: you're probably thinking about the "nix" command-style interface? There's no *active* plan for it to supercede nix-build and nix-shell and things.
<srhb>
rawtaz: Haha, that's the spirit.
<rawtaz>
ah, that might be it
<rawtaz>
srhb: what problems is it supposed to solve? the nix tools we have now seem to work fine from where i stand as a beginner
<srhb>
rawtaz: The inconsistencies between nix-shell, nix-build and *particularly* nix-env make them hard to learn.
<rawtaz>
right
<srhb>
rawtaz: A unified interface could greatly reduce this pain, but right now the command-style interface isn't really there.
<rawtaz>
yeah i never use nix-env, not sure why i should. i just define everying in the system wide config
<srhb>
rawtaz: People use nix without NixOS. :)
<rawtaz>
i see. sounds good, as long as it doenst burn out the devs
<rawtaz>
true
<{^_^}>
[nixos-homepage] @rbvermaa pushed to fastly « Add Fastly support »: https://git.io/fxqwy
<{^_^}>
[nixos-homepage] @rbvermaa opened pull request #243 → Add Fastly support announcement → https://git.io/fxqwh
Synthetica has quit [Quit: Connection closed for inactivity]
<aminechikhaoui>
wohoo, fastly FTW :-)
<ikwildrpepper>
aminechikhaoui: shht, not yet on the homepage :p
<magnetophon>
I can't nixos-rebuild, nor repair paths anymore: "nixos-rebuild: cannot execute binary file: Exec format error" and over and over: "error: cannot repair path '/nix/store/foo"
<magnetophon>
any ideas?
<magnetophon>
I've tried rebooting into an older generation: no luck; same messages
Ariakenom_ has quit [Read error: Connection reset by peer]
Ariakenom has joined #nixos
<jasongrossman>
magnetophon: That must be frustrating. :-( Have you checked the root disk partition?
<jasongrossman>
magnetophon: (I mean, checked it for disk errors.)
<magnetophon>
jaso
<magnetophon>
jasongrossman: ah, just about to ask what you meant
<jasongrossman>
(I have to go - sorry - but hopefully someone else will pick this up.)
<magnetophon>
jasongrossman: thanks so far!
<clever>
magnetophon: 32bit? 64bit? arm?
jperras has quit [Ping timeout: 244 seconds]
<magnetophon>
clever: 64
Rusty1 has joined #nixos
<clever>
magnetophon: what happens if you run `nix-store -r /nix/store/ilf1nd7xvfska20pc7x8pslr7mw7lm2v-nix-2.0.4` ?
zemm has joined #nixos
<ikwildrpepper>
andi-: fastly should support ipv6, perhaps it is disabled by default. we can look into this
Synthetica has joined #nixos
<magnetophon>
clever: seems to work
<ikwildrpepper>
not sure if it was enabled on CloudFront though
<clever>
magnetophon: what path is it unable to repair?
<magnetophon>
clever: seems like all of them: it just starts spitting out a list and keeps going
<clever>
magnetophon: any idea what the cause might have been?
<magnetophon>
clever: nope
<andi->
ikwildrpepper: they support ist, it isjust disabled :)
<andi->
it was enable on cloudfront.. I had (still have) a bunch of v6 only machines :/
<ikwildrpepper>
andi-: sorry to hear that, we will look into it
Twey has quit [Ping timeout: 244 seconds]
<clever>
magnetophon: one min
<magnetophon>
clever: I was building an audio pkg, and then the terminal I did it in got garbled, and thats's when I noticed the problem
<andi->
ikwildrpepper: thank you :)
<clever>
magnetophon: have you ran a memtest86 recently?
<magnetophon>
clever: nope
<clever>
magnetophon: try that first
jperras has joined #nixos
<magnetophon>
clever: so reboot, hope I enabled memtest, run it?
<clever>
magnetophon: yep
Twey has joined #nixos
<magnetophon>
clever: ok, so I'll be back in a few hours then, right?
trevorriles has joined #nixos
<clever>
magnetophon: possibly
<clever>
depends on if its bad enough to trigger asap or not
<magnetophon>
clever: ok, thanks so far!
magnetophon has quit [Remote host closed the connection]
v0|d has quit [Remote host closed the connection]
sgraf has joined #nixos
<sgraf>
Hey, I'm using home-manager (https://github.com/rycee/home-manager/) and some package in my config pulls in cargo, rustc and LLVM. This makes builds horribly slow and doesn't really compile to begin with. So, is there a way to print out the dependency footprint of packages I have not (yet) installed?
magnetophon has joined #nixos
<sphalerite>
sgraf: do you get a line "the following derivations will be built"?
<magnetophon>
clever: hmm, I don't heve memtest enabled
<sphalerite>
sgraf: also normally that sort of thing should be available in the binary cache…
<magnetophon>
clever: so I guess I need a live usb stick
<magnetophon>
right?
<sphalerite>
magnetophon: memtester is also useful for it
<sphalerite>
runs in userspace on a booted system
<magnetophon>
sphalerite: thanks, I'm figuring out how to run it now
<sphalerite>
magnetophon: just memtester <size>, e.g. memtester 6G if you have 8GB of RAM
<magnetophon>
sphalerite: 6 when I hav 8? is that a typo?
<sphalerite>
no, it's not — memtester can't allocate all the RAM in your system :)
<sgraf>
sphalerite: I guess it's related to my configuration, because the default home.nix from the site bootstraps just fine. Weird. Thanks anyway and sorry for bothering
<sphalerite>
I usually just start with the amount of memory in the system then reduce it until it doesn't crash (make sure not to have any swap enabled or your system will freeze)
v0|d has joined #nixos
endformationage has joined #nixos
<sphalerite>
sgraf: I'd suggest using `nix-diff /nix/store/1wxp7p3qfd6q0ar03in4qb3ylcdlsbjl-rustc-1.27.0.drv $(nix-instantiate '<nixpkgs>' --arg config {} --arg overlays {} -A rustc)` to see the differences between the normal rustc and the rustc it's trying to build
<sphalerite>
nix-diff is in the nix-diff package
<ikwildrpepper>
andi-: OK, will need to update DNS to enable IPv6
<ikwildrpepper>
andi-: will get that sorted
<andi->
ikwildrpepper: thank you very much :) releases.nixos.org will also be migrated I guess? How about v6 on nixos.org (the EC2 instance IIRC?) while you are at it? :D
<ikwildrpepper>
andi-: binary cache was our first priority, as that one has the highest costs, we'll move the other cloudfront after this
magnetophon has quit [Read error: Connection reset by peer]
<andi->
ikwildrpepper: understood.
magnetophon has joined #nixos
<magnetophon>
sphalerite: I got a few lines ending in "ok", and then: "Block Sequential : setting 43[1] 2649 killed memtester 6G"
<sphalerite>
magnetophon: that sounds like a case of the OOM killer stopping it because it was eating too much RAM, you can check journalctl -e to be sure
<sphalerite>
so try with 5G I guess :)
<sphalerite>
or quit any browsers you may be running and try again
<clever>
brb
<magnetophon>
ah, yes
<Myrl-saki>
The good old hit the drive until it works before ddrescue is very helpful.
phreedom has quit [Ping timeout: 256 seconds]
phreedom has joined #nixos
<{^_^}>
[nixpkgs] @zimbatm opened pull request #47867 → elvish: provide the compiled version → https://git.io/fxmLs
sphalerite has quit [Ping timeout: 250 seconds]
sphalerite has joined #nixos
<{^_^}>
[nixpkgs] @zimbatm pushed commit from @flokli to release-18.09 « terraform-providers.matchbox: init at 0.2.2 (#47863) »: https://git.io/fxmLD
astronavt has joined #nixos
das_j has quit [Quit: "Bye!";]
Dedalo has joined #nixos
<fyuuri>
Hi. Has there been any work on the memory consumption of nix as of yet? I have a notebook with 4GB of ram and even without any any application open after a fresh reboot, nix-os rebuild switch --upgrade fails because of lacking memory.
<Myrl-saki>
fyuuri: Fails with what error?
<Myrl-saki>
fyuuri: And what do you have installed?
<Myrl-saki>
fyuuri: And what channel are you on?
<fyuuri>
I am on the 18.03 channel. I have quite a few packets installed. The error is nix-daemon out of memory.
rembo10 has quit [Remote host closed the connection]
rembo10 has joined #nixos
thc202 has quit [Ping timeout: 252 seconds]
thc202 has joined #nixos
<aminechikhaoui>
fyuuri: nix 2.1 should fix those memory issues, should be the default in nixos-18.09 if I'm not wrong
reinzelmann has quit [Quit: Leaving]
<fyuuri>
oh! nice!
sb0 has joined #nixos
<fyuuri>
Do you know how it was solved and what the problem was?
<Myrl-saki>
fyuuri: I don't know the exact problem, but it's kinda related to add-to-store or copy.
<fyuuri>
When is the expected date for 18.09 be stable.
justanotheruser has quit [Ping timeout: 268 seconds]
mkoenig has quit [Ping timeout: 260 seconds]
iyzsong has quit [Ping timeout: 252 seconds]
mkoenig has joined #nixos
liori has joined #nixos
erasmas has joined #nixos
reinzelmann has joined #nixos
<magnetophon>
clever, sphalerite: memtester completed it's first loop, so I guess bad RAM is unlikely to be the problem, right?
mayhewluke has quit [Ping timeout: 252 seconds]
<kreisys>
does hydra have any sort of hooks mechanism? like what do I do if I want to push a docker image to a registry after it's built? couldn't find anything in the docs :(
mayhewluke has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lewo>
kreisys: Hydra has plugins. I think there is a plugin that allows you to execute arbitrary bash code.
<sphalerite>
magnetophon: always good to leave it running for a good while, but yeah that does at least give *some* confidence that it may not be bad RAM :)
<magnetophon>
sphalerite: i still have it running. what else could I try?
<sphalerite>
magnetophon: see how the files are actually damaged, try `file <some-damaged-executable>
<magnetophon>
sphalerite: it says nixos-rebuild is data...
<sphalerite>
well then! nixos-rebuild is supposed to be a shell script iirc, try opening it in less or something to see what it's looking like :D
andromeda-galaxy has joined #nixos
<kreisys>
lewo: thank you!
<sgraf>
sphalerite: Now I'm trying to find out why it needs to compile rustc from source, but part of the command you pasted `nix-instantiate '<nixpkgs>' --arg config {} --arg overlays {} -A rustc` fails with error: value is a set while a list was expected, at /nix/store/73sd0sgq6zbb65zgf4b2m4jbxqqnhk7g-nixpkgs-19.03pre154023.89b618771ad/nixpkgs/pkgs/top-level/stage.nix:172:8
<sphalerite>
sgraf: oops, it's supposed to be --arg overlays []
<sphalerite>
my bad
<lewo>
kreisys: I wonder which solution you'll choose. Would be nice to have a feedback if you write a Hydra plugin :)
<sgraf>
sphalerite: Thanks, that worked. And I know where the changes are coming from: I'm compiling a custom version of openssh with certain extra flags enabled, which flows through git into rustc
<{^_^}>
[nixpkgs] @Vskilet opened pull request #47868 → nixos/nextcloud : added options to customize the listening address/port → https://git.io/fxmnK
<andromeda-galaxy>
I use nix to build a few projects, and was thinking about setting up CI/a binary cache. Could anyone clarify when I might want to use OfBorg vs Hydra? It seems like they are both billed as CI tools.
<kreisys>
lewo: I don't see myself relearning perl lol but sure I'll give you a shout with whatever I end up doing!
<lewo>
kreisys: :) thx!
<sgraf>
I guess, the simplest way to make it work is to get rid of the custom ssh setup... it didn't work anyway
<sphalerite>
sgraf: aaaah what a pain. Do you actually need the change to affect ssh's dependents? If not maybe you should install your patched ssh just in your profile rather than using an overlay to modify it
<sphalerite>
or that :D
<magnetophon>
sphalerite: it's a long string consisting of "^@" repeated
Ariakenom_ has joined #nixos
<sgraf>
sphalerite: I'd love to do that! How do I do that?
<sphalerite>
magnetophon: looks like all you have left is NULs, whoopee
<sphalerite>
magnetophon: anyway, using the nix you downloaded with clever's command you should be able to repair the path
<magnetophon>
sphalerite: I aslo tried downloading nixos-rebuild using that command directly, and got this file...
<sphalerite>
magnetophon: one thing to test for the underlying cause (though you'll have to boot into some system where the device you're checking isn't mounted) is if your storage is broken, you can test that using badblocks -ns for a non-destructive read-write test
<sphalerite>
magnetophon: huh..?
<magnetophon>
sphalerite: I did "nix-store -r /nix/store/plwp97zfj51hgr3rv80jkqmwa8mdxv79-nixos-rebuild/bin/nixos-rebuild" and got a string of ^@'s
<sphalerite>
sgraf: I don't know much about home-manager, but I'm guessing there's some equivalent of nixos's systemPackages and nixpkgs.overlays. I presume you're modifying your SSH in an overlay or something — just move whatever you're defining openssh as into the systemPackages equivalent
<sphalerite>
magnetophon: yeah that won't help, nix-store -r won't redownload something if it's already there. Try nix-store --repair-path /nix/store/plwp97zfj51hgr3rv80jkqmwa8mdxv79-nixos-rebuild
Ariakenom has quit [Ping timeout: 272 seconds]
<magnetophon>
sphalerite: yes, now I have a script.
<sphalerite>
so that's the immediate problem fixed :) NULs can also often happen iirc if the filesystem isn't written cleanly on a shutdown, are you aware of a forced shutdown happening on that machine recently?
<magnetophon>
sphalerite: now what? I'm running badblocks, to check the disk, but I'm not sure on how to proceed
<sphalerite>
uh, you're running badblocks on a device with a filesystem mounted??
<sphalerite>
please say it's a read-only test :x
<magnetophon>
sphalerite: yes, I have done a few recently, cause my home wouldn't unmount.
<sphalerite>
that sounds like a more likely culprit than a broken storage device then, yay!
<magnetophon>
sphalerite: yeah, and badblocks finished: no errors. so now what?
<sphalerite>
sgraf: out of curiosity, what did you change in openssh?
<sgraf>
sphalerite: I'm actually just using a regular overlay in `.config/nixpkgs`. And home-manager's equivalent is probably home.packages. Ah, of course, that could work. I now have this in my config: http://www.heypasteit.com/clip/0INO0W, but it doesn't really work
<sgraf>
sphalerite: activate support for Kerberos auth mostly, as you can see
<sphalerite>
magnetophon: nix verify --all --no-trust to check if there are any more broken paths to fix, once you've fixed them all life can go on as normal :p
<sphalerite>
sgraf: two issues there — firstly, this is a case where you want to use override, not overrideAttrs, since these are package args, not mkDerivation args
<sgraf>
sphalerite: The error is The option value `home.packages.[definition 1-entry 13]' in `~/.config/nixpkgs/home/user-common.nix' is not of type `package'
<sphalerite>
sgraf: and secondly, you need some parentheses around the whole thing :)
<magnetophon>
sphalerite: 99 corupted and counting! What is the difference between this command and "nix-store --verify --check-contents --repair" (which doesn't repair anything at the moment)
<sgraf>
sphalerite: Ah, makes sense :) Was used to Haskell's application precedence, but that doesn't really make sense when lists are delimited by space
<sphalerite>
magnetophon: oh wow that's intense. The only difference is the fancy progress indicator and that it doesn't do any repairing
<sphalerite>
sgraf: yep
<magnetophon>
sphalerite: almost 500 corrupted now. maybe something else is wrong?
<sphalerite>
magnetophon: that seems pretty bad. Try doing an offline badblocks -n test rather than just a read-only one
yayforj has joined #nixos
<sphalerite>
Unless you did a badblocks -n test on the live filesystem?
<sphalerite>
In which case that will have trashed it :p
<ikwildrpepper>
andi-: DNS has been changed, so ipv6 should work shortly
<sphalerite>
(though I think badblocks should refuse to do that)
<magnetophon>
sphalerite: I did "badblocks -v /dev/sda2 > badsectors.txt "
<sphalerite>
magnetophon: oh ok that's fine then. It may be an issue with writing though, for which you need to do an offline test
<magnetophon>
sphalerite: OK, so I need to find a bootable usb, and run it from there, right?
<sphalerite>
magnetophon: yeah that's probably the easiest option
<magnetophon>
sphalerite: "nix-store --verify --check-contents --repair" gives many lines like: ath '/nix/store/3rpsjb4sxv98j6b8hiy2gsglc747fdf5-iputils-20180629.drv' was modified! expected hash 'sha256:04zcsys05fkhyl4ycf7h5wdw80d2j374xnqvnadljzchqyngknz9', got 'sha256:0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p'
<sphalerite>
magnetophon: anyway, I'm unsure at this point if it's not broken-disk after all. But this kind of stuff is also what happens when you force-shutdown :p not sure if the scale matches
<sphalerite>
oh yeah, you can't repair drvs
<andi->
ikwildrpepper: thanks one more time :) It seems to work already
<ikwildrpepper>
andi-: awesome, sorry for the inconvenience
<magnetophon>
sphalerite: OK, so those aren't errors then?
<sphalerite>
but a broken drv shouldn't be a major issue I think
<sphalerite>
well they are
<sphalerite>
but it shouldn't be a big problem AFAIK
<{^_^}>
#47837 (by grahamc, 13 hours ago, open): nixpkgs: Start documenting library functions in XML
slack1256 has joined #nixos
<rawtaz>
gchristensen: what's the use case? arent they documented elsewhere?
<gchristensen>
so you don't have to read the source for docs
<gchristensen>
and so they're documented with the rest of nixpkgs
<rawtaz>
ok, so they are currently not documented elsewhere, this is about getting them documented like the other things at all
<gchristensen>
they are documented, in the source code.
<magnetophon>
I want to add memtest to my boot, but I only see it for grub, whereas I'm using efi. does that exist too?
<rawtaz>
gchristensen: i mean outside of the source code.
<gchristensen>
right
<rawtaz>
i thought that "in XML" meant something like "in XML too", as if they were already documented in a format that was e.g. available on the website. i understand now what you mean. good idea!
<gchristensen>
also note my intention is to just mereg it sometime today and assume it can be improved later :) (unless there is other feedback)
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
<MrAngel>
Has anyone seen this before? (output from me attempting to run stack upgrade --nix showing an error caused by not having zlib, which I'm pretty sure is installed)
<{^_^}>
MrAngel: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
alex`` has joined #nixos
<MrAngel>
Ah, there we go. Thanks fam
<MrAngel>
Am I going to find that Stack repeatedly breaks if I try and use it outside of nix-shell because it depends on libraries it won't get?
<clever>
yeah
reinzelmann has quit [Quit: Leaving]
<MrAngel>
Am I, in fact, going to find that trying to use Nix to manage everything else and then using Stack as an escape hatch for development work is really dumb and I'm going to suffer less just learning how Nix works properly?
<srhb>
MrAngel: Opinions differ (but yes.)
<srhb>
As in, the "yes" is my opinion :-P
<MrAngel>
Darnit. I refuse to have come this far only to switch back to Arch now -_-
<MrAngel>
Guess I'll just have to work out how the hell to use Nix for this
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<srhb>
MrAngel: cabal2nix --shell > shell.nix, spin up a nix shell, start hacking (using cabal repl and friends, probably)
Dedalo has joined #nixos
<MrAngel>
That almost works, except that a) nix shell breaks everything (probably because it's bash and I use zsh) and b) for some strange reason hdevtools can't find dependencies being provided by Nix
<srhb>
MrAngel: stack is doable though, if you insist. I have less experience with that, for guidance, though.
<MrAngel>
Won't hdevtools just look wherever cabal puts libraries though?
<srhb>
(I may be talking out of my butt since I don't use hdevtools, but that's what I would assume)
<srhb>
MrAngel: The deps specified in shell.nix are not installed via cabal.
<srhb>
MrAngel: They just live in /nix/store along with a ghc that has _just those packages_ in its package db.
<MrAngel>
Ah
<MrAngel>
cabal2nix doesn't seem like it's helping me very much at this point
<dhess>
Mic92: your OpenWRT gist works great for me, thanks!
<MrAngel>
Since I'm gonna need to add derivations for tools I wouldn't need to include as cabal deps
<dhess>
now I need to figure out how to use their build system
<srhb>
MrAngel: It's probably still useful for generating the initial shell.nix
<MrAngel>
I'm doing a toy project from scratch, I don't even want to think about how I'd fix a non-trivial project right now
<srhb>
MrAngel: Mmm. Okay. :) Well, I won't claim it's not a time investment. I can only say that it's very composable and easy to work with once you've spent that time..
<srhb>
MrAngel: Especially for non-trivial projects.
<cocreature>
any ideas on how to fix this (apart from rolling back)
<srhb>
MrAngel: The payoff on small projects is way smaller, granted.
patrl has quit [Ping timeout: 252 seconds]
<Mic92>
dhess: you are welcome
<MrAngel>
Yeah. What interested me about Nix was having a sane, reproducible way to get an OS with the environment that I actually like (IDE-wise) up and all the dev tools installed
<MrAngel>
And then I could just let Lein/Gradle/Stack do their crazy thing in directories
<MrAngel>
I'm beginning to feel like that's not going to get me very far
<srhb>
MrAngel: You can, though it's not as powerful as going fully declarative imo.. And there will be integration issues along the way anyway.
<srhb>
MrAngel: (As you've noticed.)
<srhb>
gchristensen: I like that it's this yesterday and not some other yesterday. :-)
<MrAngel>
I agree completely that all of the named tools are very broken, but I'm very used to fixing them at this point :P
<srhb>
gchristensen: (Also neat!!)
<srhb>
MrAngel: Yeah. :)
<gchristensen>
srhb: LOL. I made that typo/fix after ikwildrpepper was grumpy it was changed yesterday not "this morning"
<srhb>
:-)
<MrAngel>
I think I'm gonna boot arch to get this done and try and brush up on Nix more later, thank you kindly for all the help though!
<srhb>
MrAngel: OK, good luke, hope you'll be back :)
<srhb>
.. luck
<MrAngel>
I'll be back for sure, this is a great idea. But much like Haskell and Clojure when I first learned them, it's a great idea that's nuking my immediate productivity :P
<dhess>
gchristensen: I'm using the aarch64 commuity builder in my project Hydra now. That thing is fast!
<infinisil>
If NixOS can't find an options or config attribute in the module, it will convert it into a { options = {}; config = <the original value>; }
<gchristensen>
sie: yeah, usually -- emacs and nxml-mode and yasnippets helps a lot. sometimes I use oXygen, but not often since I don't have a license.
Mr_Keyser_Soze has quit [Remote host closed the connection]
patrl has quit [Quit: WeeChat 2.2]
patrl has joined #nixos
matthewbauer has quit [Ping timeout: 264 seconds]
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zimbatm>
what is the definition of the (exwm-config-default) function?
<trevthedev>
hm?
<trevthedev>
how can i check xd
<grp>
I'm trying to bump unbound's version, so I copied the current .nix into an overlay I have and did the trivial edition needed, but when I try to build it, it pulls A LOT of dependencies that have NOTHING to do AT ALL with it. https://pastebin.com/HDuuQit3 (all this just from unbound-1.8)
<infinisil>
catern: Not sure what you mean, it's a hash so the same input maps to the same store path
<infinisil>
uuid's are per definition unique, which would mean unique amongst different machines, so everybody would have to rebuild everything for their own uuids, or something like that
<cransom>
a hash is reproducible too. everywhere i've seen a uuid, it's randomly generated. you could stuff a hash into something that looks like a uuid, but why?
acarrico has quit [Ping timeout: 252 seconds]
<catern>
infinisil: the same input maps to the same store path, but that doesn't matter if you're sending requests to a binary store
Ericson2314-work has quit [Remote host closed the connection]
<catern>
binary cache*
<catern>
like, why does the same input need to map to the same store path? there doesn't seem to be a fundamental reason, it doesn't break anything in the Nix model or cause additional rebuilds
<infinisil>
catern: You won't know which binary store path you're supposed to query if you don't have the same store path for a derivation as the cache
<gchristensen>
catern: how would you know how to dowload the path?
<trevthedev>
what do i define "my-exwm" as?
<catern>
infinisil: the binary store can be indexed by input rather than by store path
<gchristensen>
catern: let's turn this on its head, why use uuids?
<catern>
gchristensen: no reason, I'm just trying to understand why not
<infinisil>
catern: So you would use the .drv hash?
<catern>
my point is that store path and hash of the derivation can be different
<gchristensen>
catern: a derivation can be built multiple times, right?
<catern>
output store path*
<lassulus>
trevthedev: thats just the name for the default windowManager. you define it with services.xserver.windowManager.session and reference it with services.xserver.windowManager.default
<catern>
gchristensen: hmm, yes, but you wouldn't build something again if it's already built
<gchristensen>
but I could, right?
<catern>
yes, interesting point
<gchristensen>
and if I did, the output store path would be at a different location, right?
<trevthedev>
`i already put those in and its saying its an undefined variable...
<catern>
gchristensen: yes
<infinisil>
catern: I see what you mean now, and I can't find a reason why that wouldn't work
<lassulus>
uh, maybe I made a mistake, let me check again :D
<infinisil>
Interesting idea
<trevthedev>
alright, no worries
<trevthedev>
i appreciate the help
<gchristensen>
catern: A depends on B, how does B know what out path A used?
<infinisil>
catern: (I have a feeling there's some catch we're not seeing yet though)
<catern>
infinisil: right that's what I'm wondering too :) I'm expecting a catch
<catern>
gchristensen: er do you have one of those As and Bs swapped? because why would B know what out path A used, if A is the one depending on B?
<gchristensen>
right.
<catern>
(B doesn't know about things that depend on it)
<gchristensen>
catern: B depends on A, how does B know what out path A used?
<infinisil>
gchristensen: Build all input drvs, get the uuid's from them, scan for uuids in $out
Ariakenom has quit [Read error: Connection reset by peer]
<catern>
^ that
<gchristensen>
ok, so before you can construct the drv for B you must first fully build A?
<catern>
ah, I see
<catern>
wait, no
<gchristensen>
no no let's not give up yet!
<catern>
no, the drv for B refers to the drv for A, rather than the uuid for A
<infinisil>
Yeah
<infinisil>
No problem with that, drv's have drvs as deps
<gchristensen>
ok, but at some point B needs to know where A put its output. how does it do that?
<catern>
it builds A? (possibly by querying a binary cache and downloading A from there)
<gchristensen>
ok, sure
Itkovian has joined #nixos
<lassulus>
trevthedev: where do you get the error? from nix or from emacs?
<gchristensen>
I have two binary caches from two different hydras and I use them both. 50% of the closure for derivation X comes from cacheA and 50% come from cacheB, how do I end up with a build for X which works?
<lassulus>
can you paste the part of your config somewhere?
<trevthedev>
sure thing
mayhewluke has quit [Ping timeout: 244 seconds]
<lassulus>
it seems to work here
<infinisil>
gchristensen: That seems to be a catch indeed
<gchristensen>
oh but I have another question ;)
<infinisil>
catern: Also, we'd probably want the uuid's to be deterministic, and deterministic uuid's are pretty much just hashes xD
<gchristensen>
I'm a paranoid hedge fund and I like to have eight hydras all build the same code and ensure they're bit-for-bit identical. how do I do this?
<lassulus>
trevthedev: ah, yeah, it's getting late here, but you need to define your config somewhere, like in a let. here is an example: http://paste.krebsco.de/ENvcgHsT/+inline
<trevthedev>
thanks mate
<lassulus>
yw, night!
jtojnar has joined #nixos
<catern>
gchristensen: hm, this is essentially the same problem as the intensional store though, isn't it?
<catern>
maybe?
<catern>
and so you could use hash rewriting to make the two closures match?
<trevthedev>
no errors!!
<trevthedev>
alright now my hopefully final question, how exactly do i configure it now? like, what file do i edit to configure, or?
<catern>
gchristensen: also, you can still distribute the build over your 8 hydras, you just have to have only one of them build each thing? I admit that any chance of bit-reproducibility is lost under this scheme
<{^_^}>
[nixpkgs] @alexherbo2 opened pull request #47888 → GRV: Fix typos in description → https://git.io/fxY8F
<catern>
anyway to directly answer your question: if you have a binary cache from two different hydras which have both built the same thing, that doesn't work
<lassulus>
ah, you edit the config file you define on top, you can also use lib.readFile instaed of pkgs.writeText and import any file you want. I don't know anything about exwm so you are on your own what to write into the config
<catern>
I mean, I pretty much never want to do that, AFAICT?
<trevthedev>
so i assume i change pkgs.writeText to lib.readFile, then "./exwm-bla" right?
<lassulus>
yep, that should work
<lassulus>
(hopefully)
<trevthedev>
so far have been getting an error, tring './exwm-bla' doesn't represent an absolute path, at /etc/nixos/desktop.nix:3:20
<trevthedev>
string*
<trevthedev>
got it when i didnt change it too
<trevthedev>
well, crap xd
<trevthedev>
something broke everything is okay
slack1256 has joined #nixos
<trevthedev>
am in tty1 now xd
<lassulus>
ah, it actually needs a file,
Lisanna has joined #nixos
<trevthedev>
created one
<trevthedev>
didnt work, so i created a directory
<trevthedev>
also didnt work xd
<trevthedev>
renamed and tried to get it to work xd
<lassulus>
ok, even easier, you can just say: start = "${pkgs.emacsWithPackages []}/bin/emacs -l ${./exwm-bla}";
<trevthedev>
where do i put that?
<lassulus>
where the other start already is
<trevthedev>
1do i get rid of the let?
<trevthedev>
okie
<lassulus>
yes
grp has quit [Quit: box shutting down...]
<lassulus>
instead of the other start of course
<catern>
infinisil: why would we want it to be deterministic? not sure it's really beneficial
jedahan_ has joined #nixos
patrl has quit [Ping timeout: 240 seconds]
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jedahan has quit [Ping timeout: 252 seconds]
<trevthedev>
no error, yay
<catern>
gchristensen: infinisil: wait a second, there's no issue if half the closure for a derivation comes from one cache and half the closure from another cache, as long as the two parts of the closure don't overlap
<gchristensen>
in my 50% the definitely overlap
<catern>
well, the two caches should/would ideally be talking to each other and pulling deps from each other so that they don't overlap in builds
<gchristensen>
but how would they know? they have a valid NAR file for the derivation
<trevthedev>
yay! time to configure it, thanks mate :D
<catern>
if cache A is about to build, then it should look to see if cache B has the artifact
<lassulus>
have fun!
<gchristensen>
no, cacheA and cacheB built it entirely independently
<catern>
and download it if so; and vice versa
jedahan_ has quit [Client Quit]
<cransom>
if they both decided to build it at the exact moment, they both would check if it exists, and find that it doesn't exist. now you have a brand new set of distributed systems issues!
__monty__ has quit [Quit: leaving]
<__red__>
if one appears to have hit an impasse with a committer, I'm guessing the only option left is to delete the PR?
<trevthedev>
okay crap....
<trevthedev>
so, where exactly does uh, the exwm-bla flle go?
<__red__>
and work on something else instead
<trevthedev>
it says it cannot find any files called $./exwm-bla
<catern>
cransom: sure, that could happen, there's a race there
<gchristensen>
catern: ok, so what happens in my scenario?
<trevthedev>
does it go in /bin/emacs , /etc/nixos , or $HOME ?
<catern>
gchristensen: well, we have to either pick some arbitrary half of the closure to use, or use hash rewriting like in the intensional store
<gchristensen>
catern: well, then, I think we've found why we don't do that
jperras has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @vcunat pushed 4 commits to release-18.09: https://git.io/fxYBE
<{^_^}>
[nixpkgs] @vcunat merged pull request #47699 → nixos on hyperv: load proper modules and make installer use the module → https://git.io/fxIRl
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Neo-->
__red__, you could try pinging someone impartial?
<lassulus>
trevthedev: should be read-only in nix-store (that's what reading a File normally does in nix) altetnatively you can say ${toString ./exwm-bla} and then it should read ./exwm-bla relative to your configuration.nix
<catern>
gchristensen: okay, yeah, it's a good point
nDuff has joined #nixos
<catern>
I dunno, I was just thinking that something as fundamental as this would have an equally fundamental reason why, but this just seems like a relatively minor efficiency concern
<trevthedev>
wait so how would be able to configure it if its read only...
<gchristensen>
catern: it provides properties we want, like reproducible builds and consistency -- this is a very important fundamental property
nDuff has quit [Quit: ...]
<catern>
that's true
<__red__>
Neo--: I'm not sure how to do this - I'm very new to the project and I really don't want to be "that guy"
nDuff has joined #nixos
<__red__>
but I'm just not sure what to do
<__red__>
maybe I should just give it some more time
<catern>
I guess then I say that it seems this would be lost anyway with a move to the intensional store
<gchristensen>
mmm no I don't think consistency or reproducibility is lost
<lassulus>
trevthedev: a new copy would be done everytime you say nixos-rebuild switch for example
LysergicDreams has quit [Ping timeout: 260 seconds]
<gchristensen>
everything there is still a function of its inputs, not rand()
<catern>
oh, yeah, good point
<catern>
okay, I'm fully persuaded then
<Neo-->
__red__, sleep on it a day or two and see if you see a new angle / approach :) other than that I can't help either, I'm relatively new to the project too :)
<trevthedev>
well apparently changing it to toString doesnt work
<trevthedev>
now its looking for a file called s
<catern>
Another unrelated question! (I admit that these are just thoughts funneled from people discussing Nix internally at my company, but they don't know how to use IRC I guess :) )
<trevthedev>
where its getting that, i do not know
<catern>
A feature request that I think makes a lot of sense! It would be nice if when using --store or something, you could have sharing of disk space between multiple stores
LysergicDreams has joined #nixos
<__red__>
Neo--: I'll take your advice - thanks.
<gchristensen>
catern: sounds like magic would be needed for that
<lassulus>
Huh, weird, can you paste the new config again?
<trevthedev>
ill see what i can do
<catern>
Namely, if there's some system-wide store at /nix, I could specify --store in such a way that I get my own private store in my home directory, which is just an overlay on top of the /nix store into which I can install whatever
<catern>
gchristensen: I think it would fit pretty easily into the C++ Store abstraction
<gchristensen>
what if ~/my-private-store is an nfs mount and shared with another system?
<catern>
gchristensen: yeah? what is the problem with that? any problems with that are still a problem with any usage of --store, right?
<gchristensen>
no, because ~/my-private-store is a complete store right now
<gchristensen>
but if it is an overlay, it is no longer a complete store
Wharncliffe has joined #nixos
<nDuff>
Hmm. I'm trying to enable build of a package from a private repo, but it's being a bit tricky. Created a deploy key, one copy per build user, owned by that user in a directory they can access; created a custom SSH config file that points to those keys, using "%u" in the IdentityFile directive to be substituted appropriately... but it's trying to use *my* username for the file, and thus using a filename the build user can't access.
<catern>
gchristensen: ah, I see, good point... that breaks the store invariant...
<infinisil>
sevanspowell: I'd go for an overlay that adds a whole nother package set
<samueldr>
checking, but IIRC channel: is for nixos.org/channels only
kyren has joined #nixos
<kalbasit[m]>
oh :(
<samueldr>
you have a tarball?
<infinisil>
sevanspowell: So `(import <nixpkgs> {}).mypinnedprivatepackages.haskellPackages.somepackage`
<kalbasit[m]>
the channel I'm using is really nixpkgs under the hood but we are a team of linux/macs so I want to pin the nixpkgs revision
<sevanspowell>
ldlework: It's just if I force my team to use an overlay with an overriden package set, wouldn't they always be stuck with that package set on their system?
<kalbasit[m]>
currently inside shell.nix and direnv
<samueldr>
>> You can now use channel:channel-name as a short-hand for https://nixos.org/channels/channel-name/nixexprs.tar.xz. For example, nix-build channel:nixos-15.09 -A hello will build the GNU Hello package from the nixos-15.09 channel. In the future, this may use Git to fetch updates more efficiently.
<kalbasit[m]>
but I want it also pinned for the script when they are invoked while direnv is not loaded
<samueldr>
(from nix 2.0's release notes)
<kalbasit[m]>
I see
<kalbasit[m]>
so how can I do the above then?
<infinisil>
sevanspowell: Which can be achieved by just installing an overlay like `self: super: { mypinnedprivatepackages = let pkgs = import (fetchTarball "...") {}; in ... }`
<samueldr>
kalbasit[m]: if they're published, nixpkgs=https://example.com/publica-platform-nixpkgs/nixeprs.tar.xz (github tarball URLs would work)
<infinisil>
sevanspowell: I guess more like `self: super: { mypinnedprivatepackages = import (fetchTarball "...") { overlays = [ <your overlays that add stuff> ]; } }`
<sevanspowell>
That's a lot of good information, I'll give it a go and come back if I have any issues. Thank you everyone. Hopefully I'll know enough to actually contribute something at some point.
<kalbasit[m]>
samueldr: the problem is that I have a shell.nix (https://gist.github.com/168db1be8ed8446057331b4e894325d4) that imports from a nixpkgs-version.json. I have another script that my team use to install nix and also setup the publica-platform-nixpkgs channel with the rev in nixpkgs-version.json and I want scripts to use whatever nixpkgs revision in nixpkgs-version.json
<kalbasit[m]>
but I don't want to maintain tarball logic in every script
<kalbasit[m]>
I'd rather have them all use nixpkgs-version.json
<kalbasit[m]>
is it possible to do this?
<samueldr>
hmm, I believe so, let me test something
<samueldr>
if that script is always placed relatively at the same location to shell.nix, it should be easy
<kalbasit[m]>
samueldr: yes, always relative to that script
<kalbasit[m]>
s/that script/shell.nix/
* kalbasit[m]
facepalm
<samueldr>
when #! nix-shell is parsed; it assumes the file location is where relative paths are relative to
<samueldr>
yeah, so if you don't want to do anything to the params, your pin.nix can be `import (builitins.fetchTarball {...})` without the parameter to nixpkgs
<kalbasit[m]>
samueldr: `#! nix-shell -I nixpkgs=../lib/nix/nixpkgs.nix` and the script itself is inside `bin/`. This gives me an error (not found). Is the relative to the pwd where I'm executing the file, or where the file is or where I cd to before the #! nix-shell?
<samueldr>
where the script itself is
<samueldr>
but uh, never actually validated with -I
<kalbasit[m]>
samueldr: so if I `cd` somewhere else from within the script before I put `#! nix-shell` do you think that would work?
<samueldr>
no, it's all run before the script is ran
<kalbasit[m]>
oh I see
<kalbasit[m]>
:(
<samueldr>
nix-shell reads the script to finds all its #! nix-shell bits and bobs, then calls the interpreter with the script
<samueldr>
best option is probably to go with a shell.nix file :/
jtojnar has quit [Ping timeout: 268 seconds]
<kalbasit[m]>
I see
foldingcookie has joined #nixos
<samueldr>
I'm not sure if this should be considered a bug with regards to some other semantics of nix-shell; it probably isn't due to the semantics of NIX_PATH handling elsewhere
<samueldr>
it's currently coherent with how NIX_PATH is handled everywhere else (I think), but the not with the "file" semantics with regards to "./" in the path for shell.nix argument