<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JJnSK
emys has quit [Ping timeout: 256 seconds]
<{^_^}>
[nixpkgs] @edef1c opened pull request #93451 → nixos/users-groups: don't consider a system with Google OS Login inaccessible → https://git.io/JJnS6
emys has joined #nixos
<Raito_Bezarius>
is it expected to rebuild nsd each time I change little stuff in the config?
<jtojnar>
lovesegfault one weird thing I forgot to mention, I have bluetooth connected to usb headers
<jtojnar>
apparently, PCIe cannot handle two devices at once
<lovesegfault>
jtojnar: huh
<lovesegfault>
wat
* lovesegfault
does lsusb
<lovesegfault>
interesting, I don't see the bluetooth device there
<codygman___>
Is there some way to view the expected arguments of a function in nix repl?
drakonis has joined #nixos
emys has joined #nixos
chrmb has quit [Read error: Connection reset by peer]
<codygman___>
Put another way: Is there a way to see what values I can override using pkgs.ripgrep.override({someval = null}) where someval is invalid and I want to find valid values?
<jtojnar>
codygman___ look at callPAckage definition
<zeta_0>
could any of you check this shell.nix file to make sure that i installed JobFunnel correctly from github? https://dpaste.org/0BaX
<zeta_0>
webdriver-manager was not in nixpkgs, so i had to install that directly from github as well, also running nix-shell on that shell.nix file worked without any errors, so i could you check to make sure i did this correctly, i don't want to have to backtrack later
<zeta_0>
webdriver-manager, the python pkg that is
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos
<bqv>
`nix shell 'nixpkgs#catt' -c catt scan` working for anyone?
codygman___ has quit [Ping timeout: 264 seconds]
tmaekawa has joined #nixos
emys has quit [Ping timeout: 272 seconds]
emys has joined #nixos
o1lo01ol1o has joined #nixos
sangoma has joined #nixos
o1lo01ol1o has quit [Ping timeout: 246 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
Heirlung has quit [Read error: Connection reset by peer]
Heirlung has joined #nixos
callahad87074 has joined #nixos
stites has quit [Ping timeout: 240 seconds]
stites has joined #nixos
chimay has quit [Ping timeout: 260 seconds]
Guest84 has joined #nixos
knupfer has joined #nixos
<Guest84>
Hi, if I have no channel named `nixpkgs`, which version of `nixpkgs` is actually getting used when I do an `import <nixpkgs>` inside shell.nix or a repl. And what happens when I *do* have a a nixpkgs?
knupfer has joined #nixos
chimay has joined #nixos
alexherbo2 has joined #nixos
orivej has joined #nixos
emys has joined #nixos
nikita_ is now known as nikita`
simba2 has joined #nixos
tv has quit [Ping timeout: 272 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<srhb>
Guest84: Look at $NIX_PATH
zupo has joined #nixos
zupo has quit [Client Quit]
<srhb>
Guest84: <nixpkgs> is the first path within that that either is called nixpkgs or contains a directory called nixpkgs.
<srhb>
Guest84: Fo instance, you may have an (unnamed) path entry called /home/youruser/.nix-defexpr/channels -- if channels contains a nixpkgs, then that is <nixpkgs>. Or you may have a (named) path nixpkgs=somepath within $NIX_PATH. Then that is <nixpkgs>
emys has quit [Ping timeout: 260 seconds]
pjt_014 has quit [Ping timeout: 258 seconds]
<srhb>
Guest84: The logic gets slightly worse for some other tools that don't respect $NIX_PATH directly, but go thrugh ~/.nix-defexpr, but for nix repl this should mostly be the gist of it.
<{^_^}>
[nixpkgs] @nixos-channel-bot closed pull request #72160 → darktable: move documentation to it's own directory → https://git.io/JeuZv
<srhb>
Guest84: Or to be more explicit about your question: try `nix repl <nixpkgs>` and then enter `path` on the repl.
<srhb>
Hmm. Can I the "self" flake input from a "calling" flake? I want to add an attribute that the callee flake uses.
<srhb>
Specifically, the nixpkgs flake uses self.lastModified, which is not present in my flake lockfile (because of the nixpkgs flakeref type I'm using)
patagonicus has quit [Read error: Connection reset by peer]
<srhb>
> builtins.replaceStrings [ "o" ] [ "a" ] foo
<{^_^}>
"blablablabl"
<__monty__>
Extends: lib.replaceChars is obsolote. Works exactly the same as builtins.replaceStrings.
<srhb>
{^_^}: Liar.
<srhb>
Extends: The above will yield "faa" :)
<__monty__>
Extends: There's also stringsAsChars :: (String -> String) -> String -> String, which applies the function you pass to each character of the string in turn.
patagonicus has joined #nixos
<__monty__>
*lib.stringsAsChars
<Extends>
thanks everyone!
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #nixos
noudle has joined #nixos
dermetfan has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
xelxebar has quit [Remote host closed the connection]
xelxebar has joined #nixos
<sephii>
I'm trying to tell nixops to generate a file if it doesn't exist, with the contents being the output of a command. I know this makes in non-deterministic, but the command generates a key that I can't put in the derivation. I found https://discourse.nixos.org/t/is-there-a-way-to-work-with-files-outside-nix-in-nixops/3220 to create files outside of /nix, which works well, but I can only give a fixed string as
<sephii>
contents for the file. Is there a way to do this?
<srhb>
sephii: The usual approach is to use tmpfiles, systemd units etc. to have a service on the machine do the imperative logic.
sangoma has quit [Ping timeout: 246 seconds]
<srhb>
sephii: As an example, you can always create a systemd service that executes an arbitrary script. There may be better, less general solutions for your specific case though.
slack1256 has quit [Remote host closed the connection]
<srhb>
sephii: Yes, for instance.
<sephii>
srhb: I'll try that, thanks!
<cmk_zzz>
what is the best solution to 4add my own packages to nixos? overlays? my own channel? I want to be able to have them configured in configuration.nix
<bqv>
overlays and/or inline in your configuration
<syd>
How can I generate docs for a nixos module type? I have some modules that I want to show docs to my users for.
knupfer has quit [Ping timeout: 260 seconds]
sangoma has joined #nixos
<alienpirate5>
pjt_014: After creating the folder and symlink manually, the rebuild successfully finished.
<alienpirate5>
Jan Tojnar programs.dconf.packages is an empty array. programs.dconf.profiles is `{ gdm = «derivation /nix/store/ii0pvndrx25c9myhmq65rwnl0m32s77y-dconf-gdm-profile.drv»; }`
_ris has joined #nixos
<xeijin>
hello, I have a question - I want to keep my NixOS config files in a folder structure like this: https://pastebin.com/raw/e86xYSkY
<xeijin>
each `default.nix` imports the folders underneath until it gets to the module declarations
<syd>
xeijin I think you can do this
<syd>
you can definitely write the imports manually
orivej has quit [Ping timeout: 265 seconds]
<syd>
but there's also builtins.readDir that you can use
orivej_ has joined #nixos
<xeijin>
then in `hosts/cloud-vps/default.nix` I want to be able to enable a 'role' (or even a part of it) by doing something like `roles.remote.enable = true;` or `roles.remote.ssh.enable = true;`
<syd>
Right, you have to write some of your own modules then :)
<xeijin>
syd yes indeed, which is what the `ssh.nix` would be
<srhb>
xeijin: Generally, not having your most host specific file be the top-level one that is rebuild by the NIxOS machinery soon leads you to want conditional imports, which is not a thing. I recommend against that.
<srhb>
s/rebuild/rebuilt
<syd>
srhb yes that makes sense. I still use a top-level file per machine, but they all import the same `main` and set flags in a top-level module like `this machine has speakers` and `this machine is a build cache` etc.
<srhb>
Yeah, that's fine.
<xeijin>
srhb not sure I follow, wouldnt I just point nixos to the specific host file for a rebuild?
<srhb>
xeijin: Oh, sure, you can absolutely do that. Then that's the "top level file"
<srhb>
The directory structure itself is of no consequence.
<srhb>
It's just my experience that the structure that you're showing tends to be one step short of "now I want to conditionally import a module" -- which you can't -- so it was just a word of warning :)
domogled has joined #nixos
<xeijin>
got it srhb, and sorry, my inexperience showing here but can still conditionally enable a module right?
<srhb>
Conditionally enable is fine, yes.
<xeijin>
syd do you have an example config up on github that I could take a look at?
<srhb>
It's specifically imports you can't make conditional.
<syd>
That's right. You can still have `enable` flags but evaluation will take longer
<syd>
xeijin no my config is not public, sorry
<syd>
Client NDAs and such :)
<xeijin>
thanks both - yeah longer evaluation is fine with me
<xeijin>
haha ofc I'm having some trouble with my own config which ironically is also private hence these conceptual questions
<xeijin>
so the bit I'm confused about that the manual hasn't cleared up for me is where and how I need to specify the option declarations that will let me do `roles.remote.enable = true;` and `roles.remote.ssh.enable = true;`
<srhb>
xeijin: But for quick one-offs, you can skip the option definitions and use the top level `config.lib` option, where you can set arbitrary values.
<syd>
how do I generate the docs for them?
<srhb>
syd: Generally you just build the NixOS manual and they'll get included
<syd>
nono I've got public modules in a public project that's not part of nixos
<syd>
one os-level module and one home-manager-level module
<srhb>
There's no standalone mechanism for generating those that I know of, but I may be mistaken.
<syd>
oh really? :(
<srhb>
syd: Maybe take a look at how NixOS/home-manager generates their manuals and see if there's something reasonably detached to plug into.
<syd>
I had a look but it doesn't look to be public
<srhb>
xeijin: That is, one module can set `lib.remote = true` and then in another module, you can check the value of `config.lib.remote`
<srhb>
xeijin: And act on that :)
<srhb>
syd: Hmm, did home-manager move?
AluisioASG has quit [Ping timeout: 256 seconds]
<syd>
not sure, what do you mean?
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
<srhb>
afaik it lives on github.
<syd>
oh yes but the doc generator is on gitlab, see the link I sohwed
<srhb>
Ah, right, understood.
<srhb>
syd: Yeah, looks like nmd will happilly generate standalone docs for you.
orivej has joined #nixos
<syd>
that's what I'll try next!
<xeijin>
srhb where would be best create the option declaration for each layer? i.e. if I have a `mkOption` declaration for `enable` in `roles/remote/default.nix`, and then the same in `roles/remote/ssh.nix` would that be enough for me to do `roles.remote.enable = true;` AND `roles.remote.ssh.enable = true;`
<xeijin>
I did read that part of the manual, but having trouble getting my head round this with the nested folder structure I've created
<srhb>
xeijin: You should be able to merge those two options sets just fine, yes.
<xeijin>
right, and I probably need to brush up on my nix expressions, but the merge how and at which 'layer' would that happen?
<srhb>
As long as the modules are imported and the option definitions don't conflict, the module system takes care of merging for you (just like you can set config options in various modules, it's the same system)
leotaku has quit [Ping timeout: 256 seconds]
leotaku_ has joined #nixos
<xeijin>
thanks that's helpful, one last question
orivej has quit [Quit: No Ping reply in 180 seconds.]
<xeijin>
would I also need an option declaration for the root `roles` option? I want to avoid having a `roles.enable` declaration as that wouldnt make much sense, will nix just infer this when it sees the declarations at the lower levels?
orivej has joined #nixos
<{^_^}>
[nixpkgs] @vcunat pushed to staging « nss_3_44: bring back this older branch for firefox-esr »: https://git.io/JJcep
asymptotically has joined #nixos
sangoma has quit [Read error: Connection reset by peer]
orivej has quit [Quit: No Ping reply in 180 seconds.]
<srhb>
xeijin: Pretend each entry in the modules list is a separate file
<srhb>
xeijin: The entire file will evaluate to the string "foobar"
<srhb>
xeijin: Notice that I have not mentioned `roles` itself except as as a parent to `a` and `b`
<srhb>
xeijin: Does that help?
<srhb>
xeijin: You can use this file as a quick framework for testing out your assumptions about the module system, just add more modules to the list as you go.
zfnmxt has quit [Quit: Bye!]
zfnmxt has joined #nixos
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #nixos
<sphalerite>
huh, since when can the zfs utilities only be run as root?
<srhb>
sphalerite: Since never! :)
<srhb>
(As in, doesn't seem that way to me)
<{^_^}>
[nixpkgs] @vcunat pushed 356 commits to staging-next: https://git.io/JJcvx
<{^_^}>
[nixpkgs] @vcunat opened pull request #93465 → Staging next → https://git.io/JJcfq
nikita` has quit [Quit: leaving]
<sphalerite>
srhb: are you on a recent nixos-unstable?
<colemickens>
when I nix-tree my system's closure, I see "systemd-boot-builder.py". Shouldn't that only be used at build time? It is shown as a top-level thing, but I suspect it's pulled in by something like nixos-rebuild? Can I configure the system to exclude those scripts?
waleee-cl has joined #nixos
<xeijin>
srhb thank you very much, the gist is really helpful
noudle has quit []
hoijui has joined #nixos
ixxie has quit [Remote host closed the connection]
orivej_ has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
Extends has joined #nixos
sangoma has quit [Ping timeout: 258 seconds]
bkv has joined #nixos
bqv has quit [Ping timeout: 260 seconds]
bkv is now known as bqv
syd has quit [Quit: Connection closed]
<manveru>
colemickens: i don't seem to have that, but it seems to be a dependency of systemd-boot which i don't use
orivej_ has joined #nixos
<srhb>
xeijin: Great :)
orivej has quit [Ping timeout: 240 seconds]
morr has quit [Quit: WeeChat 2.7.1]
<srhb>
colemickens: Not without losing the ability to activate the boot config, no.
<colemickens>
I'm okay with that though
<srhb>
colemickens: Your intuition is correct, each nixos system has a bin/switch-to-configuration which has the (necessary) reference to systemd-boot-builder
<srhb>
colemickens: In that case, you'd have to blank out that reference after activating the config.
<srhb>
It's not very pluggable though
davidv7 has quit [Remote host closed the connection]
<srhb>
colemickens: (Out of curiosity, why do you want to do this?)
<colemickens>
okay, I'm using make-disk-image.sh and am already having to patch around a bug anyway so I don't mind digging in.
bkv has joined #nixos
davidv7 has joined #nixos
<srhb>
Ah, ok.
<colemickens>
srhb: it accounts for nearly 1/5 of my VM image.
<srhb>
colemickens: You'll need to alter the top level activation scripts
<srhb>
colemickens: See modules/system/activation/top-level.nix and try to identify a place where you can plug it.
<colemickens>
Okay, will do. Thank you very much for the pointers :)
morr has joined #nixos
bqv has quit [Ping timeout: 260 seconds]
bkv is now known as bqv
<typetetris>
When I accidentally clicked this chasing arrows beside an approved review, so the review gets requested again, can I undo that somehow?
<srhb>
colemickens: (btw, an mbr boot loader might trivially remove that dep for you)
<srhb>
typetetris: I don't think so.
<colemickens>
grub was big too, about the same size iirc
<srhb>
colemickens: Aw.
<colemickens>
lilo briefly popped in my head?
<srhb>
colemickens: Could you disable all boot loaders? Do you need them? :D
<colemickens>
Hm! Sadly I doubt it. It's azure/hyperv so I doubt it supports efistub.
<colemickens>
Or is there another way you're thinking of maybe?
<srhb>
No, not really. I'm not sure getting rid of this script is easy. installBootloader is guarded (for good reason) and it would have to happen through some sideband...
<srhb>
Like, you can make it a no-op, but then it's up to you to make everything bootable
<colemickens>
srhb: well, I don't want to get ahead of myself but my last riir went well...
<colemickens>
srhb: what if someone rewrote nixos-rebuild and systemd-boot-builder.py in rust?
<srhb>
haha
<srhb>
You don't need to rewrite nixos-rebuild at all.
<srhb>
The reference is in switch-to-configuration, and is pluggable via installBootLoader
<srhb>
(It is supposed to be a script that takes a nixos closure and make it bootable)
<srhb>
as in, `make-bootable (/nix/store/some-nixos-system)`
<srhb>
colemickens: installBootLoader is substituted into switch-to-configuration.pl at build time.
<colemickens>
Yeah I see it
<srhb>
ok :)
<colemickens>
I had noticed it when I was eyeballing these for the rewrite. systemd-boot-builder does similar build time interpolations
<colemickens>
I hadn't thought about tyring to re-use this point though
<srhb>
I doubt there's much to win from eliminating further up at least.
<colemickens>
however it's also used inside make-disk-image, so I think I see the trick
<srhb>
nixos-rebuild is just a shell script, switch-to-configuration is just a perl script..
<eyJhb>
srhb: any idea how such a wrapper could be made? Considering just doing a find . -level 1 etc. and then just cp -R the files
<eyJhb>
But I am unsure if that will work, because of the patching phase? Doen't it hardcode the final path into some bin?
<srhb>
eyJhb: Depends on the application in question and what you're trying to replace
<srhb>
eyJhb: Worst case you'll either have to patch the binary to replace a store path (yuck) or rebuild. Best case it's just working from the "root" of its store path. Experiment. :)
Rusty1 has joined #nixos
Heirlung has joined #nixos
catern has joined #nixos
<eyJhb>
I really just hoped there was a one-size-fits-all wrapper that could be made
<eyJhb>
But yes, I need to experiment with this
<eyJhb>
Hoping for more hours in a day soo
<eyJhb>
soon* those 24 hours a day is not enough
<srhb>
eyJhb: Yeah, not, it's application specific, no one-size-fits-all. I'd definitely just try copying/symlinking everything over initially though, since that only takes like five minutes to try out.
<eyJhb>
The easiest way to do that, would be to create a shell right? some shell.nix file?
<srhb>
I always do it in a proper build because shells are fickle and leaky
<eyJhb>
Slowly working my way up, to be better at Nix, but hell there is a long way
<srhb>
so some nix file that overlays in the new package.
<eyJhb>
Proper build?
<srhb>
As in nix-build yourfile.nix
<eyJhb>
Ahh
<eyJhb>
I suck at both
<eyJhb>
So either would work
<srhb>
Well, no, only nix-build will work
<srhb>
You don't get to create a store path from within a nix-shell.
<eyJhb>
I need a bigger desk to play and code
<eyJhb>
When you have a nix-shell default.nix, don't you have the ability to create new store paths?
<srhb>
Unless you meant including your output package in the shell or something.
<srhb>
It depends what you mean
<srhb>
nix-shell '<nixpkgs>' -A hello will not allow you to realize the hello store patj
<srhb>
nix-shell -p hello _will_ create a shell that includes that store path
<eyJhb>
n
<srhb>
So, yes, if you meant creating a shell that just has the final package in its env, sure, you can do that. The dependency will be built.
<eyJhb>
I think I understand it somehow, I will rock a nix-build
<eyJhb>
Also, do you have a nice way of testing modules? ;p
<srhb>
sure, drop them in my nixpkgs and switch my system. ;)
bahamas has joined #nixos
<eyJhb>
Damn
<srhb>
Sometimes I go crazy and build a vm or something.
<eyJhb>
The only other I heard where nix-build on a VM
<eyJhb>
You craazy gal!
<srhb>
Usually cba though. :P
<{^_^}>
[nixpkgs] @dawidsowa opened pull request #93473 → play-with-mpv: init at 2020-05-18 → https://git.io/JJck2
<eyJhb>
True
<eyJhb>
But isn't there a easy way to do it?
<srhb>
I think that's pretty easy.
<srhb>
Sometimes I even write a nixos test for it, that's also great for testing modules.
bkv has joined #nixos
<srhb>
You can always copy one of the simple ones.
<srhb>
Or better, one that has similar prerequisites.
<eyJhb>
Writing tests... Ohh you srhb :p - Still getting the hang of everything
<eyJhb>
Had a recursive type yesterday, that needed to be able to nest infinitely
<eyJhb>
Not.. Fun...
<srhb>
eyJhb: Sure. But take a look at.. I don't know, nixos/tests/i3wm.nix or something one day, to see how simple it is :)
<eyJhb>
Will do :D
bqv has quit [Ping timeout: 272 seconds]
bkv is now known as bqv
<eyJhb>
Python?
<{^_^}>
[nixpkgs] @tnias opened pull request #93474 → nixos/wireguard: fix typos and unify formatting → https://git.io/JJckS
<srhb>
eyJhb: We have both a perl and a python framework, python is going away in 20.09 (maybe)
<srhb>
er, perl is going away*
<eyJhb>
You scared me
nadley has joined #nixos
<eyJhb>
My perl is not good
<srhb>
Mine either.
<eyJhb>
I feel like most of this is, me saying I can't do anything. I can actually do Python and Go well! And PHP
<srhb>
Practice makes... Capable :)
noudle has joined #nixos
<eyJhb>
Practice in Nix makes infinite recursive functions
<eyJhb>
At least for me
<srhb>
Happens to everyone every once in a while :P
<eyJhb>
I really wish, we had something like the options page just for functions, like the lib
<eyJhb>
Not sure how nice it would be to parse lib/, although. Isn't that how the manual works?
keving[m] has joined #nixos
simba2 has quit [Ping timeout: 272 seconds]
simba2 has joined #nixos
<{^_^}>
[nixpkgs] @danieldk opened pull request #93475 → blas: do not report an empty line for every checked symbol → https://git.io/JJcIE
<srhb>
eyJhb: Right, nixos options are enriched with metadata that has documentation in it
<srhb>
eyJhb: lib could too, but no one has done that.
<srhb>
(That I know of)
<eyJhb>
But the manual has the lib documented? I think there are numerous places that have parsed them, it is just the presentation sadly :/
chimay has quit [Ping timeout: 240 seconds]
chimay has joined #nixos
<srhb>
Ah, I forgot about that. I just use the source.
<{^_^}>
[nixpkgs] @cdepillabout opened pull request #93476 → break-time: init at 0.1.1 → https://git.io/JJcI5
<benschza>
Is there any way to disable tests for the propagated build inputs of "buildPythonPackage"? Using "doCheck" you can disable it for the actual package, but not the dependencies.
<eyJhb>
srhb: need to repatch it
<eyJhb>
cp and ln uses the other patch
<eyJhb>
path*
<jlv>
Will it break anything if I edit a NixOS managed file, like /etc/hosts ? There are times when I want to make a temporary change to hosts, and I want the change overridden when I next realize my NixOS configuration.
<{^_^}>
[nixpkgs] @vcunat pushed commit from @ajs124 to staging-next « firefox: 77.0.1 -> 78.0.1 (security) »: https://git.io/JJcLJ
<bqv>
jlv: it'll just get nuked when you next switch
<hazel[m]>
you can't edit a Nix managed file they're read only
<hazel[m]>
it will absolutely break things if you change perms to edit it
<jlv>
hazel: That's what I mean't, temporarily changing permissions to write.
<jlv>
bqv: that sounds like what I want.
<clever>
jlv: thats worse
<clever>
jlv: you want to delete the symlink at /etc/hosts, and replace it with a normal file, with the contents you want (which can be a copy of the old one)
<hazel[m]>
i usually add lines to my config and rebuild
<clever>
changing the permissions will break things in a worse way, it wont always be able to undo it
<hazel[m]>
and then delete the lines and rebuild again
<bqv>
jlv: to be clear, i was imagining what clever said, obviously editing stuff in the store is a bad idea (though not impossible)
<clever>
o1lo01ol1o: the nixos service will also install its own copy, that matches the daemon
<o1lo01ol1o>
clever: hm, seems to be ok as I've got postgres configured as a service following the NixOS wiki. pg_restore of my backup data seems to be working now anyway . . .
<Jake[m]>
Is there a good way to run phoronix test suite benchmarks on nixos? I can install the `phoronix-test-suite` tool, but then there other dependencies and even when I think I've installed them, it failed with an error like `gcc: -isystem: no such file`.
stites[m] has joined #nixos
<infinisil>
,libraries Jake[m]
<{^_^}>
Jake[m]: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<infinisil>
Very likely this is the problem
jjakob has joined #nixos
<Jake[m]>
I didn't install libraries through "nix-env" I think, I made a "shell.nix" with "phoronix-test-suite" and other dependencies and ran "nix develop -f shell.nix"
<clever>
Jake[m]: what is the full command that it ran, when having that error?
<infinisil>
I see
sghir_med[m] has joined #nixos
__monty_1 is now known as __monty__
rustybolt has quit [Remote host closed the connection]
aszlig_ is now known as aszlig
<rnhmjoj>
what is the best way to signal a nixos option is mandatory? i mean, better that the "underfined variable" you see by default
nikita` has joined #nixos
<infinisil>
You mean the "option was used but not defined"?
<clever>
rnhmjoj: just use it somewhere, and dont give it a default
<infinisil>
clever: That's exactly what I think they're trying to avoid, this gives the error message I mentioned
<infinisil>
You can use an assertion that checks `options.foo.isDefined` instead, but that often doesn't work due to things being evaluated before the assertions
<rnhmjoj>
clever: that's what i'm doing now and i get "error: undefined variable 'musicFolder'" when not defined
<clever>
rnhmjoj: undefined variable means you have an error in the nix, not an undefined option
<infinisil>
^
<rnhmjoj>
uuh, right. made a typo
<rnhmjoj>
anyway, an assertion is a good idea. thanks
<buffet>
hey, im considering using one big config across multiple nixos machines (to reuse configurations etc). atm im thinking of making the configuration in modules, and then enabling those on a per-machine basis. is there any nice way to give nixos-rebuild a parameter of some sort that i can access from inside the config?
<buffet>
like nixos-rebuild switch --machine=whatever
<kl3>
hi, since patch submission via mail/discourse is still broken and I don't use github, here's a little patch for nftables: would someone be so kind and take a look or even merge it? http://ix.io/2s4U
turlando has joined #nixos
j0hax[m] has joined #nixos
<srhb>
luna: At least it's clearly split in commits, so the reviewer will be able to make that judgment easily.
<srhb>
luna: THe description is also pretty clear. I don't think it's a problem. :)
<{^_^}>
#39975 (by jtojnar, 2 years ago, open): Remove old GStreamer
<clever>
numkem: you want to either `import sources.nixpkgs { config = config.nixpkgs.config; }` to make it respect the option, ot you can `{ config.allowBroken = true; }` to have a 2nd copy of config
<numkem>
clever: setting that didn't help, but I've fixed it by changing my overlay import
<{^_^}>
[nixpkgs] @marsam pushed commit from @taku0 to release-20.03 « flashplayer: 32.0.0.387 -> 32.0.0.403 »: https://git.io/JJcs6
<numkem>
I'm not totally sure but it seems like it's vivaldi-ffmpeg-codecs that is causing the problem for me (related to gst-plugins-base being broken)
o1lo01ol1o has quit [Read error: Connection reset by peer]
<MarcWeber>
jumper149 Can you do me a favour and just run the 3 command see dpaste above ?
<MarcWeber>
Cause it fails for me and want to understand whether it's my system or whether chromedriver is generally broken on nixos for whatever reason.
<MarcWeber>
Was 3min before you joined. It should just provide shell with chromium and python. Then when running python you can import selenium and as it start a chrome window. If that works test is complete. Because this already fails on my machine.
pamplemousse has joined #nixos
turlando has joined #nixos
<jumper149>
I am currently only logged in via ssh on my machine with nix, so I guess it wouldnt be of much help?
antifuchs has joined #nixos
<eyJhb>
All the update scripts we have in nixpkgs, are the easiest to setup Python? Wondering if I could make one in go
<{^_^}>
[nixpkgs] @Lassulus pushed commit from @Sohalt to master « moodle: fix typo »: https://git.io/JJcGx
<MarcWeber>
eyJhb You either use pythonXPackages.xxx eg with -nix-shell or you can try pypi2nix tool. depending on depnedencies one or the other might be easier.
<eyJhb>
What about if I wanted to do something Go like?
orivej has quit [Quit: No Ping reply in 180 seconds.]
<MarcWeber>
|In the end 'good is' what works.
meh` has quit [Ping timeout: 265 seconds]
orivej has joined #nixos
<MarcWeber>
eyJhb: Typciall the process is 1) get dependency tree of packages youw want to installe 2) create nix expressions from them 3) merge C dependencies (eg mysql library) -> hope it compiles and works
<MarcWeber>
You may want to find out who the go maintaners are and also ask them. I don' tknow whether anybody has been working on such ..
<eyJhb>
Think I will just work my Python fo :p
<MarcWeber>
And if you're unlucky some packgaes require additoinal build depnedencies such as parser generators etc.
<MarcWeber>
Probably Go has it's own pcakage manager which just works ? Depends on your goals.
<MarcWeber>
eyJhb: Just to be clear: You might hit issues wehre project A requires C-1.0 ubt B requires C-2.0 .. THus how to package both ?
<MarcWeber>
That's why tools like pypi2nix create different sets of dependencies for each target.
<MarcWeber>
In the Vim case .. well .. it's hopend that it just works mixing latest versions to my knowledge (didn't follow it for some time).
<MarcWeber>
About update scripts -> if this chat doesn't help you try the discord messaging app or the mailinglist if it still exists or checkout nixpkgs history to see what tools are still in use. There have been multiple implementatnios/propsolas over time> don't know hat is current.
<eyJhb>
Just wanted to ensure, we were not speaking past each other. :)
<MarcWeber>
So what you're looking for (put all libraries into a huge .nix file and hope it works) is an approximation which will work for very well maintaned current packages.. But maybe not for everything you find on Github using whatever strange combinaiton of versions.
<eyJhb>
But I would imagine, that then it would require a shell.nix, where one can fire off update, or something like that
<eyJhb>
When we talk about pypi2nix
<MarcWeber>
I haves something for ruby like this: Try to create an env for packages A,B,C and use latest versions and add dependencies.
<MarcWeber>
The result is a 'build env from sources' nix code which worked well enough for thone 20 ruby packages I need. but it's by no means perfect.
orivej has quit [Quit: No Ping reply in 180 seconds.]
<MarcWeber>
The update command in fact is pypi2nix which then writes .nix files whith versions from pip and urls and hashes of those packages.
<MarcWeber>
with some recursive magic to allow overwriting stuff easily.
<duairc>
I have a module which defines a couple of NixOS options, A and B, but certain values of A are only valid for a particular value of B. Where do I put a check for that?
<infinisil>
duairc: Needs more context
knupfer has joined #nixos
<duairc>
Like, I know I can override the check function for a type in a single option, but that function only takes the value of that option
<duairc>
I need a check function that depends on the values of two different options
knupfer has quit [Remote host closed the connection]
knupfer has joined #nixos
<duairc>
if !isNull A && B != "foo" then throw "You need to set B to "foo" if you want to use A" ... something like that
<duairc>
I'm pretty sure I've seen other NixOS modules do those kinds of checks but I'm just not sure where that code needs to live
<antifuchs>
so I just started with NixOS, and it's feeling really great! My main confusion right now is around code organization - if I put package declarations in another file that I import, why do I suddenly get errors (even though they seem to pull in the same namespaces)?
<clever>
duairc: nixos has a special "option" called assertions, it takes a list of { assertion = bool; message = "something"; }
<clever>
duairc: the difference vs using the nix assert statement, is that nixos can report multiple errors at once
<duairc>
clever: Aha, yes, that's probably it!
<srhb>
antifuchs: That's difficult to answer without an example
<srhb>
antifuchs: Where and how did it work, how did you move it?
<duairc>
clever: Thanks, that's exactly what I'm looking for
<antifuchs>
srhb: I imagine! I mostly am wondering if there's a tree of examples that I can refer to... or an understanding of how the snippets in nixpkg docs should be used in actual code
<srhb>
antifuchs: nixpkgs is probably the greatest example repo there is. :)
<antifuchs>
actually, I found out why I was getting errors - I hadn't pulled in the `config` namespace
<srhb>
antifuchs: We tend to call that an attrset, or an argument (in the context of NixOS modules)
<antifuchs>
ah!
<Graypup_>
is there a way to diff the build inputs of two derivations so I can figure out why my derivation keeps needing rebuild?
<srhb>
Graypup_: Yes, nix-diff is very useful for that.
<antifuchs>
(the modularity section in the nixos manual actually helped me out a lot right now - I have some reading to do, it seems!)
pamplemousse has joined #nixos
<Graypup_>
ok I have something confusing happening to me in the nix repl: deps = {exportReferencesGraph = [ "foo" d.server ]; } then builtins.toJSON deps returns error: getting status of '[...]/myproject/nix/default.nix': no such file or directory, which is very curious to me because I don't have any imports that point at that
<Graypup_>
jk I screwed up
<Graypup_>
I should figure out what I screwed up lol
<Graypup_>
hm I screwed up a callPackage pretty badly. interesting
<{^_^}>
input-output-hk/haskell.nix#771 (by NorfairKing, 12 minutes ago, open): Tests aren't being run unless I specifically build a test suite component.
<antifuchs>
thanks a lot, I'm making much better progress now (:
<gchristensen>
my dmesg is full of logs about a device called `sdi`. Is there a way to get information about `sdi`? it doesn't have a symlink in /dev/, and the only way I could know what disk it is would be if I wrote down all the serial numbers for thedisks I can see and used process of elimination
codygman___ has joined #nixos
<srhb>
gchristensen: is it not in /sys/devices/virtual/block either?
<srhb>
(or in /sys/block)
<gchristensen>
it isn't in either
<srhb>
meh.
<clever>
gchristensen: can you pastebin the whole dmesg?
<Raito_Bezarius>
just to be sure, lsblk shows nothing right?
<Raito_Bezarius>
(it uses /sys/block I suppose)
<gchristensen>
lsblk doesn't, correct
<clever>
gchristensen: maybe there is a msg after that one, saying sdi disconnected?
<mariatsji>
can plain files be made into a nix derivation (in order to include them in dockerTools.buildImage { contents = .. } ?
<gchristensen>
no: [709604.954820] sd 8:0:5161:0: [sdi] Attached SCSI disk
<clever>
gchristensen: the error with read capacity, may prevent it from creating a device node
<Graypup_>
hm, so I am overriding the `haskell.packages.ghc865.pango` with callPackage on a cabal2nix output file and I'm getting infinite recursion. My assumption is that what might be going on is that the cabal2nix output actually generates `pango` as one of the parameters to the derivation and perhaps it's grabbing itself rather than the native pango library but I don't know how callPackage works in the haskell infra too well
<gchristensen>
clever: right, yeah
noudle has joined #nixos
<Graypup_>
welp that is exactly it! it is called with inherit (pkgs) pango in the nixpkgs sourfce
<srhb>
syd: Sorry, I'm not very familiar with the haskell.nix ecosystem, nor stack.
kreyren has quit [Remote host closed the connection]
kreyren has joined #nixos
<srhb>
syd: Is the dependency-upgrade branch supposed to be buildable?
orivej_ has joined #nixos
orivej has quit [Read error: Connection reset by peer]
<syd>
it could be that it should fail, but the nix build passes (see CI)
alp has joined #nixos
<syd>
you should be able to run `nix-build` or at least `nix-build nix/pkgs.nix -A smosPackages`
<srhb>
syd: Ah, I know what's wrong. My config is leaking in.
cole-h has joined #nixos
pamplemousse has quit [Ping timeout: 265 seconds]
dermetfan has joined #nixos
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos
<gchristensen>
clever: I did process of elimination and found it quickly enough (only 9 drives.) my system booted in 10 minutes less time after taking that drive out
ardumont has quit [Ping timeout: 256 seconds]
sangoma has joined #nixos
ixxie has joined #nixos
orivej has quit [Quit: No Ping reply in 180 seconds.]
ixxie has quit [Client Quit]
ardumont has joined #nixos
orivej has joined #nixos
inkbottle has joined #nixos
zebrag has quit [Ping timeout: 264 seconds]
ixxie has joined #nixos
xlei has joined #nixos
bahamas has quit [Read error: Connection reset by peer]
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #nixos
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #nixos
ui has joined #nixos
Kritnich has joined #nixos
stree has quit [Excess Flood]
<kl3>
coredumpctl(1) has a `debug' command which executes gdb(1), but gdb is not installed by default alongside coredumpctl; would others find it reasonable to do so?
stree has joined #nixos
<ui>
is it possible to customize the qemu command run from nixos-rebuild build-vm? i want to give it more memory and add a few devices
<kl3>
just wanted to debug a crash on a system without network, so installing gdb was not an option
<clever>
kl3: i tend to just run it under `nix-shell -p gdb`
<clever>
ahh, but without network, i see
Kritnich has quit [Quit: Bye bye.]
ardumont_ has joined #nixos
<kl3>
yeah, bad out-of-the-box experience
<clever>
you would need to fix the network first, or smuggle a gdb in with `nix copy --from local?root=/mnt/` and a usb stick
Kritnich has joined #nixos
<evanjs>
okay so I was looking at the hoogle module and... looks like it just start a local server, and can't be configured as such? 😒 I figure that would be a low-resistance change, just not entirely sure how I'd handle it
<evanjs>
like, if it was set to 127.0.0.1, okay, cool, let them specify the IP and default to that
ardumont has quit [Ping timeout: 272 seconds]
<evanjs>
but idk, probably overthinking things again 😃
<clever>
evanjs: ive noticed a security issue with that hoogle server, its sharing all of the store, possibly the entire / dir
<evanjs>
ughhhhh
<evanjs>
so i should leave it alone, then?
<evanjs>
until that is addressed, at least
<clever>
evanjs: or find another more secure way to host the server
<evanjs>
bah. I mean I was just planning on not having it port forwarded but yeah, that seems sort of iffy
<evanjs>
like setting up an open HTTP port to each device at / ? 😕
<evanjs>
and I doubt https + setting up letsencrypt will help much 😝
<evanjs>
though, come to think of it, wow, the letsencrypt/acme/etc modules must make this stuff 1000x easier to manage.
<evanjs>
If you plan on using the same cert and etc for multiple services, at least
<Graypup_>
can you inherit in a let binding?
<Graypup_>
reason I ask is I have a whole bunch of let a = super.haskell.lib.a; b = super.haskell.lib.b; etc that would look nicer if I did that
<evanjs>
seems to work on my end
<evanjs>
would "self: super:" help any in this case? random question without knowing any additional context lol
<Graypup_>
huh it didn't work the other day
<Graypup_>
but looks valid now
<evanjs>
that's what usually happens lol
<evanjs>
"I swear it wasn't working 5 mins ago"
ixxie has quit [Quit: Lost terminal]
<evanjs>
clever: btw, where did you see hoogle exhibit that behavior?
<evanjs>
figuring this would have to be on the web server side if we don't want to totally disassociate the store paths/dependencies
<clever>
evanjs: yeah
prsteele has joined #nixos
pamplemousse has quit [Ping timeout: 240 seconds]
AWizzArd has quit [Quit: Lost terminal]
<{^_^}>
[nixpkgs] @vcunat pushed to staging-next « thunderbird: fix build after nss update »: https://git.io/JJcWy
<prsteele>
Hello everyone. I'm trying to get started with Nix, and I'm hitting a wall pretty quickly. I've installed `cabal` through Nix, along with `zlib`, but `cabal install hpack` complains about not being able to find `zlib.h` (which exists in ~/.nix-profile/include). The bug page https://github.com/NixOS/nixpkgs/issues/44144 suggests that `nix-shell`
<prsteele>
could resolve this, but I don't know what incantation would be required. Any thoughts?
<{^_^}>
#44144 (by kindaro, 1 year ago, open): zlib headers are not linked in ~/.nix-profile/include.
<symphorien>
you prepare a nix-shell where the libraries are "magically available"
<evanjs>
re the whole store at least it seems lol
<symphorien>
so run `nix-shell -p zlib` and zlib.h should be found by the C compiler
<symphorien>
cabal may have something specific in this regard, though, I don't know about haskell
<symphorien>
,libraries prsteele
<{^_^}>
prsteele: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<clever>
symphorien: xmonad itself, also includes wrappers, so `xmonad --reload` can recompile itself
<evanjs>
not seeing anything outside of it so far, but still 😕
archH has joined #nixos
<prsteele>
symphorien thanks, reading
<mudri>
clever: I think there are separate questions from me and prsteele.
<archH>
Anyone know how I can get fractional scaling in Gnome with Nvidia?
<archH>
display scaling
<clever>
mudri: ah, 2 haskell questions at once!
<tpw_rules>
i had bad nouveau drivers do that for me once :D
<symphorien>
prsteele: for easy cases `nix-shell -p pkg-config lib1 lib2 lib3` should work
<evanjs>
clever: nvm... was forgetting the file part...
<evanjs>
dang
<mudri>
But yes, it's nice to have confirmation about how xmonad is packaged.
<evanjs>
that's... pretty severe
nadley_ has quit [Quit: No Ping reply in 180 seconds.]
<clever>
mudri: those linker errors look weird, like something is out of date
<prsteele>
Presumably this approach will work, and if not I have some reading that should help. Assuming it does... are there any suggested idioms for getting this to work nicely? As an example, is there an idiomatic way for someone cloning my repo to know what commands to run to get `hpack` installed? Or should I just say "run this shell script" which
<prsteele>
invokes `nix-shell` and then runs the necessary commands?
<symphorien>
prsteele: you can create a `shell.nix` at the root of the repo
<prsteele>
Broader question: is it generally acceptable to shove something in ~/.nix-profile/bin ? (In this case, I need to specify where `cabal install hpack` generates an executable. Ordinarily I'd just say something like ~/.local/bin, but I'm trying to adopt Nix idioms)
archH has quit [Ping timeout: 265 seconds]
<prsteele>
symphorien thanks
<symphorien>
then people only have to run `nix-shell`, this opens a shell with all the libs you requested
<symphorien>
prsteele: about putting something in ~/.nix-profile/bin: it's read only, so you can't
<prsteele>
so just shove it elsewhere, and remember that I need the current Nix env active to make the executable work?
ui has quit [Quit: Connection closed]
<symphorien>
executables built inside nix-shell will eventually break when you run nix-collect-garbage
hoijui has joined #nixos
<symphorien>
to have something long term, you need to package your program properly with nix and build it manually with nix-build or with something more "integrated" like NixOS or home-manager
<Graypup_>
I am missing something trivial I am sure, but how can I get the derivation path for a given nix store path?
<symphorien>
nixpkgs has a pretty advanced haskell packaging infra, so I can't really help you in this regard
<prsteele>
that is unfortunate (but probably makes sense once I understand Nix better). It sounds like I shouldn't be using this to build packages, then, because I would be relying on ephemeral tooling
<Graypup_>
thanks! I was reading the man page but missed it
<prsteele>
so unless I misunderstood what you said, I can't use Nix to make an executable that would work for someone not using Nix?
<symphorien>
prsteele: nix-shell is meant for developers only, not for end users
<symphorien>
you can, but with nix-build, not nix-shell
<prsteele>
ah. Then I might be in luck... I think I need nix-shell to make hpack, which allows me to actually call nix-build
<danderson>
hey, so https://nixos.org/nixos/options.html#networking.wireless seems to be broken. It's trying to do a cross-origin request to releases.nixos.org, and the server isn't providing the right CORS headers.
<danderson>
... which means I can't look up any options :/
<symphorien>
danderson: man configuration.nix has them all
jbgi has joined #nixos
<archh75>
How can I do this in configuration.nix ? $ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
syd has quit [Quit: Connection closed]
chimay has quit [Ping timeout: 258 seconds]
mariatsji has quit [Remote host closed the connection]
<TheSirC[m]>
Would anyone have an idea of why I am getting "error: infinite recursion encountered, at undefined position" after switching to a new generation successfully ?
simba2 has quit [Ping timeout: 272 seconds]
<dminuoso>
"at undefined position" thats neat
<cole-h>
Try looking through the `--show-trace` output.
Kritnich has joined #nixos
echel0n[m] has quit [Quit: Idle for 30+ days]
Kritnich has quit [Client Quit]
o1lo01ol_ has quit [Remote host closed the connection]
<TheSirC[m]>
dminuoso: right?
slby[m] has quit [Quit: Idle for 30+ days]
thequux[m] has quit [Quit: Idle for 30+ days]
<TheSirC[m]>
cole-h: for which command because anything with nix sends back that except nixos-rebuild
interro[m] has left #nixos ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
xfix has quit [Quit: Idle for 30+ days]
<cole-h>
Do it with `nixos-rebuild.`
<TheSirC[m]>
cole-h: wait
<TheSirC[m]>
I tried `nix-shell -p hello --show-trace`
<clever>
TheSirC[m]: types.nix is fishy, what happens if you disable it?
<cole-h>
clever: Would it not be the fact that `nixpkgs.overlays` is getting set? IIRC, aren't the contents of ~/.config/nixpkgs/overlays always imported as an overlay?
<clever>
cole-h: the error happens with `nix-shell -p hello` which ignores the nixpkgs.overlays entry in configuration.nix
<cole-h>
But that's not in configuration.nix, it's in default.nix, which is in ~/.config/nixpkgs/overlays (according to that paste, at least)
<{^_^}>
#68489 (by l0b0, 44 weeks ago, open): localtimed fails to set time zone
<gueorgui>
I'm having the same issue, rebooting doesn't help, and `systemctl status localtime` says "failed to set timezone"
<clever>
gueorgui: i think the only way to set the timezone is via configuration.nix
<gueorgui>
Same thing for running localtimed manually, same thing with sudo
<gueorgui>
clever: Ah I see, so I need to update my configuration.nix when I move between countries? (admittedly, not an urgent concern in 2020..)
<clever>
gueorgui: yeah
<clever>
time.timeZone
<gueorgui>
Gotcha, thanks. I do set it, but it would be nice to set it automatically form locaiton
dermetfan has quit [Ping timeout: 256 seconds]
quinn_ has joined #nixos
dermetfan has joined #nixos
xeijin has quit [Remote host closed the connection]
quinn_ has quit [Client Quit]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
<gueorgui>
Another question: I'm trying to mount a SD card via a USB-C card reader. Both in Digikam and in Gnome Disks I get the same error: "Error mounting /dev/sda1 at /run/media/gueorgui/disk: wrong fs type, bad superblock on /dev/sda1/ missing codepage or helper program, or other error (udisks-error-quark, 0)"
<gueorgui>
Googling the error doesn't yield many good ideas
<gueorgui>
Any clue what might be wrong?
<gueorgui>
(The card is valid and can be mounted by both the camera and an ipad)
<clever>
gueorgui: what does `blkid /dev/sda1` report?
Kritnich has joined #nixos
<gueorgui>
clever: Permission denied when ran without sudo, no output when ran with sudo
<clever>
gueorgui: `sudo fdisk -l /dev/sda` ?
knupfer has quit [Ping timeout: 260 seconds]
<gueorgui>
clever: Seems ok as well: /dev/sda1 * 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT
<clever>
gueorgui: `sudo hexdump -C /dev/sda1 | head -n30` ?
shibboleth has joined #nixos
<gueorgui>
clever: Not sure what I'm supposed to see in the hexdump, but the first line does say v.EXFAT which seems ok
<clever>
not sure then
<quinn>
can someone tell me where buildGoModule is defined? ripgrep is not helping weirdly
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos
<{^_^}>
[nixpkgs] @siriobalmelli opened pull request #93487 → pc-ble-driver: fix Darwin build → https://git.io/JJcBX
<superbaloo>
clever: here is the catch: the derivation does not list any propagatedBuildInputs
<mudri>
Maybe I can now garbage-collect the old one and reinstall it.
<armin>
https://uno.m2m.pm/bla.txt <- anyone a clue why i still get the nixos-20.03 channel output? i removed it with nix-channel --remove and nix-channel --list doesn't show it anymore.
pamplemousse has joined #nixos
<superbaloo>
I don't understand how the build adds those references
<clever>
mudri: reinstalling wont make any difference at all
<clever>
mudri: nix will give you binary identical replacements, which should function in the identical way
<mudri>
clever: Aah, I didn't know it was so identical. I probably should report an issue, then.
<duairc>
I recall there being a way to annotate a derivation to make it always build locally (e.g., for large file downloads), does anyone know if I'm recalling correctly?
<qyliss>
preferLocalBuild?
mallox has quit [Quit: WeeChat 2.8]
<duairc>
Yeah, I think that's it
orivej has quit [Ping timeout: 240 seconds]
<clever>
superbaloo: is it using bare stdenv.mkDerivation?
<clever>
superbaloo: can you pastebin the output of `show-derivation`?
orivej has joined #nixos
growpotkin has joined #nixos
<duairc>
So if I have a derivation that downloads a 10GB file that has preferLocalBuild set, and I embed the output path of that derivation in a config file on a system I deploy with NixOps, will I end up downloading 10GB to my local system (only to then upload it to the server I'm deploying to), or will the download be run directly on the server?
<duairc>
And if preferLocalBuild doesn't do that, is there anything else that does?
<clever>
duairc: nixops always wants the entire closure on the machine running nixops
<duairc>
That's what I feared
<clever>
duairc: so that central machine will download the file, then upload it to the remote boxes
<clever>
superbaloo: and what is the expr that is generating that drv?
<superbaloo>
I just updated it
<superbaloo>
sorry
lsix has joined #nixos
<duairc>
I think I'll probably end up creating a one-shot systemd service that downloads the file to a fixed location and then just make sure that it starts before the services that need it
<superbaloo>
as you see, the propagatedBuildInputs gets additional members in the show-derivation
<clever>
superbaloo: i think something is detecting that your doing static builds, and it moves all of the buildInputs to propagatedBuildInputs
<superbaloo>
and I dont understand where they come from
<clever>
superbaloo: youll notice in the show-derivation, that buildInputs is entirely empty
<superbaloo>
ha, that's a very good point
leungbk has joined #nixos
<clever>
superbaloo: so you would need to remove curl from the normal buildInputs
<superbaloo>
huum, it wont build then
<superbaloo>
or add it back in the configure options?
<clever>
why does it need curl to build, but shouldnt propagate curl further?
<superbaloo>
and because it's a static lib, the needed part of the lib are builtin the output binary
<superbaloo>
and because it's a static build, the needed part of the lib are builtin the output binary
<clever>
superbaloo: double-check with objdump, did it actually embed curl into its output library?
<superbaloo>
well, there is no linker anyway
<superbaloo>
so I'm not too sure how it could refer to it any other way
<clever>
superbaloo: usually, static libraries arent linked at all, its just an ar archive containing every .o you just built, but not your dependencies
pamplemousse has quit [Ping timeout: 256 seconds]
<clever>
superbaloo: only the final step in the build, the executable does linking, and that needs curl to be propagated
AluisioASG has quit [Read error: Connection reset by peer]
<superbaloo>
yeah, well, for the binary it goes through the linker right?
<superbaloo>
so it does not need to be propagated any further
<clever>
yeah
<clever>
but if the derivation is providing a static lib, it needs to propagate everything the static lib depends on
<superbaloo>
yeah, that derivation only outputs binaries
<superbaloo>
(and that binary depends on cryptsetup binary itself)
<clever>
ah, then you can just delete the file in $out/nix-support, in a postInstall hook
AluisioASG has joined #nixos
<superbaloo>
which is why it would only need to propagate cryptsetup dependency
<clever>
or overwrite it with just 1 path
<superbaloo>
clever: ha. I was looking for a better way to do this
<superbaloo>
I thought I was missing something
<superbaloo>
but okay :) postInstall it is
ATuin has quit [Ping timeout: 256 seconds]
<clever>
making the automatic stuff smarter, would involve recursively discovering the libraries needed by every static lib
<clever>
and knowing with storepath each maps to
<superbaloo>
yup, that totally makes sense.
<clever>
also, propagated inputs dont survive at runtime
<clever>
so you wont have cryptsetup available at runtime
<superbaloo>
I actually build an initrd
<clever>
it will only be available in other derivations, at build time
<superbaloo>
with that
<superbaloo>
which is why I'm trying to slim things down
<clever>
ah
<clever>
have you seen the existing nixos initrd stuff? using ldd to copy just whats used
<superbaloo>
I did
<superbaloo>
just experimenting something else :)
<clever>
ive also done experimenting, i made an initrd with a single static elf and nothing else
<superbaloo>
I'm reusing part of the current nixos build
<superbaloo>
clever: yeah, I have an efi with kernel + initrd, and I'm trying make it interact with TPM
<superbaloo>
yeah, well that's very similar to what I'm doing haha :D
domogled has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @tnias to release-20.03 « nixos/wireguard: fix typos and unify formatting »: https://git.io/JJcRF
shibboleth has quit [Quit: shibboleth]
<immae>
Hello there, how can I add an entry in fstab that concerns a FUSE entry (namely bindfs)? Do I need to put bindfs in the systemPath, or is there another way?
kreyren has quit [Remote host closed the connection]
<evanjs>
executing it directly seems to work fine. Hrm...
<hexa->
if I have an optional attribute in an attrset, how would I write a check that does something based on it being est?
<hexa->
set?*
jbgi has quit [Ping timeout: 256 seconds]
<infinisil>
> { foo = 10; } ? foo
<{^_^}>
true
<infinisil>
> { } ? foo
<{^_^}>
false
<infinisil>
hexa-: ^
leungbk has joined #nixos
<hexa->
thx
poro8[m] has joined #nixos
<clever>
> ({}).foo or "fallback"
<{^_^}>
"fallback"
<poro8[m]>
Is NixOS based?
<clever>
hexa-: you can also use this syntax to provide a default when the attr is missing
pamplemousse has joined #nixos
xkapastel has joined #nixos
hoijui has quit [Ping timeout: 260 seconds]
<hexa->
yay
<hexa->
thanks!
pamplemousse has quit [Ping timeout: 260 seconds]
<cole-h>
poro8[m]: ?
<{^_^}>
[nixpkgs] @aszlig pushed to master « nixos/wireguard: Fix mismatched XML tag »: https://git.io/JJc0P
antifuchs has left #nixos [#nixos]
ixxie has quit [Remote host closed the connection]
<poro8[m]>
based as in Rome 2.0 based
<cole-h>
what
__monty__ has quit [Quit: leaving]
<fmzakari>
I'm looking to give a presentation to teach but mostly sell nix to some colleagues.
dermetfan has quit [Ping timeout: 256 seconds]
<fmzakari>
anyone have some prior-art I can start from
fendor has quit [Quit: Leaving]
<poro8[m]>
reminds me of the time I first learned about nix
archH has quit [Quit: Connection closed]
<poro8[m]>
I was in a dark alley in Paris late at night and this homeless looking dude keep whispering at me from a corner and when he saw I wasnt going to go there he came to me and his breath stank, he had his hands inside his sweater but he showed one of his hands and it had a dirty old usb pendrive in it and he said "yo bro do you wanna buy some nix, It's good shit"
<poro8[m]>
* I was in a dark alley in Paris late at night and this homeless looking dude kept whispering at me from a corner and when he saw I wasnt going to go there he came to me and his breath stank, he had his hands inside his sweater but he showed one of his hands and it had a dirty old usb pendrive in it and he said "yo bro do you wanna buy some nix, It's good shit"
<leungbk>
Would anyone mind reviewing my PR from a couple weeks ago? Everytime it has fallen too far behind the base branch, I have had to fetch the entire NPM registry to resolve the merge conflict.