<bbarker>
Hi, I just added some nix expressions for this repo here: https://github.com/bbarker/MazesOfMonad/commit/41faa71643c0433f2af7d2450fe5f3d1d90d4aef - when I run `nix-shell` to execute default.nix, I notice that even if I don't change anything in the directory, a new store path is generated each time. Why is this, and how to avoid it? I suspect it is because src = ./. isn't hashed properly
<jonreeve>
When I try to build haskellPackages.rdf4h, using, say, `nix-shell -p haskellPackages.rdf4h`, it fails at the last second because of some bug with its test suite. (https://github.com/robstewart57/rdf4h/issues/39)
<{^_^}>
robstewart57/rdf4h#39 (by juhp, 1 year ago, open): test-rdf4h: rdf-tests/turtle/manifest.ttl: openFile: does not exist (No such file or directory)
silver has quit [Quit: rakede]
<jonreeve>
So the whole build fails.
<jonreeve>
Is there a way to tell nix not to run tests, so that this package might build?
<samueldr>
ideally, you'd patch only failing tests out
<samueldr>
(you then need to re-generate the hackage-packages.nix file)
Supersonic has joined #nixos
<jonreeve>
Would there be a way to change my project's shell.nix file in some way so that it replaces the broken-tests `rdf4h` dependency with something like `dontCheck rdf4h`?
<wpcarro>
Any nix-darwin users free to lend a hand?
<elvishjerricco>
wpcarro: Sounds like your NIX_PATH doesn't have "darwin-config=/Users/wpcarro/.nixpkgs/darwin-configuration.nix"
<disasm>
so `configure.customRC`
<wpcarro>
elvishjerricco: strangely enough, it did at the time. My workaround was to reinstall and change my shell from ZSH to Bash, and then somehow everything started functioning
Czen has joined #nixos
<elvishjerricco>
wpcarro: Ah. I'm guessing NIX_PATH isn't properly set in the zsh configs
<wpcarro>
I think the /etc/static/bashrc couldn't be sourced at first because the shell was ZSH and that was maybe silently failing
<wpcarro>
so for now I'm just gonna use bash
<elvishjerricco>
wpcarro: Does ZSH source /etc/bashrc?
fragamus has joined #nixos
<wpcarro>
I'm not sure that it does... I was manually sourcing it when debugging, which obviously is problematic
<disasm>
elvishjerricco: I don't think so, why would you want it to?
<elvishjerricco>
disasm: Not saying you would. But it sounds like ZSH with nix-darwin does not get NIX_PATH
<wpcarro>
Also... do all nix-darwin users reboot their computers after changing dock and keyboard settings? For me, this was the only way I could see the effects
<wpcarro>
I would `rebuild switch` and then restart
<elvishjerricco>
wpcarro: I don't use those features of nix-darwin yet, sorry
<disasm>
I think logout/login works wpcarro
<wpcarro>
elvishjerricco: no worries. thanks for sharing
<wpcarro>
disasm: ah that'd be nice. I'll try now
<wpcarro>
I wish there was a CLI alternative
<elvishjerricco>
I thought there was a way to restart the dock
<disasm>
kill the PID :)
<elvishjerricco>
I'm guessing relaunching Finder doesn't also relaunch the Dock?
<kalbasit[m]>
it's obvious that buildBazelPackage itself is broken because it relies on network not available within sanbox
<kalbasit[m]>
is there a way to enable network access from within a derivation?
sbdchd has quit [Remote host closed the connection]
<{^_^}>
[hydra] @kquick opened pull request #596 → Update prompt for Local path input to indicate a URL is also valid. → https://git.io/fAauY
rauno has joined #nixos
graphene has quit [Remote host closed the connection]
graphene has joined #nixos
gspia has joined #nixos
sb0 has quit [Quit: Leaving]
<colemickens>
What happens if the Makefile puts everything in $(out)/usr/bin ?
<colemickens>
Do I need to move it to $(out)/bin ?
<teto>
I would like to wrap a program to call another one after its execution. What would be the upstreamable way ? wrapProgram has a --run flag but not a --post-run one
<{^_^}>
[nixpkgs] @xeji pushed commit from @dywedir to master « rclone: 1.43 -> 1.43.1 (#46448) »: https://git.io/fAazw
<{^_^}>
[nixpkgs] @xeji merged pull request #46449 → qemu: port musl patch to new version → https://git.io/fAana
<{^_^}>
[nixpkgs] @xeji pushed commit from @dtzWill to master « qemu: port musl patch to new version (#46449) »: https://git.io/fAaz6
ydlr has quit [Remote host closed the connection]
barrucadu has quit [Ping timeout: 252 seconds]
<LnL>
elvishjerricco: yeah, if it works I can reimplement my code-signing branch using that, fixing the main problem it has now
barrucadu has joined #nixos
barrucadu has quit [Changing host]
barrucadu has joined #nixos
ydlr has joined #nixos
<elvishjerricco>
LnL: But I wonder if it's maybe something Nix should do on its own? Maybe Nix should detached codesign every single file in the store that has a valid Nix signature and has the executable bit set
<Mateon1>
I see. I am currently on the unstable channel, though, and the version I see is 08.28, which is broken due to a youtube update
<Mateon1>
Ah, you mean nixpkgs-unstable, not nixos-unstable
<ekleog>
sevanspowell[m]: I've never used fetchgitPrivate, but would guess if you disable sandboxing then this will work (not sure whether there's a way to do it without disabling sandboxing, then)
<Mateon1>
Didn't know there was a difference
<ekleog>
Mateon1: yeah, nixpkgs-unstable is basically latest-hydra-evaluation, afair :)
<ekleog>
nixos-unstable has, in addition to that, the set of tests that's currently blocking it from going forwards
<ekleog>
but having untested stuff for youtube-dl likely wouldn't hurt
<ekleog>
(for your whole system it would be… daring, to say the least)
<LnL>
yeah, you don't need to switch your entire system
tzemanovic has quit []
<LnL>
my machine mixes packages from 3 different channels :)
<kandinski>
how can I find what' the latest git commit of nixpkgs that I rebuilt my system from?
Izorkin has quit [Read error: Connection reset by peer]
<Mateon1>
Damn... No luck: `nix-env -iA nixpkgs-unstable.youtube-dl` `replacing old 'youtube-dl-2018.08.28'` `installing 'youtube-dl-2018.08.28'`
<kandinski>
my current build, I mean. Is that commit hash anywhere?
<sevanspowell[m]>
ekleog: Thanks, how do I disable sandboxing?
<elvishjerricco>
`builtins.fetchGit` does not need the impurity that `fetchGitPrivate` needs
<elvishjerricco>
`builtins.fetchGit` will just use your user's SSH creds, as `git` will be invoked as a subprocess of the nix program, i.e. not through the daemon or anything
Ariakenom has joined #nixos
<ekleog>
… ooooh :(
<sevanspowell[m]>
I'll look into that elvishjerricco, thanks.
<ekleog>
so the idea of having nix expressions be “safe” for some definition of “safe” when sandboxing is enabled is now dead :(
<ekleog>
(it's not a valid hash fwiw, not more than the sha256 is correct)
<ekleog>
I wonder if restricted mode could actually be used to build packages
<ekleog>
like, intuitively no, but…
<elvishjerricco>
ekleog: hydra operates in restricted mode
<ekleog>
oh? at least that's nice :)
<elvishjerricco>
So I guess we'll never see builtins.fetchGit in nixpkgs
<ekleog>
so that means builtins.fetchGit cannot actually be used in nixpkgs
<ekleog>
now, for the 1-click-install… :/
<ekleog>
elvishjerricco: can I quote the following sentence in opening an issue? <elvishjerricco> `builtins.fetchGit` will just use your user's SSH creds, as `git` will be invoked as a subprocess of the nix program, i.e. not through the daemon or anything
<elvishjerricco>
Sure. What's the issue? You don't think it should do this by default?
<ekleog>
I think it should be hidden behind a flag :)
<elvishjerricco>
Hm
<ekleog>
(with a clear error message to say how to enable the flag)
<elvishjerricco>
No, fetchGitPrivate is far worse IMO
<ekleog>
well, disabling sandboxing is bad, but transparently disabling sandboxing without user action is worse imo
<elvishjerricco>
It's not disabling sandboxing though. It's just making some files readable. Maybe it's not ideal, but it's not disabling sandboxing
<ekleog>
(got a github handle you'd like me to cc?)
<elvishjerricco>
@ElvishJerricco
<ekleog>
well, ssh private keys are supposed to be private in my opinion :°
<elvishjerricco>
The keys are not made readable to anyone
<ekleog>
I agree that I'm taking the worse-case scenario, but I personally have my passwords in a private git repo :)
<ekleog>
(encrypted, sure, but that's still one layer of security that disappears)
<elvishjerricco>
So you're worried about malicious Nix code putting your private repos in your store?
<ekleog>
some source code in private git repos can also be intellectual property
<ekleog>
yup
<andi->
http://howoldis.herokuapp.com/ is a bit misleading... it says "nixos-unstable" was last updated 1 day ago.. When you click on the link you see "Released on 2018-09-06 11:52:22". IIRC thats >1 day ago :/
<elvishjerricco>
ekleog: Hm... Well, you're going to have this problem anyway
<ekleog>
esp. as nix advertises that 1-click install is safe :) (though I agree that the question of what we actually do with the installed files is another problem)
<elvishjerricco>
error: access to path '/Users/will/github/nixpkgs' is forbidden in restricted mode
<elvishjerricco>
nix-repl> import ./.
<elvishjerricco>
error: access to path '/Users/will/github/nixpkgs' is forbidden in restricted mode
<ekleog>
> import "${toString ./.}"
<{^_^}>
<LAMBDA>
<ekleog>
sounds like {^_^} is using the wrong one
<ekleog>
> toString ./.
<{^_^}>
"/var/lib/nixbot/state/nixpkgs"
<elvishjerricco>
ekleog: So restricted mode gives read access to everything your user has read access to. Pure mode does not
<ekleog>
If set to true, the Nix evaluator will not allow access to any files outside of the Nix search path (as set via the NIX_PATH environment variable or the -I option), or to URIs outside of allowed-uri. The default is false.
<{^_^}>
nix#2411 (by Ekleog, 19 seconds ago, open): Add a scary warning to the docs that sandboxing doesn't help with untrusted .nix files
johanot has joined #nixos
nD5Xjz has quit [Ping timeout: 245 seconds]
revtintin has joined #nixos
philippD has joined #nixos
woffs has quit [Quit: Gateway shutdown]
xok has joined #nixos
benmachine has joined #nixos
<xok>
I want to create some files, and run those files with docker-compose...
sb0 has joined #nixos
<xok>
I have installed docker-compose already, how do I do this using the configuration files?..
<srhb>
xok: Generally you would write scripts using nix that use docker-compose and your generated files, you needn't rely on an "installed" docker-compose
<srhb>
xok: Look into pkgs.writeText and writeScript and friends.
woffs has joined #nixos
Boomerang has joined #nixos
<{^_^}>
[nixpkgs] @edolstra merged pull request #46401 → [18.09] set min version back to 1.11 → https://git.io/fA2oC
<{^_^}>
[nixpkgs] @edolstra pushed 6 commits to release-18.09: https://git.io/fAawT
<xok>
srhb: that's awesome, but where do I find docs for it?..
<srhb>
xok: Generally you'll have to look at the source, which has documentation of varying quality
<xok>
can you send me an example?..
<srhb>
xok: pkgs/builds-support/trivial-builders.nix has writeScript and writeText for instance :)
<srhb>
I'm a little surprised that didn't yield "undefined variable 'config'" though
johanot has quit [Ping timeout: 250 seconds]
thc202 has joined #nixos
<tobiasBora>
srhb: indeed, thank you very much!
nicko_h has quit [Ping timeout: 252 seconds]
<srhb>
tobiasBora: Sure thing.
graphene has quit [Remote host closed the connection]
jasongrossman has joined #nixos
graphene has joined #nixos
kiloreux has quit [Ping timeout: 245 seconds]
<ekleog>
hmm… how would you go to get a gdb with a custom targetPlatform? before there was a targetPlatform accepted by the gdb derivation, but it looks like there is no longer
<ekleog>
localSystem and crossSystem at nixpkgs-scale don't help afaiu, because here I specifically want build=host=localSystem and target=crossSystem, while they only allow build=localSystem and host=target=crossSystem
johanot has joined #nixos
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamishmack has joined #nixos
<ekleog>
and it looks like passing --arg targetPlatform [same stuff as for crossSystem] doesn't help
johanot has quit [Client Quit]
johanot has joined #nixos
hamishmack has quit [Client Quit]
hamishmack has joined #nixos
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ekleog>
hmm even doing that doesn't help :/ nix-build -I nixpkgs=channel:nixos-unstable -E '(import <nixpkgs> { overlays = [(self: super: { targetPlatform = (import <nixpkgs/lib>).systems.platforms.riscv-multiplatform "32";})]; }).gdb'
kiloreux has joined #nixos
<{^_^}>
[nix] @dingxiangfei2009 opened pull request #2412 → nix repl respects --arg and --argstr → https://git.io/fAaKK
Phillemann has joined #nixos
<Phillemann>
Did anything change recently wrt. either FHS oder /run/user?
<Phillemann>
I tried to get an Android FHS environment using the nix file in the Wiki, but it tells me it cannot find /run/user/1000/env-vars.
<Phillemann>
/run/user is, indeed, empty
__Sander__ has joined #nixos
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<goibhniu>
hi tobiasBora, what channel are you using?
<tobiasBora>
goibhniu: 18.03
<tobiasBora>
but I'm thinking that I may forgot to run channel --update when I setup the channel
<tobiasBora>
let me try to run channel --update and try again
<srhb>
tobiasBora: nix eval nixpkgs.lib.version might also give a clue.
<realrokka>
whats does one have to google for, if he wants to change the gcc flags used by nix-daemon? e.g. reducing compile time with -j or setting march=
<tobiasBora>
goibhniu: isn't unstable supposed to have also the binary availables?
garbas has joined #nixos
<srhb>
realrokka: You mean when nix-daemon builds things, or the build of nix-daemon itself?
<goibhniu>
tobiasBora: yep
<realrokka>
srhb: when nix-daemon builds things
<symphorien>
realrokka: -march is explicitelty forbidden by stdenv
<symphorien>
for -j, look at /etc/nix/nix.conf, there are options build-jobs and cores
<srhb>
realrokka: nix option cores controls the number in -jN for derivations that have parallel building enabled.
orivej has joined #nixos
<tobiasBora>
srhb: I got "error: attribute version in selection path nixpkgs.lib.version not found"
<srhb>
tobiasBora: Ah, I guess nixpkgs itself is not on your NIX_PATH
<realrokka>
thank u very much :)
<goibhniu>
tobiasBora: did the channel update fix it?
<tobiasBora>
srhb: hum, it is: "echo $NIX_PATH => nixpkgs=/home/xubuntu/.nix-defexpr/channel/nixpkgs"
<tobiasBora>
goibhniu: I'm trying
<srhb>
tobiasBora: That's funny.. Does that symlink actually contain a nixpkgs checkout?
<{^_^}>
[nixpkgs] @jethrokuan opened pull request #46471 → et-book: init at 1.0 → https://git.io/fAayY
<tobiasBora>
srhb: when I ls this folder, I have a default.nix, COPYING, nixpkgs...
<srhb>
tobiasBora: That sounds right. Hum.
<tobiasBora>
srhb: there is a file "versions" (with an s)
<tobiasBora>
but the result is not really relevant when I use your command with "versions"
<tobiasBora>
I get <LAMBDA> in all fields like major, majorMinor, minor, patch
<srhb>
versions is quite different from version
<srhb>
But I guess version doesn't even exist in 18.03 then
<srhb>
Oh well
<sphalerite>
srhb: yep
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sphalerite>
tobiasBora: for 18.03, nix eval nixpkgs.lib.nixpkgsVersion should work
<srhb>
sphalerite: Ah, thanks :)
<tobiasBora>
sphalerite: thanks. I get something like 18.03.133192.45f52f765cd
<tobiasBora>
also, 18.03 is not supposed to be the lastest stable?
<srhb>
Yes.
<sphalerite>
yes it is
<sphalerite>
18.09 is still prerelease
<tobiasBora>
ok thanks
hamishmack has joined #nixos
nbardiuk has joined #nixos
<sphalerite>
tobiasBora: I'll try building it myself to see if I can reproduce
hiberno has quit [Quit: WeeChat 1.6]
<benmachine>
oops, I didn't realize 18.09 was pre-release before upgrading to it -- was it October that it was going to graduate?
<tobiasBora>
goibhniu: it compiles new stuff again... (gnupg for now)
<tobiasBora>
sphalerite: ok thanks
<sphalerite>
benmachine: no date set for it yet
<benmachine>
(the manual just says "go to https://nixos.org/channels to see what's available" and it's in there...)
<tobiasBora>
sphalerite: how can you debug such a thing?
<sphalerite>
tobiasBora: nix-store -qR $(nix-instantiate test.nix) to find the drvs for all the deps
<sphalerite>
tobiasBora: compared the gtk2 one with the normal gtk2 using nix-diff /nix/store/...-gtk2.x.y.z.drv $(nix-instantiate '<nixpkgs>' -A gnome2.gtk)
<sphalerite>
found that various X libs were missing, which led me to suspect that noXlibs was set
__Sander__ has quit [Ping timeout: 252 seconds]
<sphalerite>
since I couldn't find it in test.nix itself, that only left netboot-minimal.nix
ryantrinkle has quit [Remote host closed the connection]
mayhewluke has quit [Ping timeout: 246 seconds]
<srhb>
benmachine: ^ I hope that helps
mayhewluke has joined #nixos
<benmachine>
srhb: sounds great, thanks :)
<benmachine>
srhb: sorry I didn't notice your other messages
<benmachine>
but yes, that's the place I was talking about
<srhb>
Great. :)
<{^_^}>
[nixops] @AmineChikhaoui reopened pull request #972 → DO NOT MERGE: Nix 2 out of memory workaround → https://git.io/flbUL
nbardiuk has quit [Quit: Lost terminal]
tzemanovic has joined #nixos
<xok>
srhb: can you help with creating new systemd service?..
Acou_Bass has quit [Ping timeout: 272 seconds]
<sphalerite>
xok: you said yesterday that you're a smart guy. `man systemd.service` and `man configuration.nix` (search for systemd.services in it) should get you sorted in that case
<symphorien>
xok: also grepping into nixpkgs should give you countless examples
nicko_h has joined #nixos
jasongrossman has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
<sphalerite>
__Sander__: your experimental android stuff might be nice to add to NUR, any opinion on that?
<Taneb>
What's the newScope thing in nixpkgs?
lostman has joined #nixos
orivej has quit [Ping timeout: 264 seconds]
<lostman>
I need to pass cabal flags to `callCabal2nix`. The flags change dependencies. There's some option to `appendConfigureFlags` but that is too late; the dependencies have already been computed by then. What is one to do in that case? `haskellSrc2nix` accepts `extraCabal2nixOptions` but `callCabal2nix` which calls it doesn't pass any of such parameters down
<lostman>
any ideas how to do this without rewriting a bunch of functions?
<lostman>
all I need to do is to pass `-f enableA` and then add `A` to `buildInputs`
nD5Xjz has quit [Ping timeout: 264 seconds]
<Taneb>
lostman: I've been having similar problems :(
<srhb>
lostman: I'd patch the cabal file before using callCabal2nix.
<lostman>
srhb: patch it to what?
<srhb>
To include the things you needed.
<lostman>
srhb: ugh, that sounds horrible. I'd rather write my own version of `callCabal2nix`. The functionality is all there it just doesn't pass any config flags down
* srhb
nods
<lostman>
the only "solution" without rewriting the library code I came up with is to redefine `haskellSrc2nix` for that particular package to hard-code the flag
<lostman>
so when `callCabal2nix` is called by that package it gets the flag it needs
carlosdagos has quit [Quit: Connection closed for inactivity]
<sphalerite>
Taneb: it's what enables callPackage
<sphalerite>
Taneb: let callPackage = newScope (pkgs // self); self = { foo = callPackage ./foo.nix {}; bar = callPackage ./bar.nix {}; }; in self
<sphalerite>
Taneb: then if foo.nix has bar as one of its args, it well get filled in from that set
<Taneb>
sphalerite: thanks, I think I've asked the wrong question
<Taneb>
The right question being, I've spotted pkgs/top-level/haskell-packages.nix has a "packageOverrides", is there a way I can override that from the default self: super: {}
<Taneb>
Does anyone know of any code formatters or linters or style checkers or similar for nix files?
<__Sander__>
sphalerite: no
<srhb>
lostman: So if you can live with haskellPackages.callPackage (haskellPackages.haskellSrc2nix { ...; extraCabal2nixOptions = "-f thing"; }) -- that seems rather painless to me.
<lostman>
srhb: how would I use that?
<lostman>
let's say I want to write `myPackage = callCabal2nix ... { };`. What's the cleanest way of passing down the flag?
<lostman>
what I came up with is rather convoluted
simukis has joined #nixos
<srhb>
lostman: Not using callCabal2nix, but using callPackage and haskellSrc2nix directly
<srhb>
You do have to do your own source filtering then, but other than that there's essentially nothing to it
<srhb>
Since you can already callPackage the result of haskellSrc2nix
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__lawlesseel__ has quit [Remote host closed the connection]
<lostman>
let me try that out and see
nD5Xjz has joined #nixos
<srhb>
lostman: I think passing extraCabal2nix options through callCabal2nix should definitely at least have a ticket though, as it's much nicer to reuse it :)
<Taneb>
I was about to suggest we make a github issue for this
<srhb>
Yeah, it's obviously something we want :)
<Taneb>
Shall I make the issue?
<lostman>
there seems to be two kinds of functions in nix: with positional args and with sets as args. wouldn't this require rewriting this to set?
<srhb>
Taneb: Yes please :)
<lostman>
otherwise there's no option to pass optionals, right?
<srhb>
lostman: I think that would be preferable, yes.
<srhb>
lostman: Right.
<srhb>
I'd suggest implementing that as callCabal2nix' and make callCabal2nix a compat wrapper of that.
<lostman>
or is there some magic way to override optional some levels down? `callPackage` works 1 layer, right?
<{^_^}>
#46477 (by Taneb, 1 minute ago, open): haskellPackages.callCabal2nix has no way to specify cabal2nix flags
<srhb>
lostman: This is the quick and dirty version: name: extraCabal2nixOptions: (pkgs.haskellPackages.callPackage (pkgs.haskellPackages.haskellSrc2nix rec { inherit name extraCabal2nixOptions; src = ./. + "/${name}.cabal"; }) {}).overrideAttrs (oa: { src = pkgs.lib.cleanSource ./.; });
<srhb>
Taneb: Thanks!
<sphalerite>
Taneb: hnix can format nix code iirc
<aminechikhaoui>
I have this line in the buildPhase of a derivation "make check-ws${prefix:+-aws--}-tpch-$uuid", is there anyway to make the ${prefix:+-aws--} part evaluated as bash instead of Nix ?
arahael has quit [Ping timeout: 245 seconds]
astrofog has joined #nixos
jasongrossman has quit [Ping timeout: 252 seconds]
<sphalerite>
,escape'' aminechikhaoui
<{^_^}>
aminechikhaoui: '' two single quotes: ''' bash curly bois: ''${} newline: ''\n tab: ''\t any character x: ''\x ''
<sphalerite>
aminechikhaoui: i.e. put a '' before the ${
astrofog has quit [Remote host closed the connection]
astrofog has joined #nixos
<{^_^}>
[nixpkgs] @arianvp opened pull request #46479 → safe-money: Fix dependencies for safe-money-* → https://git.io/fAaxa
<aminechikhaoui>
sphalerite: nice, thanks
arahael has joined #nixos
jasongrossman has joined #nixos
dkibi has joined #nixos
<realrokka>
howto force rebuild a package? I build opencv3 before I installed gtk ... I used a extra .nix file like the manual suggested for python modules. how can I trigger an recompile of the package?
<{^_^}>
[nixpkgs] @shlevy pushed 5 commits to release-18.09: https://git.io/fAapW
<realrokka>
to clearify: i meant recompile, the gtk lib was not installed, so opencv was not linked against it, e.g: it compiled without support for gtk windows
<srhb>
realrokka: Builds do not depend on "installed" libs. They pull them in if they are correctly specified as dependencies.
<srhb>
realrokka: And when the dependencies change, the package will rebuild without specifying --check (in fact, it will fail with --check)
<realrokka>
so I have to create an overlay with the deps specified?
betaboon has joined #nixos
<srhb>
realrokka: Yep. :)
<realrokka>
thank you :) again (◡‿◡✿)
<srhb>
You're welcome.
<srhb>
realrokka: It should be something like: self: super: { opencv = super.opencv.override { enableGtk2 = true; }; }
betaboon has quit [Client Quit]
orivej has joined #nixos
betaboon has joined #nixos
iyzsong has quit [Remote host closed the connection]
<CapsLock>
hi everyone ; I'm trying to install a python3 package (pyllow) ; I use a virtualenv inside a nix-shell (nix-shell -p zlib) ; and it seems to not find zlib library : "__main__.RequiredDependencyException: zlib" ; what am I doing wrong ? :)
<CapsLock>
Pillow* sorry
<infinisil>
CapsLock: Random guess: Add pkgconfig to the packages
<tilpner>
There is python3Packages.pillow
tzemanovic has quit [Remote host closed the connection]
<infinisil>
Ah, yes, much better ^^
<CapsLock>
thanks infinisil it worked <3
sbdchd has joined #nixos
<CapsLock>
tilpner: I expected to use requirements.txt of my project which is a more standard way to work with non-nixos users (besides converting them to nixos :p)
sc_ has joined #nixos
<tilpner>
You can use python3Packages.pillow on any system with Nix installed, not just NixOS
<sphalerite>
CapsLock: pypi2nix may also be relevant. It converts a requirements.txt into a nix expression
<tilpner>
(Well, Linux and Darwin, according to meta)
<CapsLock>
sphalerite: sphalerite good to know, thank you !
<CapsLock>
tilpner: yep, but, I guess, we are not sure in that case we are working on same version of pillow
sbdchd has quit [Ping timeout: 244 seconds]
tzemanovic has joined #nixos
nD5Xjz has quit [Ping timeout: 240 seconds]
jmc has quit [Quit: WeeChat 2.0]
vmandela has joined #nixos
fragamus has joined #nixos
Dedalo has joined #nixos
tzemanovic has quit [Ping timeout: 246 seconds]
tzemanovic has joined #nixos
<{^_^}>
[hydra] @cleverca22 opened pull request #597 → [WIP-do-not-merge] applying various patches and fixing various things → https://git.io/fAVJ5
tzemanovic has quit [Remote host closed the connection]
tzemanovic has joined #nixos
<{^_^}>
[nixpkgs] @nh2 opened pull request #46482 → WIP: haskell: Make linkWithGold use gold also for compiling Setup.hs → https://git.io/fAVUO
<{^_^}>
[nixpkgs] @vcunat pushed 0 commits to haskell-updates-18.09: https://git.io/fAVUw
<nbp>
Is there a way to send a private message to someone on github?
<tilpner>
Nope. They may have contact info available on their profile, and check stdenv.lib.maintainers
<nbp>
This is not a maintainer, a user opened an issue and pasted something which definitely look like a real password.
<nbp>
I editted the post, to replace it.
<nbp>
but a lot of persons probably received it by email.
<sphalerite>
nbp: I think github keeps old versions of edited things now anyway?
<nbp>
That's even worse :/
<qyliss^work>
It does, if you click on where it says "edited"
<nbp>
sphalerite: apparently you can delete it from the history :)
ekleog has quit [Quit: back soon]
<sphalerite>
oh neat
<nbp>
but it is still in 140 mailboxes.
<cocreature>
maybe someone was just really creativ in coming up with a fake password :)
nD5Xjz has joined #nixos
<srhb>
nbp: I think even with the email hidden you can send to them via the github email address feature?
<nbp>
srhb: What is this feature?
<srhb>
nbp: Something like.. ID+username@users.noreply.github.com but come to think of it, I don't know how to get another user's ID.
<xok>
how do I get an IP of newly deployed machine?..
ekleog has joined #nixos
<xok>
I mean from the script...
__Sander__ has quit [Ping timeout: 272 seconds]
<tilpner>
srhb - If yours starts with MDQ6V, you can get it from the API
<srhb>
tilpner: It does not. :/
<tilpner>
Hold on, testing
<nbp>
srhb: is the ID a numerical thing?
<srhb>
nbp: Yep, looks like six digits for me.
__Sander__ has joined #nixos
<nbp>
srhb: I found a 7 digit one.
<nbp>
I will try to send my-self a message
<srhb>
Ah, might just be a newer account
<srhb>
I'm not sure how this feature works at all honestly
<srhb>
Maybe it's just an identity thing
<srhb>
Yeah, it does look like you can't send to it. meh..
<barrucadu>
You can @ their username in a comment, which will at least send them a notification. But a comment saying "Hey @foo, you posted a real password" would be visible to everyone else too...
<tilpner>
Not all of those necessarily belong to some_username though
<infinisil>
Yeah
<infinisil>
And needs s/uniq/sort -u
<tilpner>
Why?
<tilpner>
Oh, right
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FireFly>
ooh, TIL about sort -u... no need to "| sort | uniq"
<sphalerite>
Random wish: that nix's s3 support someday becomes a plugin of some sort, removing aws-sdk-cpp from nix's build-time closure
<samueldr>
sphalerite: with nix 2.0, nix supports plugins, maybe an interesting way to strain that feature?
<sphalerite>
samueldr: yeah that would be cool
<nbp>
srhb: sphalerite: I put the information in the "Concat Github" form, hopping that they would forward the message.
<sphalerite>
"In particular, these plugins may construct static instances of RegisterPrimOp to add new primops or constants to the expression language, RegisterStoreImplementation to add new store implementations, …"
<sphalerite>
nbp: sounds good
<sphalerite>
samueldr: indeed!
sc_ has joined #nixos
spear2 has quit [Remote host closed the connection]
arahael has joined #nixos
spear2 has joined #nixos
<das_j>
How can I add a font to a chrootenv? targetPkgs doesn't seem to work
<Myrl-saki>
Why's the latest commit in nixpkgs-channels/nixos-18.9 5 days ago?
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @uskudnik to release-18.09 « hcloud: Add autocomplete support for bash and zsh »: https://git.io/fAVYM
<{^_^}>
[nixpkgs] @romildo opened pull request #46484 → lxqt: move contents of base, core and optional to parent directory → https://git.io/fAVYd
jperras has quit [Ping timeout: 245 seconds]
jperras has joined #nixos
<{^_^}>
[nixpkgs] @zimbatm opened pull request #46485 → govendor: init at 1.0.9 → https://git.io/fAVOB
sbdchd has joined #nixos
<nbp>
srhb: For what is worth, the email that I sent to my-self did not replied telling me that the email address did not exists, but I have not received it either :/
<srhb>
nbp: Yeah, that's what I discovered as well, there's not even an MX record for the domain. :P So clearly just for identification purposes.
fragamus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbmikus has joined #nixos
hyper_ch2 has quit [Quit: Page closed]
astrofog has quit [Remote host closed the connection]
<Taneb>
I've got lofty ideas about revolutionising the Agda ecosystem but I probably ought to start smaller
jperras has joined #nixos
jonreeve has joined #nixos
vmandela_ has joined #nixos
vmandela has quit [Remote host closed the connection]
knupfer has joined #nixos
dbmikus_ has joined #nixos
<magnetop`>
I added a new pkg in my nixpkgs tree, but the nixops deploy doesn't find it. afaik the following config should point nix to the right place: nix.nixPath = ["nixpkgs=/home/bart/source/nixradio/nixpkgs"];
<magnetop`>
what am I doing wrong?
<clever>
magnetop`: that config only takes effect at runtime, on the machine it was deployed to
<clever>
magnetop`: you want `nixops modify -I nixpkgs=/home/bart/source/nixradio/nixpkgs your-deployment-file.nix`
dbmikus has quit [Ping timeout: 245 seconds]
<magnetop`>
clever: ah thanks. How do I put that in a git repo so that others doing this deploy will get it too?
<copumpkin>
niksnut, shlevy: can either of you reset failures on hydra? there was some random failure on one of the mac builders and that killed a huge chunk of my eval
jperras has quit [Ping timeout: 245 seconds]
hydraz has quit [Remote host closed the connection]
<wpcarro>
Is setting `environment.loginShell` and `programs.zsh.enable = true;` enough to ensure you'll be using zsh when starting a shell? I keep getting bash for some reason
<clever>
which has to also have cabal2nix and nix-build ran on it
<clever>
but that example is missing the cabal file
<jonreeve>
Aha
oscarvarto has quit [Ping timeout: 252 seconds]
<wpcarro>
Looks like the value in chsh is conflicting with my Nix variables... anyone else run into this before?
simukis has joined #nixos
<sphalerite>
wpcarro: there is no environment.loginShell option…
<sphalerite>
wpcarro: maybe you want to set users.defaultUserShell ?
<wpcarro>
sphalerite: ah I guess I'm conflating nix-darwin options with NixOS options
<sphalerite>
wpcarro: oh right this is nix-darwin, sorry. No idea
<wpcarro>
sphalerite: it's okay. There's some overlap so it's always worth a shot
<sphalerite>
:)
endformationage has joined #nixos
Twey has quit [Ping timeout: 240 seconds]
Twey has joined #nixos
<__monty__>
clever: Can I tunnel internet traffic through toxvpn? Having it seem I'm browsing the web from another toxvpn node?
vaibhavsagar has quit [Ping timeout: 246 seconds]
<LnL>
wpcarro: yeah, I tried to stay as close as possible where it makes sense
<LnL>
but only a subset of modules is available
rihards has joined #nixos
<Twey>
What's the advantage of an overlay over using a normal function-to-derivation? Is it just so you can override packages that are already available in the packageset?
smolboye has joined #nixos
<sphalerite>
Twey: yes, that's the primary use
<sphalerite>
Twey: particularly if other stuff depends on it and you want to build that other stuff with your overridden version
<{^_^}>
[nixpkgs] @zimbatm pushed to master « govendor: init at 1.0.9 (#46485) »: https://git.io/fAVog
<{^_^}>
[nixpkgs] @zimbatm pushed to release-18.09 « govendor: init at 1.0.9 (#46485) »: https://git.io/fAVoi
<Twey>
sphalerite: Got it, thanks
dbmikus_ has quit [Ping timeout: 264 seconds]
Denommus has joined #nixos
rauno has quit [Ping timeout: 250 seconds]
<{^_^}>
[nix] @edolstra pushed commit from @grahamc to master « Prefer 'remote builder' over 'slave' »: https://git.io/fAVKr
wpcarro has quit [Ping timeout: 252 seconds]
rauno has joined #nixos
sbdchd has quit [Remote host closed the connection]
<clever>
__monty__: that could be tricky, because you would need to change the default route, but not have toxvpn itself obey that
<clever>
__monty__: would be simpler to just run a squid proxy on the remote end, and use the tox IP to connect to squid
<tobiasBora>
Hum....
<tobiasBora>
I tried to install nixos on ZFS, and I made a special partition for /tmp, as specified in the doc, using zfs create -o mountpoint=legacy -o sync=disabled zroot/root/tmp
<tobiasBora>
the problem is that now when I reboot, the classic users do not have access to /tmp
<tobiasBora>
so I can't even boot KDE
<sphalerite>
tobiasBora: does chmod 1777 /tmp fix it?
<sphalerite>
It should definitely fix it one-off, not sure if it fixes it across reboots
<tobiasBora>
sphalerite: it does, will try to reboot. But shouldn't nixos deal with that csae?
mayhewluke has quit [Ping timeout: 240 seconds]
<tobiasBora>
For example, should I change anything in my hardware-configuration.nix file?
<sphalerite>
no, I don't think that should be necessary
<sphalerite>
I'm not sure exactly how permissions work as far as the root of a mount is concerned
adam-6520493 has quit [Quit: Ping timeout (120 seconds)]
mayhewluke has joined #nixos
adam-6520493 has joined #nixos
<sphalerite>
i.e. if the parent or the child fs is responsible for the permissions of the mount's root dir. Although the latter would make more sense
<sphalerite>
but yeah in this case I think it's just because it already exists, so the activation script or whatever would have created it doesn't touch it
<tobiasBora>
k... Thank you!
<tobiasBora>
Ok*
<tobiasBora>
And also, any idea why the time is always wrong?
<xok>
but it starts and then stops, gets "sigterm" syscall...
<xok>
can you help with that?..
<sphalerite>
xok: probably because docker-compose exits without leaving any children behind
spear2 has quit [Quit: Leaving]
<sphalerite>
xok: try removing --detach and setting Type = "simple"; rather than Type = "forking";
<srhb>
xok: I don't really much about docker_compose and whether forking is the right thing to do. I think it would be better to not detach and...
<srhb>
what sphalerite is saying ;)
<xok>
ok, let me do that...
<sphalerite>
xok: also I think the name of the script is docker-compose, not docker_compose
<sphalerite>
so ${pkgs.docker_compose}/bin/docker-compose
<tobiasBora>
srhb: sphalerite : sept. 10 21:14:42 colnixos systemd-timesyncd[1516]: Timed out waiting for reply from 212.83.145.32:123 (1.nixos.pool.ntp.org)
<teto>
tobiasBora: you can force ntp sync with $ ntpd -s
<xok>
sphalerite: no, it's docker_compose
<xok>
I mean the package name is docker_compose...
<xok>
the bin file may be the docker-compose yes..
<sphalerite>
tobiasBora: timeouts are all you have?
<teto>
wwif you don't receive the answer than that's another problem :)
<tobiasBora>
teto: hum, strange, ntpd is not installed
<sphalerite>
tobiasBora: that's normal because it uses systemd-timesyncd
<tobiasBora>
sphalerite: yes, I've lot's of them
<tobiasBora>
sphalerite: oh ok
<tobiasBora>
teto: which one is the better one: busybox, ntp, openntpd?
<xok>
hooooraaaaay... :-D
<xok>
I finally got it working!... :D
<sphalerite>
\o/
<xok>
thank you so much sphalerite and srhb
<srhb>
xok: \o/
<kini>
on the topic of time servers, I'll repeat my question from a few days ago :)
<kini>
Dumb question -- I want to add an ntp server to services.timesyncd.servers in my nixos config file, but how do I reference the default value? Like, I want to say services.timesyncd.servers = [ "my.ntp.server" ] ++ defaultServers;
<srhb>
kini: Just assign the new value :)
<kini>
what do you mean by "the new value"?
<srhb>
Oh, no, it's actually a default
<srhb>
Oh well, you can get option.networking.timeServers.default then
<srhb>
options*
<xok>
srhb: sphalerite I am deploying that service to a remote digitalOcean machine...
<xok>
and what I want now is to get an IP address of the newly created machine...
<srhb>
kini: (Note that you might not have options in scope yet, if so add it to your module function: { options, ... }:
<xok>
is there a chance to get that information?...
<srhb>
xok: nixops info -d deployment?
<kini>
ah, yeah I was just going to ask that haha
<xok>
srhb: how do I put that in the configuration file?..
<avn>
Folks, do we have any procedures to promote some fixes from master to 18.09 branch as well?
<maurer>
avn: I think the procedure is, if security or fixes _only_, poke g c h r istensen
<maurer>
(spaces put there to not accidentally ping)
<avn>
maurer: 18.09 is not yet released, only in freezing process, if I understand right
<maurer>
Oh, then poke whoever the release manager is
<sphalerite>
which would be samuel-dr (without the -)
xok has quit [Ping timeout: 245 seconds]
Yaniel has quit [Ping timeout: 252 seconds]
__monty__ has quit [Read error: Connection reset by peer]
__monty__ has joined #nixos
<samueldr>
hi! avn if it's a version update, minor updates are always candidate to backports to whatever the current stable is, so for the in-development stable it's the same
<samueldr>
for major updates, it really depends on the reasons, and is done on a case-by-case basis
<{^_^}>
[nixpkgs] @oxij opened pull request #46490 → nixos: sound: warn about changes to defaults → https://git.io/fAV1B
<samueldr>
as for nixpkgs nix code fixes, it also is a case-by-case; feature freeze is a feature freeze, so it's expected any kind of internal API stays the same
kenshinC1 has joined #nixos
__monty__ has quit [Remote host closed the connection]
__monty__ has joined #nixos
orivej has joined #nixos
<sphalerite>
what does "output limit exceeded" mean on hydra?
<avn>
samueldr: Is a socket path update in nixos/ module. Currenly it have socket (for socket activation) and pidfile in same dir, and it not work (as I noted after last reboot).
jdcken has joined #nixos
<avn>
Although I plan to remove service at all in next release, so I would like to add deprectation on service as well.
ixxie_ has joined #nixos
<samueldr>
avn: as with any backport, an update to unstable has to first be made with the changes
<avn>
sure
<avn>
I mention you in comment in PR to master
<avn>
(will mention)
<samueldr>
good
sir_guy_carleton has joined #nixos
<avn>
And other thing, which I want to discuss -- what you folks think about splitting daemon part of pulseaudio to own output?
pie__ has quit [Remote host closed the connection]
<avn>
(of course in unstable, not in release ;))
<Twey>
What is the proper way to build an environment that has both gcc and clang available?
pie__ has joined #nixos
<jdcken>
Hi! Very impressed, brand new nix user here. Trying to figure out how best to manage my user configuration (dotfiles and the like) over multiple machines. Got a custom overlay working that provides packages overridden to include my config files. Is this a bad/naive idea?
sigmundv has joined #nixos
<Twey>
I notice that libcxxStdenv has both, but the clang-wrapper still pulls in glibc's include files…
<sphalerite>
jdcken: overridden as in they build from source? Or you make wrappers that call them with command-line args specifying the config file
<sphalerite>
?
<Twey>
This breaks things
<sphalerite>
jdcken: I do it pretty much that way. Some people prefer to use home-manager to get nixos-like configuration and be able to configure anything in ~ using it
<sphalerite>
(I do it the wrappers way)
<jdcken>
sphalerite: Wrappers indeed, using wrapProgram to add flags and refer to a templated config included in the package
<sphalerite>
yep that's how I do it. Pretty workable, and less complex (but also less versatile) than home-manager
<sphalerite>
nothing bad or naive about it :)
<sphalerite>
Although you probably won't get e.g. manpages from the wrapper packages
<ldlework>
Not all tools are amenable to customized configuration locations
<ldlework>
specified on the commandline
<ldlework>
home-manager is actually pretty simple all things considered
<jdcken>
sphalerite: Thanks, glad to have that confirmed :)
<ldlework>
it is mostly just a directed-graph + an activation package
<sphalerite>
the complex thing about home-manager is the module system
jonreeve has quit [Ping timeout: 252 seconds]
<jdcken>
I checked out home-manager but wasn't clear on how 'official' it is going forward / how portable it is between linux/mac. Should give it another go then.
<catern>
has anyone ever built the grpc_cli tool in Nix?
<catern>
I kind of remember this being a thing...
<sphalerite>
jdcken: yeah it works on both from what I've heard
<sphalerite>
and yeah it's not an official nixos thing, but lots of people here use it
<tobiasBora>
sphalerite: here is the output I have when I add in my nix "services.ntp.enable = true;"
<tobiasBora>
sphalerite: here is the output I have when I add in my nix "services.ntp.enable = true;": https://paste.debian.net/1041689/
<jdcken>
For the stubborn tools that don't take custom config locations I've been adding an rsync step that puts all the immutable files into the expected place. Pretty hacky but seems to work.
<ldlework>
sphalerite: isn't the module system just using the normal module plubming though?
<sphalerite>
tobiasBora: you shouldn't need to enable a separate ntp daemon
<ldlework>
for example, i use the exact same set of overlays for nixos and home-manager and it seems to just work
<sphalerite>
ldlework: yes, it is the same, but it's still complex :p
<tobiasBora>
hum... So I don't see what I should do
tzemanovic has quit [Ping timeout: 252 seconds]
<ldlework>
sphalerite: what do you do for tools that can't be told to use customized configuration locations on the cli?
<adamantium>
Yo guys , i kinda wanna upgrade my kernel to greater or equal to 4.15.x version, but I also do not want to use unstable. What is the procedure for this?
<sphalerite>
ldlework: install config files with writeTextFile into .nix-profile/etc/xdg, which is on my XDG_CONFIG_PATH
<sphalerite>
ldlework: for non-XDG-supporting stuff, manually created symlinks in ~
<srhb>
adamantium: linuxPackages_latest is 4.17.19 in 18.03 (but should probably become 4.18 soon since 4.17 is EOL)
<sphalerite>
although really I should use user and mount-namespaced wrappers for those :D :p
<sphalerite>
or just fix the programs
<ldlework>
sphalerite: I don't know what that means, but this sounds like an absolutely *excellent* article that wouldn't have to be very long.
georges-duperon has joined #nixos
<srhb>
adamantium: And 4.15 and 4.16 are long gone.
<srhb>
adamantium: It is a special attribute set that contains various kernel-related things that MUST be present in order for it to work.
<adamantium>
thanks
<srhb>
adamantium: Yep.
<tobiasBora>
What is the good way to enable numpad at startup in nixos? (Using plasma if it can help)
<adamantium>
srhb: one last thing, how do we see what version of ZOL we are currently using?
<srhb>
> zfs.name
<{^_^}>
"zfs-user-0.7.9"
<srhb>
Hmm, that's the user facing stuff
<srhb>
But it should match
_ris has joined #nixos
<srhb>
> linuxPackages.zfs.name
<{^_^}>
"zfs-kernel-0.7.9-4.14.68"
jperras has joined #nixos
<adamantium>
what is the command you ran to get that?
<srhb>
adamantium: And you can do the same thing locally with nix eval nixpkgs.linuxPackages.zfs.name
<srhb>
s/nixpkgs/nixos if that's your channel's name I think
<adamantium>
k
<adamantium>
nixpkgs did the trick.
<adamantium>
hmm, my first nix eval
<adamantium>
;-)
xenog has joined #nixos
<srhb>
Very useful command to quickly explore nixpkgs
<srhb>
especially if you have shell completion for attribute names
<sphalerite>
srhb: `nix` uses NIX_PATH, so nixpkgs will always work there :)
<sphalerite>
well unless a system doesn't have nixpkgs in NIX_PATH of course.
<adamantium>
cool, does that come with programs.bash.enableCompletion = true; ?
<sphalerite>
yeah should do
<{^_^}>
[nixpkgs] @oxij opened pull request #46491 → nixos: sound: warn about changes to defaults (18.03) → https://git.io/fAVS3
<srhb>
sphalerite: I've seen that happen, and it's very annoying :/
<sphalerite>
srhb: if in doubt, export NIX_PATH=nixpkgs=channel:nixos-18.03 :D
<srhb>
Yeah. :P
kiloreux has quit [Ping timeout: 272 seconds]
<adamantium>
solid
humanoyd has quit [Quit: WeeChat 2.2]
<sphalerite>
hm ok… if an entry in secret-key-files doesn't exist, builds will fail and get discarded completely (not just not be completed as normal and not signed)
grp has joined #nixos
xenog has quit [Remote host closed the connection]
<tobiasBora>
Also, any idea wheter I can run "nixos-rebuild switch" without losing time to do useless stuff, like reconfiguring grub?
lawlesseel has quit [Remote host closed the connection]
xenog has joined #nixos
Yaniel has joined #nixos
jperras has quit [Quit: WeeChat 2.2]
jperras has joined #nixos
<sphalerite>
I've got a machine here which is supposed to have 8 HDDs, but nothing shows up in lsblk. I suspect the controller has failed (they used to show up), but am wondering what I could do to debug this?
<sphalerite>
tobiasBora: reconfiguring grub is kind of important, it won't boot into the new generation next time otherwise
drewr has quit [Ping timeout: 252 seconds]
<tobiasBora>
sphalerite: I see. I thought that there were a kind of "last generation" symlink that would avoid this problem. Or maybe I can avoid osprober?
<elvishjerricco>
tobiasBora: You can do `nixos-rebuild test` to switch generation now without changing what will be booted; this should avoid reconfiguring grub. `nixos-rebuild boot` will do the opposite
rfold has joined #nixos
<tobiasBora>
elvishjerricco: good to know, thanks!
drewr has joined #nixos
<elvishjerricco>
tobiasBora: Even if there were an entry for "latest generation," you'd still want it to reconfigure grub on each build in order to add the new generation to the explicit list
Kelppo has quit []
<sphalerite>
tobiasBora: so your actual problem is "os-prober is slow"?
<sphalerite>
tobiasBora: you could put the config for booting windows in boot.loader.grub.extraEntries and disable boot.loader.grub.useOSProber
lawlesseel has joined #nixos
<Dezgeg>
or maybe just 'nixos-rebuild test' ?
* sphalerite
wonders what would happen if you set up a systemd service that runs nixos-rebuild boot on shutdown
sbdchd has joined #nixos
<tobiasBora>
elvishjerricco: true
<rawtaz>
hi. im having trouble getting unstable astroid to run. the astroid package previously depended on an insecure webkitgtk, but it has since been upgraded and should now depend on a perfectly fine webkitgtk. im still getting a warning about insecure version of webkitgtk though, and im not finding why that is. output at https://pastebin.com/A1X86ebf for config at https://pastebin.com/w2xeRZh1
<tobiasBora>
sphalerite: it can be an idea instead. But I think I'll use this method proposed above of rebuild test, and I'll combine it with boot, that way I can quickly have a usable device ;)
<tobiasBora>
thank you everyone!
<rawtaz>
what i dont get in particular is why the "webkitgtk" dependency in the astroid package (in the master branch) doesnt resolve to the newer webkitgtk. or it does, and for some other reason the old one is used here anyway..
semilattice has joined #nixos
<semilattice>
is there a wrapper for gcc/clang/musl for ghc-style 'withLibs', it's way easier to work with than environment-vars
<semilattice>
?
<rawtaz>
is it a case of my reference to "unstable" not actually meaning the master branch, so the astroid package definition is from a non-master commit?
Ariakenom has quit [Ping timeout: 252 seconds]
<sphalerite>
rawtaz: there don't seem to be any webkit updates between current nixos-unstable and master
<xenog>
If anyone is interested in the problem that I mentioned earlier with Haskell's hpack writing to the home directory at /homeless-shelter, I managed to find the problem and solve it.
<sphalerite>
rawtaz: which version numbers are you expecting?
<rawtaz>
sphalerite: let me look that up specifically, moment. surely this is a case of me misunderstanding the workings of nix and nixos :)
<xenog>
@clever, the problem was caused by hpack defaults. If you specify a default in a repository, it will attempt to copy it to the home directory to be able to use it. Remove defaults from package.yaml and everything is fine.
sigmundv has quit [Remote host closed the connection]
knupfer has quit [Read error: Connection reset by peer]
<sphalerite>
rawtaz: one way of looking at it is that unstable "follows" master
<rawtaz>
sphalerite: then that is probably the reason im getting this error. unstable isnt referencing that astroid package definition i think it is
<rawtaz>
makes sense.. is there a way to get a grip on what commit or similar "unstable" is referencing at this point in time, e.g. for the astroid package?
<tobiasBora>
What is the most up to date way to have user side configuration? I'd like, for example, automatize the creation of .bashrc, and setup some ssh key automatiquely.
tmaekawa has joined #nixos
<sphalerite>
rawtaz: AFAICT, webkitgtk refers to 2.20.5 in current unstable
<sphalerite>
rawtaz: same on master
<sphalerite>
rawtaz: so it's a matter of webkitgtk itself not having been updated in nixpkgs I guess
<rawtaz>
sphalerite: isnt it weird then that wehn i rebuild it complains about 2.4.11 being insecure? seems like it's trying to use 2.4.11 instead of 2.20.5
<samueldr>
your system is most likely still built on top of 17.09 (from that output)
amosbird has joined #nixos
<cocreature>
what is the proper way to install agda as well as its standard library? I tried just installing haskellPackages.Agda and AgdaStdlib globally but that results in agda not finding the stdlib
<cocreature>
It seems like there is probably something like agdaWithPackages but I cannot find it
<rawtaz>
sphalerite: understood, i will do that. but just for the sake of understanding: how come referencing "unstable" in 17.x isnt working? is it a "different" unstable than in 18.x?
<rawtaz>
samueldr: has it not been updated since march because i have failed to run a command that updates it, or for some other reason?
<samueldr>
rawtaz: most likely failing to run a command to update it
<rawtaz>
let me rephrase what i dont get here.
lawlesseel has quit [Remote host closed the connection]
<rawtaz>
im referencing unstable. unless "unstable" means different things depending on whether im on 17.x or 18.x, i dont understand why it's not referencing the latest/current unstable stuff, assuming i have run the proper channel update commands. perhaps i didnt update the channels properly then.
<samueldr>
if you're using "nix-channel --update" as your own user, it won't update root's channels, and it wouldn't (and shouldn't) print an error as your user can also have channels
<rawtaz>
ah ok. that makes sense.
<rawtaz>
so; if i `nix-channel --update` as root, should it then update the unstable channel to get that one onto the bleeding edge?
lawlesseel has joined #nixos
lawlesseel has quit [Remote host closed the connection]
<symphorien>
rawtaz: I thing --update without argument only update the nixos channel
<samueldr>
right now it'll probably error out since you're using nixos 17.09 with nix 1.11, and nix 2.0 is now required for unstable
<samueldr>
symphorien: manpage says "Downloads the Nix expressions of all subscribed channels [unless names are specified]"
<symphorien>
hum
cyraxjoe has quit [Remote host closed the connection]
<rawtaz>
im trying it to see what happens :)
ydlr has joined #nixos
<srhb>
symphorien: I think you're thinking of --upgrade to nixos-rebuild?
<symphorien>
ha I may be mixing with nixos-rebuild --upgrade indeed
<samueldr>
ah, that makes total sense :)
* srhb
wants that switch to go away
<symphorien>
to sum up: I have had a nixos-unstable channel for a long time, and it became really outdated
<samueldr>
sudo nix-channel --rollback will rewind one step behind
<samueldr>
so back to where you were
<rawtaz>
aha
Neo-- has joined #nixos
<symphorien>
you should set nixos-unstable to the 18.03 channel, rebuild, this will give you nix 2, and from there you are free
<rawtaz>
but in this case i can just go ahead with the upgrade to 18.x and take it from there i suppose
<samueldr>
that should work out
<samueldr>
symphorien: in this particular case, rawtaz can change the nixos channel to 18.03, upgrade the nixos channel only, and then rebuild, without touching nixos-unstable; leaving this to be done after booting in the updated system
<samueldr>
rawtaz: when upgrading between releases, it's probably better not to use `nixos-rebuild switch`, but `nixos-rebuild boot`; while switch will probably work, there's a *load* of things that could go slightly weirdly until rebooted
glowpelt has quit [Max SendQ exceeded]
patrl has joined #nixos
<rawtaz>
symphorien: previously you suggested setting the "nixos" channel to https://nixos.org/channels/nixos-18.03, but now you suggested setting the "nixos-unstable" channel to https://nixos.org/channels/nixos-18.03 instead, is there any particular reason for the latter recommendation? or are they the same, just different cosmetics?
glowpelt has joined #nixos
patrl has quit [Client Quit]
patrl has joined #nixos
<rawtaz>
samueldr: yeah, boot is the thing to use here
<samueldr>
rawtaz: I think it was sphalerite that suggested nixos to 18.03; and imho is the right way (unless you want to stay on 17.09)
<rawtaz>
ah. you guys, them similar nicks.. sorry about the confusion :P
<symphorien>
rawtaz: I was wrong
* rawtaz
heads off to upgrade
<rawtaz>
after reading the notes.
<elvishjerricco>
Is there a way to `nix-collect-garbage` to delete all but the most recent N generations? i.e. not by time, but by index.
<symphorien>
delete the gc roots yourself
<Zajcev>
guys, little silly question ... I have system.autoUpgrade.enable = true; ... how to show upgrade history with dates and times?
<rawtaz>
oh, nice that you deprecated attic in favor of borg. at some point i will make sure that restic.net is also available (if it isnt already)
<rawtaz>
i notice there's a nixpkgs-unstable channel - is that used when you use Nix on other platforms? i dont recall ever using that one in my fiddling around with NixOS so far
<rawtaz>
ok there you have it :D
<samueldr>
rawtaz: pretty much
Ariakenom has joined #nixos
<samueldr>
nixos-* channels are **tested to work on nixos**, while nixpkgs are more general purpose
<samueldr>
you could realistically use nixpkgs-unstable on nixos, but IT MAY EAT YOUR HOMEWORK
<samueldr>
so yeah, don't ever :)
lostman has quit [Quit: Connection closed for inactivity]
<samueldr>
(for your system, for other channels for use outside of the nixos configuration YMMV, but it should be good)
<ldlework>
I use stable, and add pkgs.unstable with an overlay
<ldlework>
So I can just steal packages from unstable real easy like
<{^_^}>
[nixpkgs] @LnL7 pushed to release-18.09 « bullet: fix darwin build »: https://git.io/fAVFN
<rawtaz>
ldlework: i think that's what im trying to do here as well :)
<adamantium>
rawtaz: yes, well, with themelios my plan is to integrate beadm functionality in a hopefully seamless way into the nixos grub boot loader.
<adamantium>
rawtaz: so that will come with documentation when it is complete.
<rawtaz>
cant wait
<rawtaz>
sounds great :)
<adamantium>
me too i cannot wait
civodul has joined #nixos
<rawtaz>
hm, nixcon is in london this year..
jperras has quit [Quit: WeeChat 2.2]
<samueldr>
allegedly ;)
<rawtaz>
does anyone know if .uk insists on scanning your fingerprints or reading that biometric data from your password when you go there from within the EU?
<sphalerite>
rawtaz: I don't really know how the e-passport stuff works, there are automatic gates that scan it that you have to go through (or a check by a person, not sure if the e-passport magic is involved there)
<ldlework>
rawtaz: no, i just add the overlay, and modules are free to use pkgs.unstable.whatever or not
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #46222 → libuv: Disable temperamental shutdown_close_pipe test on Aarch32. → https://git.io/fAzIM
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fAVNV
<ldlework>
i don't need to maintain an import based on the content of the file
<ldlework>
if I remove the last use of an unstable package, i have to remember to remove the import, etc
<ldlework>
so i much prefer using an overlay where possible
<ldlework>
the only thing i use imports for are library functions that cannot be used in overlays due to recursion issues
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #45698 → Show the filename on unsupported shebang error → https://git.io/fA38e
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to staging: https://git.io/fAVNi
<ldlework>
everything else is a module that is automatically imported, and enabled or not by host configuration
<tobiasBora>
Hello,
<tobiasBora>
I'm trying to setup emacs packages (melpa), as specified in the doc
<rawtaz>
now i have astroid working just fine. thank you! question though; it appears that the issue was because my unstable channel wasnt updated. i thought that `nixos-rebuild switch --upgrade" would upgrade that channel too before doing its work, but i take it it only upgrades the "nixos" channel, so that's the reason i got errors for an old webkitgtk?
<rawtaz>
the manual says "the NixOS channel". i presume that means "nixos"
* rawtaz
ponders if the manual should be more explicit..
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fAVAf
<tobiasBora>
so in my configuration file, I put in the import list "./emacs", and i start it with { pkgs ? import <nixpkgs> {} }:. However, this fails, telling me the anonymous function is called with an unexpected argument "config"
<rawtaz>
thanks! then the problem is comlpetely uncovered :D thanks all you s* named peeps!
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #45988 → emacs: allow X and cli-only builds on Darwin → https://git.io/fA8SY
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fAVAU
<rawtaz>
completely*
<tobiasBora>
so I tried to add {config, pkgs, ...}
<tobiasBora>
but it still fails
<exarkun1>
symphorien: hmm okay _something_ is happening when I use `cargoPatches` which is more than I can say for my other attempts
<semilattice>
I know I asked this a bit ago but didn't see anything. Is there an easy way to wrap some libs up with a c compiler? so that calling ../bin/gcc will find a specific lib without requiring anything special in my environment?
<{^_^}>
[nixpkgs] @xeji pushed commit from @volth to master « perlPackages: ZHF 18.09 (#46493) »: https://git.io/fAVpL
<tobiasBora>
and I installed some emacs packages
<tobiasBora>
it works great for root
<tobiasBora>
but unfortunately, not for users
<tobiasBora>
when I use "emacs", I don't have any packages set
<tobiasBora>
why?
<sphalerite>
tobiasBora: because they're installed in /root/.emacs
<{^_^}>
[nixpkgs] @xeji pushed commit from @volth to release-18.09 « perlPackages: ZHF 18.09 (#46493) »: https://git.io/fAVpc
<sphalerite>
i.e. per-user
mounty1 has joined #nixos
<tobiasBora>
sphalerite: So the good way to proceed is to use services.emacs.package = import /home/cassou/.emacs.d { pkgs = pkgs; };?
<sphalerite>
if you want to install emacs with a spefici set of packages systemwide, install emacsWithPackages (ps: with ps; [evil markdown-mode]) for example
<sphalerite>
no, that won't work. /home/cassou/.emacs.d/default.nix doesn't exist
<tobiasBora>
sphalerite: I was thinking to symlink it to /etc/nixos/emacs.nix ^^
<tobiasBora>
sphalerite: but I'm not sure to see how to use it...
<tobiasBora>
what is this ps,
<tobiasBora>
and how different is it from epkgs?
<clever>
the list of all emacs packages
<sphalerite>
tobiasBora: environment.systemPackages = with pkgs; [... (emacsWithPackages (ps: with ps; [evil markdown-mode])) ... ];
mounty has quit [Ping timeout: 252 seconds]
<sphalerite>
tobiasBora: `ps:` introduces a function which is passed an argument (the emacs packages set). I chose to call it ps, but you can call it epkgs instead if you want. The name doesn't matter.
<sphalerite>
> (x: x+1) 6
<{^_^}>
7
<sphalerite>
> (foo: foo+1) 6
<{^_^}>
7
<sphalerite>
> (ps: with ps; [ evil markdown-mode] ) emacsPackagesNg
<tobiasBora>
sphalerite: oh I see. So I could use ps.melpaPackages if I want melpa?
<{^_^}>
[ <CODE> <CODE> ]
<sphalerite>
> (epkgs: with epkgs; [ evil markdown-mode] ) emacsPackagesNg
<{^_^}>
[ <CODE> <CODE> ]
georges-duperon has quit [Ping timeout: 252 seconds]
<semilattice>
So anyway it doesn't seem to work but I have other weirdness so it would take too much effort to actually debug
<sphalerite>
tobiasBora: I think emacsPackages already includes all of melpaPackages.
<semilattice>
if I use $(which gcc) as the CC for the build, then it causes issues with the build
<semilattice>
and if I use gcc without that, I get that the headers are missing
<semilattice>
at runtime (it calls gcc)
<sphalerite>
semilattice: oh, well yeah if you try to call gcc at runtime of course it won't work outside the nix-shell
<semilattice>
yeah, that's why I want to give it a gcc that will have everything linked in
<sphalerite>
s/of course//
<semilattice>
so I can just call it outside the shell
<sphalerite>
no need for me to be patronising <_<
<semilattice>
yeah that's why I was dismissive of just using nix-shell, I didn't expect that to work at all
<semilattice>
but I have the opportunity to set the runtime c compiler
<sphalerite>
there was talk of a ccWithPackages function being introduced one day. That day is not today however.
<semilattice>
ah, Is ee
<symphorien>
semilattice: you can wrap gcc with wrapProgram to add the necessary env vars: NIX_CFLAGS_COMPILE etc.
<semilattice>
can you give me a link which shows what the necessary env vars are?
<semilattice>
or a starting point?
<symphorien>
special care must be taken for libcxx/libstdc++
<bkchr[m]>
Hi, does anyone has an idea what could lead to `error: path '/nix/store/j38h2nkas76lpzm41sq9pibyyq9hl0sz-cargo-vendor-0.1.16-vendor' is not valid`
<sphalerite>
bkchr[m]: importing a file that's in a derivation's output or similar. But if you're not using distributed builds that's not the problem
<sphalerite>
,ifd
<sphalerite>
huh I thought we had a factoid for it
<samueldr>
,IFD
<{^_^}>
import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2
<mightybyte>
If I have a nix cache on a local network, can I sign things with a key named, say "192.168.1.5-1:..."?
<mightybyte>
When nix validates signatures does it make sure that the hostname for the server matches the signing key?
<{^_^}>
[nixpkgs] @timokau pushed 2 commits to release-18.09: https://git.io/fAwvi
<{^_^}>
[nixpkgs] @xeji merged pull request #46484 → lxqt: move contents of base, core and optional to parent directory → https://git.io/fAVYd
<{^_^}>
[nixpkgs] @xeji pushed commit from @romildo to master « lxqt: mv contents of base, core and optional to parent directory (#46484) »: https://git.io/fAwv9
<mudri>
What's the `"n"` doing in that example?
grp has quit [Quit: box shutting down...]
halfbit has joined #nixos
<bkchr[m]>
sphalerite: any idea what I could debug?
<sphalerite>
mightybyte: no, the name of the key is just to work out which key a signature corresponds to
rouma has joined #nixos
<sphalerite>
bkchr[m]: what are you running that gives you this error?
fragamus has quit [Ping timeout: 250 seconds]
<{^_^}>
[nixpkgs] @xeji pushed commit from @romildo to release-18.09 « lxqt: mv contents of base, core and optional to parent directory (#46484) »: https://git.io/fAwfv
<elvishjerricco>
mightybyte: Yea that's not surprising. These days I share most of my system config between my desktop and laptop. Rather than rebuilding everything, I just try to copy over ethernet from desktop to laptop. Works super fast
<clever>
elvishjerricco: i have my hydra building the config for some of my machines
<kalbasit[m]>
On the wiki https://nixos.wiki/wiki/Nix#Sandboxing I see `This includes access to the network during the build outside of fetch* functions`, where is the condition to allow `fetch*` functions to have network?
<kalbasit[m]>
do you see something obvious that makes it fail?
<clever>
outputHashMode = "recursive"; allows $out to be a file, directory, or even symlink, and the hash is over the NAR of the output (nix-store --dump)
<clever>
kalbasit[m]: is the hash on line 53 valid?, there was a bug that allowed an empty string, and some people have abused that
<clever>
nix2 now rejects that
<kalbasit[m]>
clever: yes, I currently have it set like this `sha256 = "0000000000000000000000000000000000000000000000000000"; `
<kalbasit[m]>
to force it to fail to get the actual hash
<clever>
and can you pastebin the full console output when the build fails?
<kalbasit[m]>
clever: I see, let me show you my current progress on adding ssl
<clever>
fetchurl just disables cert checking when downloading
<sphalerite>
should setting keep-going = true in /etc/nix/nix.conf work? Because it doesn't (but it also doesn't complain about an unknown option) for me
sbdchd has quit [Remote host closed the connection]
<kalbasit[m]>
clever: `GIT_SSL_CAINFO` does not work!
<kalbasit[m]>
copied this logic from fetchgit
<adamantium>
clever: How hard would it be for us to modify nixos grub generation for zfs users to recognize datasets in $POOL/ROOT/ and autogenerate menu entries (in a boot env submenu?) for each dataset upon every nixos-switch?
<adamantium>
I mean, doing it the right way, modifying the nix files ...
<clever>
i suspect that overwrites the settings, after loading nix.conf
<rawtaz>
grr, how can you get vmware fusion folder sharing working in nixos? i've added open-vm-tools-headless to the system packages, service.vmwareGuest.enable=true and .headless=true to the config, did a rebuild and rebooted. the service fails to start though, there's a bunch of errors in the log for it. has anyone gotten this working, for starters?
<adamantium>
clever: if we can make nixos-rebuild switch additionally autogenerate boot environment entries, then the proper path would be to force beadm (or other) scripts to execute nixos-rebuild switch anytime it is needed, correct? e.g. beadm create/destroy/rename/etc foo.
<kalbasit[m]>
clever: so is there a way to put `/etc/ssl` to a derivation buildPhase?
<clever>
kalbasit[m]: it would have to be done with either libredirect or nix.conf
<kalbasit[m]>
I see, so it's not something that would go in nixpkgs build-support derivation
<clever>
kalbasit[m]: libredirect could be added to that expression fairly easily
<sphalerite>
adamantium: I don't think so, this seems more like something that should be done by nixos-rebuild
<sphalerite>
I'm not familiar with beadm/zfs boot environments though
<sphalerite>
so I may well be wrong
<kalbasit[m]>
clever: ok I'll grep for some examples
<sphalerite>
adamantium: almost certainly not nixos-rebuild switch though, as opposed to nixos-rebuild boot
<adamantium>
sphalerite: ok, nixos-rebuild boot only does boot things I take it, that is new to me now. I only have noticed everytime switch is executed, that grub gets updated, but i take it the "switch" also runs "boot"
semilattice has joined #nixos
<adamantium>
So switch is heavy-handed, nixos-rebuild boot is what a script like beadm would want to call in the case of updating our grub menu for the user?
<clever>
adamantium: switch is just boot+test, boot only updates the bootloader, and test only activates it
<catern>
sphalerite: but what if I want to build my zsh config with Nix?
<sphalerite>
adamantium: essentially, yes. nixos-rebuild boot means "build the current configuration.nix from the current nixpkgs, create a new system profile generation from the result, and regenerate the bootloader config"
<catern>
sphalerite: there doesn't seem to be a way to build a zsh file which is then automatically sourced by the "zsh" binary, which I could put Nix paths into
<sphalerite>
adamantium: while nixos-rebuild switch means "do all that, and switch the running system over to the new config too"
<adamantium>
oh wow
<adamantium>
hmm
<sphalerite>
catern: environment.etc.zshrc.contents = ''...''; in nixos, some equivalent for ~/.zshrc in home-manager?
<adamantium>
some-what similar to the idea of beadm activate.
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sphalerite>
adamantium: I don't really know what the scope of beadm is but I suspect it overlaps with that of nixos-rebuild
<infinisil>
Functional people: Should "x" be a free variable of `with y; x`?
<sphalerite>
rawtaz: and also tries /usr/bin/lsb_release -sd
jluttine has joined #nixos
<infinisil>
Because it's possible to "override" any x in y by doing `let x = 10; in with y; x`
carlosdagos has joined #nixos
erasmas has quit [Quit: leaving]
<sphalerite>
infinisil: I'd say up to you, consider the practical implications of each option, make a decision, and document that decision
<rawtaz>
sphalerite: it does seem to try it, see like 1333
<rawtaz>
line*
<rawtaz>
thats why nixos creates this file, otherwise it probably wouldnt
<sphalerite>
oh yeah so it does
<infinisil>
Hmm..
<adamantium>
What is the difference between boot.extraGrubEntries and boot.extraGrubEntriesBeforeNixos ?
<rawtaz>
hm i wonder if it could be some permission thing. it does go to the bail label in the code
<rawtaz>
nope the file is readable by everyone
<infinisil>
I think it's more practical for what I do for x to indeed be included in `with y; x`'s free vars
<sphalerite>
rawtaz: nope it looks like the problem is that nixos's version string is too long for it or something
<infinisil>
Then it means "x *may* change the result"
<adamantium>
sphalerite: does "nixos-rebuild boot" take effect on reboot, new entries will be immediately available for the user to choose?
<infinisil>
So it's equivalent to "the expression is dependent on the value of x"
<sphalerite>
adamantium: yes
<adamantium>
k
<elvishjerricco>
infinisil: Scoping issues like that are the reason I hate `with` altogether...
<elvishjerricco>
There is no intuitive answer
<infinisil>
I have convinced that the answer is that x should be in the free variables, because then it means the thing with "*might* depend on"
<adamantium>
Okay, a simple grub menuentry stanza like this: https://paste.debian.net/plain/1041730 How does it know which zfs dataset my root filesystem is on? I see it uses --label zroot (my pool name), but how does it know what filesystem root is on.
<infinisil>
elvishjerricco: I mean, `with` is very useful though, I wouldn't want to type out lib. all the time, or pkgs., or types.
<infinisil>
On the language level it is a bit of a mess though
<adamantium>
how does it know what s/filesystem/dataset/g root is on?
<elvishjerricco>
infinisil: I do prefer to type out lib.foo all the time. Much clearer to me. Now, lib.types.foo is a bit much, but that's what `let inherit (lib) types;` is for.
<rawtaz>
sphalerite: thought i'd just try changing the values in the strings in that file, but apparently you cant edit files on that static path.. regardless, the distro names buffer is 1024 chars, should be plenty. not sure what the corresponding MAX_OS_FULLNAME_LEN is though
<adamantium>
on other distros, typically you specificy root=zfs and it will use the bootfs= property, or you specify where root filesystem is exactly, like root=zfs:zroot/ROOT/foo
<adamantium>
I'm confused, how nixos finds the '/' filesystem based on the above linked generated nix menuentry
graphene has quit [Remote host closed the connection]
<infinisil>
elvishjerricco: Ah, hmm.. Good point. You can always reduce "x.y.z....s.t" to just "s.t"
<elvishjerricco>
infinisil: So wait, if x is in the free variables, then `let x = {}; in with { x = []; }; x` will return {}?
<adamantium>
I keep using the word filesystem instead of dataset, sorry.
<infinisil>
elvishjerricco: Yeah
<infinisil>
> let x = {}; in with { x = []; }; x
<{^_^}>
{ }
<elvishjerricco>
Yuck. If I *had* to choose one, I'd want `with` to always override previous bindings because that's how scoping is supposed to work. But I'd rather just have no `with` :P
graphene has joined #nixos
<elvishjerricco>
I don't even wanna know how all this interacts with `rec {` :P
<infinisil>
elvishjerricco: Yeah, I thought `with` worked like this at the beginning..
<infinisil>
Eh, rec isn't too bad
<elvishjerricco>
infinisil: Even that is unintuitive though because it can leave you wondering why your clearly visible let binding isn't working.
<elvishjerricco>
O dpm
<infinisil>
Did you know:
<elvishjerricco>
whoa, hand was one key too far to the right :P
jonreeve has joined #nixos
<elvishjerricco>
I don't know how `rec` works actually
<infinisil>
> ({ z ? { inherit x; }, x ? y.z, }@y: y) {}
<{^_^}>
{ }
<adamantium>
clever: what is nixos using to generate initramfs ?
<infinisil>
That this works ^^^
<elvishjerricco>
infinisil: I did know that, and it's infuriating :P
<infinisil>
A rather weird piece of code that is
<sphalerite>
adamantium: a shell script
<elvishjerricco>
oh wait, you mean the ability to reference the @ binding from the pattern match bindings. I did NOT know that
<adamantium>
clever: do you know how does a grub entry as generated like this https://paste.debian.net/plain/1041730 find the root= dataset? It somehow knows to find my zroot/ROOT/nixos and i dont know how because i do not have the bootfs property set.
<adamantium>
sphalerite: where can i find the script
<elvishjerricco>
still, the fact that { x ? {} }@y can result in y not having x is super annoying
<infinisil>
elvishjerricco: Heh yeah, just discovered this today
<infinisil>
elvishjerricco: Wait, let's go to #nix-lang
<elvishjerricco>
oh yea
<sphalerite>
adamantium: most of the interesting stuff isn't in there though, that's literally just taking all the files and sticking them into an initrd
<adamantium>
wheres the interestingt stuff
<sphalerite>
adamantium: the magic happens in the nix file that calls it and various stuff in nixpkgs/nixos/modules/system/boot