<c00w>
Thanks for helping me debug this clever :D clever++
<{^_^}>
clever's karma got increased to 229
<clever>
infinisil: when the system is "builtin" and the builder is "builtin:fetchurl", nix will run builtinFetchurl() inside a normal fixed-output derivation sandbox
v0|d has quit [Remote host closed the connection]
fendor has quit [Read error: Connection reset by peer]
<infinisil>
Gotcha
<infinisil>
Though I guess it won't be very useful if you need to provide a sha256
<clever>
infinisil: main benefit of it, is that it happens at build time, but to make things pure, you must know $out before you know the value
<colemickens>
Dominos UK sends spam to an old email address that I own. But their UK domain seems to deny access to non-UK residents so I can't unsbuscribe. heh
<infinisil>
pie_: If somebody sets `NIX_PATH=nixpkgs/nixos=/foo/bar` then `<nixpkgs> + "/nixos" != <nixpkgs/nixos>`
<clever>
pie_: i got bored and read the source
<clever>
pie_: "i remember whats in your sources"
toppler has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @veprbl pushed to revert-72376-pure-check-meta « Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" »: https://git.io/Je23n
<pie_>
infinisil: ok that makes complete sense but wow thats a weird corner case :D
jonringer has quit [Remote host closed the connection]
<pie_>
AHAHAHAHAHAHA
<pie_>
> lib.traceValSeq (let _omul = __mul; in let __mul = a: b: if (builtins.isAttrs a) then (a // b) else (_omul a b); in {set = {a = 1;} * {b = 2;}; int = 1 * 2;})
<{^_^}>
{ int = 2; set = { a = 1; b = 2; }; }
* pie_
initiates evil cackling
logzet has quit [Ping timeout: 264 seconds]
logzet_ has joined #nixos
<arcnmx>
NoblesseOblige24: am on it here o:
<pie_>
also yes that should be cartesian product but i actually wanted plus but you cant redefine that
<NoblesseOblige24>
arcnmx: When I installed from the README using pip and make I got a failure on not having enough development tools for one of the dependencies. Any code you can share?
<NoblesseOblige24>
Oh wow, very nice. I haven't set up my own packages repo yet (or learned the language really). Should I just put this in /etc/nixos/private or something?
<arcnmx>
NoblesseOblige24: or if you trust me, you can also use nur.repos.arc.pkgs.weechatScripts.weechat-matrix or something
bvdw has quit [Read error: Connection reset by peer]
<infinisil>
arcnmx: Oh nice
<infinisil>
What do you mean it uses a plugin?
<{^_^}>
[nixpkgs] @veprbl merged pull request #72752 → Revert "stdenv/check-meta: getEnv if the attribute is unset" → https://git.io/Je23c
<{^_^}>
[nixpkgs] @veprbl pushed to master « Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752) »: https://git.io/Je235
bvdw has joined #nixos
<{^_^}>
[nixpkgs] @veprbl pushed 0 commits to revert-72376-pure-check-meta: https://git.io/Je23F
<infinisil>
Oh weerc
<arcnmx>
Well, it does two things. One is configure the weechat wrapper, the other is yeah, configure weechat itself
<infinisil>
arcnmx: Does that work well? Or is it too stateful still?
<infinisil>
I guess it's declarative if you want, but stateful by default
<arcnmx>
yeah I can't recall why I even did it that way, probably just so /set does work and I was too lazy to configure networks ><
<infinisil>
arcnmx: Can't you configure networks that way too?
NoblesseOblige24 has quit [Read error: Connection reset by peer]
<arcnmx>
you can! main problem iirc is that the plugin loads a little late so changes don't quite take effect the first time? really it should just generate the files themselves imo
<arcnmx>
and if you want statefulness, make it merge on activation
<CMCDragonkai>
hi, the manual says you can do this `nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix`
<CMCDragonkai>
but `config.system.build.isoImage` doesn't exist
<infinisil>
CMCDragonkai: Are you in nixpkgs/nixos?
<CMCDragonkai>
hmmm
<clever>
CMCDragonkai: you need to use the nixos default.nix, nit the nixpkgs default.nix
<CMCDragonkai>
ok the reason why i said it doesn't exist, is cause i use nix repl to load ./nixos and tested what that expression is
* pie_
wonders if all this nix arcana is actually helpful in the long run
toppler has quit [Ping timeout: 240 seconds]
<clever>
CMCDragonkai: isoimage is only present if you do `-I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix` when you load nixos/default.nix
<CMCDragonkai>
i see, because of `eval.config`
sb0 has joined #nixos
<clever>
CMCDragonkai: you want nix repl '<nixpkgs/nixos>' -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix
<infinisil>
CMCDragonkai: And for nix repl you'd have to start it with `nix repl -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix` to get the same result as the command
hexa has joined #nixos
<samueldr>
hmmm, let's say I overrideAttrs a derivation, is there a trick to change its stdenv to an older gcc's stdenv?
<clever>
samueldr: .override { stdenv = ... } first
<samueldr>
oh, makes sense
jluttine has quit [Ping timeout: 240 seconds]
silver has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @marsam closed pull request #71134 → ispc: set doCheck to false. → https://git.io/Je8zU
<selfsymmetric-mu>
When launching Lutris, I get "Lutris was unable to detect Vulkan support for the i386 and x86_64 architecture". Anyone have Vulkan working?
Chiliparrot has joined #nixos
<{^_^}>
[nixpkgs] @nixos-channel-bot pushed 334 commits to nixos-unstable: https://git.io/Je2sC
<andrewrk>
hi, I did a `rebuild switch --upgrade` on the unstable channel recently, and now gnupg pinentry is configured to use terminal. this is ok except now I can no longer send emails, is there a way to get the other behavior back?
aw has quit [Quit: Quitting.]
spacefrogg has quit [Quit: Gone.]
aw has joined #nixos
spacefrogg has joined #nixos
tmaekawa has joined #nixos
bhipple has quit [Remote host closed the connection]
<infinisil>
Seems to indicate `programs.gnupg.agent.enable = true` should make it work again
<wedens[m]>
I fail to interpret this line: "Note that upstream recommends using <literal>gpg-agent</literal> and will spawn a <literal>gpg-agent</literal> on the first invocation of GnuPG anyway."
<colemickens>
On my nixos vm after upgrading the nixos-unstable channel and rebuild switching: Failed to start sysinit.target: Transaction order is cyclic. See system logs for details.
<colemickens>
:|
zupo has joined #nixos
<{^_^}>
[nixpkgs] @nixos-channel-bot pushed 8 commits to nixos-unstable-small: https://git.io/Je2nZ
<vonfry>
I want to get a path for a package, but this package doesn't contains a bin dir, so I cannot use nix-store with which. I know ~ls /nix/store | grep xxx~ can get what I want, but I only want to get the path of package in current generation.
<vonfry>
Then I find ~nix-env -q --out-put~, but it cannot work on nixos because of I cannot find a profile for system
<colemickens>
You could probably figure it out from looking at: nix-store -q --graph /run/current-system
<vonfry>
tilpner: Sorry, I cannot understand. I can use that to find the system generations, and go into that dir to find something. But the package is not found in this dir(share or manpage). And other options of nix-env such as `-q` cannot print anything. That package seems not a buildInput. What do I miss?
<{^_^}>
[nixpkgs] @jojosch closed pull request #72310 → dbeaver: use github release as src → https://git.io/Jez3q
magnetophon has quit [Ping timeout: 276 seconds]
cswl has quit [Quit: Connection closed for inactivity]
<vonfry>
tilpner: Thank you. I understand. Use this to find system generation, and then I can use nix-store to find package by choosing which generation I want.
Ariakenom has joined #nixos
<tilpner>
vonfry: Which package are you looking for?
hyper_ch2 has quit [Remote host closed the connection]
<vonfry>
tilpner: gsettings-desktop-schemas, an appimage needs to it. I have to export it share path to XDG_DATA_DIRS.
gagbo has quit [Ping timeout: 240 seconds]
gagbo has joined #nixos
dansho has joined #nixos
<tilpner>
vonfry: And you want the path to its output?
<tilpner>
vonfry: Does nix-build --no-out-link '<nixpkgs/nixos>' -A pkgs.gsettings-desktop-schemas work for you?
<tilpner>
(Phrased this way to apply overlays from your config, you can use <nixpkgs> and -A gsettings-desktop-schemas too)
<tilpner>
vonfry: Are you using appimage-run or appimageTools?
<vonfry>
tilpner: nix-build --no-out-link is worked
domogled has quit [Quit: domogled]
<vonfry>
tilpner: I'm using appimage-run
<vonfry>
tilpner: my origin problem is NixOS/nixpkgs/issues/72282
<{^_^}>
[nixpkgs] @Profpatsch pushed commit from @r-ryantm to master « rabbitmq-server: 3.8.0 -> 3.8.1 »: https://git.io/Je2CX
<talqu>
hi, there is slack-4.0.2 package shown on nixos packages website. However doing nixos-rebuild switch does not update my slack package (still have 3.3.8)
<tilpner>
talqu: You're probably on an old channel or haven't updated in a while
<tilpner>
19.09 has 4.0.2
gagbo has quit [Ping timeout: 252 seconds]
gagbo has joined #nixos
<talqu>
tilpner: oh that's right, didn't update the channel
<m1cr0man>
Hey folks. I'm trying to work out a way to set up a php-fpm pool for each user in my LDAP database. I'm wondering if it's possible/sensible to write a sort of fetchFromLDAP function for nix that will query ldap + map the results to an attrset. Is there any functions that do something similar I could look at?
cosimone_ is now known as cosimone
<tilpner>
m1cr0man: Querying a dynamic user database at eval time doesn't seem like a good idea. It will probably change, and you need to re-eval every time
talqu has quit [Remote host closed the connection]
captn3m0 has quit [Ping timeout: 265 seconds]
amfl_ is now known as amfl
<dminuoso>
nix is pure. talking to ldap is impure.
<tilpner>
dminuoso: Nix expressions can have plenty of impurities
<dminuoso>
shhh
<tilpner>
I already cautioned against doing this, but "nix is pure" is wrong
lukash_|away is now known as lukash_
<tilpner>
Especially without sandboxing and restricted mode
<m1cr0man>
tilpner: yeah, that was my main concern. I was considering writing a service that would return a fixed set of results until it gets an update instruction. Even then, it might still make more sense to write a service to build the configs
<m1cr0man>
It feels like a bit of a bit of an antipattern either way
MinceR_ has joined #nixos
MinceR has quit [Ping timeout: 265 seconds]
<etu>
m1cr0man: you could in theory have a ldapdata2nix script that fetches the user data from ldap and writes a json or nix file that you use to do the configuration. That way it would be pure and controlled.
<m1cr0man>
etu: Yeah actually that could work. I would just need to encrypt the file in git or otherwise not commit it, but that would work great.
toppler has joined #nixos
captn3m0 has joined #nixos
hmpffff has quit [Quit: nchrrrr…]
Tucky has quit [Ping timeout: 268 seconds]
alter2000_ has joined #nixos
hmpffff has joined #nixos
talqu has quit [Remote host closed the connection]
<__monty__>
m1cr0man: If you go the not committing route, I recommend putting a symlink rather than the file in the repo. That way you can't commit it by accident.
zupo has joined #nixos
gagbo has quit [Ping timeout: 268 seconds]
gagbo has joined #nixos
joshuagl has quit [Ping timeout: 268 seconds]
gxt has joined #nixos
<azazel>
journalbeat on 19.09 doesn't work anymore.... is anyone using it?
<__monty__>
m1cr0man: There's also https://git-secret.io but whether you want to use it depends on your threat model.
exfalso has joined #nixos
<exfalso>
Hi, is there a builtin for calculating the intersection of two attribute sets?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Twey>
Is there an equivalent to `buildFHSUserEnv` that *doesn't* build an FHS env? I.E. chroots the builder/shell into a sandbox with the specified build inputs but without global paths?
<__monty__>
NinjaTrappeur: Yep, was split up. Definitely less intimidating this way. I had to get used to it too though.
drakonis has quit [Ping timeout: 240 seconds]
drakonis_ has quit [Ping timeout: 250 seconds]
cosimone has quit [Quit: Terminated!]
ajirx has quit [Quit: Leaving]
ajirx__ has quit [Quit: Leaving]
toppler has joined #nixos
ajirx has joined #nixos
<globin>
__monty__: how does one find the rest now?
<__monty__>
What do you mean?
<NinjaTrappeur>
__monty__: I see. I do share globin's concern though. The ctrl-f at the top of the page trick to find the appropriate section does not work anymore :(
<__monty__>
Searching the toc's a little harder because you get hits from the rest of the manual.
<NinjaTrappeur>
^ yes
<__monty__>
Most of the time you know the broad section though.
<__monty__>
And then you ^f that.
<__monty__>
It can be handy because you get history results in your browser for the "language infra" section for example. But yes, trade-offs.
<globin>
ah I didn't notice that only the TOC is split up
<globin>
hmm it feels weirder than before
<NinjaTrappeur>
Yeah, I guess it's an acceptable one if it makes onboarding less intimidating
<NinjaTrappeur>
Could we populate the full TOC in an appendix at the very bottom of the page?
<__monty__>
globin: Only because we're used to the massive TOC. It looks very messy/intimidating to new users.
<globin>
hmm, the thing is I find it harder to skim the TOC looking for something and having to think of in which category it could be in vs just looking for the keyword I'm interested in
<__monty__>
globin: Yes, and the toc's still huge. But look at this as a step, not a complete solution to the UX issues : )
hyper_ch2 has quit [Remote host closed the connection]
<__monty__>
Well, maybe not *huge* I was looking at the NixOS TOC.
<{^_^}>
[nixpkgs] @sylv-io opened pull request #72774 → nixos/libinput: apply options to all device types → https://git.io/Je28H
JonReed has joined #nixos
<Twey>
If I set `phases = [ "fooPhase" ];` in a derivation, does it stop the default phases from being executed? I thought it did, and it looks like it does by looking at the setup script, but I'm getting an error that seems to come from the build phase: https://hastebin.com/xijosuheha.json
<Twey>
wedens[m]: Yep, that's right — I want to collect licenses from all requisites of a particular package
<Twey>
So my current approach is to build an overlay that does no building but just records the license of each package as the output, then use nix-store -qR to get them all
<clever>
Twey: i'm guessing that you broke the stdenv and the stdenv is now unable to run buildCommand
<{^_^}>
[nixpkgs] @nixos-channel-bot pushed 6 commits to nixpkgs-19.09-darwin: https://git.io/Je2lv
<{^_^}>
[nixpkgs] @globin pushed 4 commits to structured-attrs: https://git.io/Je24j
<gchristensen>
fpletz++ globin++ you both do such heroics. openssl, gcc, structured attrs. thank you
<{^_^}>
fpletz's karma got increased to 7, globin's karma got increased to 8
silver has joined #nixos
<evanjs>
Hrm. Any thoughts on what to check first when lorri is doing _nothing_ in a project? .envrc and shell.nix and etc are present
drakonis1 has quit [Read error: Connection reset by peer]
alter2000_ has joined #nixos
<__monty__>
evanjs: You direnv allowed? The daemon's running?
<__monty__>
You have the shell hook?
<evanjs>
__monty__: yaya everything looks fine
<evanjs>
Of course maybe just progress reporting is less verbose than I initially thought. I see the direnv export stuff in shell now. Opening emacs again to test
<__monty__>
evanjs: Oh, lorri only says "Started" and then the result of a build *when* it finished.
<__monty__>
Maybe you need more patience? : )
<evanjs>
__monty__: yeah I figured as much. And yes I think that was it, as I'm used to direnv or etc giving me results right away.
<evanjs>
I was planning on making it a user service anyway, so maybe I can just RUST_LOG=lorri=info or etc
<evanjs>
I can run the daemon from anywhere, right? Or just individual projects?
<__monty__>
Anywhere, `lorri watch` was the project specific command.
<__monty__>
I believe they're working on incremental output btw, so during the build, rather than only at the end.
<evanjs>
__monty__: ohhh gotcha. Guess I've been expending more energy that I've needing to so far lol. And sounds good. Super happy it's a Rust project. Maybe I should see if there are some easy open issues...
<Twey>
clever: I'm confused by it because the `buildCommand` doesn't invoke gcc anywhere — and the script seems like it should only be running `buildCommand`, which doesn't involve calling gcc
<{^_^}>
[nixpkgs] @roberth merged pull request #71301 → p4v: explicitly depend on openssl 1.0 series → https://git.io/Je4QO
<clever>
Twey: buildCommand is ran by the stdenv, which is ran by the args for builder
<Twey>
clever: But the error is specifically this one: /nix/store/m7q0crzg1s3hvja1ri6nsc8zim92bgii-bootstrap-stage1-gcc-wrapper: line 1: $'\302\253unspecified\302\273': command not found
bvdw has quit [Read error: Connection reset by peer]
<Twey>
clever: I don't understand where /nix/store/m7q0crzg1s3hvja1ri6nsc8zim92bgii-bootstrap-stage1-gcc-wrapper is being invoked at all
gnidorah has quit [Quit: Connection closed for inactivity]
<Twey>
The builder itself is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/bash, which seems like a perfectly usable bash
gagbo has joined #nixos
<Twey>
There shouldn't be any compilation required to run `buildCommand`, surely?
<exarkun>
even though it's only for the tests, looks like
<exarkun>
heh and `doCheck` is false.
mexisme has joined #nixos
<Twey>
wedens[m]: Nice post! Unfortunately this doesn't necessarily include all dependencies… since there might be dependencies other than those in `buildInputs`, like in the string contexts of attributes, and those only allow you to find the derivation path in the store, so you can't get back to the runtime derivation (which may never actually be exported from its scope, anyway)
<Twey>
wedens[m]: Which is how I ended up with this overlay approach
sigmundv_ is now known as sigmundv
<exarkun>
so ... why don't I see pebble in `nix-store --query --tree /nix/store/iplcjgixa1d25rqhpmfzjpzca5ni8wpc-certbot-0.39.0/bin/certbot`?
<exarkun>
or why does morph download pebble if it isn't really a runtime dependency of certbot?
mexisme has quit [Ping timeout: 250 seconds]
gagbo has quit [Ping timeout: 240 seconds]
<xd1le>
Twey: I'm interested in your approach to collect requisite licenses for a particular package, is it public or are you planning to make it public?
gagbo has joined #nixos
<Twey>
xd1le: If it works and you're interested, I'll try to get company approval to open-source it/write a blog post about it
<__monty__>
Twey: Is it hard because you want the actual license file? You should just be able to read meta.license recursively, right?
<xd1le>
Twey: it's also been on my general todo list for a whil, just low in priority
<xd1le>
__monty__: yes I assume so
<nurelin>
Does anyone knows how to build https://github.com/NixOS/nix/pull/3185 ? There seems to be at least three build systems, some of them using previous nix builds.
<{^_^}>
nix#3185 (by Ericson2314, 4 days ago, open): WIP: Windows support -- depends on Meson build system (#3160)
<Twey>
__monty__: No, it's because it's really tricky to get the meta
dansho has quit [Ping timeout: 252 seconds]
<xd1le>
oh my bad
dansho has joined #nixos
<Twey>
__monty__: It's easy to get the dependency graph for a package (in terms of .drv files in the store), but those don't have any attributes in them that aren't used in the build… and on the other side of the coin it's very tricky to get a complete dependency graph for a package in Nix (since there may be packages defined in scopes that aren't even exported)
<Twey>
__monty__: I have an alternative approach that makes a less drastic change to mkDerivation by just putting the license into the build environment, and then you can query it out with nix-store -qb… but that involves rebuilding the whole world, and I'd rather have an approach that avoids that
<Twey>
So my current approach is to put *only* the license into the build environment and try to prevent things from actually building, but you have to be quite careful about which things you override
realrokka has quit [Ping timeout: 240 seconds]
<__monty__>
Hmm, there's no way to go from drv -> package?
<adisbladis>
drv -> attr? Nope :(
<etu>
__monty__: Not other than searching for the name in nixpkgs...
<Twey>
__monty__: In general, no :( There are some hacks you can use to get some cases (e.g. walking the pkgs tree and checking if the drvPath matches), but there's no guarantee that every derivation object will even be exported
<Ericson2314>
@nurelin:matrix.org it doesn't build in Windows yet, or at least I haven't gotten it to
zupo has quit [Ping timeout: 246 seconds]
<Ericson2314>
See my Nixpkgs PRs (on phone so harder to link). I am fixing some windows cross compilation issues so I can build Nix in all ways comfortably from my linux machine
<Twey>
clever: Shouldn't it not break the stdenv's dependencies, though, because the base stdenv is `super.stdenv`?
<clever>
Twey: hmmm, yeah, i'm not sure then
<clever>
Twey: you would need to strace the nix-daemon to see what its doing
<Ericson2314>
If you would like try and have windows with visual studio, use the Meson one. The others should be deleted.
<Twey>
clever: I do think you're right, I think it's failing to build the builder… but I don't understand why
<{^_^}>
[nixpkgs] @cab404 opened pull request #72777 → [fix] android-studio: added certificate bundle to /etc/pki → https://git.io/Je2RW
<{^_^}>
[nixops-aws] @AmineChikhaoui pushed 2 commits to master: https://git.io/Je2Ra
<veleiro>
Hello, I've been having problems with services.xserver.videoDrivers on an older machine with a Radeon HD 6350. No matter the values I add to videoDrivers, I always end up with modesetting
<Ericson2314>
nurelin by hand. (
<veleiro>
I believe its one of the GPUs that needed nonfree firmware so i have this set too: hardware.firmware = [pkgs.firmwareLinuxNonfree] but not sure if its applying correctly. I dont see any errors in dmesg or xorg logs about the radeon drivers not loading or anything
<Ericson2314>
@nurelin:matrix.org that's another reason I'm building with Nixpkgs
<etu>
veleiro: From what I remember from my gentoo days. The driver (in kernel) named radeonhd were actually pretty good...
chreekat_ has quit [Ping timeout: 268 seconds]
xkapastel has joined #nixos
<{^_^}>
[nixpkgs] @globin pushed 2 commits to structured-attrs: https://git.io/Je2RM
<nurelin>
Ericson2314: no problem, I will give it a try
johnny101 has quit [Quit: Konversation terminated!]
dreverri has quit [Remote host closed the connection]
dreverri has joined #nixos
cosimone has joined #nixos
k41 has quit [Ping timeout: 240 seconds]
<{^_^}>
[nix] @edolstra opened pull request #3205 → Recursive Nix support → https://git.io/Je20X
dreverri has quit [Ping timeout: 246 seconds]
toppler has quit [Ping timeout: 252 seconds]
shibboleth has quit [Remote host closed the connection]
chreekat_ has quit [Ping timeout: 276 seconds]
hisham has joined #nixos
alter2000_ has quit [Ping timeout: 240 seconds]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
wormwood has joined #nixos
<infinisil>
Wow! ^^
dreverri has joined #nixos
<infinisil>
Suddenly recursive nix!
<dminuoso>
veleiro: Now if only nix didn't have deficiencies like lack of documentation.. lack of a strong module system... lack of types.. :p
<dminuoso>
Imagine what we could have.
<infinisil>
dminuoso: By module system you mean what flakes will do?
toppler has joined #nixos
<infinisil>
Or the nixos module system?
endformationage has joined #nixos
johnny101 has joined #nixos
<veleiro>
Of those things I've only needed the documentation part
<samueldr>
>> This PR also adds some ccache-like functionality to Nix's makefiles that wraps GCC calls in Nix derivations to enable caching and remote builds. This requires recursive Nix when you want to do this inside a Nix build.
<manveru>
still not sure if that's for _all_ GCC builds, or only nix itself
<manveru>
but looks cool af :)
<dminuoso>
infinisil: Not quite. Im rather talking about a file module system. Right now import is basically closer to an eval, but it might be interesting if we could have a module with a bunch of nix expression inside.
<dminuoso>
With definable exports, etc..
<dminuoso>
veleiro: "need" is a bit difficult. Having worked with highly expressive type systems, its extremely annoying to write any non-trivial code in nix.
<samueldr>
manveru: looks like it's to nix's makefile
<dminuoso>
You don't need Intel® 64 and IA-32 Architectures Software Developer Manuals either for low level work, but I'd rather have them than not have them...
<{^_^}>
[nixpkgs] @FRidh pushed commit from @ijaketak to master « rictydiminished-with-firacode: fonttools requires python3 (#72762) »: https://git.io/Je2Eg
<manveru>
is there any experiment with hnix to add types yet?
<wedens[m]>
what's a good pre-flakes approach to living without channels?
<manveru>
wedens[m]: we use niv for that
<adisbladis>
wedens[m]: Have a local git checkout of nixpkgs, point NIX_PATH to it
<wedens[m]>
manveru: do you use it for nixos?
<manveru>
wedens[m]: yeah
<azazel>
hi manveru!
<wedens[m]>
adisbladis: nixpkgs repo is pretty heavy to clone on all machines...
<immae>
wedens[m]: I completely abandonned channels in favor of NIX_PATH. There is only nix-env for which you need extra care and specify "-f '<nixpkgs>'" each time you call it (otherwise it will look for channels), but other than that it works all right
<manveru>
azazel: heya :)
<adisbladis>
wedens[m]: How are you deploying your machines? I typically don't have a nixpkgs on the remotes
<immae>
and you can use `NIX_PATH=nixpkgs=channel:nixpkgs-unstable` (+ overlays if you want customization) instead of cloning the whole repo
<manveru>
wedens[m]: i use krops+niv+wireguard to deploy all my machines
<adisbladis>
Locally on each node I'd just point NIX_PATH to unstable
<adisbladis>
(the tarball ^)
<wedens[m]>
manveru: how do you bootstrap nixos?
<wedens[m]>
adisbladis: I just do it locally, so no nixops, etc
<immae>
wedens[m]: if you point to a specific file (rather than a moving channel as in my example) I think nix will be smart and download it once only forever (need to check)
<manveru>
basically just pinning hashes for fetchTarball
<manveru>
immae: it's subject to the tarball ttl
<manveru>
so randomly you'll get delays when it redownloads it
<immae>
ah
<wedens[m]>
I've discovered recently that fetchTarball is broken with nixos-install :/
<azazel>
yes but the ttls what is, 1 h?
<immae>
manveru: I hoped it would somehow know that the file doesn’t change, but now that I write it I realize it is quite hard to be that smart :D
chrisaw has joined #nixos
<manveru>
azazel: it's configurable
<manveru>
i set it to 7 days
<wedens[m]>
what happens when it expires and I need to change some nixos option that doesn't need online? :D
<manveru>
it'll fail
<manveru>
if you're offline :)
<wedens[m]>
(just curious, not that I need that often)
<wedens[m]>
I've noticed that ttl applies even to builtins.fetchTarball with specified sha256
<wedens[m]>
which was unexpected
<manveru>
i'm not sure how that interacts... maybe it can be GC'd after the ttl?
<clever>
leo_: if you have a list of lists, its cheaper to use concatLists, that will pre-allocate room for 3 elements, then copy things from each input to the 1 output
<clever>
> [1] ++ [2] ++ [3]
<{^_^}>
[ 1 2 3 ]
<leo_>
I'm concerned about systemPackages.
<clever>
leo_: while this, will copy 1+2->1st, then copy 1+2+3 -> 2nd
<leo_>
If that's the case, it might be better to use a huge systemPackages (as jwiegley does) instead of appending 1 by 1 granularly.
toppler has quit [Ping timeout: 268 seconds]
<clever>
leo_: i would try using concatLists to generate the big list from smaller ones
<clever>
wedens[m]: partially, one min
<leo_>
clever: I'm refactoring my config now that I'm a bit more experienced with Nix*
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @mveytsman to master « nixos/nat: fix typo in comment »: https://git.io/Je2uK
<wedens[m]>
aaron: I think priorities control overriding, not merging
* aanderse
continues reading manual...
<aanderse>
yeah... hmm
<aanderse>
how do i control order in which things are merged then?
<infinisil>
There's different kinds of priorities!
<infinisil>
aanderse: mkBefore/mkAfter/mkOrder
<aanderse>
ohh a functional programmer! yay i'm saved!
<infinisil>
That's the ordering priorities
<infinisil>
And the mkForce/mkDefault/mkOverride ones are overriding prioritie
<infinisil>
s
hyper_ch2 has quit [Remote host closed the connection]
<aanderse>
infinisil++
<{^_^}>
infinisil's karma got increased to 156
alter2000_ has quit [Ping timeout: 250 seconds]
<infinisil>
:D
Baughn has quit [Ping timeout: 245 seconds]
acarrico has joined #nixos
Baughn has joined #nixos
<wedens[m]>
yet another useful and undocumented feature
dreverri has quit [Remote host closed the connection]
<aanderse>
yeah... you sort something because it is hard to read
<aanderse>
then you run a test
<{^_^}>
[nixpkgs] @nixos-channel-bot pushed 6 commits to nixos-19.09-small: https://git.io/Je2lv
<aanderse>
and it crashes hard
<aanderse>
and you realize the ordering was explicit
alter2000_ has joined #nixos
<aanderse>
possibly time to add a comment
dreverri has joined #nixos
<Twey>
I think I might just not understand overlays: https://hastebin.com/edopujewaw.shell . I expected `pkgs.super.overlays` to be empty (i.e. it's the package set without the overlay applied)
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @acowley to release-19.09 « [19.09] backport #71851 handbrake: fix missing audio »: https://git.io/Je2a1
dreverri has joined #nixos
Thra11 has joined #nixos
<Ericson2314>
tetdim: hi
<Ericson2314>
sorry pinged you in wrong channel
<Twey>
https://hastebin.com/tujuyuseza.txt — what's the deal with overrideAttrs? Derivations using `stdenv.mkDerivation` from nixpkgs have it, but derivations I create with `stdenv.mkDerivation` don't?
<Twey>
overrideDerivation, sorry
<Ericson2314>
#nixos-dev
<Ericson2314>
though your PR might be a better topic there
<Ericson2314>
anyways, there is no good way to simplify libsodium other than getting the wrapper dependency
<Ericson2314>
*getting rid of
<Ericson2314>
tetdim: oh wait i have oen more trick
<Ericson2314>
disabler : true
<Twey>
In fact, I can copy-paste the definition of `hello` from nixpkgs into my repl, and it doesn't have an `overrideDerivation` attribute
<Ericson2314>
nope
LysergicDreams has quit [Ping timeout: 246 seconds]
<Ericson2314>
no good
chloekek has joined #nixos
<alexarice[m]>
Twey: I think the overrides are created by callPackage
<alexarice[m]>
though not 100% sure
LysergicDreams has joined #nixos
<adisbladis>
Yes :) override/overrideAttrs are added by lib.makeOverrideable
<adisbladis>
Which is getting called by callPackage
<adisbladis>
Twey: So if you want to you could use lib.makeOverrideable directly
<Ericson2314>
tetdim: the reason it's annoying is because the find_library + declare dependency is not ideomatic
asymmetric_ has joined #nixos
ambro718 has joined #nixos
snake266 has joined #nixos
<tetdim>
so why do you need auto
<tetdim>
why not check with the cpp if it exists
<tetdim>
if exist, build dep
<tetdim>
you still dont need auto
ris has joined #nixos
h0m1 has quit [Quit: WeeChat 2.6]
<Ericson2314>
tetdim: the problem is there is no fixed ordering between "checkingn" and "deciding"
h0m1 has joined #nixos
hexa has quit [Ping timeout: 245 seconds]
<Ericson2314>
enabled -> decide use then check it exists
<Ericson2314>
auto -> check if exists, and decide to use if it does
<Ericson2314>
disabled -> decide not to use, don't check
<snake266>
Hello. I have some trouble: I have BCM43142 network card, but i dont know what i should write in configuration.nix (broadcom-wl for example)
<Ericson2314>
so sometimes you decide then check (enabled) and sometimes you check then decide (auto)
<Ericson2314>
this was the thing that was really hard to get write with autoconf
<Ericson2314>
but meson does it automatically with the required + enable/disable/auto options
<Ericson2314>
enabled -> required too; disabled -> required false; auto -> skip check and force not found
bvdw has quit [Read error: Connection reset by peer]
<sondr3>
anyone here used PostgreSQL in a `shell.nix` file? I keep getting `FATAL: could not create lock file "/run/postgresql/.s.PGSQL.5432.lock": Permission denied`
<sondr3>
I created the directory as `root`, so my regular user has no access
mexisme has joined #nixos
bvdw has joined #nixos
<sondr3>
and the guides I've found just go from initdb to running it without hitting this error
<gchristensen>
probably the best bet is to change all the run-time / data dir params to use something in ./
knupfer has joined #nixos
<sondr3>
I can't figure out how to change the lockfile location, the rest is fine
<clever>
sondr3: ah, i think it has to do with the postgresql version, i did have code here to change it, but it was messy, so i went with the older version
<samueldr>
postgres -i -D $somedir IIRC
<samueldr>
not sure why -i
Ariakenom has joined #nixos
<sondr3>
I get the same error with that command, I'm using the postgresql_11 package, might be something to do with it?
<samueldr>
ah, for tcp/ip, I guess so I wouldn't need to setup the socket
<clever>
sondr3: try again with just pkgs.postgresql
<samueldr>
might have had issues specific to the app environment though
<samueldr>
-k can set the UDS location
<sondr3>
woo, got it working with `postgres -i -k (pwd)/.tmp/sockets/ -D .tmp/database/`
<exarkun>
it seems to be /run/user. I guess morph is putting stuff there.
dreverri has quit [Remote host closed the connection]
<symphorien>
TMPDIR points there maybe
<sauyon>
gchristensen, iqubic: thanks!
<johanot>
morph does that yes. Are we missing a cleanup step?
dreverri has joined #nixos
<sauyon>
is there a way to just inherit the whole attrSet?
<symphorien>
// ?
<sauyon>
?
<symphorien>
Instead of
<sauyon>
`inherit ...`
<symphorien>
> let b = { a = 1; } in { inherit (b) a; }
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):270:20
<symphorien>
> let b = { a = 1; }; in { inherit (b) a; }
<{^_^}>
{ a = <CODE>; }
<symphorien>
> let b = { a = 1; } in { } // b
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):270:20
<symphorien>
> let b = { a = 1; }; in { } // b
<{^_^}>
{ a = 1; }
<sauyon>
the main issue here is that I don't have a name for the outer attrSet
dreverri has quit [Ping timeout: 240 seconds]
<sauyon>
I could just let rec above I guess?
reallymemorable has joined #nixos
<symphorien>
I don't really understand
<sauyon>
I have a global attrSet, which I want to pass to an import
<exarkun>
johanot: I wouldn't say it's obviously cleanup related. Available space on /run/user (actually /run/user/0) doesn't seem to be shrinking. But the ~ 1 GiB that something allocated to it isn't enough to hold the whole build's working state, I guess? Or whatever the peak utilization is, at least.
<sauyon>
Because I'm lazy and I'd like to modularize my configuration. Honestly `inherit a b c` works well enough, so I guess it doesn't really matter.
civodul has joined #nixos
<infinisil>
sauyon: Perhaps you could show the code in its entirety, much easier to give refactoring advice with that
<symphorien>
import file attrset instead of import file { key = value ; }
<symphorien>
The braces there are not part of the syntax
<exarkun>
/run/user seems to be a pam_systemd thing and not really intended for large working sets (but I dunno who gets to decide what "large")
<{^_^}>
[nixpkgs] @risicle opened pull request #72798 → [r19.03] file: add patch for CVE-2019-18218 → https://git.io/Je2oJ
<exarkun>
It seems to be intended for things like control unix sockets and lock files
<johanot>
exarkun: morph doesn't put anything "large" in temp (/run) iirc. just eval-machines.nix and some other working files, never outputs or similar.
<johanot>
but with many morph builds, it all adds up, of course
<exarkun>
johanot: This was the first morph build on a fresh VM. :/
<symphorien>
Ah a fixpoint
<exarkun>
johanot: The machines include some Haskell stuff which uses haskell.nix. Maybe just a coincidence but that's where it died, "tar: hackage/yi-0.7.1-r0-1b49077773f4a22aad5e060a41909b3188b31b349aca47a91db2d9e54e4ed505.nix: Cannot write: No space left on device"
<johanot>
hmm, well, I don't know what problem you are seeing. I just know for sure that morph does lack a temp-file cleanup procedure :) don't know if your issue is morph-related though
<symphorien>
Don't know. Maybe try to figure out what a scope is
<exarkun>
I bind-mounted something from / over-top of it :( and the build is happily proceeding now
<johanot>
if it works now, don't touch it :)
<exarkun>
I'm not really sure what I would want to work differently. I'm kind of generally annoyed by this random new piece of complexity in the system.
<exarkun>
johanot: sure, it works on this one VM until it reboots...
<exarkun>
and I get to add "boot.runsize" to impurities that affect the output of this build.
<exarkun>
actually I'm not sure boot.runSize controls this
<exarkun>
I think it's pam_systemd and it might not be configurable
<{^_^}>
[nixpkgs] @flokli pushed 2 commits to staging-19.03: https://git.io/Je2KR
toppler has quit [Ping timeout: 240 seconds]
cyraxjoe has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @worldofpeace opened pull request #72800 → Drop Xfce 4.12 and promote Xfce module and packageset to 4.14 → https://git.io/Je2Kg
cyraxjoe has joined #nixos
wildtrees has quit [Quit: Leaving]
cyraxjoe has quit [Read error: Connection reset by peer]
<live2live>
does nix have (or may be interested in having) an easy way to vote, comment, and read comments before installing like with the archlinux aur and aur helpers?
<live2live>
this is a really useful feature to know what wont work but also what tweaks could be used to make a pkg work, and nix still has many fhs-caused issues, to name only those
<sauyon[m]>
do you mean for the NUR?
cyraxjoe has joined #nixos
<selfsymmetric-pa>
live2live: That would be a great feature! I really appreciated that in the AUR.
selfsymmetric-pa has quit [Remote host closed the connection]
chloekek has quit [Ping timeout: 265 seconds]
HedgeMage has joined #nixos
aindlq has quit [Quit: Leaving.]
gagbo has quit [Quit: I'm out !]
gagbo has joined #nixos
orivej has joined #nixos
Guest30070 is now known as ghost64
toppler has joined #nixos
knupfer has quit [Ping timeout: 245 seconds]
domogled has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @andir pushed 117 commits to staging-19.09: https://git.io/Je2KD
equivrel has joined #nixos
philr has quit [Ping timeout: 245 seconds]
<CMCDragonkai>
nix-prefetch-url gives me a shorter than for sha256 compared to sha256sum
<CMCDragonkai>
does it use a different base encoding?
<andi->
yes
<CMCDragonkai>
what is the base encoding?
<andi->
most likely the custom base32 that nix used before base32 was a thing
<infinisil>
CMCDragonkai: You can use nix-hash to convert hashes if needed
equivrel has quit [Read error: Connection reset by peer]
<blitzclone_>
Hey everyone. I'm trying to capture a coredump when building a derivation. Is there some support for collecting coredumps in NixOS already?
gagbo has joined #nixos
<blitzclone_>
specifically, ghc crashes reliably building cabal
<infinisil>
CMCDragonkai: Nix accepts hex as well fyi
<infinisil>
(And maybe base64 too?)
<Ericson2314>
tetdim: awwwwk linking of libexpr broke
<blitzclone_>
infinisil: but that was helpful anyway, because I discovered coredumpctl and it actually did catch the core. ;) sorry, I'm spoiled by abortd on Fedora...
<Ericson2314>
some boehm gc thing
<Ericson2314>
not sure what's up
<Ericson2314>
sorry!
<infinisil>
blitzclone_: Oh nice, I never knew about coredumpctl myself
<{^_^}>
[nixpkgs] @kirelagin opened pull request #72802 → More flexible systemd expression for minimal builds → https://git.io/Je26U
dreverri has joined #nixos
<iclanzan>
I am trying to use a custom kernel version in NixOS. Can anyone point me in the right direction?
<{^_^}>
iclanzan: 29 weeks, 2 days ago <infinisil> To fix the hfmt build on 19.03: mkdir -p ~/.config/nixpkgs/overlays && curl https://paste.infinisil.com/5AEb9fyR-c.nix > ~/.config/nixpkgs/overlays/hfmt-fix.nix