<cgbrewster[m]>
* Oh yeah that does seem relevant to what I'm trying to do (edit: I meant does!)
figgyc has quit [Client Quit]
apache8080 has quit [Ping timeout: 276 seconds]
ddellacosta has joined #nixos
aaabbbbbbbbbb has quit [Ping timeout: 245 seconds]
wnklmnn has quit [Quit: Leaving]
<scott>
how should i do the equivalent of `nixos-rebuild boot` on my VPS with a specific NixOS system closure i've already uploaded to it? i've found advice to use `nix-env --profile /nix/var/nix/profiles/system --set $path`, which works, but how do i update the GRUB menu?
<pie_>
infinisil: oh i guess the bot doesnt do trace?
<infinisil>
Indeed
<gchristensen>
you can't deeply evaluate a nixos value
<tomberek>
is there a way to exclude certain things from a derivation's inputs? Still to use it impurely at build time, but exclude it from hashing/tracking? Basically I want to exclude things like changes to stdenv and basic utilities from forcing rebuilds?
<pie_>
infinisil: wow why are you awake :P
<pie_>
gchristensen: I dont follow
<gchristensen>
pie_: infinisil is on America/New_York TZ
<infinisil>
^ lol
<pie_>
gchristensen: since when? 0.o
<matthewcroughan>
gchristensen: What does deeply evaluate mean?
<gchristensen>
since forever
<gchristensen>
matthewcroughan: if you try to follow every attribute's value all the way out until you have no un-evaluated values ... you'll infinitely recurse.
<matthewcroughan>
Is that the difference between procedural and functional in a nutshell?
<gchristensen>
infinisil is not *in* America/New_York, but their effective TZ is :)
<matthewcroughan>
Just wondering, because I hear a lot about lazy evaluation, and always assume its meaning without fully understandingit.
<matthewcroughan>
is lazy evaluation a property of a functional language? Or is it just of Nix?
<gchristensen>
matthewcroughan: not *necessarily* but FP languages are perhaps more often lazy
<pie_>
laziness/strictness is completely (?) orthognonal to functionalness
<tomberek>
something along the lines of allowedReferences, allowedRequisites, but more like ignoredReferences ?
<pie_>
gchristensen: unless youre referring to some specialty of the evaluator, i dont understand why what Im doing wont work. Im putting an abitrary trace statement that should (?) evaluate the head of its argument in the strict argument of the seq and returning {}
oxalica1 has joined #nixos
<pie_>
ok so its a bit trial and error but traceVal and traceValSeqN 0 didnt work either
<gchristensen>
ah ok
oxalica has quit [Ping timeout: 252 seconds]
oxalica1 is now known as oxalica
<pie_>
no matter what i do touching that system variable it causes infrec
<tomberek>
some of the semantic loosening in shlevy's Nomia would be possible if you could tell Nix "don't worry, trust me, this dependency doesn't matter"
<gchristensen>
yeah but inevitably it is wrong :P
<infinisil>
pie_: How do you pass in the system argument?
<pie_>
infinisil: i dont know, it just seems to exist?
<pie_>
infinisil: i dont actually know if it exists
<infinisil>
Ah no it doesn't
<gchristensen>
like 80% of my consulting is people saying "ah it is totally fine!" and I say "I mean, it isn't" and then they say a few weeks later "oh dang this is totally hurting me now"
<pie_>
infinisil: ok so module arguments that dont exist cause infrec?
<infinisil>
You can replace system with any other argument
<infinisil>
Should give the same result
<pie_>
wait how does that even work xD
<tomberek>
it's wrong, but from Nix's perspective. If you squint and consider different equivalence classes, it may be what you want.
<matthewcroughan>
pie_: I always forget what orthognonal means, but I have a colleague who uses that a lot, are you him? :D
<pie_>
matthewcroughan: it means unrelated
<pie_>
or something like that
<infinisil>
pie_: Magic
<pie_>
infinisil: i presume __functionArgs, but eh?
<pie_>
matthewcroughan: or like, "you can vary these two parameters separately
<pie_>
"
<pie_>
matthewcroughan: bad explanation: laziness means you have a bunch of objects in memory that are opaque values of "here is a thing, but i dont actually need it yet", and then when you actually need it, you evaluate the thing and replace it with its actual value
Q8IoXhexAi has quit [Quit: Terminated!]
<pie_>
next, you apply this to _every_ value
<pie_>
you are blind and following a knotted rope with many branches
<pie_>
all alike
ddellacosta has joined #nixos
<pennae>
you are eaten by a bottom
<pie_>
kinky
<matthewcroughan>
pie_: What are they defined as if they have no value?
<matthewcroughan>
0?
<pie_>
matthewcroughan: the value is "i dont know my value yet, but you can find out if you ask me for it"
<matthewcroughan>
So, tab completion on a flake, have you tried it?
<pie_>
basically everything is iin an "opaque wrapper
<pie_>
no i havent
<matthewcroughan>
I feel like this is as interactive as laziness can be.
<matthewcroughan>
In fact, enter a repl and try it, one moment.
zebrag has quit [Quit: Konversation terminated!]
lordcirth has quit [Remote host closed the connection]
<gchristensen>
this opaque wrapper is called a thunk
<pie_>
^
<gchristensen>
a yet unthought promise of future computation
<infinisil>
And what a thunk actually stores is an expression with an environment
<gchristensen>
"twitch teaches laziness"
<matthewcroughan>
pie_: in a repl, do the following: flake = builtins.getFlake "github:matthewcroughan/nixcfg"
<pennae>
"a function not yet called"
<matthewcroughan>
then do flake.<tab>
<pie_>
matthewcroughan: as a sidenote, the way inifinite recursion detection works if you stick a pin in every knot you pass,and if you end up at a knot that already has a pin in it, you know something is screwy - you've been here before (this a partial, but not a _sufficient_ explanation, i think)
<matthewcroughan>
now, if you explore my flake by tab completing the attributes, you'll see it downloads things at different stages
<pie_>
I dont think I have flakes enabled since im not on unstable
<matthewcroughan>
is this the essence of lazy evaluation?
<infinisil>
pennae: Doesn't have to be a function :)
lordcirth has joined #nixos
<pennae>
infinisil: everything's a function. some are just nullary :>
<pie_>
matthewcroughan: anyway i recommend you think hard and do some reading if you want to understand this better
<pennae>
(do you want to build a thunk tree?)
<infinisil>
Lol
<gchristensen>
matthewcroughan: yes :)
<gchristensen>
matthewcroughan: consider if Nix *were not* lazy, you would have to evaluate all 40k packages just to look up pkgs.hello
<matthewcroughan>
theoretically then, all procedural alternatives will be crippled under their own weight
<matthewcroughan>
such as yocto, which seriously does have to do that
lordcirth has quit [Remote host closed the connection]
<matthewcroughan>
well, bitbake, that tooling.
<infinisil>
gchristensen: Arguably there would be another mechanism to allow it to be lazy then
<gchristensen>
this is the fundamental reason ofborg exists: to do that deep evaluation that nobody else wants to do, and many people literally can't since it requires so much dang ram
<matthewcroughan>
gchristensen: It requires lots of ram why?
<matthewcroughan>
because of top-level?
<matthewcroughan>
What is the consequence of getting rid of top-level, in terms of resources on the system?
<gchristensen>
no, just because there are so many packages combined with the deep support for overrides
<matthewcroughan>
does it require more ram to evaluate node stuff than it does to evaluate other ecosystems?
tmciver has quit [Read error: Connection reset by peer]
<gchristensen>
nix essentially can't garbagecollect any memory while it evaluates because everything has a full handle to everything in its closure
<gchristensen>
ofborg's full eval of all of nixpkgs across 4(?) architectures takes a bit over 16g iirc
<matthewcroughan>
Does this file require more resources?
<matthewcroughan>
yknow, to evaluate
<gchristensen>
not sure I can answer that
<pennae>
i'm once again at "only?" :D
<gchristensen>
pennae: :)
<infinisil>
gchristensen: Resources can't be attributed to single files
<infinisil>
Only parsing time, but that's negligible
<gchristensen>
of course
<matthewcroughan>
Right, so the fact that node-packages is one of the largest files in Nix has nothing to do with how Nix will perform in terms of resources.
<matthewcroughan>
How about a package like Ghost?
<matthewcroughan>
Where it has so many dependencies it's just ridiculous?
<gchristensen>
each package has a small impact on the memory requirements
<{^_^}>
#24936 (by b123400, 4 years ago, closed): ghost: init at 0.11.9
<matthewcroughan>
This wasn't merged because of the amount of deps.
<matthewcroughan>
As far as I can tell, anyway.
<matthewcroughan>
11K lines, of which a percentage of that number is real deps.
<matthewcroughan>
What effect would the introduction of this package have had on evaluation time and on hydra?
<gchristensen>
that is more of a maintenance burden and "impact on the repo size" than evaluation
<matthewcroughan>
Would it be cataclysmic?
figgyc has quit [Quit: No Ping reply in 180 seconds.]
<matthewcroughan>
Oh. Interesting. I had the wrong idea then :D
<infinisil>
Siri, define cataclysmic
<infinisil>
"A violent upheaval that causes great destruction or brings about a fundamental change."
patagonicus1 has joined #nixos
lordcirth has joined #nixos
ahmedelgabri has quit [Ping timeout: 276 seconds]
<pie_>
the reason I started looking for that system argument is that my config _works_ for some reason, when it shouldnt 0_o
tmciver has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @jtojnar pushed to gnome-40 « poppler_gi: fix build on Darwin »: https://git.io/J3v0S
patagonicus has quit [Ping timeout: 246 seconds]
patagonicus1 is now known as patagonicus
<matthewcroughan>
infinisil: Node packages definitely are strange in Nix.
<matthewcroughan>
Why is it so bad?
<matthewcroughan>
Why do we have to have this very large single file in nixpkgs that defines all node packages?
<gchristensen>
big questions for 3:45am
<pie_>
look at anything else that imports a package repository
<matthewcroughan>
gchristensen: I just woke up :(
<matthewcroughan>
Nix screws with my sleep schedule.
<pie_>
in general, look at the other language infrastructures.
<infinisil>
matthewcroughan: There's a single large file because it allows reusing dependency declarations between multiple packages
<pie_>
for the node-est experience, look for ones with autogenerated package sets
<matthewcroughan>
Yeah.. You mean like Python?
<matthewcroughan>
or Haskell
<pie_>
i think python is actually handwritten
<pie_>
not sure though
<pie_>
ok infinisil has a better idea about this
<infinisil>
Yeah that's right, python is manual
<infinisil>
Haskell is autogenerated
<infinisil>
Mostly
<matthewcroughan>
Do you see how setuptools is completely undefined in every Python package?
<pie_>
i dont actually know what node looks like, is that a rec on the set or something? <infinisil> matthewcroughan: There's a single large file because it allows reusing dependency declarations between multiple packages
<matthewcroughan>
So lets say you have a requirements.txt, you can say `packageName==0.11` and it'll do it
<matthewcroughan>
But you can't say `setuptools=xx.xx` because there's no way for you to know what version anything needs or wants.
<infinisil>
pie_: node2nix allows generating a single nix file from a .json file listing all the packages you want available
<infinisil>
matthewcroughan: Not sure what you mean
<pie_>
infinisil: ok but what does that have to do with the single large file? well, nevermind, i dont think thats actually the question i want to ask
<DigitalKiwi>
gchristensen: you scared me 01:47 gchristensen: big questions for 3:45am
<pennae>
it'd always be 3:45am somewhere if it weren't for those meddling timezones
tmciver has joined #nixos
figgyc has joined #nixos
<infinisil>
pie_: Ah sorry, but yeah it's a local file recursion I'm pretty sure
<pie_>
ok i figured out why my system is suspiciously workin
<infinisil>
Actually it doesn't even recurse
<pie_>
im copying a valid config by accident
<pie_>
now im still confused by why its working in the way that it is working
<matthewcroughan>
It's not like I'm changing anything imperatively, on the cli, to make it work.
<pennae>
(when was it again) ago we saw something about "actually portable executables" (written from all alphabets with no pattern except not using the proper letters) that rewrite themselves on first start
<matthewcroughan>
It definitely does do that.
<matthewcroughan>
Parsec tries to update itself at runtime.
<matthewcroughan>
Ah okay, yeah.. so it's trying to write over the so in the /nix/store and of course cannot.
<matthewcroughan>
Crap...
ericsagn1 has quit [Ping timeout: 260 seconds]
<pennae>
ah yes, cosmopolitan libc it was, with "αcτµαlly pδrταblε εxεcµταblε"s
<matthewcroughan>
There's no way of telling me what the latest version of that static object is.
<DigitalKiwi>
pennae: i'm a little annoyed i know what you're talking about
<tomberek>
we considered doing a "pre-run" for cosmo libc to do the rewrite and proceed. I guess you end up with "thing-cosmo-unbaked" and "thing-cosmo-baked"
<matthewcroughan>
samueldr: Yeah is thiswhat a bug looks like in Nix code?
<samueldr>
you probably need kitty.font.package = whateveryouwereusing
<samueldr>
I don't know what you mean
<matthewcroughan>
Yeah that's what I'm going to do, and was my immediate assumption, but the error message could never tell me that.
ddellacosta has quit [Ping timeout: 276 seconds]
<matthewcroughan>
I found that out by `man home-configuration.nix` and seeing that the type that was wanted by `programs.kitty.font` was either 'null or sobmodule'
<matthewcroughan>
But why then did the type allow package?
<simpson>
Henson: You missed the context; DigitalKiwi was being sarcastic, I think. The discussion was about how NixOS modules effectively implement an ad-hoc type system.
stree has joined #nixos
<DigitalKiwi>
i was hoping Henson was being sarcastic too
<syhn>
Henson reads as sarcasm too :p
* Henson
chuckles
jesystani has joined #nixos
<Henson>
simpson: thanks for the context, I guess I came in too late
stephank has quit [Quit: stephank]
<Henson>
DigitalKiwi: I thought your comment was just a random proclamation into an otherwise quiet channel :-)
<jesystani>
hello! two questions, with regular nix, i could enter a shell with --pure to test whether my package was exhaustive enough, how would i do that with a flake? secondly, whats the nixxy way to package a program that expects write access to the $out folder?
<DigitalKiwi>
Henson: tbf that's accurate of most of my comments here
<Henson>
DigitalKiwi: :-)
jpo has joined #nixos
<simpson>
jesystani: Writing to $out is handled contextually. Automatic updates? Disable/patch them out. Config files? Write a default file. First-time binary weirdness? Run the freshly-installed package from $out during the installPhase!
<simpson>
e.g. IIRC we generate Python bytecode by invoking Python inside the build sandbox. Python's got stdlib tools for just this sort of situation, which helps.
griff_ has quit [Quit: griff_]
<jesystani>
ah ok i think this one is just a patch it out then
<jesystani>
so this application creates an sqlite file in $out, which all invocations of the program access, would it be best to move that to /var or something?
growpotk- has joined #nixos
<simpson>
That's a good idea, yes. You can have a directory under /var/db, I think.
<simpson>
Hm, how does it work on other distros? /usr typically isn't writeable by non-root; is this tool normally installed setuid?
<jesystani>
i think its normally just run locally, and other users get a path to the binary
<elvishjerricco>
I've just installed nixos on my old macbook. I had to make a couple changes to the installer iso to get wifi working fully. But after making the same changes in the installed config, wifi barely works. I can talk to devices on my local network, but I can't reach out to the internet, e.g. ping google.com (or a public IP address)
<etu>
Sounds like network configuration rather than wifi problems
<tomberek>
dns?
stree has quit [Ping timeout: 252 seconds]
<elvishjerricco>
etu: I mean all my other devices work fine, including my nixos desktop
<elvishjerricco>
tomberek: I can't even reach something on the internet by ip
<tomberek>
hrm... routes?
<etu>
elvishjerricco: Sounds like missing routes, which is... network configuration
<Ke>
copying path '/nix/store/gczfd68r4x736zvq7aafd56hhwp91pjp-glibc-2.32-40' from 'https://cache.nixos.org'... does this mean everything will be rebuilt?
<phalrax>
I currently have enabled xserver and sddm as display manager, what do I need to disable if I just manually want to do startx whenever I need graphical environment?
<symphorien[m]>
since it's a shell builtin, run with a shell: `ExecStart = "${pkgs.zsh}/bin/zsh -c "..."`
<karantan>
I could do `${pkgs.bash}/bin/bash -c ...` but then all the output in journal will be tagged as "bash". searching through journal logs will be harder
figgyc has quit [Client Quit]
<symphorien[m]>
finish your shell script by `exec` then
<hrnz>
systemd units also have superb options for manipulating the environment :D
figgyc has joined #nixos
<karantan>
@hrnz I can't use any of them. already looked into that
<pennae>
karantan: use EnvironmentFile= in the unit to load env vars for services
<karantan>
AFAIK `EnvironmentFile` doesn't support the regular .zshenv/.bashrc format
<pennae>
or the systemd.services.<name>.environment attrset, if that's possible
jgt_ has joined #nixos
<pennae>
does it have to be that format?
<hrnz>
libnix: then you can always write a derivation yourself (and possibly submit it to nixpkgs)
<karantan>
good question. let me check
<pgiarrusso>
2:24 PM <karantan> I could do `${pkgs.bash}/bin/bash -c ...` but then all the output in journal will be tagged as "bash". searching through journal logs will be harder
libnix has quit [Read error: Connection reset by peer]
<conkker>
is there a way to specify environment variables explicitly in mkShell? I wanna load them dynamically from a file, without the possibility of overwriting attributes like shellHook
meh` has joined #nixos
ddellacosta has quit [Ping timeout: 260 seconds]
cfricke has quit [Quit: WeeChat 3.1]
<radvendii>
conkker: wait, what's wrong with shellHook for that purpose?
<radvendii>
i have a bunch of export BLAH statements in a shellHook
<conkker>
radvendii: nothing, that's how I currently do it, but it'd be nice to have them as a variable in nix, to modify the derivation based on env variables. Maybe I could just generate shell code with a bunch of `export`s
libnix has joined #nixos
<conkker>
radvendii: that's what I'm trying to avoid, with that approach it'd be possible to overwrite attributes like `buildInputs`, `shellHook` etc if i did a `//`
<conkker>
I'm loading the variables from a .env file
ddellacosta has joined #nixos
<karantan>
@pennae it turns out that I can remove the `export` prefix from my .zshenv file. With this I can now use EnvironmentFile. thanks!
dschrempf has quit [Remote host closed the connection]
tomberek has joined #nixos
figgyc has joined #nixos
ddellacosta has quit [Remote host closed the connection]
mibbitttt has joined #nixos
ddellacosta has joined #nixos
<mibbitttt>
hello
wnklmnn has joined #nixos
vk3wtf_ has joined #nixos
<pie_>
any reason users.users.root.password = "root"; wouldnt work?
<pie_>
it seems to be setting the /etc/shadow entry but i cant log in...
vk3wtf has quit [Ping timeout: 248 seconds]
figgyc has quit [Client Quit]
<mibbitttt>
I'm interested in setting up my system with full disk encryption and yubico key support so that my disk is decrypted on boot via my key and password. The guide on the wiki is 2 years old now and I was wondering if there are any updates to it or things to keep in mind since it was written.
<conkker>
ambroisie: you can do `.override (old: { cfg = old.cfg // fcfg })` instead there. If you do `nix-build -E '(import <nixpkgs> {}).neovim-unwrapped.override { stdenv = { }; }'` you can see that it fails with mkDerivation not found, so it gets completely replaced
figgyc has joined #nixos
<ambroisie>
Okay, thanks for the answers, that's pretty much what I would have written anyway ^^
justanotheruser has quit [Ping timeout: 245 seconds]
<SumnerEvans[m]>
okc0mputer: if you are using Chrome, I think there's also a feature flag you have to toggle. I don't think that screensharing works on Firefox.
<thibm>
radvendii: overrideAttrs is defined in make-derivation.nix and does not support a attribute set. (Why? Nobody implemented it but I don't see why not)
ddellacosta has joined #nixos
<thibm>
radvendii: override is defined in lib/customisation.nix ans is a bit smarted
<thibm>
smarter*
Goldstein[m] has joined #nixos
<okc0mputer>
SumnerEvans[m]: Thanks, I've been through all of that already but I don't have the gtk portal, I'll try to add it
figgyc has quit [Client Quit]
<radvendii>
thibm: gotcha. maybe i'll submit a PR for that
<okc0mputer>
SumnerEvans[m]: yeah it's still not working, I must have missed something but I feel like I've been through every single issue and wiki page about the subject. I'll look more into your config, maybe you do something I don't.
figgyc has joined #nixos
<SumnerEvans[m]>
okc0mputer: is anything working? Like, in Chromium if you try to share a screen does anything happen?
waleee-cl has joined #nixos
<okc0mputer>
SumnerEvans[m]: I just get a blank screen when I try to share
zupo has joined #nixos
<okc0mputer>
SumnerEvans[m]: but I can see errors in the pipewire and pipewire-media-session journals every time
<SumnerEvans[m]>
okc0mputer: so you are able to select a screen, but then it's black?
<ehmry>
anyone know any tricks for fixing missing tray icons?
figgyc has quit [Quit: No Ping reply in 180 seconds.]
queiw has joined #nixos
<Synthetica>
ehmry: gonna need some more info there, which DE?
<queiw>
Hello. Does anyone happen to know where /etc/issue is written? I'm trying to customize it, but environment.etc.issue.text seems to have no effect.
<radvendii>
it would be super cool if // could take a function on the right hand side also.
<ehmry>
Synthetica: sway
figgyc has joined #nixos
ddellac__ has joined #nixos
<SumnerEvans[m]>
okc0mputer: hmm... I'm not sure what to tell you. Sorry :(
<SumnerEvans[m]>
ehmry: are you getting the red :( emojis, too?
<ehmry>
SumnerEvans[m]: I dont do emojis
<SumnerEvans[m]>
ehmry: no, I meant in your status bar (in place of the status icon you expect)
<ehmry>
no
<queiw>
Oh, never mind, found it in getty.nix
<okc0mputer>
SumnerEvans[m]: no problem :) thank you
<ehmry>
I just have things that should be in the tray but never show up, but I don't know if that is because of missing icons
<SumnerEvans[m]>
okc0mputer: actually, I did think of one other thing. Do you have: `wrapperFeatures.gtk = true;`?
virkony has quit [Ping timeout: 245 seconds]
<SumnerEvans[m]>
(I have no idea if that will help or not)
<nextloop>
hey, i run nix on debian, is there a way to somehow use a python module from a system-wide installation, when running python3 in my nix shell?
ddellac__ has joined #nixos
<hexa->
it could work if you mess with PYTHONPATH
<simpson>
nextloop: You can do horrible things to PYTHONPATH, sure. We don't support it.
figgyc has quit [Quit: No Ping reply in 180 seconds.]
figgyc has joined #nixos
<nextloop>
i believe it worked
<jumper149>
How can I find the documentation on makeWrapper?
ddellac__ has quit [Ping timeout: 265 seconds]
endformationage has joined #nixos
<srhb>
jumper149: In the nixpkgs manual.
<jumper149>
srhb: Ahh, was looking in the nix manual...
figgyc has quit [Client Quit]
karantan has joined #nixos
wallacer has joined #nixos
figgyc has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
tlaxkit has quit [Quit: Konversation terminated!]
karantan has quit [Client Quit]
<radvendii>
is there an easier way to get the derivation from an output path than running `nix show-derivation /nix/store/output-path` and then looking at the first line?
figgyc has quit [Client Quit]
<radvendii>
oh, never mind. i can just call `nix log` on an output path directly. that's convenient
karantan has joined #nixos
<qbit>
is there a way to expand a list into each item it contains?
<gchristensen>
qbit: can you clarify what the input is and what you want the result to be?
<srhb>
qbit: As... What?
<qbit>
for example, I want to use services.openssh.ports in networking.firewall.allowedTCPPorts
<yaymukund>
what's the simplest way to get to obs-studio v27 RC2 (not yet in nixpkgs master). I was thinking I could copy the .nix file from master, change the fetchFromGitHub line and update the SHA and that should work..?
<jasom>
that's less than ideal :/ I use strong passwords and a large number of rounds, but it seems to completely defeat the whole idea of a shadow file that's been considered a "Good Thing" for over 30 years.
<pennae>
oh, retracted! passwordFile doesn't readFile as we thought, so that should be good
stree has joined #nixos
infandum has joined #nixos
<pennae>
where'd we get that idea anyway, that would've been a little pointless
<jasom>
pennae: I see it in e.g. /nix/store/03amdynrmwz5jhfsvrbb945fpm3jbjaa-users-groups.json
<pennae>
how'd you set it? setting passwordFile to a path that isn't in the store should be sufficient
<pennae>
or maybe you're looking at an old generation?
<jasom>
oh, I can set passwordFile; I was doing users.*.hashedPassword, per the manual
<pennae>
yeah. had thought that just wraps readFile too, but it doesn't :)
cyrinux has joined #nixos
jumper149 has joined #nixos
<jumper149>
I am using `shellFor` to create a haskell development shell, but is there a way to bring the haddocks of the inputs into scope?
<infandum>
I am converting to NixOS. I am trying to transition first through nix using home-manager. I am trying to get an xmonad / xmobar setup through home-manager, but my xmobar does not see the xmonad modules. Can this only be done through NixOS?
<jasom>
Perhaps "Passwords may still be assigned by setting the user's hashedPassword option. A hashed password can be generated using mkpasswd -m sha-512." should be changed to suggest passwordFile instead?
<infandum>
My xmonad config works, but xmobar does not see the haskell modules
thc202 has quit [Quit: thc202]
<infandum>
I put all of the haskellPackages in home.packages but not sure if that is working
<srhb>
infandum: That's likely not working, more likely you'd need to set the exact ghcWithPackages for both xmobar and xmonad.. Let me check how the home manager module works...
<jumper149>
infandum: Does xmobar see ghc?
aiken has joined #nixos
sangoma has quit [Ping timeout: 246 seconds]
<srhb>
Oh, it's not a separate module. How are you getting xmobar?
<infandum>
jumper149: How can I tell?
jb55 has joined #nixos
<infandum>
I don't see a verbose option with the xmonad / xmobar part for home-manager
<infandum>
the verbosity just says other stuff
<infandum>
I'm getting xmobar through home.packages = [ pkgs.xmobar ];
<jumper149>
infandum: actually nvm, I was thinking too much of xmonad. xmonad calls the ghc binary to compile the user config. I'm not sure if xmobar does that too.
<jumper149>
I'm not too familiar with home-manager
<jumper149>
maybe something like ~/.xmonad/xmonad.error
<infandum>
So if I just run xmobar on its own with the configuration, I get Could not find module xmobar: .local/share/xmobar/xmobar.errors: hGetContents: invalid argument (invalid byte sequence)
<infandum>
Then that file has a bunch of Could not find module "Xmonad.etc...."
<infandum>
I assume because of how nix works
<infandum>
which is fine, but I don't know how to link xmonad and xmobar together in nix in home-manager
<infandum>
which is probably pretty esoteric
jgt_ has joined #nixos
<jumper149>
Ah, I think I sort of see what's your problem
<jumper149>
you only let xmonad see your xmobar
<jumper149>
but not the other way around
<infandum>
On top of that, xmonad needs to talk to xmobar and so they probably need to be linked under the same environment somehow
<infandum>
exactly
bitmapper has joined #nixos
<infandum>
not sure what the solution is
<jumper149>
You run xmobar from your xmonad config?
<infandum>
err, outside of NixOS, but just with nix
<jumper149>
So you can pipe stuff into right?
<infandum>
I try, but it doesn't pop up
<jumper149>
ok, so that should be fine
<infandum>
so i figure I could run it separately
<jumper149>
I think you might need to add `buildInputs` to xmobar
<infandum>
like, xmonad =<< xmobar config
<infandum>
which one? the home.packages or the xmonad.extraPackages?
cfricke has joined #nixos
<jumper149>
infandum: I would think `home.packages` takes priority in this case
<jumper149>
And I don't think you need xmobar as a direct dependency of xmonad
<jumper149>
s/of/to
<jumper149>
try removing xmobar from xmonad.extraPackages
<jumper149>
just so you know what you are working with
<infandum>
ok
ddellac__ has quit [Ping timeout: 246 seconds]
<infandum>
Does home-manager work like configuration.nix with overriding buildInputs?
<jumper149>
Next you will have to override the remaining xmobar with the additional inputs.
<srhb>
This all seems very wrong to me...
<srhb>
infandum: Jumping in a bit, are you sure you're even getting xmobar from nix?
<srhb>
infandum: as in what does `which xmobar` say
mauro^ has quit []
<infandum>
$HOME/.nix-profile/bin/xmobar
<srhb>
Okay. I'm befuddled.
<infandum>
I made sure to remove all other xmobars
<radvendii>
has anyone run into "Error in tempfile(): ... Parent directory does not exist" when using autoreconf --install?
<srhb>
infandum: Can you run `nix-shell -p xmobar --run xmobar` and pastebin the entire error message please
<srhb>
I don't think it's likely that xmobar has lost its dependency on xmonad somehow, something else is going on. Let's see the full error message from the command above please.
<srhb>
(in a pastebin)
<infandum>
srhb: That does work, but it doesn't talk to xmonad. Using my configuration which is a *.hs file as opposed to .xmobarrc (which doesn't talk to xmonad), I get this output: https://pastebin.com/S2W50Dkj
<jumper149>
srhb: xmobar doesn't depend on xmonad. I'm guessing that infandum has a spicy config, making use of the xmonad library somehow.
<infandum>
I do
<infandum>
pretty hot stuff
<infandum>
But yeah, it uses various haskell libraries so that needs to be seen by all of xmobar
<srhb>
I apologize, I missed the spicyness :)
<srhb>
So are you saying that xmobar knows how to invoke ghc?
<infandum>
I made a custom config for taffybar and I was porting it to xmobar for less headaches with building
<infandum>
but alas...
<infandum>
srhb: apparently haha
<srhb>
In that case we just need to wrap it with a ghc what has the right dependencies, surely doable with ghcWithPackages
<infandum>
good idea, but does that include xmonad?
<infandum>
like, will they be the same environment?
<srhb>
infandum: What do you mean environment?
zupo has joined #nixos
<srhb>
We're just passing whatever modules to both their GHCs, that's entirely separate from env vars etc. necessary for cross-communication
<srhb>
I'm just really surprised because I've never heard of this mode of operation, so trying to figure out how it invokes GHC.. Like from a library or shelling out.
<infandum>
because right now xmonad isn't in home.packages and it's installed through enabling with its own configurations in home-manager
<infandum>
ghcWithPackages in home.packages with xmobar and xmonad did not work
<srhb>
That seems to indicate that it's not just shelling out.
cfricke has quit [Ping timeout: 276 seconds]
<infandum>
If I put the ghcWithPackages in the extraPackages in xmonad's configs in home-manager, xmobar the command isn't installed at all
<jumper149>
xmobar calls the `ghc` that it has in scope
<infandum>
ah, that did it
<jumper149>
so?
<infandum>
not sure if it works yet but it somehow found that build script in the dotfiles folder
<infandum>
so it was using stack :/
strikerlulu has joined #nixos
<infandum>
the first line of the error says it found the build script
<infandum>
so I just moved it
<srhb>
Wow, trauma.
<infandum>
still might not work though, let me finish putting in dependencies
<jumper149>
ahhh ok.
h0m2 has quit [Quit: WeeChat 3.1]
<jumper149>
Your best bet is putting ghcWithPackages in scope of xmobar I guess.
<srhb>
infandum: A good way to do this is to _wrap xmobar_ so that nothing leaks in.
<srhb>
Don't rely on arbitrary paths in home.
aramend has joined #nixos
<infandum>
im so angry
h0m1 has joined #nixos
<jumper149>
Yep that would be the correct thing to do
<jumper149>
(not being angry)
<srhb>
Hehe, indeed :)
<infandum>
(I'm porting from stack, hence the issue)
<jumper149>
?
<Kinnison>
Is there a way for me to mark a package as runtime-depending on another package being present without the first package having a binary to wrap or similar? (two vscode extensions, where one depends on the other)
<nly>
how do I let a command run on ssh even if I d/c?
<srhb>
Kinnison: You bay be looking for propagatedBuildInputs ? But how does one need to be exposed to the other? You may just need to make a real dependency.
<scott>
can someone help me understand how https://github.com/NixOS/nixpkgs/pull/61022 is intended to work? it seems to only work for me in nix-shell, not when installed, afaict because RUBYLIB gets set when i use nix-shell but not when i use environment.systemPackages or home.packages. cc qyliss
<{^_^}>
#61022 (by alyssais, 1 year ago, merged): ruby: install ri docs to devdoc output
<Kinnison>
srhb: if I just cause both to be installed then vscode joins them together at runtime
<Kinnison>
srhb: In this instance, the ms-python.python extension requires ms-toolsai.jupyter, but the latter does not require the former. And neither needs the other for "build"
<spacetato>
nly: run in `tmux`, then detach with `Ctrl+B, D`
<srhb>
Kinnison: if packageA has propagatedBuildInputs = [ packageB ]; it essentially just writes the nix store path of B into the output path of A, such that A runtime depends on B.
ntqz has quit [Remote host closed the connection]
ddellac__ has joined #nixos
<Kinnison>
I guess that this means packageA rebuilds if packageB changes, but that would be hard to prevent otherwise?
<aramend>
Is there any documentation on garbage collection for the new nix commands? Ie something like `nix store --gc`. Currently the man pages suggest to do `nix-store --gc`.
<srhb>
Kinnison: That's right. If you don't want that, create a meta package consisting of both.
<Kinnison>
I think the "spurious" rebuilds is probably better than confusing people who already have the python extension when they upgrade
<Kinnison>
I'll give that a go
<srhb>
aramend: I don't think the experimental commands have full functionality nor docs, but nix store gc --help would be where they're at
<aramend>
srhb: Yeah, figured that might be the case. Currently for nix store 'gc' is not a recognised command.
<srhb>
aramend: "currently" is relative, mine does :)
<spacetato>
mine does as well, `nix (Nix) 2.4pre20210326_dd77f71`
<qyliss>
scott: you're not really supposed to install libraries globally with Nix
<qyliss>
scott: instead, use project-specific shell.nix files and nix-shell
ddellac__ has quit [Ping timeout: 260 seconds]
lsix1 has quit [Ping timeout: 276 seconds]
nehsou^ has joined #nixos
<aramend>
Hah wow, you're all right. Updated to the new commands a week or so ago, and yeah I found nix store gc now :)
hiro98 has quit [Remote host closed the connection]
<srhb>
experimental nix is a fast moving target :)
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aramend has quit [Quit: Leaving]
<scott>
qyliss: i'd be installing ruby (and it's docs) for use of the REPL, independent of any particular project
aramend has joined #nixos
<qyliss>
scott: hmm yes that's valid
<qyliss>
in that case, it's just because nobody has made it work yet
LilleCarl has quit [Ping timeout: 265 seconds]
<scott>
reasonable
<qyliss>
(I'm the author of that PR, but it's been years since I did anything with Ruby, so I don't think I'd be able to take it any further at this point)
<Kinnison>
srhb: curses! That does indeed cause a dependency, but actually it's not what I need to do, I think I'm going to have to poke at the vscode extensions stuff harder :(
<srhb>
Kinnison: Yeah, I had a suspicion :)
<scott>
qyliss: yeah, totally fair :). i'm willing to try to do it myself, i just wasn't sure what the current state of it was
<Kinnison>
srhb: I knew it couldn't be that easy :D
zupo has joined #nixos
<qyliss>
scott: I suppose you'd need to patch Ruby to have ri look at the devdoc output by default
<qyliss>
the current approach of using a setupHook means it'll only work in nix-shell
<scott>
makes sense
<gpanders>
hi all, I have a newbie question. I want to install the pync Python module alongside weechat (I use a plugin that depends on that module) but I'm not sure how to do that. I tried creating an attribute in packageOverrides in my nixpkgs config.nix file, but it doesn't seem to have changed anything
zupo has quit [Client Quit]
<gpanders>
more generally, how do I modify a package derivation to also include an arbitrary python module?
nly has left #nixos ["ERC (IRC client for Emacs 27.1)"]
<Synthetica>
Ideally I'd like to move towards that, but that's not up to me to decide
<pennae>
gchristensen: anything that got stuck on ofborg eval wait?
<{^_^}>
[hydra] @cole-h opened pull request #941 → ToJSON: allow custom as_json function; JobsetInputs, Jobsets: update schema to align with the API → https://github.com/NixOS/hydra/pull/941
<pennae>
(we've been wondering why one of ours wasn't being merged despite approval, maybe it's that?)
<Kinnison>
Synthetica: a cross-codebase reformatting is always a pain point :/
<Synthetica>
Kinnison: it's not trivial, no
jumper149 has quit [Quit: WeeChat 3.1]
<Synthetica>
Especially not with a million+ line codebase like nixpkgs
gamb1 has joined #nixos
rj has joined #nixos
<Kinnison>
jeepers, my patch appears to have worked
<Kinnison>
gchristensen: I blame you entirely for this new part of my life :D
<gchristensen>
:D
<Kinnison>
I'd blame popey but you're close at hand
<gamb1>
Hey, I'm currently subscribed to the `https://nixos.org/channels/nixpkgs-unstable` channel. Is there a utility I can use to pin the current revision of nixpkgs-unstable? i.e. to generated a pinned.nix file
<gchristensen>
you didn't know the way I'd ruin your life, meeting outside that hotel in Montreal
* Kinnison
tries to work out what to tick for "Updated my flake.nix for my system to use my branch, rebuilt the system, and confirmed the extension worked"
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ has joined #nixos
* Kinnison
supposes "Tested execution of all binary files" counts?
* ris
wonders if he is the first person to try nixos-infecting a phoenixnap bare-metal-cloud machine...
<gchristensen>
:eyes:
<Kinnison>
aah screw it, I'm a first-time contributor, someone will go easy on me, right?
<Kinnison>
gchristensen: So I'm assuming the `10.rebuild-$os: $nnn` is a marker to say that ofborg is doing/has-done a build. But what is the significance of the nnn?
ixxie has quit [Quit: leaving]
<ris>
the default ubuntu is using lvm... wonder what nixos-infect will make of this...
ddellacosta has quit [Ping timeout: 252 seconds]
jgt_ has joined #nixos
<pennae>
ris: we lustrated an arch install with luks-lvm and came out just fine
<ris>
wtf
<ris>
well let's see
<V>
Kinnison: the number of packages that will be rebuilt
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Kinnison>
V: aah cool
<V>
somewhere in the range of the number, at least, usually within an order of magnitude or so
<evalexpr[m]>
anyone noticed any issues with pcscd recently? It seems like whenever I try start it (even via manually running the command in the systemd file) it tries to use every file in /etc/ as it's config file but /etc/reader.conf should be where it looks, I get a bunch of `00000000 [139919024829568] configfile.l:272:tok_error() tok_error: invalid value line 1 in /etc/passwd:` lines in the journal for each file in /etc/ then it
<evalexpr[m]>
fails to start
<ris>
drozdziak1: it doesn't actually do anything to the derivation
<ris>
but it exposes the attr in the resulting nix object representing the derivation
<evalexpr[m]>
colemickens: I'm glad it's not just me. Been trying to hack around and fix it for an hour or so now. If you want to cc me in whatever PR you end up creating username is the same on GitHub, otherwise can you ping me here when you get those submitted?
<ris>
phoenixnap looks interesting - $0.18/h for a 6 core xeon, 64G, 1T NVMe bare metal machine
<ris>
i wonder if it's the bandwidth @ $0.03/G they "get you"
infandum has quit [Remote host closed the connection]
<jlv>
How can I fix `error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory` in a Steam game? I tried to `steam-run` it with `openssl` in the path (`nix-shell -p openssl steam-run`), but it looks like `nix-shell -p openssl` only includes `bin`.
<hexa->
probably openssl.lib
<hexa->
,locate libcrypto.so.1.1
<{^_^}>
Found in packages: openssl, openssl.debug
ManiacOfMadness has quit [Ping timeout: 268 seconds]
<hexa->
or … not
mschwaig has quit [Ping timeout: 240 seconds]
mschwaig has joined #nixos
<jlv>
`nix-shell -p openssl.debug steam-run` didn't work either.
<colemickens>
evalexpr: is there any way I can convince you to file an issue on pcscd while I finish up some other things? no worries if not
<colemickens>
or rather on nixpkgs, about pcscd
ahmed_elgabri has joined #nixos
nek0 has joined #nixos
ddellacosta has joined #nixos
attila_lendvai has quit [Ping timeout: 252 seconds]
nek0 has quit [Client Quit]
<evalexpr[m]>
colemickens: I'll write up something and cc you, you've probably gone deeper into it than I have tonight :-)
ddellaco_ has quit [Remote host closed the connection]
<colemickens>
is there a way to make a builtins.fetchUrl file at a specific $(out)/tree/struct/file without using runCommandNoCC and just mkdir/mv?
ddellaco_ has quit [Remote host closed the connection]
<colemickens>
evalexpr: okay, thanks, I'll find it and try to come back to it soon. I'm wrapping up some adjacent work, then will wait on the PRs to merge so I can make it easy for others to test, and then hopefully maybe Friday dig back in more thoroughly. I thought this was going to be a few hours yesterday and it's really unraveled :P
<elvishjerricco>
matthewcroughan: it uses binfmt_misc, which tells the kernel what program to use as an interpreter when files with given magic headers are executed. `boot.binfmt.emulatedSystems = [ "aarch64-linux" ];` just causes NixOS to register arm binaries to be run with qemu-aarch64
<matthewcroughan>
elvishjerricco: but the wiki article suggests that you can use it for remote builds
<matthewcroughan>
like with --builders ssh://username@system
mbrgm_ has joined #nixos
<matthewcroughan>
In which case, how do I that? Do I make the remote builder advertise supportedSystems as aarch64-linux? Then put this binfmt stuff in its config?
dominikh has joined #nixos
<matthewcroughan>
the remote builder is an x86 machine
ahmed_elgabri has quit [Ping timeout: 260 seconds]
<elvishjerricco>
matthewcroughan: That sounds right
dominikh is now known as Guest88325
mbrgm has quit [Ping timeout: 260 seconds]
mbrgm_ is now known as mbrgm
supersandro2000 has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
supersandro2000 has joined #nixos
m0rphism has joined #nixos
<elvishjerricco>
beware that emulation is very slow. IIRC it's a lot slower than even an rpi. I built my own kernel for the rpi this way on a cpu with 32 threads, and it was only a little faster than building it on the rpi
bennofs_ has quit [Read error: Connection reset by peer]
<matthewcroughan>
elvishjerricco: single thread rating is comparable, but a little better on the 3900x
<pennae>
matthewcroughan: our 3900x is about as fast as our pinebook for compiling stuff
<matthewcroughan>
pennae: for cross compilation?
<matthewcroughan>
or emulated rather
<pennae>
emulated, crosscompiling is a whole lot faster
civodul has quit [Ping timeout: 260 seconds]
ddellaco_ has joined #nixos
<matthewcroughan>
so emulated compilation of arm64 stuff is as fast as a pinebook compilation?
<matthewcroughan>
in other words, it's worth the pain?
<pennae>
around the same, yeah. probably a bit faster and doesn't suffer from low ram situations as much, but the extra power cost makes me cringe a bit
<matthewcroughan>
well, how easy is cross compilation?
<matthewcroughan>
with remote builders
<pennae>
haven't tried that out yet
<AmandaC>
Problem with cross-compilation is it'll have a different hash, AIUI?
<AmandaC>
just because the gcc/etc is in the inputs, and the cross-gcc is naturally different from the native-gcc on arm
<matthewcroughan>
extra-platforms = aarch64-linux, how can I declare this in my nix.conf?
<matthewcroughan>
extra-platforms = aarch64-linux, how can I declare this in my nix.conf?
<elvishjerricco>
matthewcroughan: To cross compile the kernel, I did `boot.kernelPackages = (import pkgs.path { ... }).linuxPackages;`. I forget what the exact arguments were for importing nixpkgs, but it's not complicated. You just put `lib.systems.examples.aarch64-multiplatform` somewhere
<elvishjerricco>
Set up an x86_64-linux remote builder, and it just worked automatically
Qwerky has joined #nixos
<matthewcroughan>
That doesn't let me use --builders ssh://name@machine on an arm64 device though.
<matthewcroughan>
Does it?
<hexa->
maybe add --system aarch64-linux
<matthewcroughan>
That won't just automatically cross-compile things.
ahmedelgabri has quit [Ping timeout: 276 seconds]
<matthewcroughan>
extra-platforms doesn't seem to be able to be declared from `nix.*`
<elvishjerricco>
matthewcroughan: The way I did it, I ran the actual build command on the rpi, with a x86 remote builder configured. Then in the nix expression, I set kernelPackages to the linuxPackages attribute of a nixpkgs that's instantiated to cross compile from x86 to aarch64.
<AmandaC>
There's an `extraConfig` or similar you can use, matthewcroughan
<elvishjerricco>
It sees it needs to build the kerne from an x86 machine and sends it off to the builder
<matthewcroughan>
AmandaC: nix.extraConfig isn't a thing.
<matthewcroughan>
it's called extraOptions, cool
<elvishjerricco>
And the x86 builder hands back an aarch64, cross compiled kernel