<v0latil3_>
I am having trouble with making a package work correctly that contains a python executable. It builds correctly and I can run it, but it is missing a python import.
<infinisil>
v0latil3_: Add the package via propagatedBuildInputs
<v0latil3_>
ok. I thought it might be the propagated I was reading that part of the nix manual but it confused me
<infinisil>
It confuses everybody, no worries :P
<infinisil>
The best rule for when to use propagated vs not is: Is it python? Use propagated. Otherwise don't
<infinisil>
Works 99% of the time lol
<v0latil3_>
not in this case :( this isn't actually a pypi package though
<v0latil3_>
its just a make project that has a python script in it
<Henson>
I'm trying to use builtins.fetchGit, but it doesn't seem to be present in my nix-repl. Has it changed names, or is it so new that I might not have it?
<Wizek>
Anyone knows what might be wrong with this expression? ```nix-shell -j8 -p 'let hp = haskell.packages; in (hp.ghc822.override {overrides = self: super: let f = name: ver: (self.callHackage name ver {}); in {hspec = f "hspec" "2.4.4"; hspec-discover = f "hspec-discover" "2.4.4";};}).ghcWithPackages (p: with p; [hspec])' --run 'ghci'``` I get: ```error: infinite recursion encountered, at
<v0latil3_>
its a make program that installs a python script that imports evdev. I probably just need to add the python.withPackages to a different inputs section maybe. idk
<infinisil>
Ah, so you want to wrap a python script in $out with the correct packages?
<v0latil3_>
yeah
sbdchd has joined #nixos
<infinisil>
v0latil3_: Try adding wrapPython to nativeBuildInputs, set python packages like `pythonPath = with pythonPackages; [ ... ];` and wrapping the script with `wrapPythonProgramsIn $out/path/to/script/dir "$out $pythonPath"`
<infinisil>
in fixupPhase preferably
<v0latil3_>
its doing it automatically but its using the wrong python path
jperras has joined #nixos
<v0latil3_>
I think I know why though
<adamantium>
Hi, the amdgpu driver, is it going to be "modesetting" or "ati" ???
<v0latil3_>
modesetting
<adamantium>
or something not mentioned in the options?
<adamantium>
i've seen bugs referring to amdgpu
<adamantium>
Okay, thanks
jperras has quit [Ping timeout: 245 seconds]
<adamantium>
Anyone also know if we can enable early kms?
<samueldr>
as far as intel drivers are concerned, including them into the initrd is enough, I would instinctively assume the same for amd's
<adamantium>
so like this boot.initrd.kernelModules = [ "i915" ];
<adamantium>
<adamantium>
and amd would be, "amdgpu" ? i am guessing.
<Henson>
JonReed: did you find that in nix-repl? When I run "nix --version" it tells me 2.0.4, but "nix-repl --version" tells me 1.11.16. I'm using the latest nixpkgs-unstable.
<Henson>
samueldr: I should have been keeping more detailed notes as I went along, but just started today keeping a list of things I wish I knew before learning Nix. I'm planning on putting it into a document at some point in time to help other Nix learners.
<samueldr>
and it may be a bit onerous to ask such thing, sorry
<samueldr>
Henson: glad to hear, I like people that keep notes :)
<adamantium>
Anyone know, do we have a splash screen option instead of watching systemd init
<samueldr>
maybe look at the plymouth options
<v0latil3_>
plymouth isn't very seemless looking iirc :(
<adamantium>
aww i wanted to represent
<samueldr>
(haven't tried on nixos)
<adamantium>
i'll try the plymouth thanks
<Henson>
samueldr: I've been stuck for several weeks adapting a proprietary binary libary to work with Nix. I've learned pretty much by trial and error because what I'm trying to do isn't in any online documents. I've slowly figured it out and have made some simple helper scripts along with "ldd" and "patchelf" to track down library dependencies. I've also had to make a few of my own Nix packages....
<Henson>
samueldr: like the "pipe" package for Python, fixed a bug in python27.nuitka and made a derivation for gtkglextmm which doesn't exist in nixpkgs. I'm not sure how to go about contributing these things back to nixpkgs to make it better.
<infinisil>
Henson: Also, nix-repl has been completely removed now, you can't install it anymory with current releases, and the pills and docs haven't been updated :/
<samueldr>
(maybe the one who removed it should update the pills ;))
<infinisil>
yea..
<gchristensen>
hard to remember all the places to update
<gchristensen>
not an excuse
lassulus_ has joined #nixos
<infinisil>
At least there's an error message now
<infinisil>
Should do until somebody decides to update everything
sbdchd has quit [Remote host closed the connection]
<v0latil3_>
infinisil, I swear I didn't change anything but it started working haha
jasongrossman has joined #nixos
<v0latil3_>
With the python wrapshebangs thing
<infinisil>
Ah yes, Nix has this special thing where it randomly makes it fail with a 1% chance. It's to provide us with a sense of having solved it
<infinisil>
(/s)
<v0latil3_>
I must have not actually tried restarting the vm between my changes or something dumb. Or I didn't copy out of the terminal correctly and just launched an old config again idk
dbmikus__ has quit [Ping timeout: 240 seconds]
<v0latil3_>
I think that is a good idea to add to nix though, infinisil
drakonis_ has quit [Read error: Connection reset by peer]
sbdchd has joined #nixos
<hyper_ch>
v0latil3_: yes
alec[m] has left #nixos ["User left"]
<v0latil3_>
hyper_ch there is not maintainer for service module?
sir_guy_carleton has joined #nixos
nikivi has quit [Ping timeout: 252 seconds]
Lears has joined #nixos
<sophiag>
do i need a separate partition to run grub uefi rather than legacy? i'm currently using legacy and never got uefi support working
<ldlework>
sophiag: adamantium tells me not to use uefi all the time
<ldlework>
but i'm using uefi, and iirc i needed an extra partition
<sophiag>
oy
<v0latil3_>
sophiag yeah you need a partition type ef00 filesystem vfat
<sophiag>
is that hardware specific for you? as in why you were told to avoid uefi?
[Leary] has quit [Ping timeout: 245 seconds]
<ldlework>
sophiag: i don't think so, i think adamantium thinks uefi is bad or something
<clever>
sophiag: uefi booting required an efi system partition, with vfat, mounted to /boot (or maybe /boot/efi with the right config)
<sophiag>
v0latil3_: thanks. makes sense since the laptop (lenovo t480) came with a fat32 boot partition (oddly wayyy too big) running uefi
lord| has quit [Ping timeout: 245 seconds]
<Ashy>
sophiag: How is the t480?
<sophiag>
clever: thanks. is there any reason other than avoiding the vfat partition to use legacy on modern hardware?
<Ashy>
Just got myself an old t450 off ebay that I'm loving so far
<v0latil3_>
sophiag I made mine 500mb im only using 57mb though
<elvishjerricco>
It seems to be a common opinion that uefi is bad, though I've never heard the arguments against it. Always seemed to improve my life overall
<sophiag>
Ashy: haven't really used it yet! but i was waffling between it and the x1 carbon and on receiving it and comparing to my boss
<ldlework>
i probably wouldn't even notice the difference
<clever>
sophiag: about the only thing i can think of, is that booting uefi generally requires some special vars being set in the firmware
<sophiag>
..'s carbon the weight it perfect
<clever>
sophiag: and you can only set those vars if you boot via uefi
<clever>
sophiag: so, you must boot via uefi, to configure it to boot via uefi, have fun! :P
<clever>
sophiag: and if you move the hdd to another box, it wont boot, because the vars are missing
<v0latil3_>
I don't know if that works for nix though. I think only some kernels like ubuntu are signed for most OEM.
<v0latil3_>
Maybe you can sign your own now? i forget
<sophiag>
does it use sgx now?
<clever>
v0latil3_: i recently experiemnted with my laptop bios, and you can "enroll" any unsigned efi binary
<clever>
which just adds the hash of the binary to the whitelist
<sophiag>
(not sure if that's a good thhing anymore...)
<clever>
v0latil3_: however, the grub binary itself, doesnt have any security enabled, and will happily run unsigned things, so it doesnt really protect you much
<clever>
so my laptop can only ever run the grub.efi file nixos installed, and nothing else
<v0latil3_>
yeah haha. is it just the hash or is it a signature?
<clever>
but grub will happily run anything you point it at :P
<clever>
just a hash of the grub binary
<clever>
i also didnt bother setting a bios password, so you can just turn secure-boot back off
<v0latil3_>
I think there is a way to add a signature, so then you could have nix sign the kernel with your key and add the kernel directly as a boot option
<clever>
v0latil3_: yeah, but then you need to deal with managing secrets in /nix/store/
<sophiag>
this feels like mossad/not-mossad territory
<sophiag>
i'm just waffling on boot partition size. this ubuntu guide has separate sections for /boot (recommended 250mb-1gb) and efi (rec 100-150mb): https://help.ubuntu.com/community/DiskSpace
<ldlework>
clever: infinisil and I talked earlier about how to extend lib by setting NIX_PATH such that nixpkgs/nixos= a file that exports the same thing as <nixpkgs/nixos/default.nix> but extends lib - but do I really need to duplicate the content of that file or is there a clever (hah) way for me to extend it more intelligently - also i don't really see what in that file would allow me to extend lib
<clever>
when doing efi on nixos, the default is a vfat mounted to /boot and /boot/efi is just a normal directory
<ldlework>
any idea?
<clever>
but, you can also mount the vfat to /boot/efi, and set boot.loader.efi.efiSysMountPoint = "/boot/efi";
<sophiag>
clever: ah. is it for the reason they state? "Some computers can't see boot files (/boot) if located far (>100GB) from the start of the disk."
<clever>
then you are free to make /boot ext4, or even use the /boot directory of /
<clever>
sophiag: thats more about the start of the boot partition on the disk, and its only an issue for legacy booting
<clever>
sophiag: that problem is also part of why you may find /boot on older legacy machines, the bios cant read the entire root fs
<sophiag>
gotcha
<clever>
uefi shouldnt have issues like that
<sophiag>
i had decided not to user /boot/efi as the efiSysMountPoint, but now that's seeming ideal if i have just one large ssd and don't want to waste space on it
<sophiag>
*use
<clever>
if your using ext4 for /, then you can put the ESP at /boot/efi and just omit the /boot partition entirely
<sophiag>
not sure why that sounded less desirable at one point. it seems like what i'd want now
<sophiag>
and i can probably get away with 100mb for the esp
<clever>
[root@system76:~]# ls -ltrh /boot/EFI/BOOT/BOOTX64.EFI
<clever>
-rwxr-xr-x 1 root root 119K Oct 29 2017 /boot/EFI/BOOT/BOOTX64.EFI
<clever>
sophiag: i think you could get away with 1mb, lol
<emily>
1mb isn't enough for a modern kernel...
<sophiag>
clever: oh...then i still must be misunderstanding this
<clever>
emily: the kernel would be in /boot or /nix/store, not /boot/efi
<emily>
oh. well, sure. I strongly recommend making /boot the ESP though
<emily>
I think the UEFI spec mandates it has to be at least 100 megabytes or something.
<clever>
ah
<sophiag>
emily: that would make sense per the ubuntu guide
<sophiag>
i couldn't understand why, though, so thanks :)
<emily>
I think there's no advantage to a separate /boot/efi and it complicates things
derped has joined #nixos
<emily>
and things generally default to expecting /boot to be the ESP (where they have any defaults at all), these days
<clever>
yeah, thats why you need the boot.loader.efi.efiSysMountPoint = "/boot/EFI"; option in nixos
<sophiag>
emily: how large would you set for the esp in that case? assuming i'm only booting nixos
<emily>
100-256 megabytes should be more than enough unless you want to keep a bunch of kernels around forever or do kernel development yourself
<clever>
sophiag: my /boot on the laptop is using 79mb right now
<clever>
9.6M /boot/grub
<clever>
66M /boot/kernels
<emily>
128 is a nice number, if you want an arbitrary one
<clever>
most of it is kernels and initrds
<clever>
it also recently got full, and i had to disable my rescue_boot
<sophiag>
yeah i was thinking towards the low end. just want to avoid regrets. tbh i'm surely still anxious from dealing with acpi and bumblebee :p
<emily>
256 will insure against any reasonable regrets
<clever>
my laptop has 512mb, and ran out due to rescue_boot, lol
<emily>
okay, I refuse to offer insurance then >.>
<sophiag>
oh, while i'm on the unfortunate topic of acpi...the only problem i have left is coming out of suspend/hibernate/sleep. are there any hacks that might solve that?
<emily>
what hardware are you using again?
<sophiag>
i currently have `acpi_osi = "Windows 2009"`
<sophiag>
emily: currently a weird asus gaming laptop. migrating to a lenovo t480
<emily>
ah
<emily>
you may have problems with sleep on the lenovo. I did on the x1 carbon.
<sophiag>
yeah, someone told me that wrt the carbon running qubes
jperras has quit [Quit: WeeChat 2.2]
sir_guy_carleton has quit [Quit: WeeChat 2.0]
<sophiag>
but i thought there might be some weird way around it
<emily>
there are esoteric ways around it, yeah.
<sophiag>
well, you can see how i had to set it above just to launch a display manager :p
<sophiag>
it's been fine since, though
<ldlework>
clever: got any tips for me
<clever>
*looks up*
<ldlework>
<3
<clever>
ldlework: ive tried pointing <nixpkgs> to a default.nix before, and it causes weird problems, because of the fact that you can <nixpkgs/lib/options.nix>
<clever>
your probably better off just editing nixpkgs directly, and maybe filing a PR
<ldlework>
my little helpers are probably not of general enough use
reinzelmann has joined #nixos
<clever>
then either import its file directly, or add them to pkgs?
<ldlework>
it works on the home-manager side, but not the nixos side, because on the nixos side, one of the things I'm enabling ends up manipulating a nixos option, namely enabling xserver
<ldlework>
and so infinite recursion
<ldlework>
even though the function itself just returns some dead attrset data
<ldlework>
so on the nixos side i had to revert to just specifying the options manually
<clever>
you would need to import the file directly, and not use an overlay
<ldlework>
it is kind of a stupid helper function in the first place but i am mostly just experimenting
<ldlework>
clever: yeah that's annoying and duplicative
<ldlework>
way nicer to have these helper functions just globally available like everything else
<ldlework>
if i move the lib file, then i have to update a bunch of imports
<ldlework>
etc
<ldlework>
i am mostly trying to experiment as much as i can trying different techniques out and stuff
<ldlework>
i really like abstracting away duplicated boilerplate :)
<sophiag>
libparted is giving me that "Could not stat device /dev/mapper/no block devices found - No such file or directory." error :/
<clever>
derped: Bisecting: 278 revisions left to test after this (roughly 8 steps)
<nly>
Derped, I found the version I want in Nixpkgs repo, its on branch "release-17.09"
<nly>
Can I use that instead of writing anything?
<clever>
derped: Bisecting: 137 revisions left to test after this (roughly 7 steps)
<derped>
well theoretically yes, though I would advise against it (because you will also use all its 'old' dependencies from 17.09.
<derped>
If the only difference between them is the version than changing the source with overrideAttrs is quite trivial.
<derped>
If the build instructions are different you should use packageOverride + callPackage instead.
<derped>
Wait a sec. I'll take a look at the package you are interested in.....
<ldlework>
clever: is a description of callPackage, that it calls a function with as if each of its arguments was an attribute from the callsite's pkgs variable?
<ldlework>
i think that's what it does
mounty has quit [Ping timeout: 245 seconds]
MarkRBM has quit [Remote host closed the connection]
<clever>
ldlework: if the first arg is a file, it will import it
<clever>
then if the first arg is a function with args, it will query the names of the args it accepts, and auto-call it with those args from pkgs
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sophiag>
what's with nixos-install using /mnt/etc/nixos/configuration.nix instead of /etc/nixos/configuration.nix ?
<clever>
sophiag: its using the config on /mnt when installing to /mnt
<sophiag>
it still looks there when if i mount the filesystem to / though
<clever>
why did you mount something to / ?
<teto>
for some time now on nixos-unstable, I get this failure "Failed to remove runtime directory /run/user/1000 (before unmounting): No such file or director" I dunno if it's due to my config but I have to restart the service manually else I don't have a /run/user/1000 (=> various program failures)
<sophiag>
clever: bad idea?
<clever>
sophiag: yeah
<sophiag>
hah, okay. i just didn't have a mnt directory and figured it should look like my current system
<clever>
nixos-install is a script to run nixos-rebuild in a chroot, basically
<sophiag>
any idea what's going on here? i suspect it's because i set boot.loader.grub.device to /dev/disk/by-uuid/.. instead of an alias. but not sure why it's trying to install grub legacy
georges-duperon has quit [Ping timeout: 252 seconds]
<jasongrossman>
Hi! I'm just making my first issue report. Is there a guide as to how to do that? It seems very straightforward except that I'm not sure whether I should assign it to someone.
<{^_^}>
#46300 (by eighal, 1 minute ago, open): factor: a standard working directory is set to be in /nix/store
<srhb>
jasongrossman: Unless you know that a specific person wants it, just file it to anyone :)
<srhb>
That is, unassigned
<jasongrossman>
srhb: Cool. Thank you.
<jasongrossman>
srhb++
<{^_^}>
srhb's karma got increased to 14
<srhb>
jasongrossman: Thanks for reporting. Do you happen to know how to configure the default?
<jasongrossman>
Sorry, no. I will work it out eventually but it might take a very long time because I have to learn a lot about factor first.
<srhb>
jasongrossman: OK! Just asking in case you knew of a quick fix. ^_^
<jasongrossman>
:-)
<jasongrossman>
It's one of those things that will be straightforward to someone who knows the language's ecosystem. I don't know whether we have anyone like that in these parts.
<srhb>
jasongrossman: It might be worth doing a git blame on the definition of the derivation and finding the contributor to ping :)
<srhb>
Or just a git log on the file.
<jasongrossman>
shrb: Would you believe I don't know how to do those things?
<jasongrossman>
(That's a rhetorical question.)
<srhb>
jasongrossman: Sure, do you want me to give you a quick guide?
<srhb>
jasongrossman: It really helps to ping relevant people to speed up issue fixing :)
<siers>
If I want to include nix code, then it wouldn't work like other packages as usual, because I cannot import from fetched sources. So if I want to get a nix code package into nixpkgs, I will have to add nixpkgs docs about it? context: https://github.com/NixOS/nixpkgs/pull/46112
<{^_^}>
#46112 (by siers, 1 day ago, open): nix-gitignore: init at v1
<jasongrossman>
srhb: Yes please. Unless there's already a page on the wiki about it.
<jasongrossman>
(I haven't found one.)
<{^_^}>
[nixpkgs] @fpletz merged pull request #46235 → nixos/networkd: support MULTICAST, fix RequiredForOnline and [Route] → https://git.io/fAzYw
<jasongrossman>
At least, I know about cloning in general. Clone the whole of nixpkgs to my github account?
Boomerang has joined #nixos
<srhb>
Ah, yes, fork it first
<srhb>
Then clone it to your computer
<jasongrossman>
Thanks.
<srhb>
(The fork is helpful in case you ever want to contribute)
<jasongrossman>
OK, forked, and downloading, and I'm editing nixpkgs.factor-lang
<jasongrossman>
Downloading will take a while.
<jasongrossman>
Talk among yourselves.
phreedom_ is now known as phreedom
<srhb>
jasongrossman: editing is just a quick way to find the file in question. Then you can git log that path, and find the relevant contributors
<srhb>
jasongrossman: (You might have to scroll down a bit to find the person in question, since there's some tree-wide irrelevant changes to the file)
<jasongrossman>
I see. Great. nixpkgs.factor-lang says:
<srhb>
jasongrossman: That is usually a github handle, but you can check maintainers/maintainer-list.nix for details
<jasongrossman>
Thanks.
<jasongrossman>
Found the person on github.
<srhb>
Ping 'em in the issue politely. :D
<jasongrossman>
:-) Is there a standard way to do that?
<jasongrossman>
I mean a standard mechanism.
<srhb>
@handle msg :)
<jasongrossman>
:-)
<jasongrossman>
Thanks!
<srhb>
You're welcome.
<kandinski>
is there a nixos-beginners channel, or is this is for fairly newbie questions?
<srhb>
kandinski: You are free to ask any question at any level regarding the nix ecosystem in this channel :)
<jasongrossman>
I guess I should paste our discussion (minus specifics) into a wiki page.
<srhb>
jasongrossman: Like a guide to new people? That's a great idea. :)
<jasongrossman>
@jasongrossman message
<jasongrossman>
Hm.
<srhb>
Oh sorry
<srhb>
I meant on the github issue
<kandinski>
so, my first question is: /nix/store paths have names based on hashes of the *input expressions* to the packages, not hashes based on the *content* on the files. However, there is a cache from which we download. Where is the hash of the content of the package, and how is it linked to the input-hash-based name?
<srhb>
We don't have any mechanism to transfer a message from here to github.
<jasongrossman>
srhb: Will github parse that out of a comment, or do I type it somewhere specific please?
<srhb>
jasongrossman: Github will send a notification to person when you use @person anywhere on github. :)
<srhb>
Comments are fine
<jasongrossman>
srhb: Fantastic. Thanks.
<kandinski>
(to the above question: my assumption is that, since there is a mechanism for downloading precompiled packages from the cache, there will also be a mechanism for transmitting the hashes of those packages, for authentication/security/etc.)
<kandinski>
srhb: thanks for the invitation, and sorry for writing the question and background over three lines.
<srhb>
kandinski: Hmm, I'm not sure I quite follow. Are you asking "how does nix determine to try the cache for a certain attribute?" As in, how does it know to get nixpkgshello from the binary cache?
<srhb>
nixpkgs.helllo*
<srhb>
kandinski: That's fine :)
<jasongrossman>
kandinski: Maybe you're talking about checksums? I guess they're hashes in a way.
<kandinski>
jasongrossman: yeah, sorry, that's exactly what I meant.
<jasongrossman>
:-)
<jasongrossman>
Don't apologise though. Makes total sense to me to call them hashes.
<kandinski>
so checksums are a different kind of hashes, but still hashes, right?
<jasongrossman>
YEs.
<jasongrossman>
Now someone else knows the syntax better than I do, but there is a way of trying to download something without checking the hash/checksum, which fails but gives you the correct checksum in the error message.
<srhb>
,tofu
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<kandinski>
hashes of the binary artifacts as opposed to the (text) expressions for the derivations of the packages. Please also correct me if I'm not using the terminology right.
<jasongrossman>
ty
<srhb>
But I'm still not sure I quite get the question
<srhb>
kandinski: Ah, OK
<srhb>
kandinski: I think we're talking about the so-called fixed-output derivations
<srhb>
kandinski: And yes, the downloaded artifact is hashed in this case.
<jasongrossman>
srhb: I THINK I understand the question, and I think you've just answered it with ,tofu. No?
<srhb>
There's still the question of the cache :)
<srhb>
kandinski: For fixed-output derivations, you are correct that the output rather than the input is determined.
<kandinski>
srhb: you have an expression, and a related cached artifact corresponding to the derivation written in the expression. When you hit nixos-rebuild and a lot of cached artifacts come through the network, does nix/nixos check the artifacts' integrity? Via checksums (specialised hashes of the artifact)? Where do the checksums live for the nix package manager to use?
goibhniu has joined #nixos
<srhb>
kandinski: So the artifacts for most everything lives on cache.nixos.org (and some on tarballs.nixos.org)
<srhb>
kandinski: When a fixed-output derivation is required to be realized in the store, we simply look at the hash declared in the nix expression and do one of two things
<srhb>
1) check if it's already in the store (by looking up the hash). If it is, stop, we already have the thing.
<srhb>
2) if not, check cache.nixos.org by requesting the hash. If it exists, download it and add it to the store.
<kandinski>
But that is true also of all derivations, including the non-fixed-output ones. Right?
<jasongrossman>
(Maybe obvious, but srhb means hashes of the inputs here.)
<srhb>
3) If it's not in the store and not in a known substituter (/cache) download the source, hash its output, compare it to the declared fixed-output hash, and add it to the store under the computed* (not declared) hash. (* this changed recently, previously it was just discarded if the hashes did not match)
<jasongrossman>
(I think.)
<srhb>
jasongrossman: input for regular derivations, output for fixed output derivations.
mayhewluke has quit [Ping timeout: 245 seconds]
<kandinski>
Daughters gather asking for food. Thanks, srhb and jasongrossman.
<kandinski>
I'll come back with the next round of questions. I learned something new, but not what I was asking :)
<clever>
srhb: and fixed-output derivations will also check tarballs.nixos.org
<jasongrossman>
kandinski: Made me laugh.
<srhb>
kandinski: See you :)
<srhb>
clever: Ah, so that's the rule. I didn't know.
<srhb>
kandinski: Hopefully we can narrow down what you're asking later, sorry it didn't get quite clear to me. First pot of coffee still... :P
<davidar_>
not sure if this is the right place to ask - I'm using Nix on Ubuntu, and am having trouble running applications from nix that depend on opengl, eg. `nix-shell -p glxinfo --run glxinfo` gives `Error: couldn't find RGB GLX visual or fbconfig`, any idea what's going wrong?
<srhb>
davidar_: It is the right place to ask
<srhb>
davidar_: What does nix-info say? I don't quite recall if unstable should have gl working out of the box or if it still requires some impurity.
<kandinski>
srhb: what I learnt is that there's something called "fixed-output derivations", where the hash that names it is taken from the artifact's content. In that case, we can verify the artifact's integrity after downloading it from the cache just by taking the hash. Correct? But for regular derivation, where the name is taken from the hash of the input expression to the derivation, we can't verify the
<kandinski>
integrity of the artifact that comes from the cache except by building the derivation ourselves, which preempts the point of the cache.
<kandinski>
srhb: my assumption (surely wrong) is that there was a series of hashes of the cache packages, signed by some key, that allowed nix to check that foohash-hello-world is indeed what it purports to be.
orivej has joined #nixos
<srhb>
kandinski: The short answer is that we do not check the outputs of regular derivations. They may be non-deterministic in their outputs anyway, and are in a lot of cases.
<srhb>
kandinski: (See the Debian project on reproducible builds, which is one of the big pushes towards "builds are always bit-for-bit identical")
<kandinski>
srhb: I thought Nix/NixOS builds were bit-for-bit identical. I thought that was the point.
<kandinski>
Or one of the points, at least.
<srhb>
kandinski: When you trust a substituters key, you're essentially saying "I TRUST that you ensure that this derivation is built from these dependencies"
<srhb>
kandinski: That is not the case, no.
<kandinski>
srhb: is it a goal at least?
<srhb>
A very long term goal, yes :)
<kandinski>
srhb: and you're saying that Debian is ahead of NixOS in that regard?
<srhb>
kandinski: Nope, they're just working on it too. It's a really hard problem. So many packages produce different outputs with each build.
<srhb>
TL;DR: Most build systems are bad, and their builds are bad.
<kandinski>
ok, so binary artifact integrity from the caches is guaranteed by trusting the signing key from the "substituter", which is another NixOS term of art that I've learnt today.
<srhb>
kandinski: Right. And the "weirdness" in Nix-land is that we're trusting the output sort of transitively. "Trust substituter x" ~ "Trust that given input hash y, x provides me with the right binary artifact"
sophiag has left #nixos ["ERC (IRC client for Emacs 25.3.1)"]
<kandinski>
and a "substituter" is a "system that builds stuff from derivations so I don't have to do it locally"?
<srhb>
kandinski: Not necessarily any system, it could just be a static store served over http. A substituter is a thing that given an input hash can give you the output.
<srhb>
can MAYBE give you the output, rather.
<srhb>
(It might not have the path)
<kandinski>
sure, it's a function from hashes to artifacts :)
<srhb>
It would be nice to have a common glossary somewhere.
araadkins has joined #nixos
<kandinski>
yeah, it's difficult to digest all at once
<kandinski>
This is not RTFM, but RTTM! (Read The Three Manuals)
<srhb>
Indeed.
<araadkins>
Is it possible to make a static build of nix?
<kandinski>
don't forget NixOps
<kandinski>
So RTFM is Read The Four Manuals
<srhb>
kandinski: And Hydra. I said *main* for a reason ;-)
<srhb>
Because then I can handwave away all the others.
<kandinski>
Read The Five Manuals. Precious.
<srhb>
kandinski: If you're into papers, I also recommend Eelcos papers on Nix and NixOS. They're quite accessible and explain a lot of the internals.
<infinisil>
Something like `man systemd.directives` for Nix
<srhb>
infinisil: Yes!
<infinisil>
^^ one of the most useful manpages for systemd
<srhb>
Agreed.
<{^_^}>
[nixpkgs] @teto opened pull request #46304 → pythonPackages.gpgme: enable python3 support → https://git.io/fAzKk
<kandinski>
I'm reading the NixOS paper right now. Slowly, but yes, that's where I learnt the difference between expressions and derivations. Also that the thing between brackets {} is not a map nor a dictionary nor a hash, it's a *recursive attribute set*
sb0 has joined #nixos
<srhb>
kandinski: Hmm, only with rec in front is it termed recursive, I think?
IRCsum has quit [Ping timeout: 260 seconds]
<srhb>
> { foo = 42; bar = foo }
<kandinski>
srhb: thanks a lot. If I were to start on a common glossary, the place to put it would be under https://nixos.org/nix/glossary.html, correct?
<{^_^}>
error: syntax error, unexpected '}', expecting ';', at (string):191:23
<srhb>
> { foo = 42; bar = foo; }
<{^_^}>
{ bar = <CODE>; foo = 42; }
<kandinski>
srhb: yes, or non-recursive otherwise, thanks.
<srhb>
Eck..
<srhb>
Not strict enough :P
<srhb>
> { foo = 42; bar = foo; }.bar
<{^_^}>
{ __functor = <CODE>; bar = 2; }
<srhb>
Really!
<kandinski>
hahaha
<srhb>
Well, I hope you got my meaning. I have no idea what's going on there :P
<srhb>
It should be an error without rec.
<kandinski>
sure
<kandinski>
I now realise the "rec" is like in "letrec"
<srhb>
Right :)
<adamantium>
Hi guys, again. I feel like nixos-install takes much longer than say pacman when bootstrapping a simple system. It might take 45 minutes at least or maybe much more. I never recall it taking so long on Arch, so am I stuck likely on a slow mirror, or is more going on than meets the eye?
<srhb>
kandinski: Our lets are always recursive though
<tilpner>
philipp[m] - Try mumble_git, should use qt5
<adamantium>
should i set nixos-install jobs to the number of threads i have +1 ? for me that would be 25. Or is this not quite the same as what i think it is.
<adamantium>
srhb: ^
<srhb>
adamantium: It's difficult to say. Especially with nix 2.0.x you can get very hefty memory usage with a high number of threads (which is a bug)
<adamantium>
What would be ... conservative
<adamantium>
?
<srhb>
Things like GHC can take up to several gigabytes of memory just to fetch with that bug. So I guess you'd have to divide the RAM with the worst-case size.
<philipp[m]>
tilpner: Alright, will do.
<adamantium>
strange.
revtintin has joined #nixos
kyren has joined #nixos
jasongro` has joined #nixos
jasongrossman has quit [Ping timeout: 240 seconds]
toppler has quit [Remote host closed the connection]
troydm has joined #nixos
samweisberg has joined #nixos
<samweisberg>
hey guy, quick question: i am using nixops for remote deployments and would like to set some nix options for this (specifically tarball-ttl). What is the preferred way of doing this apart from using /etc/nix/nix.conf ?
concave has joined #nixos
countingsort has quit [Remote host closed the connection]
<aminechikhaoui>
samweisberg: do you want to set that in the target machine or while deploying ?
<samweisberg>
aminechikhaoui: likey both ;)
<aminechikhaoui>
well while deploying you can set that via --option tarball-ttl X, for the target machine you can add `tarball-ttl = X` to nix.extraOptions I think
<aminechikhaoui>
but setting that in the nix.conf file is easier from your machine I guess, unless you're on NixOS
troydm has quit [Ping timeout: 240 seconds]
rauno has quit [Read error: Connection reset by peer]
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mudri>
This update to ibus-table may (read: will) break user configs. I'm wondering what to do about that. I'll post some more details. https://github.com/NixOS/nixpkgs/pull/46265
<mudri>
This affects configuration outside the NixOS config, done via the IBus interface.
<samweisberg>
I am on nixos and I also like a solution that can be shared via version controll, so nix.extraOptions seems the way to go, thanks ;)
<mudri>
The workaround is to migrate settings from one part of dbus config to another.
<{^_^}>
[nixpkgs] @nicolaevladescu opened pull request #46309 → Fix making the partition bootable instructions → https://git.io/fAz1m
<mudri>
Specifically, users can run `dconf dump /desktop/ibus/engine/table/` and manually reproduce that via the ibus-table preferences interface or do some fiddling with `dconf` that I don't know about.
<mudri>
But I don't know whether it's possible in Nix to communicate to users that they need to do something.
simukis has joined #nixos
mounty has joined #nixos
lawlesseel has quit [Remote host closed the connection]
lawlesseel has joined #nixos
rauno has joined #nixos
cryptix has joined #nixos
kyren has joined #nixos
tzemanovic has joined #nixos
countingsort has joined #nixos
countingsort has quit [Remote host closed the connection]
countingsort has joined #nixos
<{^_^}>
[nixpkgs] @primeos pushed to master « monkeysphere: Wrap all relevant programs »: https://git.io/fAz1d
countingsort has quit [Remote host closed the connection]
<srhb>
Taneb: Redefining ghc843 to pass overrides = self: super { ghc = null; }; voids haskellPackages entirely.
<Taneb>
OK, thanks
mounty has quit [Ping timeout: 252 seconds]
cryptix has quit [Ping timeout: 245 seconds]
hamishmack has quit [Read error: Connection reset by peer]
nuncanada has quit [Quit: Leaving]
cryptix has joined #nixos
johanot has quit [Ping timeout: 240 seconds]
silver has joined #nixos
hxrts_ has quit [Quit: Leaving]
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rain1 is now known as rain2
nly has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @xeji merged pull request #46182 → python2Packages.spacy_models: update all models to version 2.0.0 → https://git.io/fAuPB
<{^_^}>
[nixpkgs] @xeji pushed commit from @danieldk to master « python2Packages.spacy_models: update all models to version 2.0.0 (#46182) »: https://git.io/fAzyg
<{^_^}>
[nixpkgs] @xeji pushed commit from @danieldk to release-18.09 « python2Packages.spacy_models: update all models to version 2.0.0 (#46182) »: https://git.io/fAzyi
countingsort has quit [Ping timeout: 244 seconds]
pi3r has joined #nixos
sbdchd has joined #nixos
kyren has joined #nixos
sir_guy_carleton has joined #nixos
sbdchd has quit [Ping timeout: 272 seconds]
NightTrain has joined #nixos
<infinisil>
srhb: (unimportant, but i think the order is super: self:)
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reinzelmann has quit [Ping timeout: 252 seconds]
<sphalerite>
infinisil: it is, the other way round compared to overlays? aaaaaargh
mayhewluke has quit [Ping timeout: 240 seconds]
mayhewluke has joined #nixos
<infinisil>
sphalerite: Nah, did i mix it up? I thought super came first in overlays
<infinisil>
,overlays
<{^_^}>
infinisil: Did you mean overlay?
<{^_^}>
Overlays look like `self: super: { foo = ...; }`. Use the self argument to get dependencies, super for overriding things and library functions (including callPackage). More info: https://nixos.org/nixpkgs/manual/#sec-overlays-install
<infinisil>
Darn
<infinisil>
Nevermind
__monty__ has joined #nixos
waleee has joined #nixos
<sphalerite>
oooh ok
<sphalerite>
I mean, I think there is something in nixpkgs where it's super: self: instead
<sphalerite>
=> aaaaaargh anyway xD
Tucky has quit [Remote host closed the connection]
reinzelmann has joined #nixos
lonokhov has joined #nixos
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos
<jtojnar>
hedning[m]: I do not see the sm fix in the branch
<hedning[m]>
jtojnar: ah, didn't force, should be there now
NightTrain has quit [Quit: Lost terminal]
rauno has joined #nixos
Tucky has joined #nixos
pie___ has joined #nixos
iyzsong has joined #nixos
pie__ has quit [Ping timeout: 246 seconds]
siel has joined #nixos
siel has quit [Changing host]
siel has joined #nixos
<jtojnar>
hedning[m]: it is weird that only some of the g-o headers are affected
<ldesgoui[m]>
Hey, I just installed 18.03 on a 32 bit laptop (Asus T100TAF) and I'm running into the issue where tons of packages need to be built from source when I don't really have anything special in my config. Happens with 18.09 as well. How could I fix that?
<gchristensen>
NixOS doesn't build many packages for i686 anymore, ldesgoui[m]
<ldesgoui[m]>
Ah, that'll be it, I'll search for a way to run x86_64 then, thanks.
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<woffs>
ldesgoui[m], you can cross-compile for i686 on a fast x86_64 machine and use that as binary cache. Or maybe the masters of hydra get overwhelmed by compassion and start building some packages for i686 again ;)
<gchristensen>
we do prebuild all of the base system for i686 to make sure we don't break it
<ldesgoui[m]>
Do you think I could easily setup x-compile with nixos-rebuild --build-host?
<gchristensen>
you don't even need to cross-compile, if you just set --build-host it'll just work
<goibhniu>
ldesgoui[m]: it only has 2GB of memory and a 128GB disk ... I suspect it's not going to be very happy with NixOS :/
<hedning[m]>
jtojnar: ah
<sphalerite>
goibhniu: I'm running nixos on a device with 2GB of memory and a 32GB SD card. It's not optimal but it's workable
<hedning[m]>
thought I checked that it actually existed, but apparently not
<ldesgoui[m]>
It'll be just fine for my usage but thanks for the heads up
<qyliss>
sphalerite: right, but when I try to create an instance with one of those AWS tells me that the AMI doesn't exist
<ldesgoui[m]>
I'll try 64bit iso to be honest
<goibhniu>
sphalerite ah cool ... is that your chromebook?
<sphalerite>
qyliss: huh ok
<sphalerite>
goibhniu: yep. So ARM as well
<goibhniu>
sweet
<sphalerite>
oh right, the least workable bit about it is how I don't have a fully-functioning browser yet :p
<sphalerite>
which ought not to be a problem on intel processors I guess
joepie91_to_go_ has joined #nixos
<woffs>
gchristensen, I just use --argstr system i686 and it works. It's great that the base packages get compiled and i686 does keep installable. It's just a time-consuming task to compile qt5 and firefox at home.
<gchristensen>
yeah, I know it is
<qyliss>
Doing it through the button on the website works, though, just not through the API
<qyliss>
So probably something broken on my end
<gchristensen>
(it just isn't cross compilation, because x86_64 your system runs the i686 compilations natively... I guess this is a fine line which isn't useful to be pedantic about :))
<Acou_Bass>
eyy folks, just a quickie - does anyone use a monitor in portrait-mode? im trying to make GRUB/boot process work with it with nixos, is this possible?
tzemanovic has quit [Remote host closed the connection]
<samueldr>
Acou_Bass: give me a min
<samueldr>
(I do)
<Acou_Bass>
ahhh nice one!
<samueldr>
in my case it's a cheap atom tablet which has its display mounted sideways, if you have more than one monitor I don't know how it'll work
<Acou_Bass>
ive got a similar device i run arch on that i have to do that with, so i assume its a similar thing hehe
emmanuelrosa has joined #nixos
<Acou_Bass>
its something like fbconrotate:=1 or something?
<samueldr>
oh!, I don't actually rotate my grub, just the picture :/
<Acou_Bass>
ohh, so the text is still sideways? :P
<samueldr>
only for grub
<Acou_Bass>
interesting
kyren has joined #nixos
<Acou_Bass>
yeah i mean... thats close enough hehe, i dont really see grub enough to care... so the background image ist he right way, and the bootup console text is the right way?
<samueldr>
yes, tracking down that option I set
<Acou_Bass>
hehe thanks a lot
flexw has joined #nixos
jperras_ has joined #nixos
jperras has quit [Ping timeout: 250 seconds]
<Acou_Bass>
what sorta atom is your thing? mines a cherry trail... linux support is bloody awful on it especially for all the other hardware on it (gotta run arch for that sweet bleeding-edge kernel otherwise i get nowhere)
<Acou_Bass>
this device actually has a lot of out of tree packages so even on arch i need a custom kernel build (it may exist for nix by now)
<flexw>
\quit
flexw has quit [Quit: leaving]
emmanuelrosa has left #nixos [#nixos]
<magnetop`>
Taneb: thanks, I have a lead now!
<samueldr>
Acou_Bass: yeah, cherry trail are a pain, it's like the worst of the ARM world crammed on an intel platform :(
<samueldr>
my chuwi tablet has software-controlled charging, without the kernel telling the hardware to "be charging" it won't
ilikeheaps has joined #nixos
<hedning[m]>
jtojnar: pushed a commit to my gnome-3.30 branch
<Acou_Bass>
it's a GPD win, so yeah, it also has the added benefit of weird Chinese firmware and devices on it with who knows what drivers powering them
drp has joined #nixos
<samueldr>
Acou_Bass: IIRC andi- has one with stuff for it publig on github
<Acou_Bass>
ah that doesn't sound good! at least this thing charges hehe, tough without the custom patches the probes to say how much it's charged don't work
<andi->
and by now mailine kernel should be enough
<andi->
it is a shame I haven't touched it in 2 months :/
<Acou_Bass>
not for mine apparently, only one small problem on the win though with mainline
<jtojnar>
hedning[m]: I wonder why Arch people did not upstream it
<hedning[m]>
jtojnar: yeah, me too
<jtojnar>
hedning[m]: I am onto it
<hedning[m]>
jtojnar: 👍
<Acou_Bass>
basically when i boot into it, the display is completely blank, until i rotate the screen then the backlight wakes up i guess... small but annoying problem as i cant see when SDDM has loaded up to type my login :P
vmandela has joined #nixos
<xok>
guys, I've got an apache on my configs and it works fine...
<xok>
then I find several scripts that could be installed using nixos:
<gchristensen>
this stuff is so complicated and really spoils usability for common cases
<NinjaTrappeur>
Hey folks, I posted this nixpkgs PR https://github.com/NixOS/nixpkgs/pull/46062 3 days ago. It's not on the first PR page and hasn't received any review. Is it stalled or should I just wait a bit more? Should I @ somebody in particular to review this? (It's about a software packaged using AppImage)
<{^_^}>
#46062 (by NinjaTrappeur, 2 days ago, open): patchwork: Init at 3.10.1
<clever>
gchristensen: the cross-compile stuff changes the syntax a bit
<sphalerite>
xok: grepping for mediawiki.nix reveals only one reference to it in nixpkgs, in apache-httpd: "# instead of using serviceType="mediawiki"; you can copy mediawiki.nix to any location outside nixpkgs, modify it at will, and use serviceExpression=./mediawiki.nix;"
<infinisil>
NinjaTrappeur: Pinging relevant people, mentioning it here, and just waiting are the best things to do, there are a lot of PR's, and there are many PR's older than 3 days that haven't been rewiewed
<xok>
sphalerite: and I don't know how to use it...
<xok>
sphalerite: can you help with that?..
dbmikus__ has joined #nixos
<sphalerite>
not really, I have no clue how to use it myself
<gchristensen>
clever: can you help me figure out what I'm doing wrong?
<infinisil>
Hum, it seems to be just pkgsCross.<platform>.<package>
<infinisil>
That sounds pretty nice!
<gchristensen>
and forceSystem doesn't work like it used to, either
<dhess>
infinisil: is that wiki on cross-compiling up-to-date?
hyper_ch2 has quit [Quit: Page closed]
<infinisil>
No idea, but "A lot has happened in 2018 and now cross-compilation is well supported within the unstable branch of nixpkgs." seems to indicate it
<sphalerite>
^ the stdenvs also seem to be in cache.nixos.org which is helpful
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @7c6f434c to release-18.09 « julia: readd julia_06 name, make julia an alias that selects a version, as we usually do for incompatible versions »: https://git.io/fAgY8
hotfuzz_ has quit [Read error: Connection reset by peer]
<{^_^}>
[nix] @kampka opened pull request #2406 → Set environment variable NIX_SHELL_NAME to derivation name → https://git.io/fAgY4
<ldesgoui[m]>
Anyone know a way to use/install a 32 bit bootloader with a 64 bit system?
pi3r has quit [Ping timeout: 244 seconds]
pi3r_ has quit [Ping timeout: 246 seconds]
<symphorien>
grub only has a 32 bit version iirc (for legacy bios, at least)
<ldesgoui[m]>
I got a 64bit kernel to install so I could migrate quite easily but UEFI won't let me boot into it
jperras has joined #nixos
<ldesgoui[m]>
Hmm, that makes sense, my problem is elsewhere then. UEFI will let me pick a generation but the one containing 64 bit kernel will refuse to boot because the NixOs-*.efi is 64 bits
<xok>
guys, does anyone on this channel have an idea how to install "modules" ( or whatever they are called ) using the nixops?..
[Leary] has quit [Remote host closed the connection]
Lears has joined #nixos
<ldesgoui[m]>
64bit installer won't boot
<sphalerite>
ldesgoui[m]: how so?
<ldesgoui[m]>
It just refuses to boot with the 64bit installer
<ldesgoui[m]>
A black screen flashes and brings me back to BIOS
<sphalerite>
huh
<tilpner>
xok - That modules does not appear to be in the main module list, has an odd structure, and hasn't been updated in a good while
<tilpner>
It might just be abandoned
humanoyd has joined #nixos
phreedom_ has quit [Ping timeout: 256 seconds]
<symphorien>
nix-env -qaP breaks because of I have a broken expression as a channel, how can I tell nix-env to just evaluate nixpkgs and not the other channel ?
<{^_^}>
[nixpkgs] @timokau pushed to release-18.09 « sage: fix numpy and scipy integration »: https://git.io/fAgBc
sbdchd_ has quit [Ping timeout: 240 seconds]
iclanzan has joined #nixos
Fare has quit [Ping timeout: 272 seconds]
winem_ has quit [Ping timeout: 252 seconds]
sbdchd has joined #nixos
<iclanzan>
Hi! I have a problem with the firewall where NixOS/systemd is using the wrong `firewall-start` script on boot. Running `nixos-rebuild switch` forces the firewall to restart with the correct config script, but after rebooting it goes back to the wrong one. The wrong config file seems to be the very first firewall config I ever had.
<disasm>
Also check /boot/loader/loader.conf and confirm the default is the latest generation
<clever>
line 6 from efibootmgr matches the uuid on line 14 for sda1, so the correct boot partition is on /boot
<disasm>
also, gist is much nicer than pastebin imho :)
sbdchd has joined #nixos
sbdchd has quit [Remote host closed the connection]
sbdchd has joined #nixos
JonReed has joined #nixos
<iclanzan>
disasm: I can confirm I have the latest generation in both /boot/loader/entried and /nix/var/nix/profiles, and that this latest generation is set as default in loader.conf
ToxicFrog has quit [Read error: Connection reset by peer]
<clever>
iclanzan: can you paste the result of `ls -l /run/current-system`, then reboot and paste the result of `ls -l /run/current-system` again, without a nixos-rebuild
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « clib: 1.8.0 -> 1.8.1 (#46292) »: https://git.io/fAg0A
iclanzan has quit [Quit: WeeChat 2.0]
jperras has joined #nixos
iclanzan has joined #nixos
_ris has joined #nixos
<iclanzan>
clever: And I get a different generation when booting :(
<iclanzan>
A much older one
sbdchd has quit [Remote host closed the connection]
<clever>
iclanzan: definitely sounds like a /boot problem
<clever>
iclanzan: how old was it?
<iclanzan>
clever: generation 412 out of 428
<iclanzan>
clever: I wonder if 412 is selected from the boot menu somehow. I have the timeout set to 0 so I never see the menu
<iclanzan>
clever: brb. rebooting again.
iclanzan has quit [Quit: WeeChat 2.0]
waleee has quit [Quit: WeeChat 2.2]
iclanzan has joined #nixos
<iclanzan>
clever: that was it! The wrong generation was selected in the boot menu. How do I make it boot the latest always?
Guanin has joined #nixos
jperras has quit [Read error: Connection reset by peer]
jperras has joined #nixos
<ldlework>
Something like callPackage for substituteAll would be pretty cool
<ldlework>
Basically I want a way to point a directory of shell scripts and just have them be all magically installed as bin scripts, with their dependencies met
<clever>
iclanzan: ive never used systemd-boot
<ldlework>
So would have to go into the script and find tokens denoting the use of packages and then automatically pass those to substituteAll kinda like how callPackage does it
<tilpner>
iclanzan - My systemd-boot always boots latest
<iclanzan>
tilpner: That used to be the case for me too, but it is not anymore and I don’t know why
<disasm>
iclanzan: the default param I had you check above :)
<iclanzan>
disasm: the problem is the default in loader.conf shows up as the latest but it does not boot the latest.
<iclanzan>
tilpner: what does `consoleMode` do?
<ldlework>
A couple weeks ago someone came up with a snippet to evaluate a string read from a file (like a shell script) as if it were a nixlang string literal, such that things like ${pkgs.foo} would be properly expanded. Anyone remember how that was done? I can't find it in my logs.
<tilpner>
Resolution of the console, but that's the default
nbardiuk has quit [Ping timeout: 245 seconds]
<tilpner>
Don't see a way to do that without exec :/
<ldlework>
tilpner: the string thing?
<JonReed>
ldlework: What do you mean find tokens denoting the use of packages? Automatically inferring packages used from a shell script? Or explicitly specifying it like using some made up syntax like `# packages = [ xdotool ]`?
<ldlework>
the former
<tilpner>
Yes. Apart from a hacky parser only some form of eval would do
<ldlework>
but i suppose i don't -hate- the latter
<tilpner>
sphalerite - Doesn't that hit the recursive nix wall?
<sphalerite>
how so?
<ldlework>
JonReed: I guess a madeup comment header would be the easiest to actually do
<tilpner>
When ldlework says "evaluate a string read from a file", I assumed Nix would be the evaluating party
dbmikus has quit [Ping timeout: 245 seconds]
<JonReed>
ldlework: I'w writing a script to the latter. It can already deal with python and haskell scripts. The idea is that in file you just put comment like `packages = [ wreq ]` and it automatically can parse and compile the file
<ldlework>
but being able to be like "all those files in ./bin are packages! install them!" without any other work.
<sphalerite>
JonReed: sounds like what nix-shell shebangs were designed for?
<ldlework>
sphalerite: do you reall want actual tools on your system to use nix-shell before starting?
<tilpner>
It's not *that* terrible
<ldlework>
JonReed: by "handles python and haskell" i guess you mean that the packages listed in the file are not from "pkgs" but rather, the runtime specific packages from python or haskell?
<ldlework>
does it support normal packages too?
<ldlework>
tilpner: is it slower?
<tilpner>
Yes
<sphalerite>
ldlework: I don't think there's anything wrong with that for quick hacks, and writing non-quick-hack stuff into a quick nix expression
<JonReed>
ldlework: My idea is that it support many keyword like `pythonPackages` `haskellPackages`, but defaults to `packages` based on the file. So, if it's .hs file then it will deduce that packages means haskellPackages. But you an put as many keywords there as you want, even use python from haskell.
<ldlework>
this is mostly a way to remove/reduce nixlang boilerplate in my system configuration
<ldlework>
JonReed: sure but how to provide normal packages :P
<JonReed>
ldlework: `nixpkgs = [ normal package]`
<ldlework>
"packages" should be reserved for non-runtime packages
<ldlework>
Another thing I'm looking for is a way to specify in home manager, that it should do home.file."whatever".source = ./whatever for a whole directory of files recursively
<JonReed>
ldlework: It's very much in work in progress and I wrote only a parser so far. But yeah. I'll pastebin it somewhere.
<ldlework>
cool
<{^_^}>
[nixpkgs] @costrouc opened pull request #46327 → pythonPackages.markerlib: init at 0.6.0 → https://git.io/fAgav
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « pmd: 6.5.0 -> 6.7.0 (#46213) »: https://git.io/fAgax
<Henson>
in a mkDerivation buildCommand section, is there a way to make a script run in the current directory of the Nix derivation? I have a script that uses git to pull out a hash and tag for the build tree, but if I reference that script inside a ${./script.sh} in the buildCommand, it gets copied to a temporary directory and isn't able to see the git tree anymore.
<clever>
Henson: use buildPhase instead, and src = ./.; to get a copy of the current dir
<JonReed>
ldlework: The second one is the entry file to test it. If that file is named `main.nix` and the first file is named `parser.nix`, and you have a file like `main.hs` (like https://lpaste.net/1759218995283623936), then running it wil produce this output: https://pastebin.com/qEEj1U7h
<JonReed>
ldlework: Then I will take this set, find those deps in nixpkgs and build helper function to quickly build the file based on this information
<ldlework>
JonReed: ok so right now it is just getting us the data from the comments, we still need to do the work to use that info to get the right packages installed, and the script itself
<ldlework>
right
<ldlework>
cool
<yorick>
raise Exception("‘deployment.ec2.securityGroups’ is incompatible with ‘deployment.ec2.subnetId’") why?!
<Henson>
clever: but that only works because src = ./. copies over the git repository as well? If the current directory is really large, it complains about running out of memory.
<aminechikhaoui>
yorick: I think you should use deployment.ec2.securityGroupIds
<disasm>
iclanzan: on the boot loader screen, does it show all the generations and just highlights the wrong one or do you get a different list of generations?
<aminechikhaoui>
yeah we should fix that I think but for now I think it's that way for historical reasons
<aminechikhaoui>
it was that way when I started using nixops :D
<yorick>
aminechikhaoui: there is software that magically does things that users believe it should do, and there's nixops :P
<yorick>
with the worst one being me typing `nixops -d thing info` a few times a day and having it fail
<iclanzan>
disasm: it shows all generations and the wrong one is highlighted
<gchristensen>
`,find` isn't the greatest tool for a newbie exploring NixOS options and packages for the first time. a great place to explore options is via `man configuration.nix` and also https://nixos.org/nixos/options.html#
wpcarro has joined #nixos
wpcarro has quit [Read error: Connection reset by peer]
wpcarro has joined #nixos
tzemanovic has joined #nixos
<ldlework>
this recursive home-manager function is proving tricky :)
<ixxie>
I have been testing a script that installs NixOS with kexec on a remote machine
<symphorien>
xok: bear in mind that on nixos installing a package with environment.systemPackages or nix-env will never have the "usual side effects" like enabling services, adding logrotate configuration and so on
<symphorien>
which means: installing docker_compose like this will not start the docker daemon
<symphorien>
and if you are new to this, I really recommend you read the manual(s): https://nixos.org/nixos/manual/ the nixos manual at least, but probably also the nix manual and nixpkgs manual.
<anon423432>
Hi guys, hope you're doing well, I would like to request your assistance for something "weird" about emacs on NixOS, I got a lot of "Invalid function: (win (frame-selected-window))" which completely broke emacs, I can't do M-x, C-x C-c or anything ... My config run well on other distro (Manjaro, Arch, Debian) so I wonder where it go wrong or how I can debug. If you could enlight me I would be gratefull, thank you in advance.
nly has left #nixos [#nixos]
jedahan has joined #nixos
<jedahan>
is there a way to install nixos to a different partition than root and still use the binary cache?
<gchristensen>
jedahan: it doesn't have to be on the root partition, but the partition does have to be located at /nix
<jedahan>
err, nix the package manager
<gchristensen>
are you on macOS or Linux?
<jedahan>
linux
<jedahan>
I've got a home server with a very small root and a very big data partition, and want to set the prefix to /mnt/data/nix
<jedahan>
could i bind mount that to /nix
<jedahan>
?
<gchristensen>
what I said remains true, you have to put the partition at /nix. a bind mount might work, worth a try
<gchristensen>
vaibhavsagar: probably not a good way to be introduced to nix, I'm not sure how well that feature is used and how well it would be supported
<vaibhavsagar>
so we use a non-`/nix` store path but otherwise everything works as before
<Henson>
I'm trying to run a build script that compiles C++ files to object files, from within a mkDerivation buildCommand section. It appears as though the build script isn't able to write anything without getting a permission denied error. I have to manually specify an output location by passing in an input argument for the output directory, and it has to be passed in the form of ${output.directory}
<Henson>
in the buildCommand section. Is this correct, are build scripts in a source tree unable to write anything within the source tree?
<vaibhavsagar>
sphalerite: cool, let me try
ixxie has quit [Quit: Lost terminal]
<sphalerite>
vaibhavsagar: it won't be nix 2.1 proper, it's likely to be a newer version from master
<Henson>
how the check does a Python distutils build script work in this case, which does not allow one to specify the build output directory?
<Henson>
check -> heck
<vaibhavsagar>
Henson: you can create a temporary directory yourself as part of the buildCommand
<sphalerite>
vaibhavsagar: in fact it still seems to be a 2.1 prerelease :/
<vaibhavsagar>
hmm
<sphalerite>
Henson: buildCommand won't unpack the sources for you. You might want to define buildPhase instead so that you still have the stock unpackPhase and such, which give you a writable "checkout" of the source
<Henson>
sphalerite: ok, I'll give that a try
<sphalerite>
buildCommand essentially overrides all of what the normal stdenv does, bar maybe sourcing the setup script (i'm not sure)
<HoloIRCUser3>
Maybe- lol this is the start of my search =P
civodul has joined #nixos
troydm has joined #nixos
cnidario has joined #nixos
<HoloIRCUser3>
I'll take a whack at writing one if I can get past the following failed assertions
<HoloIRCUser3>
- The ‘fileSystems’ option does not specify your root file system. - You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.
<{^_^}>
[nixpkgs] @nlewo opened pull request #46338 → kubernetes-helm: fix darwin hash → https://git.io/fAg1P
lewo`` has joined #nixos
<jasom>
speaking of /nix, I noticed that with ZFS if I put /nix on a separate file system, my machine won't boot. I expect that the program it wants to run to mount /nix is inside /nix ...
<sphalerite>
jasom: no, it should get copied to the initrd
<disasm>
iclanzan: that tells me the default is wrong...
<sphalerite>
jasom: you do need to use legacy mounting for it though
<jasom>
sphalerite: oh, interesting
<jasom>
sphalerite: is there an up-to-date zfs guide for nixos? I've found a lot of old stuff
<ldlework>
jasom: you might ask adamantium about themelios
<ldlework>
a tool they made which has some nice features for bootstrapping nixos with zfs
<jasom>
Isn't that greek for "foundation?
<iclanzan>
disasm: it looks like whatever generation I last selected on the boot menu will always boot unless I select another one
<jasom>
ldlework: oh, I avoid pure zfs systems, as I find bootloaders often lag behind zfs in features supported and it's easy to get your filesystem ahead of the bootloader by accident
<ldlework>
jasom: i don't really know how any of that stuff works so i just nod politely
<jasom>
ldlework: your bootloader needs to be able to read from whatever file system has your kernel. This means if you don't have a non-zfs boot partition, the bootloader needs to be able to read zfs. Whenever there is a new feature added to zfs, you need to be careful to not enable it on your root pool until after your bootloader can support it.
knupfer has joined #nixos
pie___ has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @sterfield opened pull request #46340 → Sickrage: init at v2018.07.21-1 → https://git.io/fAgD4
medvid has joined #nixos
xok has quit [Ping timeout: 252 seconds]
Freechicks has quit []
Henson has quit [Quit: have a good weekend everybody!]
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #46343 → nixpkgs module: Fix defaulting of `localSystem` and `system` → https://git.io/fAg9K
mjhoy has quit [Quit: ERC (IRC client for Emacs 26.1)]
Denommus has quit [Remote host closed the connection]
grp has joined #nixos
pie_ has joined #nixos
rfold has joined #nixos
jedahan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jedahan has joined #nixos
jedahan has quit [Client Quit]
jedahan has joined #nixos
jedahan has quit [Client Quit]
jedahan has joined #nixos
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
jedahan has quit [Client Quit]
grp has quit [Quit: box shutting down...]
jedahan has joined #nixos
jedahan has quit [Client Quit]
jedahan has joined #nixos
jedahan has quit [Client Quit]
xeji has joined #nixos
pi3r has quit [Read error: Connection reset by peer]
pi3r_ has joined #nixos
<magnetop`>
I'm trying to do remote builds, with a config that was working before, but now with a different buildbox: a debian vm with the nix pkg-manager installed. I'm getting: cannot build on 'ssh://root@hostIP': cannot connect to 'root@hostIP': bash: nix-store: command not found
<magnetop`>
the odd thing is that nix-store IS installed on the other machine, and it also doesn't seem to be a key problem: when I specify another key, I get a normal "permission denied" error.
<{^_^}>
[nixpkgs] @rycee pushed to master « pecita: download from official source »: https://git.io/fAgQb
slack1256 has quit [Remote host closed the connection]
pi3r_ has quit [Read error: Connection reset by peer]
pi3r__ has joined #nixos
kisik21 has quit [Ping timeout: 246 seconds]
<srhb>
magnetop`: This might be caused by the sourcing of whatever PATH holds nix-store not being what you expect
<srhb>
magnetop`: (Meaning just because it's on PATH when you log in interatively as the same user, doesn't mean it is for the remote builds)
sbdchd has joined #nixos
graphene has quit [Remote host closed the connection]
knupfer has quit [Read error: Connection reset by peer]
<srhb>
*full on eleventh dimension brainsplosion gif*
graphene has quit [Read error: Connection reset by peer]
<sphalerite>
srhb: a hard link no less!
<srhb>
Oh yeah :P
graphene has joined #nixos
rauno has quit [Ping timeout: 252 seconds]
mayhewluke has quit [Ping timeout: 245 seconds]
bbarker has joined #nixos
mayhewluke has joined #nixos
kyren has joined #nixos
Fare has quit [Ping timeout: 246 seconds]
spietz has quit [Ping timeout: 252 seconds]
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #nixos
<Mic92_>
magnetop`: maybe forced-command?
<Mic92_>
or a shell that extends PATH
<Mic92_>
I mean ssh forced-commands
erasmas has quit [Quit: leaving]
wpcarro has quit [Remote host closed the connection]
iclanzan has quit [Quit: WeeChat 2.0]
wpcarro has joined #nixos
ma27 has quit [Quit: WeeChat 2.2]
ma27 has joined #nixos
tzemanovic has joined #nixos
<symphorien>
magnetop`: I have had this problem, and iirc bash in non interactive non login ssh session won't source anything, so I switched to zsh and added the right source invocation in the right file and this worked
<symphorien>
I don't remember the details though
wpcarro has quit [Ping timeout: 240 seconds]
blankhart has joined #nixos
orivej has quit [Ping timeout: 272 seconds]
wpcarro has joined #nixos
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<magnetop`>
thanks to a symlink, I got it to start. thanks for the tip! it successfully copied some paths, but now it's stalling on another...
<magnetop`>
any ideas?
kyren has joined #nixos
<magnetop`>
ah, it continued...
<sphalerite>
magnetop`: yeah with the old commands it won't indicate progress for a single big path when it's copying it, and with the new ones (nix subcommands) I think it sometimes stops reporting progress even though it might still be at it in the background
<sphalerite>
also are you usually magnetophon?
<magnetop`>
this is weird: it started compiling remotely, and then stopped with: error: unable to start any build; either increase '--max-jobs' or enable remote builds
<sphalerite>
what are you building? It might be some missing "features"
<sphalerite>
e.g. if it's the linux kernel or a browser I think it wants the machine to be marked as supporting big-parallel
<magnetop`>
an rt kernel. have built it before, and should be fine
<magnetop`>
ah
<magnetop`>
and yes, I'm magnetophon, but the nick command won't work...
<sphalerite>
there was an issue about it somewhere but I haven't found it yet
sigmundv has joined #nixos
<sphalerite>
gchristensen: do you maybe remember where the issue about the missing feature error message was?
<sphalerite>
I can't seem to find it in nixpkgs nor nix
<{^_^}>
[nixpkgs] @xeji opened pull request #46346 → cryptsetup: enable and fix tests → https://git.io/fAgbN
<sphalerite>
and I seem to remember you having provided input of some sort
<magnetop`>
I can't find the bigparallel param. where should I look?
kyren has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Growpotkin>
is the syntax of nix based on any general purpose languages? I have really fallen in love with it and would like to use the same style in programs and scripts.
<gchristensen>
growpotkin: syntax or style?
<Growpotkin>
Even the ability to run "nix repl" without forcing all outputs into the store/result-dir.
<Growpotkin>
The syntax mostly. "Style" kind of depends on our interpretations of "nix style" so thats a bit fuzzier
dbmikus has joined #nixos
<gchristensen>
growpotkin: you might find other functional programming languages interesting, like Haskell, Erlang, OCaml,
<Growpotkin>
I do really enjoy Haskell, the IO and strong typing make it a bit obnoxious for little scripts ans such
<{^_^}>
[nixpkgs] @bcdarwin opened pull request #46349 → gradient_halide: init at 2018-08-31 → https://git.io/fAgxE
<Growpotkin>
I will check out erlang and Ocaml. I was looking at Lisp derivatives but the ((((((situation) of) doing) everything) was) a little) much)
<elvishjerricco>
growpotkin: I use Haskell for scripting quite a lot. `runhaskell` is sweet
<elvishjerricco>
Strong typing doesn't generally get in the way. If I would have screwed it up with the type checker, I would have screwed it up with the runtime in a dynamic language.