<makefu>
afics: can you pastebin what you did until now?
<o1lo01ol1o>
clever: well, the hash of `nix-hash --base32 --type sha256` differs from the filehash listed in the narinfo. I'm not sure why; wget reports the file was successfully downladed. I'll try again.
<clever>
o1lo01ol1o: you may need a --flat also
<afics>
makefu: yes
edef has joined #nixos
<clever>
o1lo01ol1o: nix-hash is recursive by default, so its packaging your .nar.xz up inside another nar, and then hashing
<o1lo01ol1o>
clever: the --flat did it; the hash is correct. I'm not sure why nix copy reports the narinfo as being corrupt
<clever>
o1lo01ol1o: try file:/// rather then file:// ?
UndefinedIsNotAF has quit [Ping timeout: 252 seconds]
<o1lo01ol1o>
clever: lol, that worked. Why?
<clever>
o1lo01ol1o: file://foo says to open "foo", a thing in the current working dir
<clever>
o1lo01ol1o: file:///foo says to open "/foo" an absolute path
justanotheruser has quit [Ping timeout: 260 seconds]
ayerhart has joined #nixos
<zeta_0>
clever: direnv is causing me to much problems, i think will just copy and past the bash code into a shellHook like you said
<zeta_0>
clever: are there good directions on how to use the shellHook function in default.nix?
<clever>
zeta_0: its an attribute on a derivation, not a function
<clever>
zeta_0: just add it to a derivation, along with src and buildInputs
<afics>
makefu: can really be something else in my config be the issue, if it deploys okay after commenting the nixpkgs.overlay stuff from my paste?
<makefu>
maybe you are changing packages required for keepalived ? i verbatim copy-pasted your files
<zeta_0>
clever: oh, so is there some example code, because i am not sure how to do this? i want to place this code from configuration.nix into a shellHook: https://hastebin.com/ofahozebut.bash
<clever>
zeta_0: then you want .overrideAttrs (old: { shellHook = ''....''; })
edef has joined #nixos
<bogdb>
hi, i'm trying to setup a nix-shell for c++, and i'm using the fmt package as a dependency. fmt's cmake support files define a single target fmt::fmt which includes both lib and include paths (aka 'out' and 'dev'). but the lib and dev packages are distinct in the store therefore cmake fails since it doesn't find the include path. any ideas how to fix this without hacking my cmake file?
LarryTheCow has joined #nixos
<clever>
> fmt.outputs
<{^_^}>
[ "out" "dev" ]
<clever>
bogdb: its a normal split output package
<clever>
bogdb: do you have pkgconfig and cmake in your inputs?
<LarryTheCow>
Hi, everyone. I've got a quick question: how can I override a package's derivation? I'm trying to change its version.
<{^_^}>
LarryTheCow: 6 weeks, 4 days ago <infinisil> Having looked at the code, I really don't think it's gonna help, but it's not a bad idea to limit the number of entries anyways
<bogdb>
clever, i have cmake only
<clever>
bogdb: try adding pkgconfig
<bogdb>
the cmake target defined by the package expects lib and include in the same path, but the paths are split
<clever>
bogdb: you could also try (fmt.overrideAttrs(old: { outputs = [ "out" ]; }))
<zeta_0>
error: syntax error, unexpected '.', at /home/zeta/example_projects/simple_examples/nix-haskell-recipes/default.nix:18:5
<zeta_0>
clever: ^
<pie_[bnc]>
clever: im fine with pulseaudio controlling it as long as I can route stuff
<clever>
zeta_0: that goes after line 36, and you must wrap 6-37 with ( and )
<pie_[bnc]>
clever: but I havent been able to figure out how to get jack to play with it
<pie_[bnc]>
clever: oh wait...hm. I guess I want jack to be in control because otherwise i have to do lots of loopback screwery with pulse?
<pie_[bnc]>
which is defeating the whole point
<clever>
pie_[bnc]: probably
<afics>
makefu: uh, I am using unstable, if that matters
<bogdb>
clever, your second suggestion worked. thanks\
mehlon has quit [Remote host closed the connection]
<noonien>
hmm, if it is normal to have split output packages for "out" and "dev", is there a reason for `fmt` not to work? or is it normal, but not for cmake libraries?
mexisme has joined #nixos
<noonien>
perhaps this has something to do with the fast that this is run in nix-shell?
<clever>
noonien: id say its a bug with the thing your compiling, that its not using pkgconfig to figure out where the libs and headers are
<clever>
noonien: or a bug with fmt not providing a .pc file
<noonien>
it does, in the .dev output
<clever>
then your project is likely ignoring the pkgconfig file
<clever>
also, nix itself adds fmt to -I and -L for you
<noonien>
i see, so this is not specifically a cmake thing
<clever>
so your cmake thing doesnt need to do anything at all, it would just work
<bogdb>
on nix it would just work but not on other platforms
<noonien>
i think, in this case, pkg-config would be the solution, so it would work on other platforms also
<{^_^}>
[nixpkgs] @cdepillabout pushed 2 commits to haskell-updates: https://git.io/Jepcm
<zeta_0>
clever: ok i placed it after line 36 but i am not sure exactly which parts that i need to wrap with parenthesis? https://hastebin.com/apawazeboh.bash
knupfer has joined #nixos
<clever>
zeta_0: everything after the `in` up to the `.overrideAttrs`
<clever>
zeta_0: `in (....).overrideAttrs ...`
<LarryTheCow>
nvm, I fixed it.
thomashoneyman has quit [Ping timeout: 258 seconds]
inkbottle has quit [Quit: Konversation terminated!]
ng0 has quit [Quit: leaving]
<zeta_0>
clever: ok i wrapped it with (), so do need to put a semicolon after the () ?'
<clever>
zeta_0: did the example i just gave include a ; after the ) ?
<steell>
i'm looking to create a custom live-cd ISO from a local checkout of nixpkgs master. most of the instructions i see (https://nixos.wiki/wiki/Creating_a_NixOS_live_CD) assumes we're using the system nixpkgs. how can i instead use my local checkout?
<clever>
steell: replace <nixpkgs> with the path to a nixpkgs
<gchristensen>
or in this case, nix-build /path/to/nixpkgs/nixos
<pie_[bnc]>
wait...just started poking at vcv-rack i wonder if i can just use that without even using jack
<steell>
clever, gchristensen: will try that, thanks!
<syzygyzer>
i switched from the standard kernel to latest kernel in 19.09 and now when i start up, systemd hangs on some udev service. systemd-analyze blame tells me its systemd-udev-settle.service. i tried making it with systemctl mask systemd-udev-settle but i get "Failed to mask unit.... already exists and is a symlink to ..."
<syzygyzer>
what is the proper way to mask in nixos? i am a relatively new user
iyzsong has joined #nixos
knupfer has quit [Ping timeout: 248 seconds]
<clever>
zeta_0: thats not a valid string
<clever>
> "double"
<{^_^}>
"double"
<clever>
> ''double-single''
<{^_^}>
"double-single"
<clever>
> 'invalid'
<{^_^}>
error: syntax error, unexpected $undefined, at (string):272:1
<zeta_0>
clever: could you pastbin the echo part, my brain is fried, i will give you some more karma
<mla>
how can i create a conditional import based on architecture, i tried something like: imports = [ "base.nix" ] ++ (if pkgs.stdenv.hostPlatform == "aarch64-linux" then "./aarchspecific" else [])]; but for some reason nixos-rebuild switch tells me that causes an infinite loop?
bogdb has quit [Quit: Leaving]
m1cr0man has quit [Ping timeout: 240 seconds]
<clever>
mla: imports cant depend on pkgs
<clever>
mla: it would be much better to do `config = mkIf (condition) { ... };` within aarch64.nix
<afics>
makefu: I just tested with a new nixos 19.09 vm with just hardware.nix and my paste and it does not work. I don't know what you are doing different to me
<zeta_0>
clever: ok it returned foo
<mla>
clever: hmm it seems like config = mkIf doesnt work either - does this look right to you, this is my aarchspecifc,nix http://ix.io/26la
<pie_[bnc]>
clever: good god i got the thing working somehow
<pie_[bnc]>
i should write a guide for this
<pie_[bnc]>
clever: we need litarate nixos ;P
<zeta_0>
clever: i want to shorten the bash path, do i need programs.bash.promptInit in there?
<mla>
i import that like imports = [./aarchspecific.nix]; and it says its causing infinite recursion
syzygyzer has quit [Remote host closed the connection]
<zeta_0>
clever: could you test out this default.nix file in a nix-shell, i am not sure why the bash code does change anything? https://hastebin.com/unaxuveveg.bash
<clever>
zeta_0: add a `set -x` at the start of the string, and a `set +x` at the end, then pastebin the output of nix-shell
<lovesegfault>
gchristensen: Oh? Who still uses i686 hw?
<pie_[bnc]>
clever: well, not actually sure its disabled yet
<makefu>
afics: https://paste.krebsco.de/QiQJJmau#keepalive , put these in the nixos-shell checkout and run: NIX_PATH=nixpkgs=/path-to/nixpkgs $(nix-build --no-out-link default.nix)/bin/nixos-shell ./vm.nix
mexisme has quit [Ping timeout: 248 seconds]
<mcbride>
hi, Im new to nix and Im trying to use it on macOS..Ive installed a few packages without issue but Im having issues installing MacVim. I ran "nix-env -vvvvv -iA nixpkgs.macvim" and I get the following error output https://gist.github.com/chrismcbride/f30f6decc10678f9269fcf3577f3a2ee ...not quite sure what the next step would be in debugging this
<zeta_0>
clever: which if statement, there is multiple $TERM's?
<clever>
zeta_0: nuke em all!
<gchristensen>
lovesegfault: probably not a lot :)
<zeta_0>
clever: so delete all the if's and fi's? the else's as well?
<clever>
zeta_0: and the condition between the if and then
<clever>
zeta_0: and the then
<clever>
zeta_0: and decide which half of the if statement you want to keep
<DigitalKiwi>
there was a user here the other day with i686 hardware
ebzzry has quit [Ping timeout: 258 seconds]
UndefinedIsNotAF has quit [Ping timeout: 252 seconds]
<zeta_0>
clever: i think all i need is a PS1 which one do i need to keep for bash terminal?
UndefinedIsNotAF has joined #nixos
<zeta_0>
clever: i think the 2nd PS1 right?
<clever>
zeta_0: try each PS1 in a shell, see what each does
lsyoyom has quit [Ping timeout: 265 seconds]
<zeta_0>
clever: what is xterm? i don't think i use that
<pie_[bnc]>
clever: easiest way to apply a patch from a url?
<clever>
zeta_0: xterm is a terminal emulator, that uses X
<clever>
pie_[bnc]: within the stdenv, pkgs.fetchpatch into patches
<pie_[bnc]>
clever: can i do that without hashes
<pie_[bnc]>
clever: its the usual patch from github thing
<clever>
pie_[bnc]: builtins.fetchurl
<pie_[bnc]>
clever: a'ight
h0m1 has quit [Ping timeout: 260 seconds]
johnw has quit [Remote host closed the connection]
h0m1 has joined #nixos
<zeta_0>
clever: how do you lower the length of the shell path in nix-shell? this should be easy to setup, i don't know why it i am struggling to do this
mcbride has quit [Ping timeout: 260 seconds]
<clever>
zeta_0: i just dont bother
<zeta_0>
clever: do you know someone who understands direnv really good, i think that could help me but it is a little complicated?
<gchristensen>
I think there is a #home-manager channel
<zeta_0>
gchristensen: is anyone even on that channel at this time, it is usually empty?
<gchristensen>
I don't know
<zeta_0>
gchristensen: i think i need to give up, this is too frustrating
<evanjs>
It can definitely feel frustrating at times, but with the 6+ months (or however much) time I've spent with NixOS I can definitely say it's been well worth it
<evanjs>
Much less stress than Gentoo was :D
<pie_[bnc]>
clever: its pretty annoying that applications need JACK support. I saw stuff about creating an alsa loopback device for every app or something, I didn't look very carefully. I guess I should write some nixos modules at some point and post them
thomashoneyman has joined #nixos
<thomashoneyman>
is there a way to build a script (writeScriptBin) and also run the result with Nix alone?
<clever>
thomashoneyman: runCommand
<tnks>
I've realized that I'm not sure what "recursive Nix" really is and how it fixes problems that we had with IFDs.
<gchristensen>
it'll run the script inside a nix build sandbox
<thomashoneyman>
right now I write a bash script a la `RUN=$(nix-build ...); $RUN/bin/run`
<thomashoneyman>
thanks!
<thomashoneyman>
checking it out
<thomashoneyman>
ideally i'd like to lint it with shellcheck also, if there's a way to hook in
* tnks
reading the PR now for recursive Nix... but happy to have someone explain highlights.
<thomashoneyman>
ok, i see, writeScriptBin and friends are implemented via runCommand
<thomashoneyman>
with the result being writing the script to the store
inferencerules has joined #nixos
zeta_0 has joined #nixos
bbarker2 has joined #nixos
Lears has joined #nixos
<bbarker2>
Haskellers: running `stack --nix init` for a new project (xmonad config) and getting "error: attribute 'ghc863' missing, at (string):1:43"; I have ghc 8.6.5 in the environment, and `stack --version` reports: 2.1.3.1 x86_64 hpack-0.32.0
<bbarker2>
Is there a way for `stack --nix` to allow newer versions of ghc to be used?
[Leary] has quit [Ping timeout: 268 seconds]
Scriptkiddi has quit [Remote host closed the connection]
das_j has quit [Remote host closed the connection]
Scriptkiddi has joined #nixos
<lovesegfault>
`waiting for the big garbage collector lock...`
das_j has joined #nixos
<lovesegfault>
gchristensen: What does this one mean?
syzygyzer has joined #nixos
<syzygyzer>
i am newish to nixos and trying to get the wifi to work on my new laptop. ive narrowed it down to needing this PR: https://github.com/NixOS/nixpkgs/pull/65091 but idk what the simplest way is for me to just add this PR to my system build and nothing else
<syzygyzer>
i tried just moving to the latest kernel earlier which worked but also overkill
<lovesegfault>
syzygyzer: Are you on NixOS 19.09 or unstable?
<syzygyzer>
19.09
<syzygyzer>
i run a few unstable programs
<lovesegfault>
Ah, you should check whether that change has been backported, or else yeah: latest kernel
<syzygyzer>
& apparently my wifi card started being supported with kernel 5.1
<lovesegfault>
syzygyzer: Dell XPS?
<syzygyzer>
latest kernel added a 90 second wait to my bootup time which i spent another couple hours trying to resolve before deciding to just try to install the firmware and nothing else lol
<zeta_0>
where would i place this export command for nix-shell to automatically run it? export PS1='\n\[\033[1;32m\][\[\e]0;\u@\h: \W\a\]\u@\h:/\W]\$\[\033[0m\]'
<syzygyzer>
dell precision
<zeta_0>
would i need a shellHook for this?
<lovesegfault>
syzygyzer: Ah, nice, and yeah I had the same issue
<infinisil>
zeta_0: What does shellHook do?
<zeta_0>
infinisil: i don't know, i am lost, that is why i am asking this qustion, i just need this command to be automatically executed by nix-shell so i don't have such a long path, that gets very annoying after a while
<zeta_0>
infinisil: i gave up on direnv, it was to frustrating
<infinisil>
Does that sound like it would solve the problem?
<infinisil>
And in any case, just give it a try
<syzygyzer>
@lovesegfault is it possible for me to add the firmware to the stable kernel? or does the firmware itself require 5.1? i dont know much about kernels and not really sure what backporting means
<zeta_0>
infinisil: thanks, i'll give it another try
<tnks>
Okay, so I see now what recursive Nix is, and how it's different, but similar, to IFD. But I'm still not sure which failings of IFDs go away, and which ones may still remain.
felixfoertsch has quit [Ping timeout: 248 seconds]
felixfoertsch23 has joined #nixos
<zeta_0>
infinisil: i have a default.nix file that i use for things like yesod development, i am just trying to fix small little things like this
<inferencerules>
i'm having some trouble getting the emacs overlay set up for use with nixos-rebuild, and finding the official documentation rather unenlightening; i have the overlay defined in nixpkgs.overlays within configuration.nix and i've added the configs from the wiki entry for using nixpkgs.overlays from configuration.nix as <nixpkgs-overlays> in the NIX_path, but nixos-rebuild is still trying to pull the
<inferencerules>
older emacs-26. is there a nice walkthrough of this feature somewhere?
<infinisil>
inferencerules: nixpkgs.overlays definitely applies the overlays to the pkgs you get in NixOs modules. I suspect your overlay might not be overriding the right thing
aw has quit [Quit: Quitting.]
spacefrogg has quit [Quit: Gone.]
aw has joined #nixos
spacefrogg has joined #nixos
mexisme has joined #nixos
ddellacosta has quit [Ping timeout: 258 seconds]
<zeta_0>
infinisil: is there some instructions for inserting a shellHook in a default.nix, it keeps throwing syntax errors? https://hastebin.com/nenaxuwoku.bash
<infinisil>
zeta_0: Whatever error you're getting, it's not a syntax error, because that file is valid Nix code. It's just that developPackage doesn't support setting derivation attributes like that, so you'll get an evaluation error
<infinisil>
zeta_0: However from looking at the implementation of developPackage, I believe you can do this: `developPackages { ...; modifier = drv: drv.overrideAttrs (old: { shellHook = "..."; }); }`
<infinisil>
Ah you already have a modifier set, didn't notice that
syzygyzer has quit [Remote host closed the connection]
<infinisil>
zeta_0: Your previous modifier function looked like `drv: <something>`, now to set shellHook you need to change that to `drv: (<something>).overrideAttrs (old: { shellHook = "..."; })`
* lovesegfault
still doesn't understand what a derivation is
<infinisil>
lovesegfault: Basically just instructions for how to generate a path with certain contents
<infinisil>
zeta_0: Nope that's not right. I mentioned "Your previous modifier function looked like `drv: <something>`" What is your modifier function?
<infinisil>
What was it previously I mean?
<zeta_0>
infinisil: so i need to wrap something in parenthesis, right?
<zeta_0>
infinisil: sorry i am little brain dead right now, i want get this done before i fall asleep
<infinisil>
lovesegfault: Oh, nevermind, "Only the project members, administrators, and accounts with cancel-build privileges can perform this operation."
<infinisil>
I assumed I could cancel with a "Cancel" button :/
<infinisil>
How silly of me!
<lovesegfault>
lol
ebzzry has quit [Read error: Connection reset by peer]
Fzer0 has quit [Quit: Connection closed for inactivity]
lord| has joined #nixos
<lovesegfault>
A grownup restarted it!
<lovesegfault>
Was it you gchristensen?
<zeta_0>
infinisil: i was able to go into nix-shell without any errors, but it still did not shorten bash's path? https://hastebin.com/nasojatoha.bash
<infinisil>
Haskell infra being haskell infra, the package derivations aren't used for shells, so this is necessary
Supersonic112 has joined #nixos
Supersonic has quit [Disconnected by services]
Supersonic112 is now known as Supersonic
<infinisil>
Or not
<infinisil>
Wait no that should work
<zeta_0>
infinisil: no, it did not shorten the path when went into a nix-shell
<infinisil>
Hmm..
<zeta_0>
infinisil: how strange, configuring something like this should't be that difficult
<infinisil>
zeta_0: But did it print the `hi`?
<infinisil>
Well
<infinisil>
If you add `echo hi`
<infinisil>
Does it print it?
siiky has quit [Ping timeout: 248 seconds]
<zeta_0>
infinisil: oh, when i enter a nix-shell in elisp it doesn't work but when i enter it in a regular bash terminal it works, my mistake
<infinisil>
Ah
<zeta_0>
infinisil: i don't think i am going to use elisp anymore it is missing to much functionality, that sucks because it is so convient to quickly enter it through emacs, oh well, bash it is
<zeta_0>
infinisil++
<{^_^}>
infinisil's karma got increased to 176
<infinisil>
You mean eshell?
<zeta_0>
infinisil: yes
<infinisil>
Hm yeah
<lovesegfault>
nixos-unstable release incoming
<zeta_0>
infinisil: been struggling for 4 months now with nix but i am hanging in there(keep swallowing nix pills)
<zeta_0>
how many years have you guys been using nix?
<{^_^}>
[nixpkgs] @thefloweringash opened pull request #76922 → perl: fix configure phase for Aarch32 → https://git.io/Jepl8
<clever>
i first joined #nixos on `Thu Jun 25 11:13:00 2015`
<lovesegfault>
clever: Wow
<zeta_0>
clever: close to 5 years now, wow
<clever>
yeah
<HedgeMage>
zeta_0: Less than one year for me.
endformationage has quit [Quit: WeeChat 2.6]
<zeta_0>
HedgeMage: cool
* HedgeMage
puts on her newb hat
<HedgeMage>
(kind of refreshing at my age, come to think about it)
orivej has joined #nixos
* lovesegfault
waits for channel to progress
<HedgeMage>
lovesegfault: Progress to what?
<lovesegfault>
HedgeMage: nixos-unstable has been stuck for a couple days
<lovesegfault>
so for the last two days I've been babysitting it trying to unstuck
<lovesegfault>
and now I wait for a release, i.e. for the channel to progress to a newer commit
<thomashoneyman>
does anyone have a reference to how I might use callPackage when an input is not in the top level of nixpkgs?
tardigrad has left #nixos [#nixos]
<thomashoneyman>
i suppose i could have the input just be that subset, ie nodePackages
<thomashoneyman>
but i'd rather have the specific dependency listed
<thomashoneyman>
this seems like a reasonably common situation
<ivan>
there is something wrong with master since a few weeks ago, lot of service restarts are followed by `error: cannot connect to daemon at '/nix/var/nix/daemon-socket/socket': Connection refused`
<lovesegfault>
Mic92: Wait, nvm, the hydra job finally went through it seems
<lovesegfault>
Sorry to ping you for no reason :)
<Mic92>
You are welcome
Emantor has joined #nixos
<lovesegfault>
Come on nixos-unstable please progress
xkapastel has joined #nixos
<evils>
should i give up using git ls-remote and nix-prefetch-url in nix-shell --pure?
<evils>
s/using/trying to use/
mounty has quit [Ping timeout: 258 seconds]
iyzsong has quit [Ping timeout: 248 seconds]
szicari has quit [Ping timeout: 248 seconds]
FRidh has joined #nixos
<lovesegfault>
Why does the channel take so long to progress after the hydra eval is finished?
orivej has joined #nixos
szicari has joined #nixos
ent has joined #nixos
<LnL>
the update runs periodically, it doesn't get triggered
<evils>
lovesegfault: seems like a cronjob has to run, then things like generating ISOs has to be done, command-not-found index has to be updated
captn3m0 has quit [Ping timeout: 258 seconds]
<lovesegfault>
LnL, evils I see, does anyone know the period?
<meatcar>
Are there any conventions around tagging a package in nixpkgs as outdated, for the maintainer to update? Or should I just update the version in nixpkgs and merge-request it myself?
mexisme has quit [Ping timeout: 245 seconds]
o1lo01ol1o has joined #nixos
<evils>
meatcar: i believe making a pull request to update it is the preferred way to deal with that, you can tag the maintainer in that, if it's difficult to update, making an issue for it is probably the way to go
<LnL>
lovesegfault: looks like it's 10min
<evils>
LnL: where did you find that?
<lovesegfault>
meatcar: The latter, if you don't know how then open an issue
thomashoneyman has quit [Ping timeout: 260 seconds]
<LnL>
not sure I understand the question, but ./. + "/nix/deps" is the same as ./nix/deps
<aveltras>
i've just found a workaround
<aveltras>
by passing "toString ./nix/deps" instead of ./nix/deps
<aveltras>
the goal was to factor out all functions relative to project management in some external dependencies but, it the functions provided by this, keep all paths relative to the current project
nexgen has quit [Remote host closed the connection]
carlosdagos has joined #nixos
laikq has joined #nixos
<Orbstheorem>
Is there a tool to “easily” view version changes across generations?
<Orbstheorem>
A trivial solution would be to parse and diff `nix-store -qR /nix/var/nix/gcroots/profiles/system-*-link/`, but maybe somebody wrote it already x)
<tilpner>
> let p = pkgs; in map (name: pkgs.${name}) ["hello"] # aveltras
<{^_^}>
[ <CODE> ]
<tilpner>
> :p let p = pkgs; in map (name: pkgs.${name}) ["hello"] # aveltras
<{^_^}>
anonymous function at /var/lib/nixbot/nixpkgs/master/repo/pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'hash', at /var/lib/nixbot/nixpkgs/master/repo/pkgs/development/inter...
<tilpner>
Well, fine, eval it locally
<tilpner>
And yes, p.${name} instead of pkgs.${name}, but that's up to you
<aveltras>
ok thanks tilpner
<aveltras>
seems to work for the nix side of the problem
<tilpner>
If you want less weird syntax, use builtins.getAttr "hello" pkgs
zebrag has joined #nixos
Guest43194 has quit [Quit: WeeChat 2.7]
<aveltras>
i'd like to support possibly multiple packages here but seems that would work fine for only one yes
<tilpner>
No, that still works with map, I mentioned it as an alternative to .${foo}
<tilpner>
Consider lib.getAttrFromPath if you want nested access from strings
misuzu has quit [Remote host closed the connection]
syd has quit [Remote host closed the connection]
m1cr0man has joined #nixos
<m1cr0man>
Hey folks. I'm trying to reinstall my hetzner box because the boot usb key died q_q I'm struggling to build a kexec image that loads the 0.8.2 zfs modules. I can see from the nixos-generate output that it is definitely installing zfs-user-0.8.2 but when I kexec and run modinfo zfs it is 0.7.13
<m1cr0man>
I guess my question is, what is the correct way to tell nix to use zfs unstable/0.8.2?
<noonien>
hmm, is it possible to find why i have installed 5 different versions of gcc?
<noonien>
can i get the derivation attributes from which the hash was computed?
<noonien>
so i can diff the differences between them
<tilpner>
m1cr0man: Even stable (19.09) has 0.8.2 right now, no need to go with boot.zfs.enableUnstable (but that's how you would do it otherwise)
<tilpner>
m1cr0man: Check (or paste) the nixos-generators (which I assume you mean) inputs for recent nixpkgs versions
<lassulus>
uh that could be a bug in nixos-generators
spacekookie has quit [Quit: **agressive swooshing**]
<{^_^}>
[nixpkgs] @Lassulus pushed commit from Michel Weitbrecht to master « python3.pkgs.graph-tool: 2.27 -> 2.29 »: https://git.io/Jepui
puzzlewolf has joined #nixos
<mkaito_>
anyone here familiar with how amazon bills for AMIs? I'm using the nixpkgs machinery that builds a vhd, uploads to S3, imports that into a snapshot, and then creates a few AMIs from that in different regions.
<tilpner>
m1cr0man: That warning suggests your NIX_PATH is being ignored
<mkaito_>
a few questions I have with that: can I safely transition the data on S3 to something like glacier to minimize storage costs, or is that data actively used when spinning up instances? Also, google tells me that "S3 backed AMI" are only billed for the storage taken up on S3, but I'm not sure this correctly describes the process.
<tilpner>
m1cr0man: Try with -I, as suggested in the README
<m1cr0man>
tilpner tried that and the warning disappeared. That's odd because I essentially did what the "Using a particular nixpkgs" section tells you to (export NIX_PATH)
<tilpner>
m1cr0man: Please check if that changes the installed zfs version
<m1cr0man>
tilpner: Yep going to try nit now, give me ~5 minutes
Chiliparrot has joined #nixos
tilpner_ has joined #nixos
tilpner has quit [Ping timeout: 258 seconds]
tilpner_ is now known as tilpner
laika has joined #nixos
Rusty1 has joined #nixos
<m1cr0man>
Is there a way I can add paths as-is to the nix store? I'm already kexec'd on my server and the kexec files need to go into the nix store
<infinisil>
m1cr0man: In nix code just "${./the-path}"
rogue_koder has quit [Quit: Konversation terminated!]
<m1cr0man>
Yeah neither of those will do it in this case, I've compiled the kexec on another machine and the output of it is a tar containing a nix folder, and a script with hardcoded paths
<m1cr0man>
maybe i can just edit these paths..
gustavderdrache has joined #nixos
<m1cr0man>
ah, nope, because all the elf paths are wrong too. Ok gotta build locally then
<tilpner>
m1cr0man: Are you trying to kexec on NixOS?
<m1cr0man>
yes but the kexec im extracting is from another machine
<tilpner>
That shouldn't matter
xkapastel has quit [Quit: Connection closed for inactivity]
<tilpner>
Can you try moving the hosts /nix out of the way?
<m1cr0man>
but all the paths are absolute, it doesn't work. In the README it explains the contents of the tar must be copied to root
<tilpner>
Why is it a problem that the paths are absolute?
FRidh has joined #nixos
<m1cr0man>
because they point to /nix/store, I can't copy the missing files to the right place. It just doesn't work. This kexec tar is meant to be used on a non-nix OS
<tilpner>
But can't you just mv /nix /old-nix before extracting?
<tilpner>
If not, you'll have to explain "just doesn't work"
<m1cr0man>
Ok so the steps for using the kexec from nixos-generate are 1) build it 2) copy generated tar to target machine 3) extra to root of filesystem and run. I can't do that on a NixOS target machine because it is creating a nix folder, and all the scripts in this tar have absolute paths. I can extract to a different folder and even try chroot .
<m1cr0man>
/kexec_nixos but that also fails with "No such file or directory", because all the dynamic libraries the binaries are linked to are also not there :P
<tilpner>
You still haven't explained why you can't move /nix out of the way
dozn__ has joined #nixos
<m1cr0man>
it's read only?
<m1cr0man>
And that will surely break the shell I'm currently in
<m1cr0man>
... yep, that was a bad idea
<tilpner>
mount -o remount,rw /nix or something like that
<tilpner>
Then it should be able to extract right into it
<tilpner>
No need to move or delete it anymore
<m1cr0man>
yeah that isn't allowed either I tried that. I'd give you the error but the machine is dead in the water now
<tilpner>
Pretty sure that is allowed
dozn has joined #nixos
laika has quit [Remote host closed the connection]
civodul has joined #nixos
laika has joined #nixos
dozn_ has quit [Ping timeout: 265 seconds]
Naptra has joined #nixos
dozn_ has joined #nixos
dozn__ has quit [Ping timeout: 240 seconds]
bbarker2 has quit [Ping timeout: 268 seconds]
dozn has quit [Read error: Connection reset by peer]
rogue_koder has joined #nixos
* tilpner
netcat kexec_tarball to vm
<tilpner>
m1cr0man: That works
<tilpner>
m1cr0man: Make sure to remount /nix/store instead of /nix
laika has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @NeQuissimus pushed 3 commits to release-19.09: https://git.io/JepgI
elux has quit [Quit: leaving]
orivej has quit [Ping timeout: 260 seconds]
meck has quit [Quit: WeeChat 2.7]
LLED2_3 has joined #nixos
<makefu>
afics: yep exactly
<makefu>
what you also see very often is rename 'services.keepalived' in your import to 'services.keepalived2'
LLED2_2 has quit [Ping timeout: 258 seconds]
steevveen has joined #nixos
drakonis1 has quit [Quit: WeeChat 2.7]
<afics>
makefu: I intend to upstream my changes, so I'd like to keep it as close to the original as possible
jmeredith has joined #nixos
ng0 has quit [Ping timeout: 265 seconds]
<makefu>
afics: that is great! afics++
<{^_^}>
afics's karma got increased to 1
<steevveen>
Hi! I have got a default.nix file from someone, and with nix-build it compiles a project that I can launch if I go in ../result/bin . Now, what is the command so as to install it in my nixos just like other package accessible on the command line ?
kenjis has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @lourkeur opened pull request #76938 → nixos/gnunet: Add types to the options → https://git.io/Jep2v
<{^_^}>
[nixpkgs] @lourkeur opened pull request #76939 → nixos/tsocks: Add types to the options → https://git.io/Jep2f
kenjis has joined #nixos
<eoli3n_>
when creating a whole encrypted pool on nfs, should i use "-O mountpoint=none" ?
<eoli3n_>
exemple without encryption from wiki : zpool create -O mountpoint=none -R /mnt rpool $DISK-part1
ng0 has joined #nixos
ng0 has joined #nixos
ng0 has quit [Changing host]
<eoli3n_>
exemple with encryption from wiki : zpool create -o ashift=12 -o altroot="/mnt" -O encryption=aes-256-gcm -O keyformat=passphrase zroot /dev/sdxy
steevveen has quit [Remote host closed the connection]
<tilpner>
eoli3n_: Yes to mountpoint=none
<eoli3n_>
thx tilpner :)
<tilpner>
(And you scared me with the "create a zpool on nfs storage" typo)
<ptrcmd>
and firefox is installed by adding firefox to environment.systemPackages
<ptrcmd>
in configuration.nix
rauno has quit [Ping timeout: 248 seconds]
cosimone_ has joined #nixos
<ptrcmd>
anything I missed here?
<softinio>
gchristensen: hope you are well. I would like to contribute regularly to nixos how does one become a code owner so I can help with reviews and doing more?
<ptrcmd>
and I also restarted firefox
<simpson>
ptrcmd: AFAICT you've done everything right, but I don't know what's wrong. You might need to read the code behind the `enableAdobeFlash` flag.
cosimone has quit [Ping timeout: 265 seconds]
<simpson>
(Didn't Firefox recently, in their latest release, remove the compatibility layer for hosting Flash? Maybe you need an older Fx version.)
<__monty__>
softinio: You don't need to be a codeowner to get notifications btw. If you're a maintainer for an expression ofborg notifies you.
<ptrcmd>
I am using firefox 71
<{^_^}>
[nixpkgs] @Pamplemousse opened pull request #76941 → bash_unit: init at 1.6.1 → https://git.io/Jep2X
<mankyKitty>
Heya, when in a nix-shell, is there something extra required to make cabal acknowledge the provided `hsc2hs` rather demanding it be downloaded and built ? I cannot seem to make it work
tilpner has quit [Quit: tilpner]
bvdw has quit [Quit: bvdw]
bvdw has joined #nixos
<{^_^}>
[nixpkgs] @prusnak opened pull request #76945 → python.pkgs.tensorflow: fix build with cudatoolkit 10.2 → https://git.io/JepwZ
Bryophyllum has quit [Quit: Bryophyllum]
chloekek has joined #nixos
Keith[m] has joined #nixos
<Keith[m]>
I'm trying to modify the soulseekqt derivation from nixpkgs, but I can't even build the unmodified one. I'm using the following command to build it: nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
<Keith[m]>
and it just says anonymous function called without required argument mkderivation
<Keith[m]>
does anyone know what I'm doing wrong?
o1lo01ol1o has joined #nixos
smatting has quit [Ping timeout: 268 seconds]
braingain has joined #nixos
m1cr0man has joined #nixos
<m1cr0man>
Hey folks. Sorry my laptop died earlier and I didn't report back. Got kexec to work and I'm getting my host back online. Thanks for the help :) There's nothing wrong with nixos-generators lassulus, it turns out that I had used clever's repo on its own before and I was copying the wrong file. I feel pretty stupid for that, but sure I know better
<eoli3n_>
i git clone my nix-config in /mnt/etc/nixos
<gchristensen>
not so strange :)
<eoli3n_>
just a sec, need some explaination
<eoli3n_>
so configuration.nix is under /mnt/etc/nixos/hosts/$HOST/configuration.nix
<gchristensen>
yeah, makes sense -- looks fine
<eoli3n_>
inside i import ./hardware...nix
<eoli3n_>
a sec :
<eoli3n_>
:)
<gchristensen>
ok
<eoli3n_>
what's strange is that if i generate config in /mnt/etc/nixos, it doesnt find /mnt/etc/nixos/hardware...nix
<eoli3n_>
so i need to create that link
<eoli3n_>
that's because nix does not evaluate current path ?
<gchristensen>
nix resolves the symlink before evaluating the file. your configuration.nix probably has imports = [ ./hardware-configuration.nix ] ... and that relative reference is relative based on where the configuration.nix actually is
<eoli3n_>
ok so that's it
<eoli3n_>
thx gchristensen
<gchristensen>
so just delete the symlink, and move the hardware-configuration.nix in to /mnt/etc/nixos/hosts/$HOST/
<eoli3n_>
gchristensen: yep i gitignored that file
<gchristensen>
no need to gitignore it, no need to have it
<{^_^}>
[nixpkgs] @thoughtpolice merged pull request #76762 → pythonPackages.unicorn: redesign to become a wrapper package around unicorn-emu → https://git.io/JeAxM
<{^_^}>
[nixpkgs] @thoughtpolice pushed 2 commits to master: https://git.io/JepKA
<Raito_Bezarius>
How can we set up remote builder for non-NixOS machines?
<Raito_Bezarius>
I looked to the wiki and they says basically just adapt NixOS config to Nix options
<tilpner>
Raito_Bezarius: Set builders in nix.conf
<Raito_Bezarius>
tilpner: what is the syntax? is there some docs somewhere?
<tilpner>
I'm not really sure, sorry, I used the module to set mine
<__monty__>
Raito_Bezarius: Yes, documented in the nix manual : )
<tilpner>
"builders A semicolon-separated list of build machines, in the format of nix.machines."
<tilpner>
That's what nix --help-config has to say, but what is nix.machines?
<lovesegfault>
I can see that I have i3lock in my nix store, but idk why, how can I trace this? i.e. how do I find what I have enabled that causes this dep?
<lovesegfault>
cc. gchristensen
dingenskirchen has quit [Ping timeout: 248 seconds]
dingenskirchen1 is now known as dingenskirchen
h0m1 has quit [Quit: WeeChat 2.7]
ddellacosta has quit [Ping timeout: 265 seconds]
alex`` has joined #nixos
<gchristensen>
lovesegfault: I'm going to let somebody else handl ethis :)
<lovesegfault>
:D
<__monty__>
Maybe why-depends?
h0m1 has joined #nixos
<lovesegfault>
__monty__: Yeah, but that's the beginning; what do I point why-depends to?
<lovesegfault>
❯ nix why-depends i3lock ???
thomashoneyman has quit [Ping timeout: 268 seconds]
<lovesegfault>
❯ nix why-depends -a /run/current-system nixos.i3lock
<lovesegfault>
oh
<__monty__>
The store path?
nix-newbie64 has joined #nixos
<nix-newbie64>
This is a very domain specific question but has anyone attempted to build rstudio server with nix?
h0m1 has quit [Client Quit]
<nix-newbie64>
I am playing around with nix and I think I can convince my team to use it but it won't go far without rstudio server
<nix-newbie64>
I may be also interested in attempting to package it although it may be more than I can chew
lovesegfault has quit [Quit: WeeChat 2.7]
alex`` has quit [Ping timeout: 258 seconds]
<Raito_Bezarius>
nix-newbie64: apparently, rstudio is already packaged
<Raito_Bezarius>
maybe it's possible to from this to package rstudio server
<Raito_Bezarius>
to go from this*
<manveru>
doesn't seem to be packaged yet, but given that there are packages for other distros i don't think it'd be a ton of work...
<Raito_Bezarius>
well it depends whether it's a proprietary weird binary
<Raito_Bezarius>
you'll have to patch it, etc, it's a bit annoying AFAIK
<Raito_Bezarius>
that being said, nix-newbie64 why do you need to move all your team to NixOS?
<Raito_Bezarius>
you can go partially for nixos and gradually adopt it so that rstudio server will be packaged once you go full nix
<Raito_Bezarius>
(or use a non-NixOS distro with Nix support, like Arch Linux)
acowley has quit [Ping timeout: 265 seconds]
<Raito_Bezarius>
(so that does not prevent you from having some impure packages and a FHS)
<Raito_Bezarius>
(but you won't have this very sweet feature of nixos-rebuild && configuration.nix)
Cale has quit [Ping timeout: 260 seconds]
<manveru>
looks like it builds from the same source as rstudio?
hpfr has quit [Ping timeout: 260 seconds]
<tbenst[m]>
I think server is proprietary? I'd probably start by trying `steam-run`. the nix rstudio works great on ubuntu, too. is rstudio-server source available?
evils has quit [Remote host closed the connection]
<o1lo01ol1o>
I have a function writeFooConfig that writes a config file to the nix store with writeFile. I have many of these to make, so I map writeFooConfig to make all of them. I assume this is now a list of paths to the nix store. In another derivation, I need to create symbolic links to each of these files in relative directory during `buildCommand`; what's the most ideomatic way to do this?
<{^_^}>
[nixpkgs] @jtojnar opened pull request #76955 → docbook-xsl: Fix reproducibility when building docs → https://git.io/JepPt
<manveru>
o1lo01ol1o: buildEnv maybe?
lord| has quit [Remote host closed the connection]
evils has joined #nixos
lord| has joined #nixos
NoctisLabs has quit [Quit: WeeChat 2.7]
dansho has joined #nixos
<o1lo01ol1o>
i'm thinking maybe symlinkJoin will do something I want . . . I guess the contents will be a symlink to each of the files, could I just '' ln -s ${theSymlinkJoined} foo/''?
Rusty1 has quit [Remote host closed the connection]
<elux>
gchristensen: that is amazing and simple. so cool. thank you
<gchristensen>
o1lo01ol1o: it was an lol at grumble's quit message
<elux>
does anyone know if its possible to turn off efifb for a specific gpu? i have 2 in my system and would like to ensure efifb is off for one
<elux>
or alternatively, could i tell the kernel/boot-loader to us a specific gpu?
<o1lo01ol1o>
gchristensen: damn, thought you had good feeback
Rusty1 has joined #nixos
<elux>
i use systemd boot loader btw..
chloekek has joined #nixos
<Keith[m]>
how do I manually build a nixpkgs derivation that I copied from the github repo?
<Keith[m]>
when I run nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }' it always gives me an error about an anonymous function called without the required arguments
<Keith[m]>
and I have verified that everything works when I use nix-shell -p
lord| has quit [Read error: Connection reset by peer]
drakonis has joined #nixos
lord| has joined #nixos
fendor has joined #nixos
amfl has quit [Ping timeout: 265 seconds]
jumper149 has joined #nixos
<elux>
gchristensen: im getting the error error: The option value `boot.kernelPatches.[definition 1-entry 1]' in `/etc/nixos/hardware-configuration.nix' is not of type `attribute set'.
<elux>
i tried, `kernelPatches = [ ./navi-reset.patch ];`
<ryantm>
elux: kernelPatches has type list of attribute sets.
<elux>
inherit, super, override, etc.. its not quite adding up yet, i haven't spent time with this language
<elux>
not so much voiila for me
amfl has joined #nixos
h0m1 has joined #nixos
<Raito_Bezarius>
the "and voila" was due to ryantm basically giving the answer
<Raito_Bezarius>
if you look to his link, you can see the way patches are defined
<Raito_Bezarius>
which is indeed { name = <string>; patch = <path> }
<elux>
hehe ah yes. this seems to be building properly, but i dont know if it correct.. `kernelPatches = [ { name = "navi-reset.patch"; patch = ./navi-reset.patch; } ];`
<elux>
the kernel is rebuilding tho, i can see it happening now
<Raito_Bezarius>
it is correct, otherwise you'll end up with a error somewhere
<elux>
amazing, cant wait to learn more about nix. i know its awesome and powerful .. would be nice to finally understand more of it
elux has quit [Remote host closed the connection]
fendor has quit [Quit: Leaving]
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
elux has joined #nixos
h0m1 has quit [Quit: WeeChat 2.7]
astrofog has quit [Quit: Quite]
h0m1 has joined #nixos
<elux>
the kernel patch worked great. i love how easy that was to apply + rebuild
<ryantm>
elux: also it's easy to rollback if your kernel patch breaks stuff!
<elux>
yea, very nice feature
drakonis has quit [Ping timeout: 260 seconds]
<elux>
btw, another basic question.. what is the name of the boot sequence that goes from the loader to once it loads the kernel? specifically the stage when it switches my graphics from what is low resolution and looks like DOS, to something high-resolution
<elux>
i notice once it runs `udev.. dm_mod..` then my monitor goes black, then switches to a higher dpi or something
<clever>
Raito_Bezarius: mixed content, its trying to load css over http, not https
<clever>
Raito_Bezarius: i'll have a look into that sometime this weekend
<Raito_Bezarius>
elux: it sounds like you're mentioned the "before modeset"
<Raito_Bezarius>
you're mentioning *
<Raito_Bezarius>
also called kernel mode setting (KMS)
<Raito_Bezarius>
this is nixos-independent, it is something you can configure at multiple levels
<Raito_Bezarius>
some people don't care, some people care and want mode setting as early as possible
<elux>
"want mode setting" does systemd boot support this mode setting?
<elux>
so i could get into the higher resolution (i presume this is call kms) sooner?
<Raito_Bezarius>
it sounds like you can use UEFI to do this
<elux>
my system has 2 graphics cards, and im having a bit of an issue in that on boot the boot loader is usually good about picking the primary card, but then when it switches mode, it often gets lost and ends up switching the mode to the other gpu, its quite annoying
<Raito_Bezarius>
i'm no expert unfortunately and I don't have 2 GPUs, but I guess what controls everything would be efifb
<Raito_Bezarius>
so you should try to look "dmesg | grep fb" for example to see what is going on
<Raito_Bezarius>
and focus your efforts on configuring efifb to what you want ™
visitor has joined #nixos
<elux>
wonderful, that is very helpful.
<elux>
ive also read about vesafb .. what is vesa vs efifb ?
<Raito_Bezarius>
vesafb is another implementation of efifb for non-UEFI systems
<Raito_Bezarius>
<stuff>fb are framebuffers implementations which enables you to have some graphics in the console
<elux>
ive read some people recommend turning off efifb completely, i will give this a try, but ideally i can turn it off on a specific gpu, or tune it somehow, i will do more searching
<Raito_Bezarius>
elux: what are you planning to do with your 2 GPUs?
<elux>
thanks though, piecing together the mechanics help me understanding this
<Raito_Bezarius>
some usual scenario is to GPU passthrough the second to some VM
<Raito_Bezarius>
don't forget in this case to use intel_iommu=on for some cases
<elux>
Raito_Bezarius: single desktop / monitor, and running linux as host with windows10 and macosx as kvm/qemu systems with gpu passthrough
thc202 has quit [Ping timeout: 248 seconds]
<elux>
yep, i have the gpu passthrough working :) its pretty sweet. its just that when i boot up my computer, i have to turn it on and off multiple times before it selects the right gpu to load on the host, lol.. super annoying