<ottidmes>
Hmm if I want to nest multiline string literals, I don't want the trailing newlines, because then I get 2 newlines, is there a better way to prevent this then: removeSuffix "\n"
<clever>
rotaerk: you can also add foo = hello; in the nix, and then just use $foo in the nix-shell
<clever>
ah, the haskell mkDerivation complicates it a bit
<rotaerk>
vulkan-loader is a librarySystemDepends, so vulkan-loader is available from within the nix-shell, and I'd like to know where the path is without having to load up default.nix in nix-repl and navigating through it
Sonarpulse has joined #nixos
<clever>
echo $librarySystemDepends would get it, but may also include other things
<rotaerk>
clever, I think it does, though; vulkan-loader is usable in the nix-shell with that override
<rotaerk>
I guess I'll just: which vulkaninfo
<rotaerk>
though that's highly specific to this package
ryantm has quit [Remote host closed the connection]
<jackdk>
I'm trying to package crip ( http://bach.dynet.com/crip/ ). So far, I've managed to get CDDB_get into perl-packages.nix, and I'm trying to make the expression for crip see it. When I test crip in result/bin/crip, it doesn't see CDDB_get.pm. Here is what I have so far: https://pastebin.com/yZ3bKaay . I'm not thrilled by the substituteInPlace calls (
<clever>
ah right, let me check something
<jackdk>
and I think I have them in the wrong phase), but it wasn't replacing the perl shebangs without them.
<clever>
rotaerk: librarySystemDepends is just added to the giant otherBuildInputs list
<clever>
rotaerk: which then goes into buildInputs
fresheyeball has quit [Ping timeout: 264 seconds]
<rotaerk>
ah, echo $buildInputs does display something
<rotaerk>
particularly, vulkan-loader's path
<rotaerk>
thanks
ryantm has joined #nixos
fresheyeball has joined #nixos
<rotaerk>
oh wait, that's a bit different... wonder why
<ottidmes>
jackdk: You should check the patchShebangs command, that should do it for you
<rotaerk>
vulkaninfo is located in /nix/store/q1vq1wvmw0xfbkpdrlimjl34www09xmv-vulkan-loader-1.0.61.1
<rotaerk>
but the patth in buildInputs is /nix/store/rj0bpyn0lnyw0q0v8hm85zdnr2cb37rv-vulkan-loader-1.0.61.1-dev
<rotaerk>
which seems to contain header files
jrolfs_ has quit [Ping timeout: 264 seconds]
<ottidmes>
rotaerk: nix-shell loads the dev version of packages, since that is what you generally want when developing a package
<ottidmes>
rotaerk: That is why I always see it download bash stuff after a garbage collect
<rotaerk>
well it seems to have also loaded the non-dev one too, when I add the package to buildInputs
<rotaerk>
because outside the nix-shell, vulkaninfo doesn't work, and inside, it does
<ottidmes>
rotaerk: If a package has a special dev output, it will load that as well in nix-shell, that is what I meant, but I am not that experienced with nix-shell
<rotaerk>
k
jrolfs_ has joined #nixos
WilliButz has quit [Read error: Connection reset by peer]
<jackdk>
ottidmes: I would have expected that also, but even naming the file specifically like `preFixup = "patchShebangs $out/bin/crip";` doesn't work.
<jackdk>
also the documentation at https://nixos.org/nixpkgs/manual/#ssec-fixup-phase heavily implies that shebang rewriting is automatic, so I'm wondering what I'm doing wrong that it isn't being triggered
kerrhau has quit [Ping timeout: 276 seconds]
WilliButz has joined #nixos
michas_ has quit [Ping timeout: 260 seconds]
jrolfs_ has quit [Ping timeout: 268 seconds]
dan_b has quit [Ping timeout: 240 seconds]
telent has quit [Ping timeout: 264 seconds]
<ottidmes>
jackdk: I am getting: error: attribute 'CDDB_get' missing, is this something you installed locally?
<jackdk>
yes it is. I'll pastebin it: https://pastebin.com/8c4rLmgx (in perl-packages.nix L1661 or so, if you want to keep the file in order)
Piece_Maker has joined #nixos
sigmundv has quit [Ping timeout: 255 seconds]
Acou_Bass has quit [Ping timeout: 260 seconds]
Piece_Maker is now known as Acou_Bass
Acou_Bass has quit [Remote host closed the connection]
markus1189 has joined #nixos
<{^_^}>
[nixpkgs] @baroncharlus opened pull request #38586 → WIP: Add stubby service module → https://git.io/vxQCo
markus1199 has quit [Ping timeout: 260 seconds]
<{^_^}>
[nix-pills] @dudebout opened pull request #57 → fix mispelling of graphviz → https://git.io/vxQC9
<ottidmes>
jackdk: Seems like patchShebangs does not register them as being scripts, and simply ignores them
<jackdk>
weird. [ `head -1 crip | head -c+2` = '#!' ]; echo $? prints 0, replicating the test inside patchShebangs
<{^_^}>
[nix] @dudebout opened pull request #2055 → fix typo in nix-env man page → https://git.io/vxQCH
Supersonic has quit [Disconnected by services]
Supersonic112 has joined #nixos
mbrgm has quit [Ping timeout: 268 seconds]
<ottidmes>
jackdk: Yeah, I thought that maybe they were not executable at the point patchShebangs runs, but chmod +x them does not help
Supersonic112 is now known as Supersonic
<ottidmes>
jackdk: Ah of course
michas_ has joined #nixos
<jackdk>
victory?
<ottidmes>
jackdk: I got it working
<ottidmes>
jackdk: You have to add perl to the buildInputs as well
<jackdk>
thanks. what's the standard for copying files in nixpkgs? cp or install?
<clever>
jackdk: i just use cp
mbrgm has joined #nixos
<ottidmes>
jackdk: cp/mkdir, since install is only useful for permissions and stuff, which will be removed by nix anyway
<samueldr>
is it normal for the output of (I presume) nix 2 to be screwy when used in nixos 17.09, updating to 18.03?
<jackdk>
ok, got it. now if I try to run result/bin/crip that still fails because it can't find CDDB_get.pm. do I need to load it into a shell or something to test that properly?
<clever>
jackdk: the PERLPATH has to be setup right
<samueldr>
AFAIUI, it should show some progress in a line at the bottom for downloads and compilations, right?
<ottidmes>
samueldr: Yeah, caused by nix-daemon still being run as 1.11 I believe, you might want to go into steps, first updating to nix 2.0 and then updating to 18.03, but maybe thats not needed anymore
<samueldr>
good!
<samueldr>
glad that it's not an "only me" issue :)
<samueldr>
(I can cope with a screwy output during the 18.03 update)
<jackdk>
great, it starts. next problem: this laptop has no cd drive. At least I've got something I can push and build on my other machine. Thanks a lot.
jrolfs_ has joined #nixos
<clever>
jackdk: nix-copy-closure can also copy finished builds to another box
<jackdk>
yeah I should learn how to do that. Today's a yak-shaving day anyway, so why not?
<achambe>
Hmm, im trying to copy a closure to a machine with limited memory, and I get 'dumping very large path (> 256 MiB); this may run out of memory'
<achambe>
why would the size of the closure matter?
<Ralith>
nix likes to bounce everything off RAM for some reason
<Ralith>
fixes for some but probably not all cases appear to be in the works
<avn>
I heard 2.x have some improvements here
<achambe>
hmm ok (I still get the error with 'nix copy')
<achambe>
argh, out of memory, it won't let me copy a 500 meg closure to a machine with 600 megs of ram
<boomshroom>
Where can I get help writing udev rules? I'd like to be able to run the Joy-Con driver without sudo.
<Ralith>
achambe: I'm told git master of nix 2 is slightly less terrible about this
<achambe>
ah, yeah im reading some commits from 4 days ago that mention constant memory use.
* Ralith
assumes people weren't thinking of large outputs being a thing
<achambe>
well, im trying to do what nixops does basically, copy a whole system derivation
<achambe>
nixos-rebuild build ; nix copy ./result
<{^_^}>
[nixpkgs] @badi opened pull request #38589 → Add TLAPS and TLA+ Toolbox → https://git.io/vxQWS
tmaekawa has joined #nixos
<achambe>
neat, the memory use is going way down, 514 to 18 megs in a recent commit
<thoughtpolice>
boomshroom: I've looked over/used this guide before. http://www.reactivated.net/writing_udev_rules.html -- normally you're just gonna do something like match on vendor/product IDs and set a MODE= or group attribute or something. Should be pretty easy; look around under ./nixos and you can also find some udev rules written for the modules that should help I think...
<thoughtpolice>
Most rules are really simple
<boomshroom>
thoughtpolice: I'm already on that website, but I can't find udevinfo. I only seem to have udevadm and it doesn't seem to give the same info.
<Ralith>
achambe: wait, 4 days ago? what commit are you looking at?
<thoughtpolice>
Ah, I normally just need to know the rule syntax. What are you trying to do with udevadm, reload rules or somesuch?
<thoughtpolice>
boomshroom: I don't have a bluetooth device on hand -- one thing you can try is running `udevadm control --environment` which should show you the kernel event of the device being attached. Do the `SUBSYSTEM` and `KERNELS` match by chance?
<thoughtpolice>
(Well I do have one somewhere somewhere I'd just have to find it)
<thoughtpolice>
Err, sorry. Wrong command
<thoughtpolice>
`udevadm monitor --environment`
Arcaelyx_ is now known as Arcaelyx
<boomshroom>
thoughtpolice: Nothing prints.
<thoughtpolice>
Do you have a name of the attached device node you can use, even with root? /dev/something?
<thoughtpolice>
boomshroom: Oh, and to be clear -- run `udevadm monitor --environment` and then *attach the device*. Sorry, I wasn't clear about that last bit
<thoughtpolice>
If you have the device name, you can use `udevadm info -a -n /path/to/node`
<thoughtpolice>
boomshroom: yep. Now make sure the attributes match; you could alternatively modify the rule to work on matching some other specific attribute to debug it. udev will auto-reload rules so you can just keep modifying them, plugging in the device, and watching for events
<thoughtpolice>
If you don't know the /dev node name you can also use the /sys path with `udevadm info` IIRC
lopsided98 has quit [Remote host closed the connection]
<boomshroom>
Let's try this config.
lopsided98 has joined #nixos
<boomshroom>
"Couldn't open JoyCon device - install udev rules or run as sudo"
<iqubic>
Can the JoyCons connect to Linux Machines?
<jackdk>
Okay, next step to get this cd ripping script packaged (currently: https://pastebin.com/E9ttn8xA ). crip itself calls out to cdparanoia, oggenc, and a bunch of others to do all the real work, which obviously don't exist in my current shell because I'm testing by running result/bin/crip. is there a way to load the thing I just built into a shell?
<jackdk>
It would be nice to not have to patch and refactor crip to use nix-store paths for all the tools it depends on, but if that's the correct way to do it that's what I'll do.
<thoughtpolice>
boomshroom: Hmm. Taking a shot in the dark but maybe it's related to that `uinput` bit... The original version actually bases it on a group. Maybe try `strace`ing and see if you get something like an open(2) permission error...
<boomshroom>
iqubic: Yes. I've done so as root. Now I'm trying to do so not-as-root.
lord| has quit [Ping timeout: 260 seconds]
<thoughtpolice>
jackdk: You can use makeWrapper. What you probably want to do is use it to create a shell wrapper that properly sets `$PATH` for every file under $out/bin
<boomshroom>
thoughtpolice: The driver displays that message specifically if it got a permission error.
<jackdk>
thoughtpolice: great, thank you.
<samueldr>
ouch, maybe I should have tried nix 2.0 before it reached stable :/
<thoughtpolice>
boomshroom: Right. I assume this is because it's trying to access `uinput` as your user and being denied (that's the shot in the dark). `strace` would probably just help actually confirm that's the case (since you could see the open call or whatever being denied). In which case you know your udev rule is (for some reason) wrong.
<freeman42x]NixOS>
anyone run into following issue when updating to 18.03? https://paste2.org/1sbNFJ6B after printing those warnings it freezes
<achambe>
freeman42x]NixOS: I have gotten that warning, but no freeze
<freeman42x]NixOS>
achambe, for me it just gets stuck there, not seeing any major resource usage
<thoughtpolice>
Well, you already know the rule is wrong, of course. :) More specifically you could try fiddling more with `TAG+="uaccess"` (which doesn't seem very well documented/understood from what I can see?); the original variant adds a group. Maybe try that and see if you get something else, etc.
<boomshroom>
The last thing strace says before the error is a futex wait.
<freeman42x]NixOS>
achambe, it unfroze after a very long time
lopsided98 has quit [Remote host closed the connection]
michas_ has quit [Ping timeout: 260 seconds]
Fare has joined #nixos
lord| has joined #nixos
klntsky has quit [Ping timeout: 268 seconds]
<jackdk>
freeman42x]NixOS that happened to me, but I think it was silently downloading in the background because after a while it got moving again
<jackdk>
the machine in question completed the upgrade and rebooted fine
<tnks>
can any of the fetch* functions unpack something that's curled over?
<tnks>
I have both .tgz and .txz files upstream curl-able.
<jackdk>
I've nearly got crip properly packaged, but it wants to know the user's text editor. I could make it depend on nano and substitute the `$editor = "vim"` lines in the scripts with the full path to nano, but I'm not sure that's the best idiom. Any advice?
<{^_^}>
[nix] @samueldr opened pull request #2056 → nix-shell: Fixes use with ruby shebangs. → https://git.io/vxQlp
<samueldr>
it would be `services.xserver.windowManager.xmonad.enable`
alhariel has quit [Remote host closed the connection]
<Days>
samueldr: quick question. whould this install both xmonad and xmonad-contrib?
<iqubic>
No. You also need 'services.xserver.windowManager.xmonad.enableContribAndExtras'
schoppenhauer has quit [Ping timeout: 256 seconds]
<Days>
thank you iqubic
<iqubic>
Also added to your configuration.nix
<samueldr>
:) thanks iqubic, I know nothing about xmonad
<samueldr>
only that it *is* present in nixpkgs :)
<bett>
does anybody use polybar with i3? did you have to manually build polybar with i3 support?
<Days>
will im just waitting for nixos-install to get over with
<iqubic>
samueldr: I have used nixos and xmonad for a while myself. That's how I know what to do.
schoppenhauer has joined #nixos
<Days>
I have used nixos for like a 1.5 month before around 17.09
<iqubic>
Days: If you are just now running nixos-install you can skip the nixos-rebuild switch. Unless the installer wants you to do that. I don't recall.
<iqubic>
Yeah, I just switched to 18.03 now.
<iqubic>
*yesterday.
<Days>
liking how nix2 is less clutter compare to wall text like before
<iqubic>
what is nix2?
<samueldr>
iqubic: it's the new nix you now use in 18.03
<samueldr>
I'm actually upgrading my machines
<iqubic>
Oh, I see.
<samueldr>
(it was nixUnstable, then nixStable2 in 17.09 for what it's worth)
<Days>
oo god.. Failed to create EFI Boot variable entry: No such file or directory
<{^_^}>
[nixpkgs] @endgame opened pull request #38594 → crip: init at 3.9; perlPackages.CDDB_get: init at 2.28 → https://git.io/vxQ4L
<samueldr>
while the motherboard is UEFI, most (all?) can still boot in Legacy mode, a `No such file or directory` error message would lead me to believe efivars aren't mounted, which is usually a sign that the machine is booted as Legacy
<samueldr>
(though I may be wrong!)
<iqubic>
Hmm. Odd. nixos-rebuild still works for me.
<iqubic>
Oh, wait, it worked to allow me to upgrade *to* 18.03
<Days>
maybe I should I have reboot after using fdisk
jrolfs_ has quit [Ping timeout: 264 seconds]
<iqubic>
Anyone have a link to a guide on the new nix command, or should I read the man page?
<samueldr>
iqubic: nixos-* and nix-* are not entirely related (nixos-* isn't part of nix) and nix-* tools will still work and are still the stable interface (e.g. for scripting)
<iqubic>
Does this have any effect on the nixos-* commands for working with the linux distro?
<samueldr>
iqubic: in the 2.0 release notes they answer your nix-* question
* samueldr
is searching for the relevant line
<iqubic>
And are there any changes to the nixos-* commands?
<samueldr>
hmm, I thought that was there that I read that the nix-* aren't going anywhere for a while and should be considered the stable alternative (for e.g. scripting)
<samueldr>
and as for nixos-* commands, they are unrelated to nix, and I don't know for sure, but I would assume that they aren't changing, haven't seen anything fly by about that
<iqubic>
And I quote from the release notes:
<iqubic>
"It introduces a new command named nix, which is intended to eventually replace all nix-* commands with a more consistent and better designed user interface."
<samueldr>
I think the keyword is "eventually"
<iqubic>
Yeah. Because wouldn't that change require re-writing most of the scripts in nixpkg?
<samueldr>
(they are introducing neat features for scripting, like json output for commands so they can be consumed in a safer manner)
<achambe>
it would be a slow deprecation, also the new command doesn't support all the same stuff
<achambe>
yet I think
<samueldr>
I love how upgrading to 18.03 was painless ♥ as always
<iqubic>
Yeah. I literally just updated the url of the main nixos branch, and then told Nixos to install the latest packages.
<Days>
im going redo this. just going make sure I reboot after using fdisk. then I'll start were I left off. uploading all the config to hastebin ^.^ so I can pick up where I left off
<iqubic>
What is wrong with what you have currently done?
tertle||eltret has quit [Quit: Connection closed for inactivity]
Guest39 has joined #nixos
lord| has quit [Quit: WeeChat 2.1]
lord| has joined #nixos
tmaekawa has quit [Quit: tmaekawa]
<achambe>
Have there ever been any alternative implementations of the nix language by the way? No real reason, just wondering how well specified the language is.
lord| has quit [Client Quit]
lord| has joined #nixos
<iqubic>
Why are there so many different packages for taskwarrior.
<iqubic>
??
Days has joined #nixos
Rusty1_ has quit [Quit: Konversation terminated!]
Days has quit [Client Quit]
Guest39 has quit [Ping timeout: 260 seconds]
kreisys has quit [Read error: Connection reset by peer]
spinningarrow has quit [Quit: Ping timeout (120 seconds)]
johnw has joined #nixos
Fare has quit [Ping timeout: 264 seconds]
bpa has joined #nixos
duckwho has quit [Ping timeout: 246 seconds]
jad340 has joined #nixos
duckwho has joined #nixos
spinningarrow has joined #nixos
freeman42x]NixOS has quit [Ping timeout: 264 seconds]
<jad340>
How can I get libinput to ignore some devices on 18.03? Upgrading has caused the trackpoint on my ThinkPad X270 to act really wonky in regards to acceleration (I don't like any of the acceleration profiles libinput has either)
<{^_^}>
→ dbffe147 by R. RyanTM: asymptote: 2.41 -> 2.42
<{^_^}>
→ d1d52adb by @peti: Merge pull request #38601 from r-ryantm/auto-update/asymptote
blahdodo has joined #nixos
<{^_^}>
[nixpkgs] @wmertens pushed to gc-mtu « google-compute-image: provide correct MTU »: https://git.io/vxQEk
<{^_^}>
[nixpkgs] @FRidh pushed 21 commits to python-unstable: https://git.io/vxQEI
<{^_^}>
→ 61704709 by @FRidh: python: astroid: 1.6.2 -> 1.6.3
<{^_^}>
→ 51fbf9c7 by @FRidh: python: CairoSVG: 2.1.2 -> 2.1.3
<{^_^}>
→ f3e4c90a by @FRidh: python: djangorestframework: 3.8.0 -> 3.8.2
<{^_^}>
[nixpkgs] @wmertens opened pull request #38605 → google-compute-image: provide correct MTU → https://git.io/vxQEm
aarvar has quit [Remote host closed the connection]
bpa has quit [Remote host closed the connection]
<justanotheruser>
Is there a way I can generate an expression which generates my current environment?
<elvishjerricco>
justanotheruser: Can you elaborate? Do you mean an expression that determines how to reproduce your current nix-env profile?
aarvar has joined #nixos
<justanotheruser>
For example, if my nix file is simply environment.systemPackages = with pkgs; [gcc];", then I"run "nix-env -i tmux", my expression would be " environment.systemPackages = with pkgs; [gcc tmux];"
<justanotheruser>
messed up the quote placement..
<elvishjerricco>
justanotheruser: Oh. So you want to _generate_ an expression based on your nix-env profile?
<elvishjerricco>
I don't think anything like that exists currently
<{^_^}>
→ c83682bb by @mdorman: gtk-traymanager: fix build
<{^_^}>
→ 2498bcb1 by @peti: hackage-packages.nix: automatic Haskell package set update
jonoabroad has joined #nixos
ashgillman has quit [Ping timeout: 264 seconds]
jrolfs_ has joined #nixos
<FRidh>
Records store paths installed by nix-env
<justanotheruser>
ah ok
<FRidh>
Whenever you install additional packages, or perform upgrades, it takes that info and extends/updates it.
ashgillman has joined #nixos
xy2_ has joined #nixos
jonoabroad has quit [Quit: leaving]
Lears has joined #nixos
<boomshroom>
justanotheruser: I just took a look at it. You can get the resulting store path for each package and the file the derivation was defined in.
rauno has quit [Ping timeout: 240 seconds]
duckwho has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @dotlambda pushed commit from @r-ryantm to master « ccnet: 6.1.0 -> 6.1.7 (#38593) »: https://git.io/vxQE1
<{^_^}>
→ 66973708 by @veprbl: xaw3d: use an https download url
<{^_^}>
→ ea1c5522 by @Mic92: Merge pull request #38603 from veprbl/patch-5
nschoe has joined #nixos
<nschoe>
Hi everyone, I have to add a custom udev rule for my USBTiny ISP (arduino). From my readings, it looks like the correct place is to add in configuration.nix, under the services.udev.extraRules. Is that right?
pie_ has joined #nixos
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
→ 7b75bc79 by R. RyanTM: bcftools: 1.7 -> 1.8
<{^_^}>
→ 62dc9899 by @Mic92: Merge pull request #38595 from r-ryantm/auto-update/bcftools
<{^_^}>
→ 18fa5403 by @Mic92: bcftools: python/perl is needed for shebangs
<MichaelRaskin>
If this is a desktop situation, so to completely independent cards, you can just force the Xorg configuration to only use one of the cards
hakujin has quit [Ping timeout: 264 seconds]
<{^_^}>
[nixpkgs] @dotlambda pushed 22 commits to python-unstable: https://git.io/vxQg9
<{^_^}>
→ 29eb453b by @FRidh: python: djangorestframework: 3.8.0 -> 3.8.2
<{^_^}>
→ 490cf914 by @FRidh: python: dulwich: 0.19.1 -> 0.19.2
<{^_^}>
→ 33dce884 by @FRidh: python: flit: 0.13 -> 1.0
<{^_^}>
→ 998a19e8 by @ryantrinkle: syslog-ng: enable SMTP destination
<{^_^}>
→ 380dd22f by @grahamc: terraform-provider-nixos: init at 0.0.1
<{^_^}>
→ db535009 by @danbornside: libesmtp: add metadata
<seafood>
Is this the channel to ask about nix utlitieis such as nix-shell?
<FRidh>
yep
<seafood>
Okay, I’m running nix-shell but I’m not getting the “[nix-shell]” prompt out the front.
<seafood>
In fact, it seems to be loading most of my .bashrc files etc.
<seafood>
Adding the —pure flag doesn’t seem to change things
<seafood>
I’m just getting my regular prompt.
<seafood>
I’m using “nix-shell (Nix) 2.0”
<seafood>
And doing it on Mac OS X
ashgillman has quit [Ping timeout: 265 seconds]
ashgillman has joined #nixos
kerrhau has quit [Ping timeout: 276 seconds]
rihards has joined #nixos
Ariakenom has joined #nixos
optikfluffel has joined #nixos
<justanotheruser>
"Nix has multi-user support. This means that non-privileged users can securely install software. Each user can have a different profile, a set of packages in the Nix store that appear in the user’s PATH. If a user installs a package that another user has already installed previously, the package won’t be built or downloaded a second time. At the same time, it is not possible for one user to inject a Trojan
<justanotheruser>
horse into a package that might be used by another user."
<justanotheruser>
Aren't there some packages that must be shared by the users, like kernel stuff? Or is that quote just commenting on the lack of permissions, and not the fact that different users use different packages.
iyzsong has joined #nixos
<tilpner>
You can't use Nix to install the kernel on Nix-on-Linux setups
<tilpner>
That only works on NixOS, where only root can rebuild into a configuration that sets the kernel
<justanotheruser>
I'm on nixos
<justanotheruser>
ah ok
<justanotheruser>
so it is a comment on permissions then
<MichaelRaskin>
tilpner: actually you can, in a sense
<MichaelRaskin>
Anyway, every user can install a kernel (and use it for VMs), but root picks what gets booted for the machine.
<LnL>
any user could build and use a different kernel, but they can't change the current kernel ofcorse
nschoe has quit [Ping timeout: 260 seconds]
<tilpner>
MichaelRaskin - Yes, I know. You technically can, but it's not really intended. You can install a kernel, but root still has to configure it to boot
<tilpner>
(At least I never heard of a Nix-on-Linux setup booting Nix kernels)
<MichaelRaskin>
Well, there is also clever's not-os
<tilpner>
:c
<MichaelRaskin>
And I don't know if NixWRT is already deployed on someone's router…
<tilpner>
If we always mention all exceptions, all explanations become technically correct but much more annoying to read, perhaps even useless if they confuse the asking person
knupfer has joined #nixos
<tilpner>
By Nix-on-Linux I was referring to your standard Ubuntu, Arch, etc.
<tilpner>
On a desktop/laptop
<justanotheruser>
how can I select an older version of chromium?
zybell_ has quit [Ping timeout: 260 seconds]
<tilpner>
I guess I should have said s/can't/usually don't/
<{^_^}>
→ 2dac2271 by R. RyanTM: dbus-glib: 0.108 -> 0.110
<{^_^}>
→ 86e5f228 by @Mic92: Merge pull request #38582 from r-ryantm/auto-update/dbus-glib
asuryawanshi has joined #nixos
martingale has quit [Ping timeout: 260 seconds]
marting__ has joined #nixos
<elvishjerricco>
seafood: There's a massive autogenerated package set, based on Stackage plus some extra curations in configuration-hackage2nix.nix. Then there's a bunch of manually written overrides to fix builds in the various configuration-xyz.nix files.
asuryawanshi has quit [Ping timeout: 245 seconds]
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
→ c550af54 by R. RyanTM: gdbm: 1.14 -> 1.14.1
<{^_^}>
→ 8d05ae48 by @Mic92: Merge pull request #38563 from r-ryantm/auto-update/gdbm
knupfer has quit [Ping timeout: 265 seconds]
xAFFE has left #nixos ["Error from remote client"]
Alling has joined #nixos
<bbsl>
Im fairly new to nix/nixos and Iv made a made a haskell project using nix-shell to develop and nix-build to build. It was working fine last time I used it but now it seemes to have broken Im getting this error: https://pastebin.com/mDB4aiRH anyone have any idea what it is and how to fix it?
<{^_^}>
→ 63378bd6 by @Mic92: Merge pull request #38558 from concatime/patch-2
<Alling>
I have a oneshot systemd service whose script includes "tmux new ...". When I build, that service fails with "tmux: command not found". tmux works fine if I run it manually. What should I do?
<{^_^}>
→ 1a59c8d0 by R. RyanTM: harfbuzz: 1.7.5 -> 1.7.6
<{^_^}>
→ 9ac7fa77 by @Mic92: Merge pull request #38555 from r-ryantm/auto-update/harfbuzz
<Alling>
Yaniel: I can't find anything on nativeInputs from a quick Google search.
<Yaniel>
or was it nativeBuildInputs
<oW-NAPfzaZHT7>
is it possible to set custom cflags for packages?
<ottidmes>
bbsl: Seems to be unrelated to the nix tooling, but rather what you are trying to build seems to be broken, seems like the patch is failing causing the whole to fail
<oW-NAPfzaZHT7>
I don't care if I have to rebuild everything
<oW-NAPfzaZHT7>
I just want a different code layout than everyone else
<Alling>
Yaniel: Where does nativeBuildInputs go in my configuration.nix?
<Yaniel>
it's used in custom packages
<ottidmes>
oW-NAPfzaZHT7: To all packages? Or to some package? If it is for all packages, you probably want to modify stdenv.mkDerivation to incorporate that
<bbsl>
ottidmes: hmm yea but I am not trying to patch anything in the build the patching is happening in the nixpackage that build the lib (Taggy) I think, so maybe Taggy or the nixpkgs version of taggy is broken?
<oW-NAPfzaZHT7>
for all
mounty has quit [Remote host closed the connection]
martinga_ has joined #nixos
<ottidmes>
Alling: Are you sure you are using absolute paths? Systemd requires absolute paths for ExecStart and the like
<Alling>
ottidmes: I don't think I'm using an absolute path for tmux if that's what you mean. It's just "tmux new ..." in my script.
mounty has joined #nixos
mounty has quit [Client Quit]
<bbsl>
ottidmes: it says "applying patch /nix/store/f2yllwm5vnr069ciq0h47ykiammgpfz9-blaze-markup.patch" I guess this is called from somewhere. maybe I can disable it somehow, though I dont know how and with what function and or option?
<ottidmes>
Alling: You then probably want to do either: https://nixos.org/nixos/options.html#systemd.services.%3Cname%3E.path or in your script (if it is created via nix, that is) ${tmux}/bin/tmux
mounty has joined #nixos
jackdk has joined #nixos
<ottidmes>
Alling: The latter you probably have to do ${pkgs.tmux}/bin/tmux
<{^_^}>
→ b2491ba5 by @matklad: jetbrains.clion: 2017.3.4 -> 2018.1
<{^_^}>
→ 2bddfb16 by @matklad: jetbrains.goland: 2017.3.3 -> 2018.1
<{^_^}>
→ 0215ae06 by @matklad: jetbrains.idea-community: 2017.3.5 -> 2018.1
<Alling>
ottidmes: Omg, haha, turns out none of my systemd services have been working for this very reason. :D
<Alling>
ottidmes: path = with pkgs; [ tmux ]; works like a charm!"
<ottidmes>
Alling: Good to hear! I had the same problem with my first systemd services ;)
<Alling>
ottidmes: Although the actual tmux script thing doesn't work, hm ...
<ottidmes>
Alling: What is the error?
<Alling>
ottidmes: No error. Service starts up as expected. But tmux list-sessions says "no server running on /tmp/tmux-1000/default"
Aleksejs has quit [Ping timeout: 240 seconds]
Aleksejs has joined #nixos
pie__ has quit [Quit: Leaving]
<ottidmes>
Alling: I have only seen tmux being mentioned, no experience with myself, but the 1000 is often the first uid, could it be that you have to run it as the user? If so, you can specify that via serviceConfig.User
<Alling>
ottidmes: I have a mitmproxy that I want to start automatically when my server boots up. As of today, I have to manually start a tmux session and, inside it, start the proxy, then disconnect from the tmux session.
<Alling>
I.e. I have to ssh to my server to start the mitmproxy every time I have rebooted the server.
xAFFE has joined #nixos
<Alling>
ottidmes: I tried serviceConfig.User = "alling"; but still no sessions
<{^_^}>
[nixpkgs] @Mic92 pushed 20 commits to release-18.03: https://git.io/vxQo8
<{^_^}>
→ b157efcd by Averell Dalton: jetbrains.ruby-mine: 2017.3.2 -> 2017.3.3
<{^_^}>
→ 1dee074f by Averell Dalton: jetbrains.webstorm: 2017.3.4 -> 2017.3.5
<{^_^}>
→ 8458aae0 by Averell Dalton: jetbrains.pycharm-professional: 2017.3.3 -> 2017.3.4
<{^_^}>
[nixpkgs] @vcunat pushed 147 commits to staging-18.03: https://git.io/vxQo4
<{^_^}>
→ dde80d70 by @Ericson2314: qtbase: Fix x86_64-conditional logic
<{^_^}>
→ eeb8419c by @Ericson2314: ceph: Fix --with-file-aio logic for new meta.platforms and cross
<{^_^}>
→ 79d8353b by @Ericson2314: treewide: Make `shouldUsePackages` copypasta use meta.available
<{^_^}>
→ 7a510176 by @joncfoo: psc-package v0.3.2-pre -> v0.3.2
<{^_^}>
→ 82059417 by @Mic92: Merge pull request #38575 from joncfoo/update-psc-package
MichaelRaskin has joined #nixos
<bbsl>
can anyone tell me what is the command to get nix-shell to source both a .nix file as well as enter packages with the -p file;
<Alling>
ottidmes: Yeah I usually ssh and run tmux manually.
<ottidmes>
Alling: Another issue might be something missing in the environment. I would just try and see how it is running when started as the service, try and figure out the differences between that and running it as user
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @joncfoo to release-18.03 « psc-package v0.3.2-pre -> v0.3.2 »: https://git.io/vxQoa
seafood has quit [Quit: seafood]
<bbsl>
ie. I want to do this nix-shell -p haskellPackages.hlint release.nix but it wont let me, if I do either of the two ns -> release.nix or ns -> haskellPackages.hlint it works fine
<Alling>
ottidmes: What do you mean exactly? journalctl says "Starting mitmproxy ...", then "Started mitmproxy." No errors.
<Alling>
bbsl: Could you maybe put hlint in release.nix?
<ottidmes>
bbsl: Maybe start nested nix-shell's first one with -p and then with your nix file?
<mpickering>
how often does staging get merged into master?
<{^_^}>
→ 8f7750b1 by @tadfisher: enyo-doom: init at 1.05
seafood has joined #nixos
<Alling>
ottidmes: I tried adding a touch command in the script of my service, so I could confirm that the script runs successfully. I just can't find "where the tmux session is", if it exists at all. :D
<{^_^}>
→ 28cf1a7a by @Mic92: Merge pull request #38572 from tadfisher/enyo-doom
<ottidmes>
Alling: I mean that something has to be different about starting it via systemd and what you do normally, which most likely has to do with with the environment being different in both cases, so try and figure out what differences might be problematic. You could also try starting it as a systemd user service
<bbsl>
Alling: no I cant put it in release.nix I want this file to only be the build deps and my development deps I want outside of the file. I tried doing it with a seperate shell.nix file and that worked fine untill something broke in one of the packages Im using in my project and I had to manualy downgrade it. Now everything is a mess :)
<bbsl>
ottidmes: I thought nested nix-shells were a nono?
<bbsl>
anyhow I just want to source a .nix file and add a -p {package} to it, is that not possible?
<Alling>
bbsl: As is tradition when working with Haskell packages. ^^
martinga_ has quit [Read error: Connection reset by peer]
<ottidmes>
bbsl: I have little experience with nix-shell, I am afraid, but the manpage does say this "{{--packages | -p} packages... | [path]}", so it seem like either or, and not like you can have both, but nested nix-shell might work as long as you do not make them --pure, or modify the .nix file to have its derivation list the packages you want as well as buildInputs, I guess that would work too
<FRidh>
mpickering: it is done manually. It typically depends on the amount of successfull builds (we don't want to break master)
seafood has quit [Quit: seafood]
<FRidh>
I intend to merge staging into master after tomorrows' staging evaluation.
seafood has joined #nixos
<ottidmes>
bbsl: You really should post your deriviation, I just tried installing taggy and it works fine for me, unfortunately I will not be able to help you, I have to go right now, good luck!
<bbsl>
ottidmes: I generated most of it with cabal2nix, I guess some other lib/package Im importing is patching taggy and then Taggy tries to redo the same patch or something, dunnno ... I mannaged to get nix-build working by version locking taggy to the latest version but nix-shell which sources another .nix file containing my dev deps as well as the build deps still does'nt work. Anyhow ty for the help
<{^_^}>
→ 209d4555 by @sifmelcara: pcmanx-gtk2: fix build
<{^_^}>
→ b214874b by @Mic92: Merge pull request #38541 from sifmelcara/fix/pcmanx/libtoolize
shoogz has quit [Ping timeout: 268 seconds]
<bbsl>
so I want to try to override taggy (a package) in my shell.nix file based on a derivation i have in a taggy.nix file can anyone help me with how I can go about doing that please? https://paste.ee/p/6p1J4
jtojnar has joined #nixos
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nschoe has joined #nixos
aszlig has joined #nixos
<vaibhavsagar>
bbsl: I can't see how to edit that paste
<vaibhavsagar>
I don't think I should have to download it, make edits locally, and reupload it when only 2-3 lines need to be changed in shell.nix
Unode has quit [Ping timeout: 245 seconds]
<vaibhavsagar>
basically under `f = haskellPackages.callPackage f {}` you should be able to put `taggy' = haskellPackages.callPackage ./taggy.nix {}` and then use `taggy'` instead of `taggy` in `f`
<mpickering>
In the shell.nix add a new line "extension = sel: sup: { taggy = super.callPackage ./taggy.nix; }" Then change pkgs.haskellPackages to pkgs.haskellPackages.extend(extension)
<mpickering>
vaibhavsagar: That isn't going to work properly if taggy is a dependency of anything
Ariakenom has quit [Read error: Connection reset by peer]
<bbsl>
vaibhavsagar: ok sorry I should have found somewhere to paste it that could have been edited
<bbsl>
mpickering: Il try that
<mpickering>
I am missing {} where I called "callPackage" it should be super.callPackage ./taggy.nix {};
FRidh has quit [Quit: Konversation terminated!]
Unode has joined #nixos
<vaibhavsagar>
mpickering: good point, I hadn't considered that :)
<avn>
mpickering: my "most favorite" mistake btw ;)
<bbsl>
mpickering: woot it worked, ta. Do you know if there is a syntax checker for nix on emacs btw? allso can you help me understand your function? "extension = sel: sup: { taggy = sup.callPackage ./taggy.nix {}; };" so it assigns to a varname extention but what does sel: sup: mean? its anon functions or?
vaninwagen has quit [Ping timeout: 265 seconds]
optikfluffel has joined #nixos
<Myrl-saki>
Dezgeg: Hey, are you still maintaining the RasPi NixOS image?
<mpickering>
bbsl: extension is a function which takes two arguments. "sel" is the result of extending the package set. "sup" is the old package set before your extension. The result of the function is a set which contains each attribute you want to replace or add to the package set.
oahong has quit [Ping timeout: 260 seconds]
<mpickering>
So because you want to replace the "taggy" attribute you have an attribute set with "taggy = ..."
<mpickering>
then you can apply this extension using the "extend" method
pie_ has joined #nixos
<Dezgeg>
Myrl-saki: yes
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
optikfluffel has joined #nixos
jackdk has quit [Ping timeout: 264 seconds]
oahong has joined #nixos
<bbsl>
mpickering: ty though I still dont understand it but "extend" is a function that take 2 arguements sel and sup are supplied as arguments but what I dont understand is what does the ":" in sel: and sup: mean. (Im guessing it has something to do with how they get values assigned to them but ya.. )
<mpickering>
No extend takes one argument which is a function
<mpickering>
"extension" is a function with two arguments
<mpickering>
: is like a lambda in haskell
<mpickering>
extension = \sel sup -> ...
<bbsl>
hmm and then sup.callPackage {arg} returns 2 arguments?
<bbsl>
ok I think I get it
<bbsl>
ty, again :)
throwboy has quit [Quit: Ping timeout (120 seconds)]
Ariakenom has joined #nixos
<bbsl>
does anyone have syntax checking set up for nix el? Id like to set something up in emacs but all Iv found so far is a configuration.nix word list type thing
<Myrl-saki>
Dezgeg: Thanks, just wanted to make sure.
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
→ 50a34e55 by @Ma27: nixos/iftop: add module
<{^_^}>
→ 6fd1520e by @Mic92: Merge pull request #38547 from Ma27/iftop-module
<Asmadeus>
Hi. I'm somewhat new at nix, it took me ages to figure how to build a custom kernel (using zfs unstable + boot.crashDump.enable was a cache miss and takes ages to recompile so I wanted to turn tons of junk off), I think I have something here but I have a couple of questions...
optikfluffel has joined #nixos
<Asmadeus>
First, my config http://pastebin.notk.org/pastebin.php?show=d7911058 and nix-info system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.0, channels(root): "nixos-18.03.131802.4b4bbce199d", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
optikfluffel has quit [Client Quit]
civodul has joined #nixos
optikfluffel has joined #nixos
<Asmadeus>
Questions: nixos-rebuild switch only builds with make -j 1 despite nix.buildCores = 4; in the config, while nixos-rebuild switch --cores 4 does make -j 4, any idea why?
<{^_^}>
[nixpkgs] @Mic92 merged pull request #38515 → firefox: fix wrapper to make proper symlink to icon → https://git.io/vx9Sa
<Asmadeus>
Hm, let me try that, might not trigger two rebuilds at least
dan_b has joined #nixos
telent has joined #nixos
ndrei has joined #nixos
<symphorien>
linuxPackages is using the concept of scope, so overriding it might have surprising effects. But I have never really understood scopes, so, sorry...
<ndrei>
Hi, I'm trying to rebuild the system config using a local nixpkgs checkout, (running nixos-rebuild -I path/to/checkout switch --upgrade), I've defined a new top-level var in pkgs/top-level/all-packages.nix and I get an "undefined variable '<my-var>' error"
<ndrei>
Not sure if the problem is with the -I switch or somewhere else..
<Asmadeus>
Do you know what happens if I set boot.kernelPatches in my configuration.nix but also use that crashdump optino which also sets config.boot.kernelPatches ? Did mine "overwrite" crashdump's or do both get applied?
<symphorien>
ndrei: not sure whether --upgrade makes sense with -I
knupfer has joined #nixos
<symphorien>
Asmadeus: kernelPatches is a list; they are merged
<ndrei>
indeed, I've just tried removing that and I still get the same error
nschoe has quit [Quit: Program. Terminated.]
<symphorien>
each patch is applied sequentially
nschoe has joined #nixos
<symphorien>
and use: -I nixpkgs=/path/to/checkout
<{^_^}>
→ 0de00d57 by @xeji: systemd 238: bump revision for upstream bugfixes
<{^_^}>
→ 2cf343fc by @Mic92: Merge pull request #38475 from xeji/p/systemd-238-bump
<ndrei>
symphorien: still something I'm confused about: I'm now getting a bunch of "copying path from <...> cache.nixos.org" messages, and the nixpkgs checkout is in sync with the GitHub master. Is this expected?
bbsl has quit [Remote host closed the connection]
<symphorien>
all expression which have not changed (including dependencies) since last hydra build are still fectched from the cache
<ndrei>
right. but my local config is set up with the "unstable" channel, so... why does it look like everything is reinstalling from scratch?
<ndrei>
I thought unstable == nixpkgs/master
<ndrei>
I wasn't expecting everything to rebuild - sorry if I'm really confused about how this should work, it's just not what I was expecting
<ndrei>
so I guess my question is: when all I want is to add one package definition to nixpkgs, is a local checkout + edit of all-packages and adding the definition the way to it?
<thoughtpolice>
ndrei: First, occasionally, there will be changes to very low level packages on Nixpkgs master (AKA 'unstable'), and this will cause a lot of things to be rebuilt. If you use master, you may occasionally update, rebuild, and 'reinstall' a lot of stuff that it looks like you already have, from cache.nixos.org. This is expected.
<thoughtpolice>
Also you will occasionally just update really really soon after some package you need was changed.
logzet has quit [Ping timeout: 265 seconds]
martingale has quit [Read error: Connection reset by peer]
<justanotheruser>
line 4 is nixos-1803 = import <nixos-18.03> {};
logzet_ has joined #nixos
<thoughtpolice>
Like, the other day I updated right after rustPackages was updated. So I had to rebuild 'hyperfine', no way around that, it was only like 20 minutes earlier.
<thoughtpolice>
ndrei: Second, you are correct about how to add a package to Nixpkgs. At least, this is always the way I do it. Just modify all-packages.nix and add it there.
raynold has quit [Quit: Connection closed for inactivity]
<thoughtpolice>
There are about a million ways to actually write local expressions that don't need to be inside the tree, but if you plan on submitting a PR for example this is definitely the way to go, since you'd have to do it anyway.
<{^_^}>
[nixpkgs] @dotlambda pushed commit from @r-ryantm to master « insomnia: 5.14.9 -> 5.15.0 (#38554) »: https://git.io/vxQXI
<ndrei>
yeah, I was planning to have that kind of set up for a while, since I have a few local packages I could submit, I'm still interested in one of the millions of alternatives though :). Precisely, for system-level packages, since I don't use per-user stuff
<kuri0>
what prefix do i have to build an application for nix with ?
sellout- has joined #nixos
srdqty has quit [Quit: WeeChat 1.9.1]
duckwho has quit [Ping timeout: 260 seconds]
martingale has quit [Read error: Connection reset by peer]
duckwho has joined #nixos
martingale has joined #nixos
<thoughtpolice>
ndrei: Luckily if you want to use "standalone" expressions (foo.nix for my private 'foo' binary) with your own configuration.nix, that's pretty easy. Just use `foo = pkgs.callPackage /path/to/expression.nix {}`, and put `foo` inside environment.systemPackages. Just like you would if you added it inside all-packages.nix
<thoughtpolice>
You can just have it be any path. On one of my machines I have a few private binaries and my configuration.nix says something like `foo = pkgs.callPackage /home/austin/src/project/default.nix {}` -- that's totally OK.
samueldr has quit [Ping timeout: 256 seconds]
<thoughtpolice>
As an alternative, you could also put that .nix file right next to configuration.nix. Put it in git next to it, whatever. I have some packages I keep around this way, too (private packages that I did not author, for example, but want to use)
<thoughtpolice>
ndrei: This is almost certainly the easiest way to go if you expect all your private things will always be installed globally, directly through configuration.nix, and you don't ever plan on using nix-env.
<{^_^}>
[nixpkgs] @dotlambda pushed commit from @r-ryantm to master « inboxer: 1.0.3 -> 1.0.4 (#38226) »: https://git.io/vxQXz
<ndrei>
thoughtpolice: thanks, that's actually what I was doing atm, so I don't really know what I was asking :).
<thoughtpolice>
ndrei: Oh, you were already putting the `callPackage` calls inside your configuration.nix? Then you're on the right track. That's probably the best way to do it.
<ndrei>
I guess it's more of expecting a more "modular" way of doing that, I would like, for example, to be able to reference some nixpkgs fork from GitHub and pick a particular package definition to merge in
<thoughtpolice>
Oh, you can absolutely do that, too.
<kuri0>
are there any nix based distros other than nixos ?
<thoughtpolice>
ndrei: This kind of usage is called "import from derivation". It is not always available, JSYK. (For example, Hydra disables it.) But it works well for cases like this, and is normally quite OK.
<guest>
hello. i'm trying to cross compile a C/C++ project to arm. do you have a documention/example how to do? (system: "x86_64-linux" version: nix-env (Nix) 1.11.15)
<{^_^}>
[nixpkgs] @dotlambda opened pull request #38614 → sigal: add ffmpeg to PATH → https://git.io/vxQMt
jperras has quit [Ping timeout: 265 seconds]
jacob_ has joined #nixos
aszlig has quit [Quit: Kerneling down for reboot NOW.]
ma27 has quit [Ping timeout: 265 seconds]
blankhart has joined #nixos
aszlig has joined #nixos
chisui has quit [Quit: Page closed]
chisui has joined #nixos
jperras has joined #nixos
adamt has joined #nixos
adamt is now known as Guest25108
jperras has quit [Ping timeout: 264 seconds]
lassulus has quit [Ping timeout: 256 seconds]
mkoenig_ has joined #nixos
mkoenig has quit [Ping timeout: 260 seconds]
<Dezgeg>
I wonder if anybody has tried running vagrant boxes inside nix builds
<Dezgeg>
(use case would be to run integration tests on other distros)
lopsided98 has quit [Remote host closed the connection]
nschoe has quit [Quit: Program. Terminated.]
pie_ has quit [Ping timeout: 264 seconds]
lopsided98 has joined #nixos
vidbina has joined #nixos
pie_ has joined #nixos
srdqty has joined #nixos
boxscape has joined #nixos
<boxscape>
so, I'm pretty new to nixos. One thing I'm still confused about is, when should I put a package into my configuration.nix vs installing it with nix-env -iA?
jperras has joined #nixos
<ertes-w>
what's the proper way to get a PHP derivation with all the extensions built?
<ertes-w>
like bz2, curl, etc.
<ertes-w>
the ones that come with PHP
<infinisil>
boxscape: If you're the only user those two aren't very different. It's up to you. nix-env is faster but not reproducible, configuration.nix takes a bit longer but is reproducible
<boxscape>
okay, thanks
<ertes-w>
boxscape: i'd say you should almost always install it using nix-env… the only case where using configuration.nix makes sense is when you need the package's SetUID wrappers, or when you have some system service that depends on the package, like a cronjob
<infinisil>
boxscape: I personally use `nix-shell -p hello` if i need something to try it out, nix-env -i when I want to also install it but am too lazy to add it to configuration.nix and configuraiton.nix when I really think it's useful and i wanna keep it forever
<ertes-w>
reproducibility is possible with nix-env… you just write a package set in your ~/.nixpkgs/config.nix
<ertes-w>
for example i have a package called 'ertes-base' that includes all the packages that i use regularly
<{^_^}>
→ 6d8a5870 by @dotlambda: sigal: add ffmpeg to PATH
<{^_^}>
→ 2cf5f979 by @Mic92: Merge pull request #38614 from dotlambda/sigal
jperras has joined #nixos
<bhipple[m]>
I've just updated from 17.09 to 18.03 and I seem to be having an issue with my display manager not starting anymore (just drops me into cmdline). This happen to anyone else?
<bhipple[m]>
Still debugging, but I've tried removing all my custom xserver options and rebooting, and systemctl doesn't list any failed units. Anyone have a hint what might be going on?
<samueldr>
which display manager? here with sddm (and using either intel or nvidia drivers) everything updated smoothly on two machines
<samueldr>
I mean, smoothly enough that I almost had trouble believing anything changed :)
<bhipple[m]>
displayManager sddm, desktopManager none, windowmManager xmonad. Trying with all defaults now but still just getting dropped into the cmdline
<ndrei>
I'm trying to build https://github.com/anmonteiro/lumo, which builds with Boot (Clojure builder).. which uses Java. Anyway, when I run the "boot release" as a user, it builds fine, but when doing so through a nix expression (`buildPhase = "boot release"`) I get an error from Java which I believe is related to FS permissions (the error is: `Exception in thread "main" java.io.IOException: No such file or directory
<ndrei>
at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createTempFile(File.java:2024)`)
<bhipple[m]>
Does nix put the x11 logs somewhere other than /var/log/Xorg.0.log? I don't see them in journalctl either
<samueldr>
they should be in the journal
fendor has joined #nixos
jperras has quit [Ping timeout: 276 seconds]
<samueldr>
though, --unit=display-manager iirc
<ndrei>
It sounds like it's related to trying to write permissions, do I have to use buildFHSenv for that?
<samueldr>
(yes, --unit=display-manager here I have X log)
<fendor>
morning, when using the freeglut library, i get the error: freeglut (client): failed to open display 'desktop:7'
<ndrei>
so... Java is tyring to create a temporary file and fails... why? and how can I fix that?
<{^_^}>
→ 2e905fb4 by R. RyanTM: openttd: 1.7.2 -> 1.8.0
<bhipple[m]>
<3 the ability to reboot with an older config and compare :)
<{^_^}>
→ 2eb81677 by @Mic92: Merge pull request #38517 from r-ryantm/auto-update/openttd
<ndrei>
samueldr: thanks, I've tried "mkdir foo; _JAVA_OPTIONS: -Djava.io.tmpdir=foo; boot release" but still no luck
<zybell_>
bhipple[m]:Normally that is a sign that a superfluous '&' is around.
<bhipple[m]>
In the sddm config?
Arcaelyx has quit [Ping timeout: 268 seconds]
<ndrei>
I haven't found any examples of something similar in nixpkgs, neither involving "buildFHSUserEnv" in a build context
<ndrei>
not sure that would be the way to go but I figured that would allow me to simulate a user env while building since afterwards I only need the binary
<zybell_>
The process goes like: startscript starts X/sddm/..., ...goes background(*'&'*),startscript ends,systemd wakes and SIGTERMs all started(from script) procs incl. X/sddm/whatever.
<zybell_>
systemd services going background is a no-no.
Rusty1_ has joined #nixos
<bhipple[m]>
Hmm, let me try something like slim instead of sddm and see if I get different results
<bhipple[m]>
It doesn't look like the sddm nixos module was changed between 17.09 and 18.03 tho
Arcaelyx has joined #nixos
valasztasponthu is now known as oW-NAPfzaZHT7
<zybell_>
Its how you run it, not like its compiled, that is important.
<bhipple[m]>
Aha, with slim I got a lot more error messages. It looks like the x11 server failed to start due to amdgpu driver issues
<bhipple[m]>
Yeah, I think the sddm start script just backgrounds something waiting for x11 to come up, which means when ssytemd kills it you don't get much in the way of eerror messages
<zybell_>
ndrei: look in which dir you run java, and in which dir mkdir runs. Absolute paths in nix start with $out/ not /.
justanotheruser has joined #nixos
jrolfs has quit [Ping timeout: 276 seconds]
<ndrei>
zybell_: I've just tried with `mkdir $out/foo` and now I get `mkdir: cannot create directory '/nix/store/w7lcmp02dx22aq133dhlcgw1yh7ca1sw-lumo-1.8.0/source/foo': No such file or directory`
jrolfs has joined #nixos
CornBurglar has joined #nixos
<zybell_>
Did you try in build or in shell. mkdir -p might help.
<bhipple[m]>
zybell_: It looks like the root issue was my `videoDrivers = [ "amdgpu" ];` line. Commenting that out gets me an X11 server started up with sddm and friends, with a few other bugs (2nd and 3rd monitors are rotated incorrectly)
sigmundv has joined #nixos
<zybell_>
I thought that already after sli report.
<ndrei>
zybell_: what do you mean by "in shell"? tried with `mkdir -p` as well, same error message
<zybell_>
*slim
ma27 has joined #nixos
ma27 has quit [Client Quit]
<bhipple[m]>
Trying out amdgpu-pro to see if I have better luck there
ma27 has joined #nixos
<zybell_>
the syntax is for .nix-files; if you're doing it at nix-shell you're doing it wrong.
<zybell_>
*nix-shell prompt
<ndrei>
no, not using nix-shell, I have the .nix file called with pkgs.callPackage in configuration.nix
Fare has quit [Ping timeout: 256 seconds]
<CornBurglar>
Heyy, I'm trying to reinstall Nixos and I'm running into an error. I feel like it's something simple, but I can't seem to solve it. the error yielded by nixos-install is: Failed to create EFI Boot variable entry: No such file or directory
phreedom has quit [Remote host closed the connection]
oida has quit [Remote host closed the connection]
phreedom has joined #nixos
<samueldr>
CornBurglar: using systemd-boot?
oida has joined #nixos
<ndrei>
CornBurglar: do you have UEFI enabled?
<CornBurglar>
my configuration.nix contains boot.loader.systemd-boot.enable = true;
<samueldr>
someone earlier/yesterday had a similar or the same issue with systemd-boot
<samueldr>
reportedly after booting in the system, you can put back `canTouchEfiVariables` to true and rebuild without issues
<zybell_>
then mkdir -p $out/foo at build time should work unless the disk is full. However it would be ro at runtime. So a symlink ln -s whatever-works $out/foo/link at build time is a useful addon.
<CornBurglar>
Wonder what would cause that problem
<CornBurglar>
I'll see if that workaround works
<samueldr>
I do wonder too
<samueldr>
my guess (and supported by the conversation I linked) is that anyway systemd-boot wouldn't re-touch the efi variables after being installed once, so it's not really fixed
<samueldr>
CornBurglar: could you tell me which iso image (exact filename) you are using?
lopsided98 has quit [Remote host closed the connection]
<CornBurglar>
let me reboot and see if the installation was successful
<CornBurglar>
workaround was successful*
nuncanada has quit [Ping timeout: 264 seconds]
lopsided98 has joined #nixos
boxscape has quit [Ping timeout: 260 seconds]
maingo has joined #nixos
CornBurglar has quit [Ping timeout: 260 seconds]
CornBurglar has joined #nixos
<CornBurglar>
appears to be working
Guest39 has quit [Read error: Connection reset by peer]
John882_ has joined #nixos
John882_ has quit [Client Quit]
<michas_>
Hi, setting up a local kubernetes "cluster" on nixos is easy using `services.kubernetes.roles = ["master" "node"];`. What do I need to do if I want to run master and node on different machines?
CornBurglar has quit [Ping timeout: 260 seconds]
<musicmatze[m]>
Hi. Is there a way to tell nixos-rebuild build-vm how much RAM to use for the VM? I read that the startup script uses 384 MB ... but I'd like to throw in 8GB
<{^_^}>
→ 4c7db1c7 by @mpickering: openorienteering-mapper: 0.8.1 -> 0.8.1.2
<mightybyte>
I was assuming that nix-build would only build things of type "Derivation" and so to accomplish my purposes I'd need to have a derivation combining function.
<{^_^}>
→ a2efd3e8 by @Mic92: openorienteering-mapper: also enable linux
<{^_^}>
→ 0fe94a12 by @mpickering: openorienteering-mapper: Load additional image formats
mmlb has quit [Ping timeout: 264 seconds]
<Turion>
mightybyte: Do you want to do something like continuous integration and build matrices?
<mpickering>
Thanks Mic92!
<Mic92>
no problem
<mightybyte>
Turion: I'm wanting something that I can run locally.
mmlb has joined #nixos
<Turion>
Makes sense
ma27 has quit [Ping timeout: 256 seconds]
<mightybyte>
I already have CI testing with multiple compiler versions, but I was thinking that nix should be able to let me easily do that locally
<mightybyte>
...and be significantly faster thanks to caching.
<infinisil>
mightybyte: And if that doesn't work, there is linkFarm which takes an attrset { foo = <some drv>; bar = <some drv>; } and produces a derivation with $out/foo and $out/bar that are symlinks to the result of the derivations
<infinisil>
Maybe that's a better idea
<bkchr[m]>
How is maintaining the `aarch64-unstable` branch in nixpkgs?
<mightybyte>
Ooh, nice!
<Turion>
mightybyte, I'd be interested how that turns out, it sounds like a project that might serve a bigger purpose!
<mightybyte>
Oh yes
<mightybyte>
It most definitely does
<infinisil>
Turion: Well it's just how nix works really
<infinisil>
Oh you don't mean that
<infinisil>
nvm
<mightybyte>
infinisil: What's the first argument to linkFarm?
<mightybyte>
Just an arbitrary name?
<LnL>
the drv name probably
<infinisil>
It's the name of the derivation, this doesn't matter
<infinisil>
Ah and it's a list of { name = "name"; path = "..."; } pairs
<infinisil>
not an attrset like i initially thought
simukis has joined #nixos
<mightybyte>
infinisil: Oh, does that actually do what I need?
<mightybyte>
Where would I get the path from?
<infinisil>
mightybyte: Well it creates a single derivation that needs to build all others, so i think so
<Turion>
toString
<infinisil>
mightybyte: Turion: Nah, use "${packageToBuild}", this will be the same as "${packageToBuild.outPath}"
<Turion>
Ah ok :)
<infinisil>
I think toString would just give you the path to it without actually building it
boomshroom has joined #nixos
<boomshroom>
Hello!
<infinisil>
boomshroom: Hi!
<bkchr[m]>
Dezgeg: are you maintaining the `aarch64-unstable` branch?
<Dezgeg>
well it's my personal testing branch rather
ertes-w is now known as supercynic
<bkchr[m]>
Dezgeg: hydra is building the packages based on this branch?
<Lears>
I'm using `nix-shell -p "haskellPackages.ghcWithPackages (p: [ p.xmonad p.xmonad-contrib ])" --run "ghci ~/.xmonad/xmonad.hs"` so ghci can see the xmonad libraries it needs to interpret my config, but it misses the private modules in ~/.xmonad/lib. Anyone know how to rectify that?
<bkchr[m]>
Yeah.
<bkchr[m]>
That is what I thought, that this branch is linked to this hydra evaluation
<infinisil>
Turion: Because that's what it takes to evaluate it, nothing wrong with that
<bkchr[m]>
Could you push an update with the latest changes? I'm interested if rust finally builds again.
<infinisil>
Lears: You probably need to create nix expressions for those modules so you can add them to the list there
<Turion>
infinisil, ah ok. No way around that then except decreasing the amount of packages I'm pulling in, I guess. And the memory slowly decreases as it downloads packages because it can delete stuff from the list of things yet-to-build?
<infinisil>
Lears: Oh wait, maybe not, I'm not sure actually
<Turion>
(If so, I wonder whether lazyness can be used to improve that behaviour... I always need to switch of firefox and thunderbird when I update, since I only have 2 GB RAM)
optikfluffel has joined #nixos
<infinisil>
Turion: Switch off?
<Turion>
Errm, kill, quit
alex`` has joined #nixos
<infinisil>
Ah. Yeah Nix can take quiet a bit of RAM, I don't know the exact behaviour of it though
<Turion>
(Maybe another problem is that firefox eats so much memory in the first place, but I've come to accept this)
<infinisil>
Turion: You could build the system on a different machine
<Turion>
infinisil, I don't quite understand...
<Turion>
Compilation and so on is already done by the Hydra mostly
<infinisil>
Ah right it's just evaluating nix in that case
<infinisil>
Yeah that can't be done on a different machine
<Turion>
Ah ok
<infinisil>
Well it can actually, but then you need to move your config to the other machine
<Turion>
If it could, I would be incredibly amazed
<Turion>
And still I need to move the build result back somehow
<infinisil>
There's --build-host and --target-host arguments to nixos-rebuild
<bkchr[m]>
Dezgeg: ahh nice, did not know that. I usually find it really hard to find the information I want in hydra ^^
<Turion>
Hmmm yes makes sense, otherwise all the nixops stuff would be horrible, right?
<infinisil>
Yeah it's kinda required for Nixops
<Turion>
So I could turn it around and have a server farm build the system for my laptop
<infinisil>
yup
<Turion>
Another thing I'm wondering (which would improve things already) is how I can increase the default niceness (and io niceness) for the nix daemon
<infinisil>
Just nixos-rebuild with --target-system to your laptop
<mpickering>
What do I do if a program looks for executables on PATH at runtime? Is using makeWrapper the right thing to do?
<infinisil>
mpickering: Or you could patch the source to look for binaries at the /nix/store paths directly
<mpickering>
ok
<Turion>
infinisil, thanks! I don't know why I didn't find it before on the options list
posco_ has joined #nixos
vidbina has quit [Ping timeout: 240 seconds]
<avn>
Folks, btw can we have some agreement (may be even semi-automatic) to name fetchFromGitHub derivations as "${owner}-${repo}" for example?
<avn>
I understand that is not possible to throw-in at once (cause rebuilds, etc), but I found that ~20 of source derivations named ${hash}-source downloading in row push me to depression
<boomshroom>
avn: I'd rather "${owner}-${repo}-${shortHash}"
<infinisil>
avn: Yeah good point..
<infinisil>
avn: PR time?
<avn>
boomshroom: yep, it similiar with what I do with own stuff, so updating shortHash invalidate hash as well ;)
<avn>
infinisil: Not sure if we want mass PR, which invalidate all fetchFromGitHub at once
kerrhau has joined #nixos
kerrhau has quit [Changing host]
kerrhau has joined #nixos
<LnL>
avn: there's a reason why everything uses name = "source" by dfault
<avn>
and anyway, I am busy by farewell lib-prefixed packages
<Turion>
I do wonder though why memory consumption of nix-build goes up again (to 1.4 GB) while downloading ghc. I understand it may have a high consumption in the beginning when it figures out what my system should be. But once it knows that, why should the memory still go up? It just has to download a ton of paths and write them to the disk.
<boomshroom>
I'm trying to make a minimal system with the nixos module system. Currently it fails with a strange message "The option `nixpkgs' defined in `/nix/store/blqgf10slwb43ghkvyw6cx8zz8pxd7pl-default.nix' does not exist." https://github.com/boomshroom/nixos-bare
kerrhau- has joined #nixos
<boomshroom>
Does anyone have Discord working on NixOS?
<avn>
infinisil: LnL: I am agreed about default "source" for fetchzip, but I believe we can undo `gitRepoToName repo rev,`
<infinisil>
avn: That has the problem the commit mentioned though?
optikfluffel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rotaerk>
boomshroom, I'm using it via the browser; the discord *package* didn't seem to work
<rotaerk>
I think it's an out-of-date version
kerrhau has quit [Ping timeout: 256 seconds]
<boomshroom>
rotaerk: Thank you. Sad to see it's not up to date.
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
<tilpner>
boomshroom - You need to import modules/misc/nixpkgs.nix
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
<tilpner>
boomshroom - I've tried what I think you're doing. Maintaining custom baseModules was very painful, and didn't buy a lot of speed, if that's why you're trying this
freeman42x]NixOS has joined #nixos
<tilpner>
(Don't listen to that if you want to upstream this. I'm all for that)
optikfluffel has quit [Client Quit]
sigmundv__ has quit [Ping timeout: 245 seconds]
<boomshroom>
tilpner: Thank you. There's a chance I may look at that module more closely in the future should I really want to cut ties to nixpkgs.
optikfluffel has joined #nixos
<tilpner>
boomshroom - What do you want to achieve?
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
<boomshroom>
tilpner: 1. To learn more about how NixOS is put together. 2. To try to swap out components that are non-configurable in NixOS. 3. Absolute Control.
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thblt has quit [Read error: Connection reset by peer]
optikfluffel has joined #nixos
thblt has joined #nixos
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
mkoenig_ has quit [Remote host closed the connection]
optikfluffel has quit [Client Quit]
thblt has quit [Read error: Connection reset by peer]
<infinisil>
The module system should give you a lot of control
optikfluffel has joined #nixos
<infinisil>
There should be only very few things that aren't configurable
thblt has joined #nixos
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
mkoenig has joined #nixos
ryanartecona has quit [Quit: ryanartecona]
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
pkill9 has joined #nixos
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
<tilpner>
infinisil - But blacklisting options via module paths is ugly. Whitelisting would be better :)
optikfluffel has joined #nixos
optikfluffel has quit [Client Quit]
<infinisil>
Ah yeah, the evaluating-all-modules-in-all-cases isn't very nice
<tilpner>
boomshroom - Oh, okay. Learning how it works is good
<mpickering>
Does dlopen have some magic in on OS X to open .dylib if looking for .so?
kmicklas has joined #nixos
jacob_ has quit [Quit: Lost terminal]
mmlb has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @andreivolt opened pull request #38619 → lumo: init at 1.8 → https://git.io/vxQFY
mmlb has joined #nixos
mmlb has quit [Read error: Connection reset by peer]
mmlb has joined #nixos
mmlb has quit [Read error: Connection reset by peer]
mmlb has joined #nixos
zybell_ has quit [Ping timeout: 264 seconds]
mmlb has quit [Read error: Connection reset by peer]
zybell_ has joined #nixos
mmlb has joined #nixos
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mduggie has quit [Ping timeout: 256 seconds]
fendor has quit [Remote host closed the connection]
mduggie has joined #nixos
fendor has joined #nixos
ryanartecona has joined #nixos
vidbina has joined #nixos
<fendor>
hey, i am trying to use gloss for haskell, but when i start the program, it fails with roughly the message: freeglut(client): unable to open display: 'desktop:7'
<fendor>
any ideas why that might happen?
<infinisil>
Huh that's weird, DISPLAY should always be :0 on NixOS
alex`` has quit [Quit: WeeChat 2.1]
<fendor>
yeah, you mentally replace the 'desktop:7' with ':0', same error.
<fendor>
*you can
<infinisil>
So you tested it with :0 and it didn't work either?
<fendor>
yes
<infinisil>
No idea then, I just recently however compiled a small gloss example and it worked no problem
fragamus has joined #nixos
<Turion>
fendor, I've gone through similar trouble
fresheyeball has quit [Ping timeout: 240 seconds]
<Turion>
Are you using stack or cabal?
<Turion>
(My recommendation: Use stack, and in the stack.yaml use nix)
<fendor>
Turion, doing both
<Turion>
Both failing?
<infinisil>
Well this gloss example I compiled with plain ghc
<fendor>
i mean, i am using stack and stack.yaml
fresheyeball has joined #nixos
<infinisil>
If I could choose I'd use cabal, but that gives me lots of problems with my editor setup, so I would be using stack if I had to choose right now
<Turion>
infinisil, ah, did you not go through strange linking problems or freeglut runtime errors?
<fendor>
i have a freeglut runtime error
<infinisil>
I did not
<fendor>
Turion, what libraries would I need?
<fendor>
in nix?
MP2E has joined #nixos
<Turion>
fendor: I ended up with:
<Turion>
nix:
<Turion>
enable: true
<Turion>
packages: [mesa freeglut]
<fendor>
doesnt work for me :(
<Turion>
Then I'm already at the end of my wisdom, sorry :( but I'd really like to hear the solution once you find it
<Turion>
fendor, do you have the code online somewhere so I can give it a try?
<infinisil>
Seems to use user namespaces though, so it won't run actually everywhere
<fendor>
infinisil, this works
<bhipple[m]>
It lists that in the "Drawbacks" section at the bottom. That said, most Linux machines have user namespaces on after kernel 3.8, unless they have a patch to turn it off (RHEL7, Centos7)
<Turion>
gchristensen, that's cool! Although you still need nix to create the single executable
<infinisil>
bhipple[m]: Yeah, CentOS seems to run on a lot of hosted servers, so that's why it's somewhat significant i think
Myrl-saki has joined #nixos
<{^_^}>
[cabal2nix] @ryantm opened pull request #345 → CC0-1.0 is now a known license → https://git.io/vxQNG
<Myrl-saki>
Dezgeg: The armv7l seems to be lacking findutils.
<Myrl-saki>
I sha256summed it, and it seems my local copy is correct.
jperras has joined #nixos
<Myrl-saki>
binutils and shadow, I think.
<Myrl-saki>
Err
<Myrl-saki>
findutils
bbsl has joined #nixos
<Turion>
htop claims that xmobar is using 1.0T shared memory... wat?
<Turion>
Errm, virtual memory
<Myrl-saki>
Turion: I think all Haskell programs do that.
<Turion>
Then I don't really understand virtual memory
<bbsl>
Turion: I had a problem on arch where xmobar would load the cpu for no reason tried to google it a bit but found no real solution, uninstalled xmobar and started using lemonbar :p
<bbsl>
anyone else have the "curl 22" when using nix pull stuff from the internet? Iv had it for a few months now and its kindof annoying :), is there a fix?
<fendor>
infinisil, compiling pong via nix works fine
<keith_analog>
Hi All, I'm trying to install the nix package manager on an unbuntu machine that happens to be poorly configured. In particular, the path / is mounted on a filesystem that is full, and unfortunately I cannot change this configuration. There is however plenty of storage in /home. What is the easiest method to get nix installed on this machine? Thanks!
<Myrl-saki>
Turion: But I don't work with the RTS, so I don't know.
knupfer has quit [Quit: knupfer]
<{^_^}>
[cabal2nix] @ryantm closed pull request #345 → CC0-1.0 is now a known license → https://git.io/vxQNG
<infinisil>
keith_analog: Hard truth, the easiest way is to get / to not be full and then install nix like normal
<infinisil>
While it's possible to install nix in a different location, it's really not recommended
<keith_analog>
ok thanks. i am cursing whomever thought it wise to allocate 2gb to / and 1tb to /home
<symphorien>
keith_analog: maybe bind mount a subdir of /home on /nix
<infinisil>
Oh yeah that might work
<keith_analog>
symphorien: oh, interesting. do you know of a pointer to bind mount?
<keith_analog>
it's the first i've heard of it
<symphorien>
man mount , option --bind
<infinisil>
keith_analog: `man mount` then search for "bind"
<keith_analog>
got it, thanks!
<{^_^}>
[cabal2nix] @ryantm reopened pull request #345 → CC0-1.0 is now a known license → https://git.io/vxQNG
boxscape has joined #nixos
Myrl-saki has quit [Read error: Connection reset by peer]
Myrl-saki has joined #nixos
<boxscape>
hm, this is strange. Pinging nixos.wiki from my NixOS machine gives me "network is unreachable", even though I can reach it from my phone in the same wifi network. Pinging nixos.org tries to ping the IP at least, but never gets a reply. Opening nixos.org in firefox immediately says that it can't be found. But again, works on my phone...
vaninwagen has quit [Quit: Connection closed for inactivity]
<boxscape>
sometimes it works though
<keith_analog>
symphorien: brilliant! it seems to work. i can at least succeed now in `nix-shell -p hwloc --command "hwloc"`
<symphorien>
:)
bbsl has quit [Remote host closed the connection]
raynold has joined #nixos
<Turion>
bbsl: My xmobar stays below 1 luckily :)
<Turion>
infinisil, your pong works for me! Although it does consume 50 % of my CPU
<infinisil>
huh
robstr has quit [Quit: WeeChat 1.9.1]
<infinisil>
Oh, maybe add some -O flag to the ghc call
<infinisil>
I just used `ghc Main.hs`
pie__ has joined #nixos
<Turion>
I'll try :)
<rycee>
infinisil: Pardon the delay, just got online. That looks like a nice addition to the module system! :-)
<Turion>
But isn't there a more generic builder for haskell projects somehow?
ixxie has joined #nixos
<infinisil>
rycee: Has been hit with some dissasisfaction in the comments though :(
<infinisil>
Turion: Yeah there is, but I didn't wanna stumble into potential problems regarding that. A simple ghc call is all I needed
aarvar has joined #nixos
tomberek has joined #nixos
pie_ has quit [Ping timeout: 276 seconds]
<tomberek>
is there a way to have Hydra send a test email? (other than by deliberately breaking a build?)
<rycee>
infinisil: Yeah, I notice. But I'm not sure why it specifically is harmful. It seems like a patch that increases the consistency of the code behavior.
<infinisil>
rycee: Yeah, there's absolutely nothing bad about this patch, it just adds a tiny bit of functionality, nothing gets worse with this
<infinisil>
But makes it much nicer for HM and nix-darwin
<rycee>
infinisil: I.e., before the lib argument was treated special for no apparent reason (at least from what I can tell).
<infinisil>
rycee: Yeah it always referred to nixpkgs/lib, without any way to change it
<rycee>
infinisil: Yeah. I'm also liking nbp's suggestion to simply have a new hmLib attribute :-)
<rycee>
Anyway, I'll write a comment in the issue.
<infinisil>
Yeah I guess that would work too, but I'd like the lib argument for that better, it's still library functions after all
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
srdqty has quit [Ping timeout: 240 seconds]
<LnL>
infinisil: rycee: so far I've not really needed any libs shared across multiple modules, but I was planning to use module arguments
nix-noob has joined #nixos
<infinisil>
LnL: Hmm.. So you're also for having a separate argument for custom lib functions?
srdqty has joined #nixos
<nix-noob>
Hello. Can anyone here advise on how to setup a gitconfig file? I have tried saving it both to `~/.gitconfig` as well as putting it in my `configuration.nix` file, and yet each time I try to clone a private repo I still need to enter my github username and pw
<LnL>
infinisil: if I extended lib I wouldn't add stuff toplevel so the usage would be pretty similar
<infinisil>
nix-noob: Not sure what this has to do with nix, so probably #git is better suited
ndrei has quit [Remote host closed the connection]
dbe_ has quit [Ping timeout: 256 seconds]
ndrei has joined #nixos
<infinisil>
LnL: I just don't like the idea of doing { lib, myLib, ... }: with lib; with myLib; when this simple change allows you to only have { lib, ... }: with lib;
bpa has quit [Remote host closed the connection]
srdqty has quit [Ping timeout: 240 seconds]
<infinisil>
Also - and I'm gonna mention this in the PR - Without this change the module system is not modifiable whatsoever, if you wanted to do even a slight change you need to fork nixpkgs
<nix-noob>
infinisil: thank you. Will try there.
nix-noob has quit [Quit: Page closed]
<tomberek>
nix-noob: I believe there are options that cannot go into .gitconfig for security reasons... instead use ssh to authenticate with github
<Turion>
infinisil: Compiled with -O2 and now it consumes 90% :D
xcmw has joined #nixos
<rycee>
nix-noob: I think you need to look up using ssh keys with github. It'll make it easier to avoid having to enter username/password.
<infinisil>
Hehe sorry tomberek and rycee you were too slow
<infinisil>
(he left)
ndrei has quit [Remote host closed the connection]
srdqty has joined #nixos
fresheyeball has quit [Ping timeout: 256 seconds]
<infinisil>
Turion: Damn.. And that's just a simple pong..
<rycee>
infinisil: Hehe, matrix is too slow to pick up /parts :-)
mahalel_ has joined #nixos
<m3lt>
infinisi: thx, it works now
ndrei has joined #nixos
ruhatch has joined #nixos
<Turion>
Yes ;) maybe it's my slow computer. It's definitely not a nixos problem though
<ruhatch>
Hey all
<ruhatch>
I'm trying to use the sshconfig-file part of the NIX_PATH for fetchgitPrivate
<ruhatch>
But I'm working with a remote build machine
fiddlerwoaroof has quit [Ping timeout: 256 seconds]
<ruhatch>
I've set up the nix.nixPath on the build machine to contain the correct config, and if I build the fetchgitPrivate derivation there it's fine
Yaniel has quit [Excess Flood]
<Turion>
infinisil: I guess it's just the line "fps = 120".
<ruhatch>
But if I run the build remotely it doesn't seem to pick up that NIX_PATH
<ruhatch>
So I tried to use a local ssh-config-file and set up the path locally, but that also didn't work
Yaniel has joined #nixos
<rycee>
infinisil: Yeah, I think being able to adjust the module system itself is a powerful argument and I think nbp appreciated that. I'm also thinking that the part about it being best to use it only for modifying the module system might be worth considering. I haven't thought about it too much but I'll ponder it for some time :-)
<ruhatch>
Any ideas on how to get the remote builder to see that config file?
<infinisil>
rycee: Cool, thanks :)
<mpickering>
If I wrap an executable setting LD_LIBRARY_PATH then the executable invokes another executable, is LD_LIBRARY_PATH set for the executable it invokes as well?
sehqlr has joined #nixos
<LnL>
infinisil: the change itself is fine, it just makes it easier to do bad things
<infinisil>
rycee: Are you on your phone that you're so slow with typing or is this your normal typing speed? :P
fiddlerwoaroof has joined #nixos
<sehqlr>
hello all
Guest25108 has quit [Ping timeout: 240 seconds]
<infinisil>
LnL: Agreed
ilyaigpetrov has quit [Quit: Connection closed for inactivity]
<infinisil>
LnL: But honestly, if you're messing with functions in the fixed point of lib you probably have your reasons heh
fresheyeball has joined #nixos
<Izorkin_>
help. how to use virtualisation/qemu-vm.nix ?
<guest>
i have added a custom dev environment as overlay, using myEnvFun. however, when using the script load-env-mycustomenv, $PATH is not pure. is is possible to load a pure environement (ie reproducible) using myEnvFun? or should I use something else?
<ruhatch>
It doesn't have read access from the repo
<ruhatch>
But there is a key and ssh-config file on the remote machine
<ruhatch>
It's just not able to see it
<infinisil>
LnL: It sure is a useful function though
<ruhatch>
Because the NIX_PATH isn't being used during the remote build
<infinisil>
NIX_PATH is only used during evaluation which happens always on the local machine
<LnL>
infinisil: that's the point :)
<ruhatch>
Okay - do you know how the ssh-config-file part of the path is used?
<ruhatch>
Would that be passed to a remote builder?
<infinisil>
Yeah, it's passed in GIT_SSH, which will be an env var of the builder
<infinisil>
But only the path to the config file, not the config file itself
<ruhatch>
Okay, so as long as it's on the remote machine at some path it should be able to find it?
<infinisil>
I haven't used fetchgitPrivate myself though. Maybe try getting it to work locally on the remote machine first
<ruhatch>
It has done
<ruhatch>
It's just the remote version
<ruhatch>
I'll see if I can get it to work with some predefined path
<ruhatch>
I've got to go, but thanks for the help!
<infinisil>
Yeah, good luck, bye!
ryanartecona has quit [Quit: ryanartecona]
<infinisil>
LnL: I mean sometimes you just need certain functions
<infinisil>
LnL: And with the extensible lib change you can even override it with a more efficient implementation if you can do it :o
<LnL>
that's the scary stuff I'm thinking of that people shouldn't do :p
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<infinisil>
I mean it's gonna be outside of nixpkgs, I'm fine with whatever people do with the module system out there
boxscape has quit [Quit: Page closed]
<sehqlr>
I have a newbie question: how to do I figure out what the default attributes for a function are? I'm trying to package a Python application and I keep getting "cannot auto-call a function" errors
<pierron>
rycee: ?
<gchristensen>
infinisil: yeah I think that isn't an approach we should be encouraging ...
<pierron>
rycee: about the merge modification of lib, using makeExtend?
<infinisil>
pierron: Yeah we were discussing it a bit (it's my PR)
<pierron>
infinisil: ok
<gchristensen>
I'd prefer undoing the change, personally
<pierron>
infinisil: what is the intent of the modification?
<pierron>
infinisil: what are you trying to achieve in the home-manager?
<infinisil>
pierron: An arbitrary attribute you can add to lib, would be used for custom functions of course
<pierron>
infinisil: then this is not the best approach
<pierron>
infinisil: the best approach is just to create an option which provide this collection of functions, without modifying the module system.
<pierron>
infinisil: option.hmLib = mkOption { type = lib.attrs; }
<infinisil>
pierron: Well yeah, that's what the lib option is for, but when you use it like `with config.lib;` you can get trouble with infinite recursion
<pierron>
infinisil: how are config.lib attribute used?
<pierron>
infinisil: with { inherit (config.lib) …; };
<infinisil>
That doesn't look very nice
<infinisil>
I just really don't like having infinite recursion problem with even lib now
<infinisil>
It's already annoying enough with the module system and mkMerge's
<infinisil>
Being able to extend lib like this makes it very easy to change lib and certainly doesn't get you any trouble. The change was really small, doesn't break backwards compatibility and has no negative side
<infinisil>
And nixpkgs allowed you to override almost everything already, except lib, until this change
<gchristensen>
the problem I have is expectations. I expect my lib functions to do the same thing every time, and this breaks that promise
<pierron>
infinisil: when does lib needs to be extended, does it has to be extended within the module system?
<gchristensen>
and, I don't see the down side to passing around custom lib functions every other way which is possible. as noted, nixpkgs' overrides are necessary for its core feature set, a thing not for lib functions
<infinisil>
pierron: When you want to add custom functions to lib for home-manager, nix-darwin or other out-of-nixpkgs module system evaluations. Yes you could use _module.args.myLib = ..., but then you have { lib, myLib, ... }: with lib; with myLib; in the top of modules which doesn't seem very nice at all
<gchristensen>
the crux of it, for me, I don't think it is a good thing to be able to modify lib.
<pierron>
infinisil: the question I have, is can you extend the lib outside the module system, then call the module system with this modified lib?
<infinisil>
pierron: You cannot
<infinisil>
This change makes it possible
<pierron>
infinisil: can you do it without the makeExtensivble?
<infinisil>
pierron: Nope
<infinisil>
Well I'm 99% sure it doesn't work, but I'll check, hold on
<pierron>
infinisil: can you redefine the lib.module attribute with a new lib, whitout the makeExtensible?
<infinisil>
You mean the { lib, ... }: argument?
<pierron>
infinisil: I mean let extLib = { …; module = import <nixpkgs/lib/modules.nix> extLib; } in extLib or something like that?
<pierron>
^ extLib = lib // { …; }
<infinisil>
pierron: Doesn't work with makeExtensible as I expected
<infinisil>
pierron: And then use extLib.evalModules?
<pierron>
infinisil: yes.
<infinisil>
I'm also 99% sure that doesn't work but I'll try
<pierron>
I bet for the 1% :P
Myrl-saki has quit [Ping timeout: 240 seconds]
<pierron>
especially if you do not need other lib function to use your function, but only to add new functions to the existing lib.
<pierron>
otherwise you will have to re-import with the extLib for everything which depends on it.
<infinisil>
Nope doesn't work
<pierron>
infinisil: I do not see why it would not work
<pierron>
infinisil: you will still need the 1 line change in modules.nix.
<infinisil>
Ah yeah that might work
<pierron>
:)
<infinisil>
I shall test it
* pierron
off
<infinisil>
Hold on
* pierron
on hold
<infinisil>
Um, I'm gonna check it again, but it seems to not work
<pierron>
I never used nix-repl, and I always prefer nix-instantiate over nix-repl
<elvishjerricco>
infinisil: I don't know why that would work. evalModules has the old `lib` in scope, not `myLib` (which is the only place that has `foo`)
<infinisil>
Oh right, modules is still from the old lib
<infinisil>
Makes sense
<elvishjerricco>
it'd be different if we had Lua-esque self: object calls, but that's awful :P
<infinisil>
Ergo: There's no way to extend it without the change in the PR
<infinisil>
And the fixed point infrastructure was there already as well, the change was so simple because of that
<pierron>
infinisil: I am not sure to understand.
<pierron>
infinisil: isn't the 1 line in modules.nix enough?
<infinisil>
I'm gonna assemble a nix-instantiate command for testing
<pierron>
I do not see how it would not be enough.
<{^_^}>
→ 260d90d9 by @Mic92: vimPlugins: use github https links
<{^_^}>
→ 99c27720 by @Mic92: vimPlugins: sort plugin name list alphabetically
<{^_^}>
→ 77303e90 by @Mic92: vimPlugins.cpsm: wants ncurses
pxc has joined #nixos
ixxie has quit [Ping timeout: 256 seconds]
nuncanada has joined #nixos
<Lears>
If anyone's interested, I figured out what I was asking before -- how to feed xmonad private libs to ghci. You can just pass it an include option: `ghci -i$HOME/.xmonad/lib/ ~/.xmonad/xmonad.hs`.
<{^_^}>
→ 25c2fd80 by @volth: lib: add naturalSort
<{^_^}>
→ 3f8c9106 by @volth: lib: add naturalSort (move the example IPs to private space)
<{^_^}>
→ 0fe11dbe by @Mic92: Merge pull request #38611 from volth/nat-sort
jrolfs has joined #nixos
<Lears>
Maybe ghcWithPackages (p: [ p.xmonad ]) should manage this include automatically, since it's what provides ghc with libraries? On Debian something like this gets done when installing xmonad either with apt-get or cabal.
<infinisil>
Hmm.. yeah, maybe NixOS' xmonad could be made to work like this
hiratara has quit [Ping timeout: 276 seconds]
hiratara has joined #nixos
sehqlr has quit [Quit: Konversation terminated!]
jperras has joined #nixos
pie__ has quit [Ping timeout: 255 seconds]
fragamus has joined #nixos
pie_ has joined #nixos
jperras has quit [Ping timeout: 268 seconds]
telent has joined #nixos
dan_b has joined #nixos
jrolfs has quit [Ping timeout: 256 seconds]
thc202 has quit [Ping timeout: 256 seconds]
jrolfs has joined #nixos
xy2_ has quit [Ping timeout: 260 seconds]
seafood has joined #nixos
acarrico has quit [Ping timeout: 256 seconds]
<michas_>
kubern
<michas_>
Hi, setting up a local kubernetes "cluster" on nixos is easy using `services.kubernetes.roles = ["master" "node"];`. What do I need to do if I want to run master and node on different machines?
dingotux has left #nixos ["Konversation terminated!"]
pkill9 has quit [Read error: Connection reset by peer]
seafood has quit [Quit: seafood]
<ndrei>
?bot
<ndrei>
ups
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanivan>
I'd like to test a change I'm making to a nixos module before submitting a PR. What's the best way to do so? Temporaily point at a local nixpkgs and do a rebuild?
<kreisys>
when I try that 'nix-store -qR result' won't show those paths as part of the closure and indeed gc would collect them and break my package :'(
ma27 has joined #nixos
<clever>
kreisys: un-quote the path
<seafood>
(I was using nixos-minimal-18.03.131807.489a14add9a-x86_64-linux.iso)
<kreisys>
clever: I'm working on a nodejs builder that takes any node package with an npm-shrinkwrap
<clever>
kreisys: i recently worked on a project using yarn2nix, and it works great
ndrei has quit [Remote host closed the connection]
<samueldr>
I can confirm, on a couple projects, yarn2nix works great
<kreisys>
clever: my issue with all the existing solutions was that you end up with a monolithic package containing all the dependencies instead of references to other store paths. this was a deal breaker for me because the project I'm packaging is literally a monstrosity.
<clever>
kreisys: how big is your finished node_modules?
Ariakenom has quit [Read error: Connection reset by peer]
<kreisys>
I know that it should be broken down but unfortunately this is out of my control
mahalel_ has joined #nixos
<clever>
kreisys: what if you generate a nix file, not a json file?
<clever>
kreisys: or just use nix to pass the derivations into it directly?
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
michas_ has quit [Ping timeout: 255 seconds]
<kreisys>
can I do that? generate a nix file from a nix expression?
<kreisys>
there's a toJSON function.. not a toNix one
<clever>
yeah
<clever>
you need to use just raw string manip to make the nix file
<kreisys>
I'm trying to avoid having to maintain yet another "lockfile"
<kreisys>
because I know my devs won't bother updating it
<clever>
and it wont work to commit anything with storepaths
<clever>
the other users wont have those paths, and it will fail
<clever>
yarn2nix works by generating a .nix file, and then importing it using import-from-derivtion
<kreisys>
whoever builds it will have all the files. they're built during that same nix-build run
<kreisys>
I'm just doing some despicable things to get around nodes despicable dependency handling
ndrei has joined #nixos
<kreisys>
because of course with that many dependencies I have several circulars and such
<clever>
i also got yarn2nix tweaked to not rebuild things on every minor change
<clever>
yarn2nix avoids circular issues by just doing the entire `npm install` inside a single derivation
<clever>
which in your case, would produce several gig
<kreisys>
In order to get around having to do that I actually wrote a resolver in javascript and I'm kinda hijacking require
<clever>
lol
<kreisys>
I take package.json and npm-shrinkwrap and massage them into a json file that contains the store paths to all the required versions
<kreisys>
that works beautifully
<kreisys>
except that the dependencies get garbage collected :P
<kreisys>
I broke it down into a few stages that pass the data as json to each other in order to make sure that things happen in the right order
<clever>
if you are given storepaths as inputs, and include those in the output, it should know you depend on them
<kreisys>
if I don't do that I end up with a require-from-derivation scenario
<kreisys>
which means I lose parallelism
<kreisys>
and the whole thing takes hours
<kreisys>
yeah for some reason that doesn't happen
ottidmes has quit [Ping timeout: 276 seconds]
<clever>
run nix-store -qR on the output json and see what it says
<kreisys>
if I throw a text file containing all the path somewhere in the output it still doesn't depend on those paths
<clever>
also, i think buildins.readFile looses the dependency info
<clever>
you have to pass the whole path to the json into a derivation, which reads it without nix
<kreisys>
if I run 'jq .[][].path result/nix-support/nix.json'
<kreisys>
I see all the paths
<kreisys>
then
<kreisys>
'nix-store -qR result' shows me none of those paths
<clever>
what is the derivation that made that file?
<kreisys>
absolutely no idea why.
<kreisys>
the derivation of the project being built
<clever>
can you gist it?
<kreisys>
well I don't know if it would make lots of sense out of context
<kreisys>
but sure
<kreisys>
I'd make it public but the code is still messy and embarrassing and contains some obscene comments
<clever>
the linux kernel has its fair share of curse words :P
<kreisys>
k let me just check whether I have some secrets in there lol
<achambe>
Is the person who maintains the google cloud images here?
keith_analog has quit [Quit: Konversation terminated!]
pxc has quit [Ping timeout: 260 seconds]
sigmundv__ has joined #nixos
seafood has quit [Quit: seafood]
<achambe>
A new image has been uploaded, which I really appreciate, but its not world readable
<kreisys>
clever: I /msg'd you the github url
nD5Xjz has quit [Ping timeout: 264 seconds]
<clever>
kreisys: which file generates nix.json?
<kreisys>
spells.nix :P
<kreisys>
Sorry about the choice of names. I got really slowed down by having to name things
<kreisys>
you're looking for buildSelf
<kreisys>
basically go to test/hellojs-nogulp
<kreisys>
and nix-build it
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kreisys>
the package works (if you install it run 'hello'. it will print a spinner and hello world)
<kreisys>
it breaks as soon as you gc
<clever>
kreisys: where does mapPackages come from?
<kreisys>
context/dep-map.nix
<clever>
yeah, i'm starting to get lost, lol :P
<kreisys>
of course. it's a mess. it was great until I started chasing ghosts
<clever>
kreisys: to start with, use pkgs.writeText to just make a file that contains a single string from selfAndNoDev, and then `nix-store -qR` that result
<clever>
it should depend on the things its refering to
<kreisys>
I'm doing something kinda like that in the derivation buildphase
<clever>
try doing it in its own derivation with just writeText to make things simpler
<clever>
building '/nix/store/0givz1pbazsywgi5388rsd3qa72v78hy-node-hello-1.0.0-modules.drv'...
<clever>
tar: /nix/store/if4n5zak610pxxd6j43i4kv0zha6xsya-node-ansi-styles-3.2.1.tgz: Cannot open: No such file or directory
<clever>
this derivation doesnt depend on its inputs, so the build fails here
seafood has joined #nixos
<kreisys>
you mean because they're not in buildInputs?
<clever>
inputs can be in any attribute
<kreisys>
Exactly
<clever>
but you somehow broke the dependency tracking on the strings
<clever>
so nix doesnt consider them as inputs anymore
<kreisys>
yep
<clever>
how are you passing those values into this derivation?
matklad has joined #nixos
seafood has quit [Client Quit]
<kreisys>
well it was supposed to be that json
<clever>
let me check something...
<kreisys>
I assumed that if the hashes exist in the dump then it's considered a runtime dependency
<kreisys>
but that's not happening
<kreisys>
and it's only not happening in this particular case
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<clever>
it must also be a build-time dependency, for it to even look for that hash
<kreisys>
I have not been able to whip up a minimal repro
<clever>
fromJSON doesnt support dependency tracking
<clever>
so you can never read a json file with storepaths
<clever>
i think
xcmw has joined #nixos
<clever>
yeah, no signs of context tracking there
<kreisys>
what about xml?
seafood has joined #nixos
<clever>
that will have the same problem
<kreisys>
hmmm
<clever>
you must pass the whole json file to the derivation, and parse it at build-time
nuncanada has quit [Quit: Leaving]
<clever>
not with nix
<kreisys>
The problem is that I have to serialize the entire context between stages in order to force everything to build through the scheduler before proceeding
<kreisys>
because I need to import the package.jsons of all the packages for further processing and if I don't pass through json I end up getting all the derivation built during eval
<clever>
readFile has the sameproblem
<kreisys>
which is bad
<clever>
so you must never use readFile on something that refers to store paths
<kreisys>
yep. learnt the hard way :P
<clever>
i think part of the problem here, is that the context is too invisible
<clever>
do you know how the string context works?
<{^_^}>
[nixpkgs] @matthewbauer opened pull request #38624 → [preview] Darwin hacking → https://git.io/vx7kW
<kreisys>
what do you mean? my context?
<kreisys>
context is just what I called package.json+npm-shrinkwrap after doing some transformations on them
<clever>
any time you call builtins.derivation {a set} in nix, it will generate a magic string, that points to the output, and it has some extra "context" attached to the string, to say which derivations it depends on
<kreisys>
you mean the .drv file?
<clever>
and if you do any string manipulation with that magic string, the context spreads like an infection, and all strings based on it have the same context
<clever>
and when you pass that string into any new builtins.derivation call, it collects all of the context, and uses that to know what the inputs are
<clever>
and thats how nix builds the build-time dependency tree
ericsagnes has quit [Ping timeout: 264 seconds]
vidbina has quit [Ping timeout: 260 seconds]
<kreisys>
Can I get ahold of the .drv path from inside an expression?
<clever>
not really
<clever>
let me have a closer look
<clever>
builder for '/nix/store/0givz1pbazsywgi5388rsd3qa72v78hy-node-hello-1.0.0-modules.drv' failed with exit code 15