<matthewcroughan>
Nix doesn't make Python much better hah
<fuzzypixelz>
is there a way to override the specific config module?
D_ has quit [Ping timeout: 250 seconds]
<fuzzypixelz>
=> I just want to have the option
<matthewcroughan>
Got it completely working though, thanks clever and gh0st[m]2
lsix has quit [Ping timeout: 258 seconds]
<matthewcroughan>
++ gh0st[m]2
<matthewcroughan>
How do you give kudos to people here again?
Qwerky has joined #nixos
<gh0st[m]2>
I think it has to be postfix notation
<matthewcroughan>
clever <3
<fuzzypixelz>
it would be odd if I could just swap out the entire nixos config module to point to unstable while my system still has 20.09 packages
<gh0st[m]2>
<fuzzypixelz "is there a way to override the s"> If you're writing a config, you can import the tarball from a nixpkgs commit that has it and reference it that way, but otherwise, not really without overlaying or adding a separate channel
codygman` has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @mweinelt pushed 3 commits to python-unstable: https://git.io/JYOuJ
<matthewcroughan>
clever: Okay, now in this shell, I can't override the propogated build inputs on mkdocs.
<fuzzypixelz>
gh0st[m]2: I'm fine with overlaying, but what do I overlay exactly?
<clever>
matthewcroughan: thats why you need to use a python overlay via python3Packages.overrideScope (self: super: {})
<clever>
matthewcroughan: then you can mutate any python package, and it will automatically affect all python packages
supersandro2000 has quit [Disconnected by services]
<matthewcroughan>
So you're saying my shell is currently totally wrong?
supersandro2000 has joined #nixos
<clever>
matthewcroughan: it may be pulling in multiple versions of the dep, the override and the pre-override version
<matthewcroughan>
error: anonymous function at /nix/store/gi3zkz8zd9i2isj17ji854qyvfj7x763-nixpkgs-21.05pre274251.f5f6dc053b1/nixpkgs/pkgs/build-support/fetchurl/default.nix:40:1 called with unexpected argument 'propagatedBuildInputs', at /nix/store/gi3zkz8zd9i2isj17ji854qyvfj7x763-nixpkgs-21.05pre274251.f5f6dc053b1/nixpkgs/pkgs/build-support/fetchzip/default.nix:17:2
emilsp has quit [Quit: I become anti-present]
Qwerky has quit [Ping timeout: 240 seconds]
<matthewcroughan>
clever: not sure what that means yet, go easy ;D
<matthewcroughan>
How could it be pulling "multiple versions"? I've limited it to `python38.pkgs` and provided hashes?
<clever>
you tried to override a fetch function, which isnt building things
<gh0st[m]2>
<fuzzypixelz "gh0st: I'm fine with overlaying,"> overlaying for a single package seems excessive personally. I'd advise, but tbh, I barely understand overlaying myself
<clever>
if you override both X and Y, and shove the overridden versions into a shell
<clever>
but Y depends on X
<matthewcroughan>
clever: because if I don't override src, I get more errors
<clever>
Y is going to pull in the pre-override version of X
<matthewcroughan>
well, rather, it builds 1.0.4, from nixpkgs
<clever>
so now you have 2 X's of different versions
<clever>
if you use a python overlay to change X, then you only get one
<fuzzypixelz>
gh0st[m]2 so the config options are "carried" with the package?
<matthewcroughan>
Is there an example python overlay shell you can point to?
<clever>
matthewcroughan: this takes a set of python packages, applies a python overlay, and returns a mutated set of python packages
<matthewcroughan>
clever: in my shell, do I replace `super.mkdocs.overrideAttrs` with that?
<clever>
matthewcroughan: you would do mkdocs = super.mkdocs.overrideAttrs inside the python overlay
<gh0st[m]2>
<fuzzypixelz "gh0st so the config options are "> I want to say yes, but they should still be overrideable, if by config options you mean the derivation config
<matthewcroughan>
So I need to do `overlay = python3Packages.overrideScope (self: super: {})`?
emilsp has joined #nixos
<matthewcroughan>
instead of `overlay = (self: super: {})`
<clever>
matthewcroughan: you would have 2 overlays, a python overlay, and a nixpkgs overlay
<fuzzypixelz>
gh0st[m]2: my picom now is from master bit I still don't have the option ):
<matthewcroughan>
so my second line remains the same? `overlay = self: super: {`
<matthewcroughan>
inside of this overlay, I have this second overlay you're talking about?
<clever>
matthewcroughan: can you pastebin your file again?
<gh0st[m]2>
<l33[m] "just to blow your mind..check o"> I'm not entirely convinced that repo is in English. That or "profunctor optics" is a concept in the stratosphere above my head
<matthewcroughan>
clever: you know what the really annoying bit is?
<matthewcroughan>
It wants the `future` package from python now
Qwerky has joined #nixos
Synthetica has quit [Quit: Connection closed for inactivity]
emilsp has quit [Quit: I become anti-present]
Qwerky has quit [Ping timeout: 265 seconds]
<matthewcroughan>
clever: error: undefined variable 'self' at /home/matthew/git/foundries/mkdocs/clever-shell.nix:18:13
<matthewcroughan>
from your shell, btw
<matthewcroughan>
Ah, now it's pSelf, okay .
grimvar has joined #nixos
<matthewcroughan>
clever: error: attribute 'mkdocs' missing, at /home/matthew/git/foundries/mkdocs/clever-shell.nix:16:14
<clever>
matthewcroughan: ah, mkdocs isnt in pythonPackages, it needs to be moved to the nixpkgs overlay
<matthewcroughan>
man we really just need to fix this in nixpkgs ;D
<matthewcroughan>
I got a bit further with my shell and ended up with the following:
<matthewcroughan>
Only to end up with this, ERROR: Could not find a version that satisfies the requirement nltk>=3.2.5; python_version > "2.7" and extra == "languages" (from lunr[languages]) ERROR: No matching distribution found for nltk>=3.2.5; python_version > "2.7" and extra == "languages"
<clever>
tab-completion in nix repl is your friend
<matthewcroughan>
Now we've got ERROR: Could not find a version that satisfies the requirement nltk>=3.2.5; python_version > "2.7" and extra == "languages" (from lunr[languages])
<matthewcroughan>
I think I might turn into pure energy
alexherbo2 has quit [Ping timeout: 240 seconds]
<matthewcroughan>
Can we not write a function that literally goes to pypi and scrapes every single package from them?
<matthewcroughan>
why can't we automate the packaging of every single pypi package?
<matthewcroughan>
mkdocs, version 1.1.2 from /nix/store/r532rqnchz4g4jjwcz7zv8wzmp5ca8i6-mkdocs-1.0.4/lib/python3.8/site-packages/mkdocs (Python 3.8)
<matthewcroughan>
Boom, problem solved. A million thanks for the assistance :)
<l33[m]>
<matthewcroughan "Hmm, how do I upgrade Nix if I'm"> rm -rf /:-)
<l33[m]>
<l33[m] "rm -rf /:-)"> you may have sudo...
<matthewcroughan>
l33[m]: Why haven't I thought of this before?
<matthewcroughan>
Solved all of my problems
<matthewcroughan>
l33[m] ++
<l33[m]>
<matthewcroughan "Solved all of my problems"> actually , once you have full nix/OS you'll have a set of new problems..but some problems are nicer to have.
<matthewcroughan>
supersandro2000: I want nix 2.4 on arch, any way to do it?
<matthewcroughan>
I got 2.3.10 from nix-env on the unstable channel
<clever>
matthewcroughan: if nix is in /usr/bin/nix, then its being managed by arch, either tell arch to update it, or `nix-env -iA nixpkgs.nix` and then tell arch to remove nix
<matthewcroughan>
clever: supersandro2000: I could just log into my 24 thread server, then `nix-build '<nixpkgs>' pkgsStatic.nix`', then copy it into /usr/bin on arch, couldn't I?
<matthewcroughan>
Do you think that would work? :D
<matthewcroughan>
clever: there is no nix package for arch, only a crusty aur package that is from 2020
<clever>
matthewcroughan: even static, it will have references into /nix/store
<matthewcroughan>
yeah, and I have a /nix/store
<clever>
matthewcroughan: just do a plain nix-env -iA nixpkgs.nix, and let it stay in /nix/store
jbox has joined #nixos
Dr8128 has quit [Ping timeout: 252 seconds]
<matthewcroughan>
yeah but unstable
<matthewcroughan>
is it nixpkgs.nixFlakes I want then?clever
jmeredith has quit [Quit: Connection closed for inactivity]
stree has joined #nixos
<simpson>
matthewcroughan: This should probably go in an FAQ somewhere: PyPI doesn't export rich-enough metadata for us to simply import all of their packages in a single motion.
<matthewcroughan>
simpson: what are the challenges?
<matthewcroughan>
Are most of the pypi packages automated then? With a few unable to be?
<matthewcroughan>
or is every single python3Packages just done by hand?
<simpson>
AIUI upstream simply doesn't have the metadata that we'd need. So yeah, we maintain them by hand.
<matthewcroughan>
Oh dear. error: unable to execute '/nix/store/l4rrkdvmy117rm20snkna99y2aq9yw77-ly-unstable-2021-03-26/bin/ly-unstable': No such file or directory
<matthewcroughan>
But I checked with ls, and the file does exist
<matthewcroughan>
by giving it a `version` as part of `name` it has appended `-unstable` to the output name
<matthewcroughan>
What's going on with that supersandro2000? How am I supposed to fix that? O.o
ddellacosta has joined #nixos
dbmikus has quit [Ping timeout: 240 seconds]
<matthewcroughan>
Okay, this must have been a caching fluke or something, whatever the problem was seems to have fixed itself after garbage collection.
erictapen has quit [Ping timeout: 240 seconds]
<matthewcroughan>
Oh, no, I changed `pname` to `name`, sneaky sneaky. Yes. so when `pname` is set to `ly` whilst the `version = unstable-xxxx-xx-xx`, the expected path is /nix/store/l4rrkdvmy117rm20snkna99y2aq9yw77-ly-unstable-2021-03-26/bin/ly-unstable
<matthewcroughan>
Am I supposed to change the pname to `ly-unstable` supersandro2000?
<matthewcroughan>
haha, if I do that, I end up with an expected path of /nix/store/f6wy6hdgzficw5kmmdnd7v2dcgzd3c6j-ly-unstable-unstable-2021-03-26/bin/ly-unstable-unstable
<matthewcroughan>
If I change it to pname = "ly-unstable"; I end up with an expected path of `ly-unstable-unstable`, what's this about?
<matthewcroughan>
supersandro2000: I've rebased, now you should be able to run `nix run github:matthewcroughan/nixpkgs/update-ly#ly` and observe the error
<matthewcroughan>
error: unable to execute '/nix/store/1vhcy6xjg54n6zbbyk4inbjqwwvlcm3y-ly-unstable-2021-03-25/bin/ly-unstable': No such file or directory
<simpson>
matthewcroughan: How would that work? You can `FROM nixos/nix` but it's not as good of an experience.
<matthewcroughan>
Does anybody know how to garbage collect the last X generations in nix? Rather than based on a time period?
<matthewcroughan>
Say I want to limit Nix to generating 10 generations
<l33[m]>
can't you use something like nixery?
<matthewcroughan>
simpson: companies tend to think of tools like Nix as the boogieman.
<matthewcroughan>
I am probably just going to end up packaging the shell as if it were a derivation, in an OCI image written by the nix tooling, this will probably suffice, I was just curious
<simpson>
matthewcroughan: Corporations are not alive; any appearance of thinking is an illusion. Don't worry about it.
<matthewcroughan>
Basically, it'd be great if when I wrote a shell, that represented an OCI image automatically, at the same time.
<matthewcroughan>
so you have two choices; Install nix, or install docker.
<matthewcroughan>
People are going to take a long time to do the former.
<l33[m]>
depends what people they are, those that want their software to build, and those that don't.
Dr8128 has joined #nixos
<matthewcroughan>
l33[m]: they?
<matthewcroughan>
Which they?
<matthewcroughan>
Is there a way to have flake inputs fallback?
<matthewcroughan>
Let's imagine you have two git repos as nixpkgs? inputs.nixpkgs.url1 and inputs.nixpkgs.url2
<matthewcroughan>
url1 and url2 point to github and gitlab respectively. This way, if GH is down, no problem.
<l33[m]>
didn't john lennon say that?
<matthewcroughan>
l33[m]: imagine there's no downtime, it's easy to do
<l33[m]>
wouldn't your fall back be cached in your /nix/store?
mkaito has quit [Quit: WeeChat 3.1]
<matthewcroughan>
Yes, but if you were trying to start a fresh build and github and gitlab were down, that's fine, because url3 points to a synced gitea/gogs instance that you set up to mirror nixpkgs, hopefully
<l33[m]>
however, the trust pin it https:/thisiswhatiwant.with.ssl.certificate.com
<l33[m]>
only build input are hashed...but maybe in flakes that can be different?
<matthewcroughan>
trustix and ipfs will make this pointless, won't it? Lol
<matthewcroughan>
there won't be a central git repo to fail in that setup
<l33[m]>
that is the future...
<l33[m]>
i need more cores!
<matthewcroughan>
ryantm: Is it possible that we could use a yubikey instead of an ssh key with agenix?
<matthewcroughan>
I think that'd be so cool, to unlock all my secrets with a yubikey.
<apo>
I installed exim on my box and tried to use it as sendmail, as a non-privileged user. This creates a file in /var/spool/exim/input (as that user), then tries to chown it to exim's user and group, which fails
<apo>
(Because you can't hand off your owned files to somebody else)
<apo>
It seems that normally, exim is suid
<apo>
Anybody got an idea what I should do to get sendmail running?
<matthewcroughan>
ryantm: lol, if we did this with yubikeys you could even put your ssh private keys into your nix configuration, and decrypt them with age via the yubikey.
<matthewcroughan>
This is the craziest use case for a yubikey I've ever seen
<matthewcroughan>
Do you automatically get invited to the NixOS organisation when you are added to maintainers.nix?
endformationage has quit [Quit: WeeChat 2.9]
<matthewcroughan>
supersandro2000: I figured out the issue with Ly, haha
<matthewcroughan>
Its insane custom configuration parsing library limits the char size of any configuration option to 80, meaning the nix store path gets cut off.
cole-h has quit [Quit: Goodbye]
cole-h has joined #nixos
palo1 has joined #nixos
palo has quit [Ping timeout: 240 seconds]
palo1 is now known as palo
waleee-cl has quit [Quit: Connection closed for inactivity]
<patagonicus>
Anyone know a mirror for sudo.ws / the source for sudo-1.9.6p1? The server seems to be down.
simba1 has joined #nixos
Unempl0yed[m] has joined #nixos
monokrome has quit [Quit: software update]
monokrome has joined #nixos
Vadrigar_ has joined #nixos
<srhb>
patagonicus: Well, cache.nixos.org
<patagonicus>
Shouldn't that be automatically done by nix-build?
<patagonicus>
Anyway, I found it because it's being used by LFS and they have mirrors. :)
<srhb>
patagonicus: Yeah, it should. Maybe you had a substitution attempt flake out.
<patagonicus>
I'm building close to master, it might not be in the caches yet. And it's 32-bit arm, so no binary cache, just sources.
<srhb>
Should still work as far as I can tell. The src attribute is fixed-output, so the hash shouldn't be changed as far as I can think, unless it's actually a different src per system, which I assume it's not.
<srhb>
eg. /nix/store/grbq4miwjmklddni84b3ryvjfc4g85ai-sudo-1.9.6p1.tar.gz should work
<Magic_RB>
Hi, I'm attempting to reimplement parts of NixOS on my own, as a learning experience and now I'm working on my version of https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/vm/default.nix#L306 and I've got it working, but only when I run the script outside of the Nix build process, it seems as if the 9p mount does not work when running
<Magic_RB>
in Nix
<Magic_RB>
```
<Magic_RB>
qemu> mounting Nix store...
<Magic_RB>
qemu> /init: line 23: sleep: command not found
<Magic_RB>
qemu> mounting out...
<Magic_RB>
qemu> /init: line 26: /nix/store/cgvsmcmbxv1aszhhzy8b86gmas58bvbr-busybox-1.31.1/bin/m
<Magic_RB>
qemu> /init: line 27: /nix/store/cgvsmcmbxv1aszhhzy8b86gmas58bvbr-busybox-1.31.1/bin/m
<Magic_RB>
qemu> /init: line 29: /nix/store/cgvsmcmbxv1aszhhzy8b86gmas58bvbr-busybox-1.31.1/bin/m
Magic_RB has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Magic_RB>
For those that saw my last message, it got detected as flooding. Didn't intend to flood sorry guys, I'm new to IRC so idk if it got through or it somehow got intercepted, anyway, thanks for your help in advance
sangoma has quit [Quit: WeeChat 3.1]
<jess>
hey
<jess>
i removed the ban, lots of people make that mistake
<jess>
try a pastebin instead
<gh0st[m]2>
Yeah, it's no problem, pastebin and stuff like it will work best
<Magic_RB78>
Hi, I'm attempting to reimplement parts of NixOS on my own, as a learning experience and now I'm working on my version of https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/vm/default.nix#L306 and I've got it working, but only when I run the script outside of the Nix build process, it seems as if the 9p mount does not work when running
<srhb>
Magic_RB78: Brief look over, it looks to me like you're in a bootstrap pickle -- your initrd needs a bunch of tools to mount the 9p stuff but you are trying to get those tools from the 9p mounts, as far as I can see.
<srhb>
Magic_RB78: You'll need to produce an initrd that actually contains enough tools to bootstrap eg mount
<Magic_RB>
The initrd is a bundle
<Magic_RB>
So it contains everything it needs, the errors appear only after I mount 9p and it works if I run the script manually
Dr8128 has joined #nixos
<srhb>
What exactly do you mean by manually? Without sandboxing?
<Magic_RB>
write text the script and then run it with bash result
<srhb>
But on your host machine, /nix/store/...busybox suddenly exists!
<srhb>
I'll read bundle in case I missed something
<Magic_RB>
Oh unless nix literally drops paths that it doesn't need
<srhb>
Though my gut feeling is that this is the right diagnosis. You're assuming /nix/store exists and contains eg. busybox before that's actually the case.
<srhb>
Magic_RB78: I think it's still related to what's available before/after store mount -- try https://pastebin.com/8PDpEdzr
zupo has joined #nixos
<srhb>
Magic_RB78: Similarly I think adding busybox to runCommandNoCC's args in buildInputs would do the same thing, because the executing qemu would see a /nix/store containing busybox in the sandbox, and mount that in.
<srhb>
Magic_RB78: Causing the "overwrite" (when you mount "store") to not lose busybox due to the shadowing.
<odiug[m]>
init
lsix has quit [Quit: WeeChat 3.0.1]
<odiug[m]>
sry, wrong window :-)
<srhb>
Magic_RB78: Does that clear things up?
<Magic_RB>
I think, so. the thing that runs qemu doesn't depend on busybox, so when qemu add /nix/store to 9p the store only contains the stuff that qemu depends on
<Magic_RB>
Therefore it doesn't contain dependencies of the script it self
<srhb>
Magic_RB: Right. :)
<Magic_RB>
Couldn't I just add the script to nativeBuildInputs?
meh` has joined #nixos
<srhb>
Magic_RB: Yeah, that should work too.
<Magic_RB>
srhb: thanks you very much, I can continue work on my thing, creating a bootable disk imagine is next
<Magic_RB>
*thank
<srhb>
Magic_RB: You're welcome.
<Magic_RB>
I can't type apparently lol, anyway, I'll have to stop by here more often, I think I found all of the Nix masters
<srhb>
It's a good and helpful channel :) Especially when you have stuff as easy to reproduce as yours.
<srhb>
So kudos for that.
zebrag has joined #nixos
<Magic_RB>
Thanks, I'm trying to do this right to eventually merge parts or ideas from NixNG into NixOS, one of the main things is I'd like to have a generic init system interface in Nix
<srhb>
I think someone posted on similar goals yesterday evening in this channel, and there was also a... relevant talk at nixcon 2020 I believe.
<srhb>
I think it was odiug[m] that posted something yesterday.
<Magic_RB>
I'll definitely watch the talk from nixconf2020, I'll be here more often, still hoping someone helps me with my little project
Magic_RB has quit [Quit: Connection closed]
Magic_RB has joined #nixos
Magic_RB has quit [Client Quit]
sss2 has joined #nixos
Magic_RB has joined #nixos
<odiug[m]>
Yes, i posted my proof of concept of an s6-init system.
<Magic_RB>
odiug[m]: could you post again? Though I'm aiming more for runit or openrc. I do realize that I'll have reimplement a lot of systems since NixOS depends on it quite heavily
<Magic_RB>
odiug[m]: well you beat me to it lol, I also had the idea that I could create a module which would parse `services` then generate something like `services2` which then could get parsed by which ever init system the user picked. I planned to write a semi official design for the new generic services option by going through all existing services and
<Magic_RB>
generalizing what they need so that we could build up a a capability system for each init system, so that if you were to enable sshd which required some feature which runit didn't support Nix would yell at you.
<Magic_RB>
I started developing NixNG so that I could gain a better understanding how such I a distro might be built, I also refer to NixOS source all the time so I'm learning that too
hiro98 has joined #nixos
zupo has joined #nixos
<odiug[m]>
I was glad I could do it without changing nixpkgs.
<Magic_RB>
Yeah that one way I'm aiming for a more destructive change, though there is no reason why my thing could be included as a third party flake too, :D
<{^_^}>
[nixpkgs] @mweinelt pushed 644 commits to python-unstable: https://git.io/JYsRP
<Magic_RB>
*that's, couldnt
stree has joined #nixos
<maralorn>
My build for git-2.29.3 fails because I have max-jobs==0. What flag is my remote-builder missing to be viable for that build?
<hexa->
maralorn: is cached for me
<maralorn>
hexa-: Hm, it might just be a wrapper or something?
medvid has quit [Quit: WeeChat 2.3]
<hexa->
this works for me: nom-build -A git -j0 --check
<yaymukund>
I'd like to prepend to XDG_DATA_DIRS but I think the underlying firefox package would tkae priority, because they prepend
<hexa->
pretty sure it would reuse the var from your env
Mateon1 has quit [Quit: Mateon1]
Mateon1 has joined #nixos
<hexa->
so if you'd used something home.sessionVariables (home-manager), that could work
<yaymukund>
hmm, ok,i do not think that would work becasue I think the underlying bin/.firefox-old prepends a path that takes priority, but let me do some debugging to figure out exactly what's happening
ahmed_elgabri has joined #nixos
<hexa->
yaymukund: the wrapper only accumulates xdg_data_dirs afaict
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #nixos
ahmed_elgabri has quit [Ping timeout: 246 seconds]
<yaymukund>
ah ok, that makes sense. I realized i did not actually fix the thing I thought i was fixing, so this is all moot -_-;
<simpson>
shla: "Windows on Windows", IIRC; it's part of how 32-bit Windows was implemented on 16-bit Windows. (You can probably guess what "wow64" is, now...)
<koluacik>
Hello, I think posix_man_pages package might not be working correctly. When I invoked a nix shell with -p posix_man_pages, I couldn't find posix man pages such as sys_wait.h. Also, the archive fetched is outdated...
<shla>
32bits apps on 64 arch?
<koluacik>
I tried writing a new derivation by using the manpages derivation expression from nixpkgs and it works. Should I open a issue/pr about this?
<hexa->
Raito_Bezarius: also should probably use upstreams nomenclature, enableTracking
plakband has joined #nixos
ddellaco_ has quit [Ping timeout: 246 seconds]
<D_>
upstream calls it "anonymous statistics"
<D_>
they also support DO_NOT_TRACK because there was an effort to standardize that as an environment variable for opting out of tracking https://consoledonottrack.com/
<Guest84841>
hello, I am currently on nixos-20.09. Unfortunatelly all distros are swapping to zstd kernel compression. However, this is not yet compatible with our XEN servers and they simply don't support it. Is there a NixOS way to *not* use zstd?
ahmed_elgabri has quit [Ping timeout: 246 seconds]
ddellacosta has joined #nixos
n-osborne has quit [Remote host closed the connection]
vidbina has joined #nixos
<tobiasBora>
Hello, I'm trying to fix a package, and what I need to change is only in the postfixup phase. Can I avoid full recompilation everytime I change the postfixup phase?
<kalbasit[m]>
tobiasBora: I don't believe so
ddellacosta has quit [Ping timeout: 260 seconds]
<tpw_rules>
no, you can't
e has quit [Quit: edk]
hiro98 has joined #nixos
<gh0st[m]2>
Probably not, unless you're able to break the package into a separate pre-postfixup phase, which would be kinda ridiculous
<tpw_rules>
but you can use a nix-shell to run the package compilation process manually so you can repeat the postfixup phase until you get it right. then test it in the full thing
suketu[m] has left #nixos ["User left"]
<tpw_rules>
there's also breakpointhook
ddellacosta has joined #nixos
<tobiasBora>
tpw_rules: hum... I never felt confortable enough with nix-shell to manually run the compilation... How is this supposed to be done? Also, if I run the postfixup phase in nix-shell several times, it will wrap many times my executables no?
<tobiasBora>
kalbasit[m]: but I don't really have failures in my case, should I volontarily create failures?
<tpw_rules>
its a bit weird and not really documented. but basically what i would do is start the shell, run all the phases in the "phases" environment variable up until postfixup, (see section 6.5.1 in the manual), back up the $out directory somewhere, test my post fixup, restore the $out directory if it fails, and repeat
<kalbasit[m]>
yea, you can do that with `exit 1` in your postfixup phase
<tpw_rules>
yeah i think breakpointhook is an easier way of doing step 1 of what i just described. never tried it though
sangoma has joined #nixos
ddellacosta has quit [Ping timeout: 240 seconds]
<tobiasBora>
kalbasit[m]: I'll try that, thanks!
stree has quit [Ping timeout: 268 seconds]
<tobiasBora>
tpw_rules: ok, guess I've no way to avoid manual $out backup ^^ So to make sure I understand things, if I do in nixpkgs: "nix-shell -A carla", and then "echo $phases" ==> if this is empty is means that the default sequence https://nixos.org/manual/nixpkgs/stable/#sec-stdenv-phases ?
<tpw_rules>
as i understand it, breakpointhook will get you through all the phases up until your exit 1. then you would use the cntr thing to enter the build shell, back up $out, run your postfixup, and repeat until you get it working
<tpw_rules>
then update the derivation and build it to make sure it works
<tobiasBora>
tpw_rules: from an empty folder? What happens if I don't? So I need to do "nix-shell -f ~/nixpkgs/default.nix -A carla" from an empty folder?
codygman__ has joined #nixos
<tpw_rules>
tobiasBora: you'll get junk all over it
ece has quit [Read error: Connection reset by peer]
<tobiasBora>
Also, I tried to manually run all the phases on a toy derivation, but when I run "installPhase" I run into troubles because "mkdir: cannot create directory /nix/store/...-helloworld-1.0: readonly file system"
<tobiasBora>
also, it's strange, but installPhase is supposed to be my simple "cp myfile $out/myfile", but it's in fact the default value http://pastebin.fr/89176
alexherbo2 has joined #nixos
<tobiasBora>
oups, wait for the last thing I may did something stupid
<tobiasBora>
nope, in fact this was not stupid, declare -f does not give me the right input
<tobiasBora>
output*
ahmed_elgabri has joined #nixos
ddellaco_ has joined #nixos
spacekookie has quit [Quit: **aggressive swooshing**]
<uhohqueenofTechl>
How do I disable display managers on nixos?
<uhohqueenofTechl>
<uhohqueenofTechl "How do I disable display manager"> I want to manually start DWM
jmeredith has joined #nixos
codygman__ has quit [Remote host closed the connection]
<figgyc>
Is there a way that when nix is building several long packages and one fails, instead of stopping as soon as an error comes up, it waits for the other packages to finish?
codygman__ has joined #nixos
<nomadtester>
Hi guys
<nomadtester>
Is there a general universal way of ssh authentication that will NEVER change like the dumb host keys? So I could use a key to login to a server, then reboot either, do whatever, change hosts, and still be able to log in remote? At this point i just ln -s /home/user/ssh/host_keys /dev/null - So, very useful
Baughn has quit [Ping timeout: 260 seconds]
<uhohqueenofTechl>
How do I verify my nixOS iso?
<uhohqueenofTechl>
* How do I verify my NixOS iso?
hiro98 has quit [Remote host closed the connection]
<nwspk>
uhohqueenofTechl: what do you want to verify? if it is downloaded correctly? if the ISO was tempered with?
<uhohqueenofTechl>
<nwspk "uhoh, queen of Techlore - #👥•ch"> I have already verified it's sha256sum, but thank you :)
<nwspk>
most propplery, you have downloaded the ISO using a TLS connection. thus, I would assume it is correct
<nwspk>
the TCP-part should assure the correct file. TLS does the rest
<nwspk>
okay, then nevermind
tobi_ has joined #nixos
<uhohqueenofTechl>
How do I make a package as Nix-friendly as possible? Is it possible to write software entirely in Nix?
ahmed_elgabri has joined #nixos
<nwspk>
well.. you could, but mostly Nix is a DSL specially crafted for packaging
<nwspk>
however, there is, for example, a static webpage generator written in Nix
<nwspk>
if your tools uses standard build systems, it should be straight forward to create a Nix package
<sterni>
uhohqueenofTechl: what do you mean by nix friendly? the answer depends on for example if you want to have it for nixpkgs or not
<sterni>
uhohqueenofTechl: you shouldn't do general do general purpose programming in nix, it is close to impossible and very painful in any case
<sterni>
uhohqueenofTechl: nix excels however at writing build systems although it then becomes harder to package that for other packaging systems and even nixpkgs because we don't have recursive nix (yet)
<sterni>
uhohqueenofTechl: also something which is very cool and also pretty fun is generating code and then building it all from within nix using pkgs.writers.* for example
<sterni>
uhohqueenofTechl: nixpkgs aims to support conventional build systems as well as possible, so use whatever build system is idiomatic to use for your package and avoid hard coding paths or depending on the enviroment as much as possible (i. e. respect configure flags which tell you the prefix, use pkg-config or similar to find your dependencies' location, maybe even take the path to other binaries you
<sterni>
uhohqueenofTechl: generally you can add flags to the input of a package in nixpkgs which then influence the configure flags and are overrideable, but depending on your software a nixos module may be a better fit to customize behavior (at runtime then via configuration files usually)
Qwerky has quit [Remote host closed the connection]
Magic_RB78 has quit [Quit: Connection closed]
growpotkin has joined #nixos
FRidh has quit [Quit: Konversation terminated!]
<Raito_Bezarius>
sterni: there was an interesting discussion in how package with config should still be "package" and has some package.withCfg (xxx) rather than a module
n-osborne has joined #nixos
luxemboye has quit [Remote host closed the connection]
n-osborn_ has joined #nixos
<Raito_Bezarius>
uhohqueenofTechl: @ display manager, https://nixos.org/nixos/options.html# + searching for displayManager should help you ; in particular, you might want displayManager.startx.enable = true;
luxemboye has joined #nixos
<matthewcroughan>
grahamc[m]: Did you ever find out a way to have Hydra build usable outputs with a different NIX_STORE?
<matthewcroughan>
I last suggested a container might be a good method, but does this still talk to the daemon on the host?
meh` has joined #nixos
n-osborne has quit [Ping timeout: 240 seconds]
Qwerky has joined #nixos
<matthewcroughan>
Minijackson: Heyo! I saw you made some more progress on the Yocto building shell, you around?
<Minijackson>
I am ^^
<matthewcroughan>
When I try to run my shell, I end up with /usr/bin/env: ‘python3’: No such file or directory
<matthewcroughan>
upon running bitbake, after sourcing setup-environment :D
<Minijackson>
can you share your env?
<matthewcroughan>
it's just your nix-shell
ManiacOfMadness has joined #nixos
<matthewcroughan>
by env, do you mean the Yocto repos?
<Minijackson>
ah! The nix code that I shared on Discourse isn't meant for nix-shell
<matthewcroughan>
Oh, how am I intended to run it?
<Minijackson>
it's meant for nix-build, then `./result/bin/yocto-on-nixos`
<alienpirate5>
I upgraded the channel on my server from NixOS 20.09 to unstable, and now `nixos-rebuild` segfaults
<alienpirate5>
I think this is a problem
<matthewcroughan>
Minijackson: I don't see gitRepo in the env
<matthewcroughan>
is that intentional?
<Minijackson>
I haven't had a need for it for building the base image
<Minijackson>
alienpirate5: it's definitely weird that you have two different glibc in the runpath
kreha1[m] is now known as tomek[m]
<Minijackson>
you may be able to get around it by setting LD_LIBRARY_PATH? Although I'm not 100% sure
<alienpirate5>
last time I tried this (on a different server) it segfaulted on boot
zebrag has quit [Quit: Konversation terminated!]
<alienpirate5>
<Minijackson "you may be able to get around it"> doesn't that require ld itself to initialize first?
zebrag has joined #nixos
<alienpirate5>
then I get this; `/nix/store/9ywr69qi622lrmx5nn88gk8jpmihy0dz-bash-4.4-p23/bin/bash: symbol lookup error: /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6: undefined symbol: _dl_fatal_printf, version GLIBC_PRIVATE`
<Minijackson>
I'm not sure what you mean by ld initializing first
<matthewcroughan>
Minijackson: Huh, yocto complains about missing rpcgen
<matthewcroughan>
That's provided by glibc right?
<alienpirate5>
I don't know what I'm talking about basically
attila_lendvai has joined #nixos
attila_lendvai has joined #nixos
attila_lendvai has quit [Changing host]
tobi_ has quit [Quit: leaving]
<matthewcroughan>
Minijackson: also, do you know about nix-index?
<matthewcroughan>
Basically, `nix-shell -p nix-index` then run `nix-index` then run `nix-locate rpcgen`
<matthewcroughan>
or `nix-locate libsqlite6.so`
<matthewcroughan>
shows you what nix packages contain various artifacts, pretty serious stuff
<Minijackson>
alienpirate5: welp, that bash seems not recoverable...
<alienpirate5>
how does that even happen?
<Minijackson>
matthewcroughan: I usually have `command-not-found` finding things for me ^^
<matthewcroughan>
yeah but rpcgen won't happen :D
<Minijackson>
alienpirate5: Do you have some essential packages in your overlays?
<matthewcroughan>
omg it does
<alienpirate5>
I don't have any overlays on this system
<{^_^}>
#117835 (by anna328p, 14 seconds ago, open): After an upgrade from nixos-20.09 to nixos-unstable, `nixos-rebuild` segfaults
<matthewcroughan>
Minijackson: All it took to avoid the sanity checker was ` export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE LOCALEARCHIVE LOCALE_ARCHIVE"`
<Minijackson>
matthewcroughan: apparently, rpcgen is not part of the glibc.bin derivation on nixpkgs-unstable, not sur why, yet
<Minijackson>
yes
<Minijackson>
but LOCALE_ARCHIVE is still not forwarded to the build environment :-/
<matthewcroughan>
Yeah, complete insanity.
<Minijackson>
(AFAIK)
supercoven has quit [Read error: Connection reset by peer]
<Minijackson>
matthewcroughan: I found an rpcgen command in the rpcsvc-proto package, not sure if it's the same one
<matthewcroughan>
yeah I added that, it's what I needed, should have mentioned :D
<matthewcroughan>
Minijackson: ocamlPackages.ocamlnet.out 519,856 x /nix/store/yyiflaf0xh5mk50nacaqchx87qsjmv9j-ocaml4.10.0-ocamlnet-4.1.8/bin/ocamlrpcgen
<matthewcroughan>
Found by nix-locate, just interesting to notw :P
n-osborne has quit [Remote host closed the connection]
m1cr0man has quit [Quit: G'luck]
<dgpratt>
I asked this over in #home-manager, but it's a bit quiet over there atm...
<dgpratt>
I just set up home-manager on non-NixOS (Ubuntu). Everything seemed to go fine, but "$HOME/.nix-profile/bin" is no longer part of the PATH. It seems that for certain things to work, it should be?
zupo has joined #nixos
<Minijackson>
IIRC, "$HOME/.nix-profile/bin" is where programs installed through nix-env are installed
gustavderdrache has joined #nixos
julm has joined #nixos
<Minijackson>
it seems to also be the case for programs installed through home-manager, dgpratt
<bew>
I'm thinking that using squash&merge button on github for example would allow to have a cleaner history, without having commits referencing old parents, without adding more commits (one for the change, one for the merge)
<dgpratt>
thanks Minijackson and supersandro2000 -- doesn't make sense to me that HM creates a profile that doesn't add that to the PATH
<dgpratt>
maybe it's supposed to be set elsewhere
evils has quit [Ping timeout: 252 seconds]
<Minijackson>
if you're not on nixos, I think you have some files to source in your shell
jrm2 has joined #nixos
cole-h has joined #nixos
Qwerky has joined #nixos
<uhohqueenofTechl>
So I did `wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase 'SSID' 'key')`, but that did not work; I `ping google.com` and it does not work.
<supersandro2000>
ece: whats not working right now?
<supersandro2000>
matthewcroughan: do you have ncurses in the env of the module? Maybe you need to wrap the package or replace the path.
<bew>
supersandro2000: yeah I already have sth like that for cleaner/smaller git logs, but it's still littered with a lot of Merge commits and colored graph lines, and it gets worse when scrolling
<bpye>
If I'm doing a nix build how can I get the full log? 'nix build --show-trace --builders 'ssh://nixvm-aarch64 aarch64-linux' .#images.image ' is my current command, but I'm getting some weird break that I can't figure out and all the output I get currently is 'not an absolute path: 'K''
stree has joined #nixos
<matthewcroughan>
supersandro2000: I've tried propogatedBuildInputs, it's definitely there, I'm convinced that it's to do with the systemd service, so do you have any advice with that? :D
<supersandro2000>
kpcyrd: shrug. probably something broken on github. This shouldn't block the update in any way as the PR is already merged
<bpye>
/nix/store/8cjmi1jzmssqsbsrfiqbqzfhip0y03mb-init.drv doesn't exist on the remote
<supersandro2000>
bpye: can you ssh into the remote builder? try some -vvvv but be careful the output can contain personal information
<bpye>
Yeah ssh is fine
<dgpratt>
there is this line at the end of the ~/.profile script before HM replaced it: if [ -e /home/user/.nix-profile/etc/profile.d/nix.sh ]; then . /home/user/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
<phalrax>
Hi, any idea how I could implement this iptables rule in my configuration.nix? It's needed to run k3s apparently, otherwise my containers keep crashing (works with firewall.service stopped): iptables -A INPUT -s 10.42.0.0/16 -d <host_internal_ip>/32 -j ACCEPT
jrm2 is now known as jrm
<dgpratt>
well, HM didn't exactly replace it, it said it couldn't "switch" as long as it was present
<kpcyrd>
supersandro2000: is this a normal delay for an update to unstable?
<supersandro2000>
dgpratt: I have replaced all the modifications of the nix-installer in my bashrc so I can't tell what is supposed to be there
<dgpratt>
supersandro2000: you referenced the multi user installer, does that imply there is a single user installer? perhaps that is what I set up when I installed nix and perhaps HM assumes use of the multi user one?
<matthewcroughan>
supersandro2000: sigh, I think you're right, it totally is hardcoded and the config doesn't work
<matthewcroughan>
but most of the other config options *do* work
<supersandro2000>
dgpratt: did you pass --daemon to the installer?
<supersandro2000>
hm should work with both
<dgpratt>
that was a while back, so I'm not sure, but I doubt it
jtle has quit [Quit: Client update]
<dgpratt>
well I think I can assume the comment on that line about it being added by the nix installer is correct and that line does have the effect of correctly setting up the PATH, NIX_PATH, etc. and HM has created a .profile that no longer does those things
philr has joined #nixos
<bpye>
supersandro2000 is there something else I can look at for logs?