<boxscapeR>
is there something like realpath that I can use to get the path a symlink actually points to?
<drakonis>
hmm, how do i find the list of licenses?
<drakonis>
nevermind that
<kalbasit[m]>
is it possible to `nixos-install` from a 64bit system onto a mountpoint 32bit? The mountpoint is a CF card for an embedded router that does not support booting from USB
acarrico has joined #nixos
Ariakenom has quit [Quit: Leaving]
b has quit [Ping timeout: 244 seconds]
<infinisil>
boxscapeR: readlink
<infinisil>
bpye: Depends on what you need, you might have to change nixpkgs for being able to do it
b has joined #nixos
<boxscapeR>
infinisil uhm, are you saying the command line program readlink? Because I'm trying to do it inside a nix expression
<bpye>
infinisil Fair enough, that works with me, I can just have a local copy and pass it to nix-rebuild can't I?
<{^_^}>
[nixpkgs] @zimbatm merged pull request #49334 → buildRubyGem: Provide manpages for Ruby gems → https://git.io/fxH55
<{^_^}>
[nixpkgs] @zimbatm pushed commit from @manveru to master « buildRubyGem: Provide manpages for Ruby gems (#49334) »: https://git.io/fxQBN
<{^_^}>
[nixpkgs] @zimbatm closed pull request #34548 → bundler app: add support for man pages → https://git.io/vNA9k
sigmundv has joined #nixos
sophiag has left #nixos ["ERC (IRC client for Emacs 26.1)"]
acarrico has quit [Ping timeout: 246 seconds]
haitlah has quit [Remote host closed the connection]
<drakonis>
is there any decent tutorial on packaging python modules?
thc202 has quit [Ping timeout: 246 seconds]
<boxscapeR>
is there a way to specify allowUnfree directly in the home-manager config file?
<boxscapeR>
I'm trying to create both config.nix with it and install an unfree program, which doesn't work if you don't already have config.nix with allowUnfree
<steveeJ>
boxscapeR: probably in the nixpkgs.config attrset
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fxQRp
o1lo01ol1o has quit [Remote host closed the connection]
Mr_Keyser_Soze has quit [Ping timeout: 245 seconds]
sb0 has quit [Quit: Leaving]
ryantrinkle has joined #nixos
slack1256 has joined #nixos
<slack1256>
Is there a option to boot with cgroup v2 only?
<elvishjerricco>
How do you compose two functions `g . f` without losing the `builtins.functionArgs` of `f`?
<Myrl-saki>
elvishjerricco: You can use sets as functions with _functor.
<Myrl-saki>
elvishjerricco: So `compose = g: f: { inner = f; _functor = x: self: g (f x); };` or something.
<Myrl-saki>
Or is that too ugly?
<elvishjerricco>
Myrl-saki: I think you're solving something else. I'm trying to write a function `compose` such that `builtins.functionArgs (compose g f) == builtins.functionArgs f`
<elvishjerricco>
Oh, you're suggesting just keeping `inner` as a side channel and manually diverting to it when necessary
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to staging: https://git.io/fxQ0H
<Myrl-saki>
elvishjerricco: Something like that, yeah.
<Myrl-saki>
I haven't tried functionArgs tho.
<elvishjerricco>
Unfortunately I need it work with builtins.functionArgs specifically
<Myrl-saki>
Oh, I just checked what functionArgs does. Hm.
<Myrl-saki>
Yeah, that *does* seem difficult.
<elvishjerricco>
Basically trying to write something that wraps an arbitrary NixOS module with `mkDefault`, but the functionArgs of the module have to be preserved otherwise the module system won't pass them.
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
b has quit [Ping timeout: 246 seconds]
sir_guy_carleton has quit [Quit: WeeChat 2.2]
o1lo01ol1o has joined #nixos
Lisanna has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slack1256 has quit [Ping timeout: 264 seconds]
mayhewluke has quit [Ping timeout: 240 seconds]
mayhewluke has joined #nixos
o1lo01ol1o has quit [Ping timeout: 252 seconds]
hamishmack has joined #nixos
endformationage has quit [Quit: WeeChat 1.9.1]
Mr_Keyser_Soze has quit [Ping timeout: 240 seconds]
Mr_Keyser_Soze has joined #nixos
o1lo01ol1o has joined #nixos
aleph- has quit [Ping timeout: 245 seconds]
<Lisanna>
OK, I'm trying to add a hack to nix that will let me add a file to the nix store, but with a path (hash) that I specify.
<Lisanna>
here's what I've come up with so far:
<Lisanna>
1) LocalStore::addToStore the file
<Lisanna>
2) queryPathInfoOld on the resulting path
<Lisanna>
*LocalStore::queryPathInfoOld
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
<Lisanna>
3) call LocalStore::addToStore again, but the variant that accepts a ValidPathInfo object, with the "StorePath" property edited to be the path I want, and everything else left the same
reinzelmann has joined #nixos
jasongrossman has joined #nixos
Fare has joined #nixos
<Fare>
Hi. I'm trying to upgrade a nixos installation to 18.09, and I get this error: error: nix-repl has been removed because it's not maintained anymore, use `nix repl` instead. Also see https://github.com/NixOS/nixpkgs/pull/44903
<Ralith>
have you tried removing nix-repl from your configuration?
<Fare>
I didn't know I had it.
<Fare>
Thanks!
jD91mZM2 has quit [Quit: WeeChat 2.2]
ashkitten has quit [Quit: WeeChat 2.2]
aither has joined #nixos
alienpirate5 has joined #nixos
<alienpirate5>
nixos is great
<jluttine>
any ideas what's wrong? if i open nix-shell without --pure, i can run unit tests successfully, but with --pure i get errors like: "UnicodeEncodeError: 'ascii' codec can't encode character u'\u0301' in position 70: ordinal not in range(128)"
<jluttine>
so what could i be missing from the pure environment..
<jluttine>
(python package unit tests)
jackdk has quit [Ping timeout: 246 seconds]
<jluttine>
i tried setting locale but it didn't seem to help
adamantium has joined #nixos
o1lo01ol1o has joined #nixos
<jluttine>
oh! figured it out! need glibcLocales as a build input
adamantium has quit [Remote host closed the connection]
alex`` has joined #nixos
<Lisanna>
OK, I have a StringSink. I need to convert this to a Source
<Lisanna>
found it: sinkToSource
Mr_Keyser_Soze has quit [Ping timeout: 240 seconds]
hyper_ch2 has joined #nixos
orivej has joined #nixos
random_yanek has quit [Quit: random_yanek]
marusich has joined #nixos
emily has quit [Ping timeout: 252 seconds]
Mr_Keyser_Soze has joined #nixos
crmlt has joined #nixos
o1lo01ol1o has quit [Ping timeout: 276 seconds]
periklis has joined #nixos
orivej has quit [Ping timeout: 246 seconds]
Itkovian has joined #nixos
reinzelmann has joined #nixos
crmlt has quit [Remote host closed the connection]
leotaku has joined #nixos
crmlt has joined #nixos
<leotaku>
I think that integrating the "nix edit" functionality into nix repl could greatly improve the nix development process.
<srhb>
leotaku: So that the dev workflow is something like, pkgs = import <nixpkgs> {} -- try evaluating something, then :edit pkgs.somepackage ?
<srhb>
That would indeed be very nice.
<srhb>
Needs a reload..
<srhb>
Ah, we have that.
<leotaku>
srhb: Yeah, exactly that.
Mr_Keyser_Soze has quit [Ping timeout: 244 seconds]
<srhb>
Very ghci-ish.
<leotaku>
On that note, a better ":t" would also be really nice. But thats probably much less trivial to implement.
<{^_^}>
[nixpkgs] @Mic92 pushed to master « zfs{Stable,Unstable}: mark as incompatible with 4.19 »: https://git.io/fxQKE
<arq1>
i am reinstalling nixos on a new ssd and when i ran nixos-install i got error: selector 'x86_64-linux' matches no derivations, anyone know the reason?
hotfuzz_ has quit [Ping timeout: 244 seconds]
<srhb>
arq1: Is this from the installer?
<srhb>
(Wild guess: It's because it expects a channel named nixos to exist?)
<arq1>
yes
<srhb>
Hm, okay, not that then.
<arq1>
nixos is added already
<srhb>
das_j: Did you figure out the above error with nixos-install?
<arq1>
the first message that i get is: GC Warning: Bad initial heap size 100000 - ignoring it.
<srhb>
That's "ok" -- just a spammy warning since 2.1.x afaik
<arq1>
then the error selector message
<srhb>
I'll try and grab the iso..
<arq1>
it was on a lvm volume
<srhb>
arq1: Just started installing here. Looks alright so far.
isHavvy has joined #nixos
<srhb>
arq1: Is this a completely minimal config?
Havvy has quit [Ping timeout: 250 seconds]
Mr_Keyser_Soze has quit [Ping timeout: 250 seconds]
<srhb>
arq1: If so, I think you should try getting a trace output
<srhb>
arq1: Installation succeeded here.
<srhb>
arq1: (With the latest installer and a completely minimal config)
<arq1>
it is fairly minimal
<srhb>
arq1: Try moving it away and using just the default config generated by nixos-generate-config --root mnt?
isHavvy has quit [Ping timeout: 252 seconds]
<{^_^}>
[nixpkgs] @viric pushed commit from @Mic92 to release-18.03 « Merge pull request #45017 from chpatrick/meshlab-update »: https://git.io/fxQ6K
Havvy has joined #nixos
o1lo01ol1o has joined #nixos
Itkovian has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teto has joined #nixos
<arq1>
even with the default config i get the error
<{^_^}>
#49275 (by tazjin, 1 day ago, open): Add generated documentation for library functions
Itkovian has joined #nixos
alienpirate5 has quit [Ping timeout: 264 seconds]
<leotaku>
Mic92: Nice, I have always thought that the docs were a bit lacking. I'm really happy that's being addressed.
Itkovian has quit [Client Quit]
Tucky has joined #nixos
adamantium has quit [Remote host closed the connection]
<LnL>
this is like the 3rd attempt to build something like that
Itkovian has joined #nixos
<LnL>
but the others had runtime impact
<tazjin>
runtime of what?
<tazjin>
we want to run nixdoc during manual generation time, but the first step is to check in the generated files. That won't really affect anyone :)
goibhniu has joined #nixos
<LnL>
yeah, that would be better but it's not a reason not to merge this already :)
<Mic92>
tazjin: the previous approaches changed the source code of nix function. Nix doc just parses comments, so it has zero impact on runtime
<tazjin>
ah!
<LnL>
indeed, runtime lookup of the attributes
thc202 has joined #nixos
o1lo01ol1o has quit [Ping timeout: 264 seconds]
<LnL>
the nice advantage that had is that you could inspect the docs in the repl
<tazjin>
It'd be nice to generate static metadata that is available at runtime though
<tazjin>
to write a docs lookup function or something
jsgrant has joined #nixos
<LnL>
that's also an option
goibhniu has quit [Ping timeout: 272 seconds]
<gchristensen>
one step at a time though :')
Ariakenom has joined #nixos
__Sander__ has joined #nixos
<LnL>
the configurations idea would enable that for example, but we won't be able to use that anytime soon
oida has joined #nixos
marusich has quit [Quit: Leaving]
<gchristensen>
can I get the DISPLAY variable's contents over?
<gchristensen>
can I get the DISPLAY variable's contents over dbus?
<gchristensen>
I'm thinking there might be a service exposing it somehow... I want to start a gui-related thing in a systemd user unit and it is predictably annoying
<{^_^}>
[nixpkgs] @timokau pushed 3 commits to release-18.09: https://git.io/fxQ1n
<gchristensen>
ekleog: I was _predicting_ the DISPLAY var not being set to be a problem, but indeed, it is not a problem! thank you!
Itkovian has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Itkovian has joined #nixos
<ekleog>
:D
<{^_^}>
[nixpkgs] @timokau opened pull request #49378 → R: give details on test failure → https://git.io/fxQ1i
<timokau[m]1>
Does anyone have comments on my usage of `failureHook` in #49378? I haven't seen that done before and I think it isn't documented either. Some better way?
<tazjin>
gchristensen: I'm opening a separate PR for the .nix changes as you suggested. Still the appendix question remains, if we publish them once without being in an appendix we will break links in the future
<gchristensen>
we will have an appendix!
<{^_^}>
[nixpkgs] @tazjin opened pull request #49383 → Update library function "docstrings" for nixdoc generation → https://git.io/fxQyk
<CMCDragonkai>
There is a tracker package in nixpkgs. And there's also a tracker module to represent the system service.
<CMCDragonkai>
In that Nix file, it just shows it using the tracker derivation in various sets: `systemd.packages` and `services.dbus.packages`.
<CMCDragonkai>
How does NixOS know how to start the tracker program as a service, and what the service configuration should be?
orivej has quit [Ping timeout: 264 seconds]
<CMCDragonkai>
I thought there would be a systemd unit file or service file in the actual tracker source. But I looked into it, and I couldn't find one.
crmlt has joined #nixos
crmlt has quit [Client Quit]
<tazjin>
CMCDragonkai: the package for the service contains a unit file
<{^_^}>
[nixpkgs] @globin pushed commit from @danieldk to master « hugo: 0.47.1 -> 0.49.2 »: https://git.io/fxQQ1
<gchristensen>
does defining nixpkgs.pkgs in the module system break being able to refer to ${pkgs.path} in a module? I'm getting infinite recursion and I'm surprised.
<krgn>
heyhey, I was wondering if anybody has firefox working under wayland here. It seems that its not yet supported?
<globin>
gchristensen: I remember something about that being a problem in the same module
<globin>
gchristensen: I have this in our base profile: # pkgs as an argument creates an infinite recursion pkgs = import <nixpkgs> {}; nixexprsRepo = pkgs.fetchFromGitHub {
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « python36Packages.flask_migrate: 2.2.1 -> 2.3.0 (#49020) »: https://git.io/fxQ7h
<jD91mZM2>
In a rust project, I'm getting "undefined reference to XOpenDisplay" when trying to build. Have tried adding x11 and xorg.libX11 and similar but to no success
<betaboon>
ekleog: meh. yeah with toPath it might work. but for me it still results in "not a .git directory" as my .git is just a file containing "gitdir: ....." as this is a git-submodule.
<jD91mZM2>
Yeah. Installing xlibs.libX11 does not make the linker error go away
<Taneb>
What about xorg.libX11.dev ?
<jD91mZM2>
Found it, it wasn't a problem with missing packages. Turns out you need the "xlib" feature in x11-rs
alhariel has quit [Remote host closed the connection]
alhariel has joined #nixos
hexagoxel has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @LnL7 pushed to release-18.09 « loc: enable darwin build »: https://git.io/fxQ5b
jmeredith has quit [Ping timeout: 260 seconds]
clacke[m] has quit [Ping timeout: 260 seconds]
r5d has quit [Ping timeout: 260 seconds]
sc_ has quit [Ping timeout: 260 seconds]
aanderse has quit [Ping timeout: 260 seconds]
Shados has quit [Ping timeout: 260 seconds]
Mikaela- has quit [Ping timeout: 260 seconds]
genesis has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @LnL7 pushed commit from @gilligan to release-18.09 « bats: add missing grep dependency »: https://git.io/fxQdU
sc_ has joined #nixos
<ekleog>
betaboon: well, you'll need to partially rewrite that anyway if you really want it eval-time (but use cases for needing it eval-time are… rare, imo), because this version doesn't give you time
jmeredith has joined #nixos
<{^_^}>
[nixpkgs] @LnL7 pushed commit from @iwinux to release-18.09 « httping: add libintl to buildInputs on Darwin (#48188) »: https://git.io/fxQds
<ekleog>
well, either that or just go full-on with IFD and do `import (pkgs.mkDerivation { name = "version"; inherit src; buildPhase = '' echo '"' > $out; git describe --tags >> $out; echo '"' >> $out ''; })`, but that won't pass on hydra
<betaboon>
ekleog: i guess i have to rethink my versioning then :/
Mic92 has quit [Quit: WeeChat 2.2]
<ekleog>
betaboon: I don't really understand why you're trying to use `git describe --tags` at eval-time, if you do `src = ./.` it's development anyway and you don't care about the version?
<betaboon>
ekleog: i have the source-repos of specific applications as git-submodules in a nixpkgs-overlay. therefore src is always ./.
Mic92 has joined #nixos
clacke[m] has joined #nixos
o1lo01ol1o has quit [Ping timeout: 252 seconds]
<ekleog>
and if it's only for releases you'll likely want to pin an immutable path so that the build is reproducible, and then writing the version name by hand isn't a problem
Mic92 has quit [Client Quit]
Itkovian has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
genesis has joined #nixos
<ekleog>
hmm in your specific example… maybe you can decide that you don't care and use `version = "git";`?
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « python27Packages.gevent-websocket: 0.9.3 -> 0.10.1 (#49010) »: https://git.io/fxQFk
<ekleog>
(and/or use IFD as it sounds like something that won't go through hydra anyway)
<betaboon>
ekleog: as the overlay is pinned to a specific commit, the submodules are pinned as well. therefore it is reproducable. yeah maybe i just don't care about version on derivation-level
<leotaku>
Do most people here use channels for tracking nixpkgs, or do you have a custom nixpkgs checkout?
<jophish>
leotaku: I have a custom checkout
<jophish>
I understand how git works, but I've never taken the time to learn how this channels business operates
<leotaku>
I kind of dislike the channel system. It's so awfully imperative. But maintaining the proper git repos for multiple machines is also a pain.
mayhewluke has quit [Ping timeout: 252 seconds]
mayhewluke has joined #nixos
<steveeJ>
mh, seems like my home-manager xsession is still somehow borked. `systemctl --user status` gives me an error `Failed to read server status: Process org.freedesktop.systemd1 exited with status 1 `
sir_guy_carleton has joined #nixos
<{^_^}>
[nix] @LnL7 opened pull request #2495 → nix doctor: return nonzero exitcode if a check fails → https://git.io/fxQAx
<tokudan[m]>
ssl is mandatory, so i cannot switch to http
<{^_^}>
[nixpkgs] @dtzWill opened pull request #49390 → gmime3: 3.2.0 -> 3.2.1, enable tests, now uses libidn2 → https://git.io/fx7ei
<tokudan[m]>
how can i work around the ssl issue?
<fooinabar>
Hi all! I'm trying to use a nixpkgs installation in Ubuntu to create a reproducable build environment. Is there a way to specify nikpgs from a specific git version of the nixpkgs repo? (Hopefully, this makes some sense)
<ekleog>
… wat? can someone try `nix-shell '<nixpkgs>' -A notmuch --run "python3"`?
<roberth>
Option in the sense of possibility
* ekleog
wondering whether he's the only one with a stacktrace mixing python2 and python3 code
<gchristensen>
roberth: I think I solved the problem differently )
<gchristensen>
:)
ThatDocsLady has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @dtzWill opened pull request #49395 → upower: 0.99.7 -> 0.99.9, lock down service → https://git.io/fx7fn
<symphorien>
ekleog: I confirm
<ekleog>
symphorien: ugh. going to try to reduce to a python packaging bug :/
<symphorien>
adding a python lib to buildInputs adds it to PYTHONPATH, and there is no PYTHON3PATH so it is expected
copumpkin has joined #nixos
<symphorien>
if you add --pure then python3 is not found
<ekleog>
yeah
<shlevy>
Is there a good list of options (or maybe we've all settled on one?) for managing user config/environment? My main requirement is that it work on NixOS and darwin, so it can't be wed to NixOS, but I'd be fine with something that can use NixOS and nix-darwin as backends
<symphorien>
so you run python3 with a python2 PYTHONPATH
<ekleog>
issue is, notmuch's build stack actually requires python3 to run tests…
<ekleog>
I'm thinking maybe we could set python2path / python3path and set pythonpath=[the right variable] in a python[23] wrapper
<symphorien>
you can try running it after emptying PYTHONPATH
<steveeJ>
the systemd --user issue is really weird. when I run the system in libvirt (via /dev/sdb just attached as a disk) it works flawlessly and my user session gets started properly. when I plug the drive into a real computer and boot it systemd --user fails
Thra11 has quit [Ping timeout: 244 seconds]
<ekleog>
yeah I confirm it works after emptying PYTHONPATH
<symphorien>
\o/
<ekleog>
well, going to braindump into the issue tracker, too busy to try to change the packaging right now :)
<LnL>
shlevy: I try to keep nix-darwin as close as possible to nixos for the modules that exist for both, but it's hard because I can't share the implementation because there's no way to make sure the implementation is safe on darwin
<gchristensen>
anyone know if ssh's ProxyJump / ProxyCommand options work in conjunction with BindAddress? I have a jumphost which I need to SSH in to, and then SSH out of via a specific addresss.
sb0 has joined #nixos
<andi->
gchristensen: I think not. ProxyJump just constructs a ProxyCommand using SSH. It is basically a shortcut IIRC
<gchristensen>
yikes
<jabranham>
dhcpcd.service is adding ~12 seconds to my boot. Before I invest time in tracking down why, is this a known problem?
<disasm>
cransom: I'm waiting on fpletz patch for networkd :)
drakonis has joined #nixos
<symphorien>
is there an equivalent to NIX_LDFLAGS which only has effect on c++ and not c ?
<cransom>
disasm: well, it works-ish. the things that don't (wireguard, didn't look into that further) and v6 prefix delegation (I had manual set things for that in dhcpcd.conf, so i dind't expect that to work out of box). but otherwise, it did all the vlan interfaces and routing properly. so far as i can tell right now
cmacrae has quit [Read error: Connection reset by peer]
cmacrae has joined #nixos
<disasm>
yeah, and both of those are requirements for me :)
<symphorien>
where are derivation logs stored ?
<shlevy>
The Cloud
<cransom>
hrm. and a docker failure. oh well. will look later.
<shlevy>
(also /nix/var/log/nix)
<symphorien>
thanks
<Mic92>
symphorien: NIX_CFLAGS_COMPILE and NIX_CXXFLAGS_COMPILE
<Synthetica>
Wait, are all logs of all time there?
<Mic92>
symphorien: mhm maybe the last one is not correct
locallycompact has joined #nixos
<locallycompact>
Hello, I'm confused about packages
<locallycompact>
I did a nix-env -i root
<locallycompact>
and it installed
<locallycompact>
installing 'root-6.04.18'
<locallycompact>
but when I browse to the packages online
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « python36Packages.pip-tools: 2.0.2 -> 3.1.0 (#48986) »: https://git.io/fx7s1
<symphorien>
,-A locallycompact sorry
<{^_^}>
locallycompact sorry: You'll usually want to use nix-env -i with -A. It's faster and more precise. See https://nixos.wiki/wiki/FAQ/nix-env_-iA for details.
<locallycompact>
it has it has version root-6.12.06
<Mic92>
there is NIX_CXXSTDLIB_COMPILE
<locallycompact>
that didn't make any difference
<locallycompact>
should it be: nix-env -f '<nixpkgs>' -iA nixos.root ?
random_yanek has joined #nixos
<locallycompact>
it's still installing 6.04.18
<locallycompact>
how do I install 6.12.06
<symphorien>
then run nix-channel --update
<locallycompact>
then?
<symphorien>
can you paste the output of "nix-shell -p nix-info --run nix-info" if this fails ?
<locallycompact>
error: undefined variable 'nix-info' at (string):1:94
<symphorien>
"if it is still installing the wrong version, then run nix-channel --update"
<symphorien>
ah you must be on a really old channel
<symphorien>
BUT it won't work because your are updating four versions in one step
timclassic has joined #nixos
<symphorien>
so you probably need to do this for all intermediary versions
<locallycompact>
why is it so old
<symphorien>
17.03, 17.09, 18.03, 18.09
<locallycompact>
hmm I'm getting error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I), at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/default.nix:1:60
<{^_^}>
[nixpkgs] @dtzWill opened pull request #49402 → llvmPackages: 5 -> 7 on Linux, keep Darwin at 5 until fixed → https://git.io/fx7Gb
<symphorien>
well I guess a nixos managed box must be managed through nixops
<symphorien>
you can't use nixos-rebuild on such a machine
cornu has joined #nixos
<symphorien>
*a nixops managed
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
<worldofpeace>
locallycompact: what version of nixos is the deployer at?
<jabranham>
how can I find which package(s) include a certain binary?
<locallycompact>
worldofpeace, my host is arch linux
mayhewluke has joined #nixos
<andi->
jabranham: try ,locate <pkgs>
<andi->
,locate bash
<{^_^}>
Found in packages: dgsh, cheat, cjdns, vagrant, bash.doc, brackets, taskwarrior, playonlinux, bashInteractive, apparmor-profiles, nodePackages.meguca, python27Packages.powerline, python36Packages.powerline, python36Packages.bash_kernel, haskellPackages.misfortune.data
<andi->
interesting result..
<jabranham>
andi-: not possible to do outside of IRC?
<jabranham>
,locate repstopdf
<{^_^}>
Couldn't find in any packages
<jabranham>
:-(
<worldofpeace>
jabranham: Well the irc bot is using nix-index
<simpson>
,locate ps2pdf
<{^_^}>
Found in packages: ghostscriptX, texlive.combined.scheme-medium
<simpson>
jabranham: What are you actually looking for?
<jabranham>
simpson: I'm trying to compile this latex file and keep getting:system returned with code 32512 sh: repstopdf: command not found
v0|d has joined #nixos
waleee has joined #nixos
<worldofpeace>
locallycompact: so you deployed a virtualbox vm with nixops from arch linux? (just want to verify)
<locallycompact>
yes
<{^_^}>
[nixpkgs] @andir opened pull request #49403 → qemu_test: disable features that are not needed for tests (closure 567MB -> 174MB) → https://git.io/fx7CZ
<jabranham>
simpson: I've already got texlive.combined.scheme-full and adding ghostscriptX doesn't seem to fix it
<nyanloutre[m]>
Hello, I use a fork of nixpkgs on my server so I can quickly use changes before PR are merged and still be on a stable base
<nyanloutre[m]>
Is it possible to create a custom nix channel for my fork ?
pointfourone has quit [Remote host closed the connection]
<nyanloutre[m]>
Do anyone work like this ?
pointfourone has joined #nixos
ryantm_ has quit [Ping timeout: 240 seconds]
<nyanloutre[m]>
I saw some example with Travis and GitHub pages, maybe it's an easy solution
locallycompact has quit [Disconnected by services]
adulteratedjedi has quit [Ping timeout: 264 seconds]
<Synthetica>
(nyanloutre[m] (If you don't specify a hash, none of this is pure of course, and if you do specify a hash, you're still trusting github to give you the correct thing)
<jabranham>
simpson: I should report this as a bug, right? "nix-shell -p texlive.combined.scheme-full --pure" then trying to run "repstopdf" results in command not found
<symphorien>
locallycompact: run nix-channel --update
<simpson>
jabranham: I don't know. I'd be willing to guess that font-utils or whatever texlive package has it just doesn't copy that particular binary. Or maybe texlive is horribly broken; has happened before.
<symphorien>
and then nix-shell -p nix-info --run nix-info
<locallycompact>
ok that didn't make a difference to nix-channel --list
<worldofpeace>
locallycompact: It wouldn't because you didn't remove, change, or add a channel
<locallycompact>
ok
<symphorien>
locallycompact: nix-info will tell you which version you actually have
<symphorien>
an unstable from two years ago or a current one
<locallycompact>
can I set that config.system.nixos.version or so?
<locallycompact>
is that a thing
<worldofpeace>
locallycompact: well you don't have 'NixOS`
<locallycompact>
shouldn't there be a way I can just put the version of nixos that I want in my virtualbox deployment .nix file?
<kreisys>
is there an easy way to run nixos on an ec2 instance with a btrfs root?
<locallycompact>
or maybe upgrade my nixops somehow
<locallycompact>
ok using nixpkgs.nixopsUnstable made something a bit more sensible but it had to wait for user input in the graphical window in virtualbox before it installed which was wierd
jsgrant_ has quit [Remote host closed the connection]
Fare has joined #nixos
<worldofpeace>
:D
<{^_^}>
[nixpkgs] @pvgoran opened pull request #49408 → gitea: include "options" directory in "data" output → https://git.io/fx70S
cmacrae has quit [Read error: Connection reset by peer]
cmacrae has joined #nixos
<boxscapeR>
is there a builtin way I can convert a string containing newlines into a list of strings?
<boxscapeR>
actually I got it, I think I can use lib.strings.splitString
<shlevy>
boxscapeR: There's also builtins.split
<boxscapeR>
ah, thanks
<boxscapeR>
that's actually better for what I want to do
<{^_^}>
[nixpkgs] @jluttine opened pull request #49409 → piexif: 1.0.13 -> 1.1.1 (and bunch of other packages) → https://git.io/fx7EB
<shlevy>
Is there any fundamental reason why desktop/window managers are configured system-wide instead of per-user?
<shlevy>
It seems like if one user wants gnome and another KDE this should be just fine?
spinglet has quit [Remote host closed the connection]
<boxscapeR>
I think you can also set up a window manager in home-manager
<shlevy>
Ah nice
<gchristensen>
you can also enable multiple: kde and gnome, and select at log-in time
<shlevy>
Sure, but that has to be enabled in configuration.nix right?
<gchristensen>
correct
<shlevy>
I guess I'm wondering why the sysadmin cares. Do the desktop managers run as root?
<shlevy>
Or do any cross-user sharing?
__Sander__ has quit [Quit: Konversation terminated!]
johnw has joined #nixos
<shlevy>
(I'm just now coming off of years of using dwm, configured in my .xsession, so I haven't looked at this stuff in a while)
sigmundv__ has quit [Ping timeout: 264 seconds]
sigmundv has quit [Ping timeout: 240 seconds]
<steveeJ>
how can I avoid nix copying a filepath to the store before using it?
isHavvy has joined #nixos
<symphorien>
it would be prevented by the sandbox for purity reasons
Havvy has quit [Ping timeout: 252 seconds]
wucke13 has joined #nixos
<johanot>
quit
<johanot>
sorry :P
johanot has quit [Quit: WeeChat 2.2]
<wucke13>
I have a project, which is build using a shell script and an environment defined via shell.nix. Is it possible run it in a docker container, for people how don't have nix-shell?
sigmundv__ has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wucke13>
Furthermore, how does one install a python with some pythonpackages via nix-env?
<wucke13>
steveeJ: Though I'm using `--user $UID` to let the result of the build become accesible to the user who started the docker container. Any idea of how that could be handled else?
Tucky has quit [Quit: WeeChat 2.2]
<shlevy>
Anyone know of a window manager with "modal" keybindings?
<jabranham>
shlevy: not sure if you're an Emacs user or not though
<shlevy>
Yeah, EXWM is my top contender currently
<grp>
How can make a derivation symlink/install a file to a path outside the /nix/store ?
<jabranham>
shlevy: I use EXWM and it's great.
<steveeJ>
wucke13: you could alternatively chown the result in the container. I haven't personally tested nix-shell in a container
<shlevy>
I had a reason last night why I didn't just commit to it... But I can't remember it now :D
FRidh has joined #nixos
<jabranham>
shlevy: It sounds a bit ridiculous to use a text editor as your window manager but it really works well. This is a bit off-topic for this channel though, feel free to come ask questions in #emacs
<wucke13>
steveeJ: Do you happen to know a way to add a user to the nix docker image?
<steveeJ>
wucke13: you don't need the user inside for chowning, just use numerical UID/GID
<wucke13>
I have some ache with doing so. I have a working, 'clean' nix-shell based build script. I would prefer to alter the docker container to resolve the issue to altering my build script.
<{^_^}>
[nixpkgs] @nlewo opened pull request #49414 → dockerTools.buildImageWithNixDb: simplifications and switch to closure info → https://git.io/fx7rR
<boxscapeR>
Uhm, nix-shell is supposed to use shell.nix instead of default.nix if it exists, right? I'm getting "default.nix: no such file or directory"...
<steveeJ>
wucke13: would a `chown ..` command inside the container after your build script not cut it?
<boxscapeR>
hm, actually I guess it might be something that I'm doing *inside* my shell.nix that's causing this
<{^_^}>
[nixpkgs] @nlewo closed pull request #46592 → dockerTools: use closureInfo to load hashes and closure sizes into the Nix DB → https://git.io/fA63z
<grp>
How can make a derivation symlink/install a file to a path outside the /nix/store? example: /nix/store/...-pkg/aux/test -> /aux/test
<grp>
I know it goes against nixos model but I really need it
<jonreeve>
l
<jonreeve>
l
jonreeve has quit [Client Quit]
<simpson>
grp: What's your goal? Why do you need it?
jonreeve has joined #nixos
<worldofpeace>
grp: you can use nixos with `environment.etc` or get a link at /run/current-system/ somehow
<jonreeve>
Does anyone know the command to install these? ttps://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/spacy/models.nix
<simpson>
worldofpeace: I don't think grp is trying to manage part of their disk with the Nix store, but instead wants some sort of convenience impurity. Not sure though.
<worldofpeace>
simpson: right
<grp>
simpson: I've made a dhcp server confs derivation that includes some script that I also manage with nix. Problem is: dhcp server stores "on release" event's script path in the leases database. This means that it'll try to run the previous script version way after I changed the confs
<grp>
so I need the script to be in a stable path
<grp>
let me put an example:
mayhewluke has quit [Ping timeout: 252 seconds]
mayhewluke has joined #nixos
<grp>
currently my dns update script is stored at /nix/store/<abcde>-ddns-script/bin/ddns-script. This path is interpolated in the dhcp server's conf for the "on release" event. Dhcp server stores this path in it's leases database to know what to do when it frees that lease (which is moronic but anyway, that's how it works). So, whatever goes into the running configuration will be stored for later use. So, if I
<grp>
change the update script, the dhcp server will still try to run the previous one
<grp>
so, the dhcp-server will run /nix/store/<abcde>-ddns-script/bin/ddns-script for some leases, then /nix/store/<12345>-ddns-script/bin/ddns-script for other (newer) leases, and so on
<grp>
so I need my ddns-script binary to be in a stable system path
<grp>
to circumvent the stupid behavior of dhcp-server
<grp>
makes sense now?
<simpson>
To a point. Every other NixOS service that has this sort of setup is okay with requiring a nixos-rebuild when configuration changes. Why can't your service do that?
<grp>
it _does_, but the state database is keeping track of old /nix/store paths
<grp>
can't change that behavior...
drakonis has quit [Quit: WeeChat 2.2]
<grp>
unless I modify the services' C sources....
<jonreeve>
Here's what I've tried so far:
<simpson>
Has to happen sometimes.
<grp>
the dhcp-server leases state file stores for later use, the script paths that were set at the time the lease was commited
<jonreeve>
And nix-env -iA nixos.python36Packages.spacy.en_core_web_lg
mayhewluke has quit [Ping timeout: 244 seconds]
<jonreeve>
I can see the nix file in nixpkgs, but I just don't know the expression I need to use to install it
<grp>
simpson: well, I could just add it to $out/etc/dhcp/ddns-script or something, so it gets merged, but I'd like to do that with another path. I don't like storing scripts in /etc
<grp>
I'd like to specify other paths to be merged
<grp>
otherwise everything lives in whatever profile is there
<grp>
and that won't do in this case
drakonis has joined #nixos
drakonis_ has quit [Ping timeout: 240 seconds]
<simpson>
Yeah, that's how a lot of people feel about Nix.
<jonreeve>
I figure there must be something easy I'm overlooking
<emily>
sometimes I feel it's not restrictive enough
<simpson>
grp: Yeah, that's how capability-aware systems tend to be. We have played fast and loose with software design, and now it is time to stop doing that.
<simpson>
emily: I feel that Nix is ultimately a transitional technology, and that true package-capability systems will be very different-looking.
<grp>
I'd like them to be more plan9-like
<hodapp>
plan 9 whaaa?
<grp>
ditch symlinks and search paths
<grp>
use filesystem views
<emily>
simpson: nod
<emily>
although I also agree with grp
<shlevy>
Just pass objcaps :P
<cransom>
grp: you could stick dhcpd in systemPackages. i assume ddns-script would be in /run/current-system/sw/bin
<emily>
Nix(OS) suffer from having come about just a bit before Linux namespaces became viable
<grp>
emily: thx T_T
<hodapp>
I ran Plan 9 once....
<jonreeve>
More generally, I guess I'm asking: how can I tell by reading a nix file where the name of the package is?
<shlevy>
emily: namespaces are similarly a "transitional" technology IMO. Having that baked into the kernel instead of simply having all the kernel primitives be relative and let applications handle their views is the way to go IMO
<simpson>
shlevy: Soon.
<jonreeve>
Because I think I can install a package with `nix-env -iA nixos.packagename`
<shlevy>
simpson: Which will come first, the year of the linux desktop, hurd becoming mainstream, or capabilities everywhere? :)
<grp>
hodapp: plan9 is pretty useless as it is, but it puts some good ideas to practice
<emily>
sure, sure, I have a grand vision I could sell too :p
<hodapp>
grp: what about Inferno?
<grp>
haven't checked it out
<shlevy>
At least capabilities for the filesystem are mostly doable in today's world. Especially with recent work removing the ability to .. out of a directory fd
<shlevy>
And for everything else I guess we can spin up daemons and pass around sockets...
boxscapeR has quit [Ping timeout: 252 seconds]
<jonreeve>
Or is there a way I can get a list of packages under the spacy namespace from the nix repl?
<simpson>
shlevy: We're getting there. Monte and Pony are still active, Genode and seL4 are releasing updates, the Mill is still 10yrs away, and ES is still slowly being molded into an ocap language without anybody noticing.
adamantium has joined #nixos
* endformationage
likes Pony
<shlevy>
Heretical (and off topic), but IMO languages need to follow system interfaces here, not the other way around. Otherwise someone's going to just give a back door to open(2) anyway...
<simpson>
Taming is hard. Pony barely tames at all, and it's sad. Monte tames, which of course means that nearly all of POSIX is *not* yet available. I think Nix has an alright middle ground, denying the worst stuff like networking.
<grp>
cransom: yeah... not too fond of that path though but it's an option.
<hodapp>
what are Pony & Monte?
<grp>
cransom: originally I didn't want this script to be in any $PATH
<grp>
so maybe /etc is still the better option
<maurer>
You could also look at the CHERI project with CHERI-BSD/CHERI-MIPS
<shlevy>
Oh man I didn't know they capsicum guys had looked at hardware!
<shlevy>
Cool, thanks :)
alhariel has quit [Read error: Connection reset by peer]
<cransom>
grp: /etc or /var/lib would be the only other options. i'd probably opt for that unless the lease file is easy to scrub and you adjust the paths for all the existing leases with a non-current path
<grp>
cransom: yeah, but that'd mean I'd have to somehow make nix to stop the dhcp server so leases are flushed to the file, then patch it, then run the server again
<jonreeve>
Ok, I managed to do `:l <nixpkgs>` followed by `python36Packages.spacy.`+<tab>
<jonreeve>
But I'm not seeing anything about models there
<cransom>
grp: a restart trigger for yoru ddns-secripts would restart the service. the patch would go in prestart
<endformationage>
simpson: what is meant by taming?
<jonreeve>
how are they connected to the Spacy package?
<grp>
cransom: but the ddns-script isn't a service, or do you mean defining a sytemd.service.dhcp4.preStart hook?
<simpson>
endformationage: Taming is the process of removing dangerous authority from an API. After taming, an API should only expose information on a Principle of Least Authority basis.
<FRidh>
jonreeve: Don't install Python libraries with `nix-env`. Instead, create a Python environment with python.withPackages. That one you could install with nix-env.
<cransom>
grp: are you talking dhcpd or dhcpcd?
<grp>
dhcpd
<wucke13>
Is pytest on master broken?
<Zajcev_>
guys, is it possible to get pam_userdb working on nixos? I'd like to use pam_userdb + pam_mkhomedir but there is only pam_mkhomedir option?
<Zajcev_>
I mean declaratively in conf
<{^_^}>
[nixpkgs] @veprbl opened pull request #49416 → texlive: provide repstopdf → https://git.io/fx7Ps
<jonreeve>
FRidh: so like, nix-shell -p (python36.withPackages (ps: with ps; [spacy jupyter pip])).override(args: {ignoreCollisions=true;})'` works OK, but I just don't know the right package name for the spacy models, like en_core_web_lg
<jonreeve>
FRidh: so I don't know how to get the models. I can get the other packages, just not those
<jonreeve>
FRidh: I've tried `en_core_web_lg`, `spacy.en_core_web_lg`, `spacy.models.en_core_web_lg`, and other variants, but nothing seems to be working
<jonreeve>
It says "error: attribut 'models' missing" or "error: attribute en_core_web_lg" missing
<jonreeve>
But I can see them referenced in that JSON file
wildsebastian has quit [Ping timeout: 264 seconds]
wildsebastian has joined #nixos
haitlah has quit [Remote host closed the connection]
<FRidh>
jonreeve: $ nix-build -A python3.pkgs.spacy_models.en_core_web_lg
<FRidh>
in python-packages.nix there is an attribute called spacy_models which is an attribute set of models
<FRidh>
so add spacy_models.en_core_web_lg to withPackages
<jonreeve>
FRidh: Nice! That seems to be working. Thanks so much!
<grp>
btw, what's the most orthodox way to set /var/log/ files' permissions inside a derivation?
Unode_ has joined #nixos
<grp>
(I want a script that's going to run as an unprivileged user to be able to write to some log file)
<Laalf>
teamspeak3s client crashes when i connect to a newer server. i dont know what version the server runs since i cant connect to it without teamspeak crashing but it worked a few days ago. the client is very old on nix
mayhewluke has joined #nixos
<Unode_>
hi all, does anyone know of any script that combines nix-locate and patchelf to patch pre-built binaries to find all required libs?
<Unode_>
I'm finding myself doing these patches by hand where it looks like some degree of automation would be possible
<jonreeve>
Does anyone here use a swapfile?
<Unode_>
jonreeve: I used to. But I've been experiencing some very annoying freezes when the system starts swapping so I disabled all swap entirely.
<jonreeve>
I'm "invalid argument" when I try to rebuild with a swapfile, or run `sudo swapon /swapfile` manually
<jonreeve>
Hm weird
<Unode_>
jonreeve: did you add the swapfile to you nix configuration? that's the easiest option
<grp>
jonreeve: have you formatted the swapfile? mkswap
<Unode_>
also make sure you are not using a swapfile on a btrfs filesystem
<jonreeve>
Yep. I have `swapDevices = [ { device = "/swapfile" } ]` just like it says in the docs
<jonreeve>
grp: Yet, formatted it with mkswap
<jonreeve>
grp: `sudo mkswap /swapfile`
<rycee>
steveeJ (IRC): Hmm, no haven't seen such an error before. Seems to be some form of problem with the lightdm setup. Like a missing dependency or something. Which NixOS version are you on?
<jonreeve>
*Yep
<Unode_>
jonreeve: swapDevices = [{device = "/mnt/share/.swapfile";size = 1024;priority = 0; }]; takes care of everything on my side
<hyper_ch>
hi sphalerite
<steveeJ>
rycee: I'm on 18.09. I think it's a race condition with an undeclared dependency
<jonreeve>
Hm cool I'll try that. What units is that size in?
<Unode_>
jonreeve: what filesystem is / ? ext4 ?
<Unode_>
jonreeve: that 1GB
Dezgeg has joined #nixos
<Unode_>
that's*
<jonreeve>
Ah cool. Hm I don't really know. How can I tell?
<Unode_>
mount
<sphalerite>
hi hyper_ch
<hyper_ch>
sphalerite
<hyper_ch>
sphalerite: got now a tool for snapshots?
<steveeJ>
rycee: I have my user on autologin with lightm so it starts pretty quickly in the boot process
<jonreeve>
/ is btrfs, it looks like
<Unode_>
jonreeve: that's your problem
<sphalerite>
hyper_ch: well I know of one I can use to replace my really hacky pull-based stuff ;) not started using it yet though
graphene has quit [Remote host closed the connection]
<{^_^}>
#49347 (by sjau, 1 day ago, open): easysnap: init at 2018-10-28
graphene has joined #nixos
<Unode_>
jonreeve: also the same here, which is why I use /mnt/share . It's an ext4 partition which is shared with Windows.
<Unode_>
anyway, back to my initial question. Does anyone know of an automatic way to patch pre-built binaries (possibly using patchelf and nix-locate to automate things)?
<steveeJ>
rycee: yes. all the things depending on that service are broken after boot. I can work around it by manually starting user@1000.service and then restart the display-manager
<jonreeve>
Unode_: Hm I regret not making an ext4 partition now. Know of another way to get around nix's memory overflow errors?
orivej has quit [Ping timeout: 252 seconds]
<Unode_>
jonreeve: don't know what you are referring to. Do you mean nix eating all your RAM?
<rycee>
steveeJ (IRC): "systemd[1353]: Failed to fully start up daemon: Permission denied" seems ominous.
<jonreeve>
Unode_: Yep. I run a nix-shell command, it tries to install a package, then runs out of memory, and I get `MEMORY ERROR`
<Unode_>
tilpner: nice! that's a great start. Thanks!
<steveeJ>
rycee: what would be the alternative to using the home-manager nixos module? I'm trying to come up with a declarative machine bootstrapping process
<Unode_>
jonreeve: I'm familiar with the issue and no, I don't have a good solution. I have the same problem when running nix-index . This requires around 3GB of RAM so the only way I've managed on my old 4GB laptop is to close X (or most X apps) and use the linux terminal.
<jonreeve>
Unode_: If you have a VPS with <2G ram, you can try it yourself, with `nix-shell -p '(python36.withPackages (ps: with ps; [spacy spacy_models.en_core_web_lg]))'`
<Unode_>
jonreeve: <2G is indeed a very tough. I don't know what more experienced nix(os) users do.
<jonreeve>
Unode_: yeah, I can't really close any more programs. I'm only using 75M of memory total.
<Unode_>
you can try zram but that won't get you that far with only 2GB
<Unode_>
works great with 8GB+
<jonreeve>
Unode_: Is nixos just not suitable for running on low-powered servers?
<Unode_>
jonreeve: there's an issue on github tracking this.
goibhniu has joined #nixos
<Unode_>
jonreeve: I remember bumping into it when looking for ways to lower memory requirements. It's a known problem but no idea if any known solutions have been found.
<Unode_>
jonreeve: I think the problem has been getting worse with the increase of packages in nixpkgs
<{^_^}>
[nixpkgs] @markuskowa merged pull request #49408 → gitea: include "options" directory in "data" output → https://git.io/fx70S
<Unode_>
jonreeve: you can also use other tricks like nix-copy-closure to deploy things without having to evaluate too many things at once
<Unode_>
someone experienced with nixops might have other suggestions
agander_ has joined #nixos
<catern>
Synthetica: neat
<Unode_>
jonreeve: there's another option which is to use a smaller nixpkgs tree. I've noticed -small branches in nixpkgs but don't know if this is the case.
<jonreeve>
Unode_: Hm I don't suppose there's an easy workaround that a commoner would understand? Something like `nix-shell -p super_big_package --please-dont-overflow-memory`?
<rycee>
steveeJ (IRC): Well, there is the nixos module and the home-manager tool.
<Unode_>
jonreeve: I'm not aware but not that experienced either. Maybe wait for further feedback or open an issue on it.
Izorkin has quit [Ping timeout: 252 seconds]
<rycee>
steveeJ (IRC): But I assume the issue you are having is not particularly related to Home Manager.
<Unode_>
tilpner: hum. do you know in which context is this auto-patchelf.sh script loaded? It seems to do exactly what I described but sourcing it as a standalone fails with references to other commands or dependencies.
Izorkin has joined #nixos
<tilpner>
Unode_ - Search nixpkgs for autoPatchelfHook for examples
<Unode_>
tilpner: will do. Thanks
<rycee>
steveeJ (IRC): Hmm, wonder if there is some issue with /etc/pam.d/lightdm-autologin
Itkovian has joined #nixos
<jonreeve>
Ok so I think I have to make a swap partition
<jonreeve>
Anyone know what the procedure is for making a swap partition (ext4 I guess?) without having to wipe the whole system?
<jonreeve>
I have a feeling I have to reboot the system with the NixOS ISO, then use that to partition it while it's not already booted into its own NixOS
<jonreeve>
But if there's an easier way let me know
<Unode_>
jonreeve: safest option, boot CD/USB, gparted, shrink and make the new one. However if I recall correctly btrfs supports live resizing
<tmplt>
I'm packaging a program that has a `#!/usr/bin/env bash` shebang in its ./configure. nix-build fails with "bad interpreter: No such file" even with bash in nativeBuildInputs. Shouldn't that work?
<Synthetica>
tmplt: Just patchShebangs it?
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drakonis has quit [Ping timeout: 252 seconds]
shpx has joined #nixos
<tmplt>
Synthetica: just stumbled upon a usage of it; was having trouble finding documentation on how to use it. It did solve the problem, though. thanks
Laalf has joined #nixos
<drakonis1>
so, is nix run the replacement for nix-shell?
<{^_^}>
[nixpkgs] @obadz opened pull request #49423 → nixos/zerotier: binds to network-online.target to avoid the 1m30s … → https://git.io/fx7Fb
<symphorien>
drakonis1: nix-shell gives a build environment, nix run does not
<drakonis1>
ah i see
<drakonis1>
that explains why python doesn't work
agander has quit [Ping timeout: 252 seconds]
<symphorien>
well python.withPackages should
<symphorien>
but just putting python packages together won't
<Ralith>
I'm still confused about why build environments are a special thing
<symphorien>
they run the setupHooks, mostly
<adisbladis>
Also inherits environment variables and such
<Ralith>
right, but ... why is that a special thing?
<drakonis1>
i take that their respective functionality is now accessed from nix?
<Ralith>
why not have a single universal notion of environments that behaves consistently, so there's none of this "help I installed a compiler and some libraries and they don't work" confusion
<drakonis1>
Ralith: a case of "it used to be terrible so we're trying to make it better"
<adisbladis>
drakonis1: In a busybox-like fashion, not via their respective `nix *` names
<drakonis1>
ah alright
boxscapeR has joined #nixos
<symphorien>
Ralith: for example right now python3 is broken in nix-shell -p python27Packages.enum
<symphorien>
a build environement can be intrusive and unfit for some things
<Lisanna>
"attribute 'elasticsearch2' missing"
<Ralith>
seems like that problem is trivially avoided by not installing intrusive build tools in an environment where you don't want them
<Lisanna>
oh boy, a fun evaluation error for a nixos module that I'm definitely not actually using anywhere
jD91mZM2 has quit [Quit: WeeChat 2.2]
<Lisanna>
18.09 ):
<drakonis1>
run unstable~
<drakonis1>
probably not a solution for anything
<boxscapeR>
does anyone know how to get any of the interactive GUI backends running with python's matplotlib?
o1lo01ol1o has quit [Remote host closed the connection]
<drakonis1>
jupyter?
<tmplt>
What's the canonical way of handling configure scripts that checks for shared libraries in a hardcoded /usr/lib?
<tmplt>
mdash: would just sed'ding it out suffice?
orivej has joined #nixos
<simpson>
tmplt: Did they use autoconf? There's a hook for calling autoreconf. If it's handwritten, then you get to handwrite some sed, or more likely call substituteInPlace.
PlasmaStrike[m] has joined #nixos
<tmplt>
substituteInPlace sounds like the way to go, if it weren't for the check being a `for i in curl otherlibs; do check /usr/lib/lib$i.so`
<boxscapeR>
symphorien: works perfectly, thanks
Mateon1 has quit [Ping timeout: 244 seconds]
Mateon3 has joined #nixos
<simpson>
tmplt: Ooh, this package sounds like it needs special hugs.
Thra11 has joined #nixos
<symphorien>
boxscapeR: maybe you can add how you did it as an example in the wiki; so that people typing matplolib in the search bar find it
<grp>
I want a script that's going to run as an unprivileged user to be able to write to some log file in /var/log so I need it created and permission-set as part of the install process. How can I achieve this?
<simpson>
It's kind of amazing that that works. Maybe those LSB-using folks are onto something~
<Lisanna>
OK, for some reason the module evaluation using an 18.03 version of nixpkgs... but I have nixpkgs very strictly pinned to 18.09.
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tmplt>
simpson: it's not the standard way of checking for libs, I surmise?
<boxscapeR>
symphorien: yeah, I'll do that
<Lisanna>
Is nixpkgs doing any funky imports that I don't know about that might be impurely stealing something from my NIX_PATH?
<symphorien>
thanks :)
<drakonis1>
Ralith: would definitely like to have that improved
<imalsogr1g>
Anyone know how haskell nix infrastructure interacts with `shellHook`? I can't get a shellHook command to run overrideDerivation'd haskellPackages whose attributes end with ".env"
<Lisanna>
like for nixos
<simpson>
tmplt: That's pretty brittle. I assume that they also don't call pkg-config or similar.
Mateon3 is now known as Mateon1
sigmundv has quit [Remote host closed the connection]
<tmplt>
simpson: they do, but through tup I think
<boxscapeR>
symphorien do you mean as an example to the Gnome section? Or somewhere on its own?
shpx has joined #nixos
<symphorien>
to the gnome section, but do as you see fit
<Lisanna>
ugh, omg... hardware-configuration.nix depends on <nixpkgs>
<Lisanna>
great
shpx has quit [Client Quit]
<tmplt>
simpson: buildtime also expects the FUSE filesystem module to be loaded... How does that work with Nix?
sigmundv has joined #nixos
<simpson>
tmplt: Nix doesn't care, I think. NixOS, either you have it or you don't, but I think it's enabled by default.
<simpson>
There is a way to encode those expectations. I think that the Docker packaging would be something to look at, maybe, as an example of that.
<tmplt>
simpson: fuse is loaded, but I get "fuse: device not found" when running nix-build. Is this because of the sandbox?
<jonreeve>
Any Python people here?
<simpson>
Oh, probably. You could try disabling sandboxing and see what happens.
<simpson>
jonreeve: Sure?
<jonreeve>
I can't figure out why I can run `nix-shell -p python36Packages.pandas --run 'python -c "import pandas"'` and it works fine, but...
<jonreeve>
When I write virtually the same thing as a shell.nix file, it says "no module named 'pandas'"
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jonreeve>
For instance, my shell.nix is basically: `with import <nixpkgs> {}; (python3.withPackages (ps: with ps; [ pandas ])).override({ignoreCollisions=true})`
<simpson>
You probably need `python36.withPackages`
<symphorien>
jonreeve: you need mkShell { buildInputs = [ your special python ]; }
<jonreeve>
simpson: Hm, I just tried that, and I can enter the shell fine, but then it doesn't see my modules there
xeji has joined #nixos
<symphorien>
nix-shell gives a shell with the dependencies of your expression, not just your expression
<boxscapeR>
jonreeve uh, don't you have to do .env in the shell.nix if you want to do it like that? For example I have `with import <nixpkgs> {}; (python36.withPackages (ps: with ps; [ ipython numpy toolz ])).env`, which works for me
<simpson>
Hmmm. Not sure, and apparently my Nix install (I'm stuck on my employer's POS Apple hardware) isn't working right.
<jonreeve>
boxscapeR: when I try that, it says "attribute 'env' missing"
<jonreeve>
symphorien: Cool. Where do I put that in the file? And what is the name of my special python?
<symphorien>
the special python is the expression you had before
<symphorien>
I was too lazy to copy paste :°
<boxscapeR>
jonreeve looks like you have to put parentheses around the whole expression and then get the .env of the parenthesized term
shpx has joined #nixos
<jonreeve>
boxscapeR: Awesome, that seems to be working! Thanks
jtojnar has quit [Quit: jtojnar]
<pareidolia>
Does NixOS keep a copy of configuration.nix for every generation of the OS as it is rebuilt? (much like linux keeps /proc/config.gz)
<{^_^}>
[nixpkgs] @tuxinaut opened pull request #49425 → vim-plugins/iceberg: init at 2018-10-18 → https://git.io/fx7pW
sigmundv__ has joined #nixos
<tilpner>
Not by default
<tilpner>
system.copySystemConfiguration can be set to true, to copy just configuration.nix
<tilpner>
But that will not copy imports, so you may want to do that too
<mightybyte>
Or do I need to set up an ubuntu container with nix?
<{^_^}>
[nixpkgs] @mztriz opened pull request #49427 → SC2086: Double quote to prevent globbing and word splitting. → https://git.io/fx5vI
<steveeJ>
rycee: I would prefer them not to be. Does it mean that I can currently update the module installed user environment with home-manager?
<LnL>
you can build x86_64-linux packages, those work on any distro because we pull in all runtime dependencies ourself
<mightybyte>
LnL: Ok, cool. Do I need to do anything special to do that?
<LnL>
for a single-user install just follow the instructions, otherwise it's a little more complicated
<steveeJ>
rycee: in fact I'd like to have it so that only when the system is installed the nixos module is used, and later I can update them asynchronously
<mightybyte>
LnL: Ok thanks. I'll give it a try.
random_yanek has joined #nixos
<LnL>
it's simpler with nix 2.0 but the instructions should still work
<rycee>
steveeJ (IRC): I assume you currently can use the home-manager tool to switch generations but when you reboot then the user environment would revert back to the system defined one.
<steveeJ>
rycee: ah I see. Can you suggest a different way to initialize the user environment during the installation?
romanofskiWork has quit [Ping timeout: 246 seconds]
zarel has joined #nixos
<rycee>
steveeJ (IRC): But eventually we'll have to switch the nixos module to use users.users.<name?>.packages for installing packages and then the home-manager tool and the nixos module would be quite incompatible.
<rycee>
steveeJ (IRC): I'm not sure what happens when applying the HM nixos module during a nixos-install run. In principle I guess it should work but I've never tried it.
<rycee>
steveeJ (IRC): I think there was some issue opened about that recently. I'll try find it.
<{^_^}>
home-manager#417 (by balsoft, 2 weeks ago, open): nixos-install doesn't work when home-manager is used as nixos module
<steveeJ>
rycee: I've tried and it works, except for the aforementioned race during boot
<rycee>
So it should work but only with fetchGit instead of fetchzip, for some reason.
<steveeJ>
Right, I had to use that workaround too
<steveeJ>
It's really neat to prepopulate $HOME like that!
<steveeJ>
rycee: after the system is booted I'd prefer to hand over to the tool though ;)
<LnL>
don't depend on networking in activation scripts, that can make your system unbootable IIRC
zarel has quit [Quit: Leaving]
<rycee>
LnL (IRC): If you refer to the fetchGit and fetchTarball then these are in the `imports` section of the system configuration, so they shouldn't show up in any activation script.
<rycee>
But it seems fetchGit works when using nixos-install but not fetchTarball?
<LnL>
that sounds weird and is why I'm suspecting something weird in the activation scripts
<LnL>
but it could be something totally different
Fare has joined #nixos
<rycee>
steveeJ (IRC): I still suspect that HM is innocent when it comes to the race issue, the logs seem to be from before the .xsession ever gets executed.
<rycee>
LnL (IRC): It seems to be from nix build: nix: src/libexpr/primops.cc:56: void nix::EvalState::realiseContext(const PathSet&): Assertion `store->isStorePath(ctx)' failed.
<steveeJ>
rycee: yes, fetchGit works. I, too, that suspect you're right about the race. I'll keep an eye on it and try out a few more systems. It doesn't happen in qemu for instance
<rycee>
LnL (IRC): There are some bug reports with this in the nix github.
<steveeJ>
rycee: so the module/tool collaboration is much more interesting right now :D
<rycee>
steveeJ (IRC): Did you try switching to a non-autologin? If the error doesn't show up there then perhaps there is some problem with the autologin pam file.
<Twey>
Is the `let { foo = 5; body = foo; }` syntax documented anywhere?
<gchristensen>
I think it is just an implementation detail ...
<Twey>
That's exposed in the language? :P
<LnL>
rycee: oh, it's a module import not a NIX_PATH entry?
<steveeJ>
rycee: I haven't tried but I will tomorrow
<Twey>
But okay, thanks :) So I shouldn't expect humans to ever write it in input?
<simpson>
Twey: I checked nix/manual and did not see it.
<gchristensen>
Twey: I wouldbe very surprised
<Twey>
Cool, thank you
<rycee>
LnL (IRC): Yeah, a module import into the system configuration.
slack1256 has joined #nixos
<Twey>
simpson: Yeah, I know it's not in the manual, but that doesn't mean it isn't hiding in the depths of nixpkgs somewhere...
<simpson>
Twey: Ah, fair. I figure that if it's not in the section on "Functions" in nix/manual then it's effectively not documented.
boxscapeR has quit [Remote host closed the connection]
<LnL>
rycee: I think the caching ttl behaviour of fetchTarball and fetchGit with a ref might be different
vk3wtf has joined #nixos
<Twey>
simpson: My favourite new Nix fact from today is that the 'or' keyword is sometimes special-cased to behave as an identifier, unlike any other keywords -- because there's a nixpkgs function by that name. :)
<simpson>
Twey: Amazing.
<Twey>
(not documented, unsurpisingly)
<Twey>
unsurprisingly**
Unode_ has quit [Quit: WeeChat 2.2]
<steveeJ>
Do nixos-{install, rebuild} support to run commands in a users $HOME in any way?
<Twey>
So you can say 'lib.or true false' where e.g. 'lib.with true false' is obviously a syntax error.
<Twey>
steveeJ: You can pass --root to nixos-install
<Twey>
I don't think you can do anything similar for nixos-rebuild
<LnL>
rycee: as in both would fail with --option tarball-ttl 1
<steveeJ>
Twey: I mean to run a command as user during system activation
o1lo01ol1o has quit [Remote host closed the connection]
<Twey>
steveeJ: I guess you can generate a service that does 'su'
<steveeJ>
rycee: I just looked at the implementation of the module and am surprised that the activation only happens on first boot!
<Twey>
I guess that would run more often though
boxscapeR has joined #nixos
<Twey>
I'm not actually sure how the activation machinery works, hmm...
rprije has joined #nixos
jperras has quit [Ping timeout: 272 seconds]
<rycee>
steveeJ (IRC): You mean of the home-manager-<username> service?
<rycee>
steveeJ (IRC): It should run on each boot.
mayhewluke has quit [Ping timeout: 245 seconds]
mayhewluke has joined #nixos
rprije has quit [Ping timeout: 252 seconds]
ryantrinkle has joined #nixos
rprije has joined #nixos
<steveeJ>
rycee: so it will activate exactly what was built with the nixos config last. What if we had a well-known place for the activation script instead, which is updated with each successful build by the tool too? Worst case is that the boot service runs a noop
<steveeJ>
rycee: or the boot service could checks if the script exists somewhere in HOME and falls back to the one built with the OS
cyraxjoe has joined #nixos
<rycee>
steveeJ (IRC): That might work but I would have to think really hard about it. Mainly I guess about idempotency.
carlosdagos has joined #nixos
drakonis has joined #nixos
<rycee>
Also, like I said the nixos module and home-manager script will eventually generate activation scripts that are not compatible with each other and at that point such a setup wouldn't work.
<steveeJ>
rycee: why will they become incompatible? by necessity or intention?
<rycee>
By necessity. The activation script now assumes that it can run `nix-env -i` but that is not true when the Nix store is really read-only. Like when doing nixos-rebuild build-vm :-\
rrrr has joined #nixos
<rycee>
So the nixos module should instead insert the packages that should be installed into the `users.users.<name?>.packages` NixOS option.
<rycee>
But the home-manager tool can't use that option so it will still have to do nix-env -i.
<rycee>
steveeJ (IRC): Yes, it would mean that home-manager switch would not work.
fooinabar has quit [Ping timeout: 240 seconds]
<rycee>
I guess build and generations and the other sub-commands would still be functional. Just switching would be impossible.
<Lisanna>
I evaluate on a mac and build on linux
<steveeJ>
rycee: so you assume that the nix-daemon can still modify /nix just not the user?
Mr_Keyser_Soze has joined #nixos
<steveeJ>
rycee: there could be different modes for the different contexts, too. one could be assisted by a system daemon which does the switch
<Twey>
Lisanna: Hmm, good point -- I guess I don't actually know what triggers a build. Is it being *passed into* a derivation('s environment)?
<rycee>
steveeJ (IRC): I think nix-daemon in those cases is not functional either, so I guess home-manager build is out.
<steveeJ>
rycee: so nothing would work at runtime, only whatever nixos-{install-rebuild} could set up
<rycee>
steveeJ (IRC): If I recall correctly, then yeah. That's the limitations.
<steveeJ>
rycee: I'm optimistic that there can be compatibility, but I haven't looked at how ˋusers.users.<name?>.packagesˋ is implemented
<rrrr>
Hi, annoying that I have to register a nickname. Anyway, here's my complicated issue: I want to mount Google drive on my computer, but I don't want Google looking through my files, so I want a file that sits in Google drive containing an encrypted filesystem that I can mount locally. For now I just want to have a file in drive that I can mount locally, but I get various errors for a bunch of different things
<rrrr>
I've tried.
<rrrr>
I've tried creating an exFAT filesystem and then using fuse-exfat to mount it, but that gives me USE exfat 1.2.8
<rrrr>
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
<rrrr>
I've tried creating an ext4 filesystem and then mounting with root, but root can't read my google drive mount since I mounted it
<rrrr>
and I can't mount with allow_root, for the same reason that exFAT fails
<steveeJ>
rrrr: the fusermount error message looks very accurate. have you tried to reconfigure fuse?
<rrrr>
What I've tried is man configuration.nix, and then search for FUSE, but I can't find how to configure fuse
<rrrr>
I just tried to mount google drive as root to get around the problem, but it looks like google-drive-ocamlfuse doesn't support that
<Lisanna>
Twey well, this isn't a build problem anyways - it's a platform evaluation problem
<steveeJ>
rrrr: I'd try ˋenvironment.etc.<name?>.textˋ if there's no fuse.conf yet. fuse isn't mentioned in the options explicitly
<{^_^}>
[nixpkgs] @das-g opened pull request #49429 → osmium-tool: init at 1.9.1 incl. dependencies → https://git.io/fx5te
<{^_^}>
[nixpkgs] @timokau pushed commit from @r-ryantm to release-18.09 « matomo: 3.6.0 -> 3.6.1 »: https://git.io/fx5tY
boxscapeR has quit [Quit: Ping timeout (120 seconds)]
Mr_Keyser_Soze has quit [Remote host closed the connection]
<rrrr>
Trying now...
MinceR has quit [Ping timeout: 245 seconds]
boxscapeR has joined #nixos
Thra11 has quit [Ping timeout: 252 seconds]
<rrrr>
Now I get the message fusermount: unknown option 'user=ray', but I also get the message when mounting a file not in Google Drive, so I suspect this is exFAT's fault
MinceR has joined #nixos
<rrrr>
Okay, mounting google drive with allow_root and then mounting the file as root with ext4 works
<rrrr>
so this is kind of a solution
<rrrr>
Thanks for your help.
acarrico has quit [Ping timeout: 240 seconds]
erictapen has quit [Ping timeout: 252 seconds]
<Lisanna>
OK, I think this is a NixOps problem ):
<{^_^}>
[nixpkgs] @thomasjm opened pull request #49430 → R: update CRAN package set to snapshot 2018-10-28 → https://git.io/fx5t5
<jackdk>
I reinstalled my laptop from some old ubuntu to nixos. Now the battery status shows as unknown. tlp-status suggests I should have the acpi_call option. How do I ask for that in configuration.nix? I set boot.initrd.kernelModules = ["acpi-call"]; but still cannot modprobe.
<jackdk>
google claims the error is indicative of a bad battery, but for it to fail at the moment I switch OSes seems like more than mere coincidence
<tmplt>
jackdk: is the module not called "acpi_call" instead of "acpi-call"?
<tmplt>
jackdk: perhaps so, I'm not sure; I've never used an external module before. Never seen a kernel module with a hyphen in its name neither.
<jackdk>
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ]; seems to have done the trick in that tlp-stat can summarise the battery, but it still reports unknown
schopp0r has joined #nixos
<tmplt>
This doesn't happen to be for a Thinkpad ultrabay battery? I have the same problem, but only for the extra battery.
kreisys has quit [Read error: Connection reset by peer]
oida has quit [Ping timeout: 256 seconds]
drakonis_ has joined #nixos
<jackdk>
it is a thinkpad battery but not ultrabay