<pbb>
Hi, I am packaging a software that depends on the .git folder being present at build time, is there a way to do a full git clone instead of fetching a tarball?
<bgamari>
mpickering had a fairly good understanding of this IIRC
gagbo__ has joined #nixos
<infinisil>
pbb: What needs .git? If you can, you should patch the thing that needs it not not need it
<DigitalKiwi>
my kde powermanement false as of recently does anyone know about this?
<DigitalKiwi>
fails*
<infinisil>
pbb: And if you really can't patch it (or it's too cumbersome), you can pass leaveDotGit to fetchgit
<pbb>
I think that's what I want to do: The application runs git describe to embed the commit used into the result
carlosdagos has joined #nixos
gagbo_work has quit [Ping timeout: 250 seconds]
<infinisil>
Yeah I thought so, that's what a lot of them do
<clever>
yep, very first paragraph mirrors what i said
Dedalo has quit [Quit: WeeChat 2.3]
<bgamari>
ugh, this looks awful
<bgamari>
the problem is that to use the dwarf package set that nh2 proposes you may want to both override (to set the dwarf configuration) as well as extend (to, for instance, override library versions)
orivej has quit [Ping timeout: 240 seconds]
o1lo01ol1o has quit [Remote host closed the connection]
winem_ has quit [Ping timeout: 250 seconds]
endformationage has quit [Ping timeout: 240 seconds]
countingsort has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @danbst merged pull request #48153 → nixos-option: don't abort with shell failures if options are not existant → https://git.io/fxCzE
<clever>
elvishjerricco: to quote nh2, "It's getting ever more confusing/
<elvishjerricco>
clever: How's that?
countingsort has joined #nixos
<clever>
elvishjerricco: its the same as overrideCabal vs overrideAtrs vs overrideDerivation
<bgamari>
right, I saw that
<clever>
you just need to use them in the right order
<bgamari>
but it is indeed awfully confusing and fragile
<elvishjerricco>
Yea. The multiple layers of overriding is a bad design
<bgamari>
this whole thing feels like a canon aimed at my foot
<clever>
just stick to extend, it will remove the problematic override
<bgamari>
clever, the problem being that extend isn't actually sufficient for the dwarf case
<elvishjerricco>
clever: extend is the problematic one :P
eadwu has joined #nixos
<clever>
bgamari: only ever use override for changing the stuff extend cant change, and do override first
lassulus has quit [Ping timeout: 268 seconds]
slack1256 has joined #nixos
<elvishjerricco>
clever, bgamari: In my opinion is easiest to pretend extend doesn't exist. Then there's never any question about what you should do: override is the only option
<clever>
elvishjerricco: that override and compose thing just feels messy, when extend does the same thing more simply
<clever>
elvishjerricco: also, anybody that doesnt know of it, will use .override the wrong way and nuke all your changes
<clever>
but extend, removes override, forcing them to do it the right way
<elvishjerricco>
clever: Except it's not more simple because then doing anything with override becomes complicated
<clever>
using extend removes override, so override complexities are gone
<elvishjerricco>
My point was that if you DO need override, it becomes more complicated
<elvishjerricco>
Override is still quite useful
<elvishjerricco>
E.G. overriding all-cabal-hashes
<elvishjerricco>
Or GHC
<bgamari>
elvishjerricco, indeed, I find myself overriding all-cabal-hashes quite often
<clever>
in that case, your likely not wanting to use somebody elses package set?
<clever>
so you can start from pkgs.haskellPackages, and do things in the right order
goibhniu has quit [Ping timeout: 268 seconds]
<elvishjerricco>
clever: Just saying that having to keep an ordering like that in mind at all seems more problematic to me
<bgamari>
and nh2's dwarf patch will mean that overriding GHC and mkDerivation will also be a pretty common need
<bgamari>
I'm really not concerned about a particular use-case right now but rather the overall design that nh2's patch should expose
<elvishjerricco>
bgamari: Side note: I hate that patches like that require making the same change to a bunch of GHC expressions :P
<bgamari>
In my opinion we should try to base all GHC derivations on a single common nix expression after hadrian becomes the default build system
<bgamari>
I think trying to common up the existing expressions would be too much work for too little benefit
<bgamari>
but hadrian provides a clean slate
sanscoeur has quit []
<mpickering>
why do you override an existing package set, could you build a new one from scratch and then extend?
<mpickering>
composing extensions manually is horrible
ng0 has quit [Quit: Alexa, when is the end of world?]
perique has joined #nixos
Mateon3 has joined #nixos
orivej has joined #nixos
lord| has quit [Quit: WeeChat 2.3]
Mateon1 has quit [Ping timeout: 250 seconds]
Mateon3 is now known as Mateon1
<nh2>
bgamari elvishjerricco: I think there's general consensus that the various ghc .nix files should be merged, just that nobody has done it. I'm quite sure it'd get merged quite quickly as soon as somebody put out a PR that extracts the common bits
orivej has quit [Ping timeout: 240 seconds]
<bgamari>
mpickering, me?
<bgamari>
there isn't a convenient way to build a package set from scratch as far as I know
shabius has quit [Read error: Connection reset by peer]
<bgamari>
you need to import the haskell-modules/default.nix expression by filename IIRC
<bgamari>
which seems horrible
shabius has joined #nixos
<clever>
bgamari: stack2nix was doing .override and passing it a initialPackages function
<bgamari>
mpickering, do correct me if I'm wrong
lord| has joined #nixos
orivej has joined #nixos
<nh2>
bgamari: btw I think there are a couple of issues around that discuss that using various types of overrides somehow accidentally deletes .override, but nix's way of doing this override business is pretty opaque to me so I'm no expert on that
<nh2>
*nixpkgs
<nh2>
so there may be an obvious solution and that we're just using the wrong function
<bgamari>
I get the impression that this is still a bit of an open question
<simpson>
hl: Works here. Can you be more specific?
<hl>
^
<clever>
hl: i can reproduce the issue on this end, looking....
mekeor has quit [Remote host closed the connection]
<infinii>
Hi, I have an older thinkpad x201 (circa 2010) which I'm fairly certain does not have/use UEFI. Should I be looking for instructions on how to install nixos via BIOS and MBR?
Supersonic has quit [Ping timeout: 252 seconds]
<clever>
infinii: you can still do bios on gpt as well
<clever>
infinii: if you want bios on gpt, you just need to add a 1mb bios boot partition, no fs, not mounted, not formatted, then continue the same way you would have with MBR
<clever>
basically no reason to ever use MBR
praetorg has quit [Read error: Connection reset by peer]
<clever>
samueldr: hey, i was going to do that! lol
<samueldr>
clever: I'll be glad to take comments, critiques, ways to do things better :D
<clever>
samueldr: i havent looked at yours yet, but i was wanting to spin up the iohk hydra in qemu, to confirm the module configures things right, and allow testing changes to hydra itself
dmc has joined #nixos
<samueldr>
ah no, this is entirely runs-on-your-machine thing, made mainly to hack on the web interface
<aanderse>
having an issue with my test... probably something silly, hoping someone can point out the obvious
<{^_^}>
#54524 (by aanderse, 41 minutes ago, open): redmine: add missing 'migrate' command prior to starting the application
<clever>
samueldr: i was also planning to run on the local machine, but just via a qemu guest that is ran from a bash script
<samueldr>
everything is self-contained in _db and _data directories inside the hydra-in-a-bag directory (I intend to make it configurable at one point, but uh, right now things are messy)
<aanderse>
my test isn't passing... just an error i don't understand
<samueldr>
clever: here the hydra-dev-server instance also runs locally, which I think is important to get live reload when hacking on the web parts
mkoenig_ has quit [Ping timeout: 250 seconds]
<clever>
samueldr: is it using its own private postgres instance?
<samueldr>
clever: yes
<clever>
nice
<clever>
that gets rid of most of the need for qemu
<samueldr>
yeah, I kinda want to look into making the database script better since it's... it's old code mutated each project it was dragged through :)
<samueldr>
but instead of anguishing for days on those details I decided to just make the damn thing work as best as I could in a two-commands invocation
<samueldr>
aanderse: those ofborg node apparently haven't been updated to work with the fix for the tests
<jasongrossman>
samueldr: Yaks prefer not to be shaved.
<aanderse>
samueldr: from months ago i thought i recalled there was a sort of work around for this so you could still run tests... any idea what i'm talking aboutL
<aanderse>
?
<samueldr>
aanderse: yes, just searched for it and commented with it
<aanderse>
yeah thats the one! thanks :)
<aanderse>
oh... now your test has failed an assertion
<aanderse>
:\
<{^_^}>
[nixpkgs] @pbogdan opened pull request #54526 → tcl: link with libgcc_s → https://git.io/fhwtb
<samueldr>
hmm, something might be broken on master :/
<samueldr>
aanderse: does the test run fine for you locally?
<samueldr>
if so, then you shouldn't be worried, it'll 99% work fine when this is resolved
<aanderse>
i'm 99% sure it does. but that was months ago (lost track of this code, just making the PR now even though i wrote this forever ago...)
<aanderse>
will test again locally
<samueldr>
(sorry, normally I would dig a bit more, but I'm in the middle of something)
<samueldr>
(I would dig to see if master really has an issue)
<{^_^}>
[nixpkgs] @cdepillabout opened pull request #54528 → lib/modules: Change mkAliasOptionModule to use the priority for the alias → https://git.io/fhwYW
<witchof0x20>
Anyone else having issues with systemd-cryptsetup-generator in unstable?
fragamus has joined #nixos
<CMCDragonkai>
If you're packaging a package with multiple licenses.
<CMCDragonkai>
How do you specify that?
<CMCDragonkai>
Is there a way to state `licenses` instead of `license` on the meta?
<infinisil>
CMCDragonkai: Just put a list in license
<infinisil>
Yea, or `license = with licenses; [ gpl20 epl1 ];`
<iqubic>
What excatly does with do?
<simpson>
`with S` brings S's attributes into scope in its subordinate expression.
<ottidmes>
in the case of a Nix script, what is the best approach to store some values, knowing that the code following it might crash unrecoverably. I rather not split the script, because 90% of the work would have to be redone. I could write the state to the Nix store, but the Nix path it is stored it would then need to be returned somehow, which brings me to the original problem
<iqubic>
Is `with foo` sorta kinda like a map of "\x -> foo.x" over the list?
<simpson>
No.
<simpson>
> with { x = 42; }; x
<Church->
Hmm, wonder if I should package up my Forth implementation...
<{^_^}>
10
<iqubic>
I know that's not even proper nix syntax. I don't know the nix syntax for functions, or lambdas.
<simpson>
...Wait, what.
<iqubic>
simpson: Where did that 10 come from?
<iqubic>
> x
<{^_^}>
10
<iqubic>
I think someone bound x to 10 at some point.
<simpson>
> with { unlikelyName = 42; }; unlikelyName
<{^_^}>
42
<{^_^}>
[nixpkgs] @aanderse opened pull request #54529 → nixos/httpd: rename apache log files to have a .log file extension → https://git.io/fhwYM
<iqubic>
> let x = 420
<{^_^}>
error: syntax error, unexpected ')', expecting ';', at (string):216:1
<iqubic>
I'm not sure how someone set x to 10.
<ottidmes>
iqubic: it adds another scope to check for bindings, let and rec attribute sets have the strongest binding, so it will only check the added with scopes if it fails to look it up in them first
<ottidmes>
> let foo = 5; in with { foo = 10; }; foo
<{^_^}>
5
hellrazor has quit [Ping timeout: 250 seconds]
<iqubic>
I see. I completely misunderstood that.
<iqubic>
But then again, the only time I have ever seen `with` is in system.environmentPackages = with packages; [ hello tar ]
hellrazor has joined #nixos
<ottidmes>
iqubic: and with lib; probably
<iqubic>
Where does that show up?
<ottidmes>
most packages have at least with stdenv.lib; for the metadata, or if they make use of lib in their package, at the top of the file
<rprije>
Hmm. Paths seem to be interpered based on whether there's any non-space character following a slash. So how does one specify the root path / ?
<ottidmes>
iqubic: quite a few ^ modules have with lib; on top
<rprije>
oh, never mind. I just figured it out. "/."
<iqubic>
rprije: You can also use `./.`
<ottidmes>
iqubic: no, that would give you the current folder
tmaekawa has joined #nixos
<ottidmes>
> ./.
<{^_^}>
/var/lib/nixbot/state/nixpkgs
<ottidmes>
> /.
<{^_^}>
/
<iqubic>
Ah. I didn't think about that.
pie__ has joined #nixos
lassulus_ has joined #nixos
drakonis has quit [Quit: WeeChat 2.3]
o1lo01ol1o has quit [Remote host closed the connection]
<carlosdagos>
Hi all. Is there a way to set the `hashedMirrors` property in `nixos/configuration.nix`?
o1lo01ol1o has joined #nixos
hellrazo1 has joined #nixos
hellrazor has quit [Ping timeout: 250 seconds]
o1lo01ol1o has quit [Ping timeout: 244 seconds]
ddellacosta has quit [Remote host closed the connection]
<ottidmes>
carlosdagos: if you are OK with having to rebuild a second time to have it take effect, then you could set the NIX_HASHED_MIRRORS env variable, I do know of another way, but that requires some tricks, which you might not like
tdbgamer has quit [Ping timeout: 240 seconds]
bgamari_ has joined #nixos
bgamari has quit [Ping timeout: 252 seconds]
tbenst_ has quit [Quit: Leaving]
<carlosdagos>
I'm currently using `nix.extraOptions = ''hashed-mirrors = https:...`
<carlosdagos>
can't say that it's working though
bgamari_ has quit [Ping timeout: 252 seconds]
<ottidmes>
carlosdagos: should I implement the trick for you?
<carlosdagos>
sure, I'd like to know what your other option is
<CMCDragonkai>
Specifically: `cp: -r not specified; omitting directory '/nix/store/wj4qqj4qvinvrgm1njq65klfdh6ngzx6-source'`
<CMCDragonkai>
That's weird, why would there be an error from unpacking the sources and using `cp -r`?
phizzz has joined #nixos
aminechi1haoui has joined #nixos
<wedens>
ottidmes: you'll have to define equality
<wedens>
which requires checking all possible inputs :)
<ottidmes>
wedens: function pointer equality I guess
<ottidmes>
wedens: I expect builtins.fetchurl == bulitins.fetchurl to be true, but (x: x) == (x: x) to be false
<bryan1_>
I'm making a nix release tarball in order to test some trival modifications to the multi-user install script and i'm wondering if i need to make changes to the script if there's a way to prevent nix-builder from recompiling everything. I'm running nix-build release.nix -A binaryTarball.x86_64-linux
<phizzz>
i'm running nixos in a lxc container and the graphical service tries to start and kills my kde session, also nixos getty is messing up logins. how do i disable them in configuration.nix while still being able to console/ssh logins?
bryan1_ has quit [Quit: Changing server]
bryan1 has joined #nixos
infinee_ has joined #nixos
infinii has quit [Ping timeout: 245 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phizzz>
i have tried services.getty@.service = false; but i get the error: syntax error, unexpected '@', expecting '.' or '=', at /etc/nixos/configuration.nix:15:17
<sphalerite>
but you won't be able to do console logins if you disalbe getty
<phizzz>
sphalerite: thanks, that's what i was worried about
jackdk has quit [Ping timeout: 245 seconds]
palo1 has joined #nixos
<phizzz>
so i'm using debian, and after i start the container, and my kde session is killed, if i go to the console, i get my linux login prompt AND the nixos prompt and can't log into either. any suggestions on how to fix this?
<sphalerite>
that seems very odd
<sphalerite>
how did you create the container?
<phizzz>
nixos is trying to take over my tty. all i really want is to access nixos via lxc console or ssh
palo has quit [Ping timeout: 268 seconds]
palo1 is now known as palo
<phizzz>
i created an empty lxc and copied the tarball nixos-system-x86_64-linux.tar.xz into it. the nixos container boots fine except for the issues i described
<phizzz>
maybe i'm doing the container all wrong?
<sphalerite>
I think the lxc config is wrong if it's able to take over the ttys
<sphalerite>
but wait, I have something that's probably worth doing
<sphalerite>
boot.isContainer = true; :)
<Myrl-saki>
Can I have some people review #53600 and #54494?
<{^_^}>
https://github.com/NixOS/nixpkgs/pull/53600 (by adrianparvino, 2 weeks ago, open): nixos/modules/system/boot/stage-1.nix: Add support for mounting files encrypted with luks
<clever>
phizzz: you also dont need to copy any special images
<clever>
phizzz: nix-build '<nixpkgs/nixos>' -A system -I nixos-config=./configuration.nix, will generate the entire closure in the current /nix/store/
<phizzz>
thanks sphalerite that built, now is there a way to stop the systemd graphical.target from starting?
<clever>
phizzz: `nix copy --to local?root=/var/lib/containers/foo/ /nix/store/foo` will coyp /nix/store/foo from /nix/store to /var/lib/containers/foo/nix/store/
<infinee_>
I know I'm getting ahead of myself as I still haven't completed an installation yet but...if I wanted my root partition to be ZFS. Is that done during the install or does it have to be done post-install?
<infinee_>
jboy: I've seen this https://nixos.wiki/wiki/NixOS_on_ZFS But is there like an installation doc/howto describing how to install nixos from scratch with zfs?
<jboy>
infinee_: nothing official that I know of, but I found individual users' documentation (on blogs and github) helpful when I set up my system.
<jasongrossman>
infinee_: I know that page is old, but actually it's all correct, except for some good news: ZFS is now enabled in the installer image.
<jasongrossman>
infinee_: If you're familiar with ZFS then it's super easy, and if you're not then the partitioning and setting up the pools is the hard bit, and that's not NixOS specific.
<jasongrossman>
infinee_: NixOS is one of the very few Linux distributions that makes ZFS easy. \o/
<infinee_>
jasongrossman: I'm not :( I set it up on my freenas like 5yrs ago and have never had to touch it since
<jasongrossman>
(Or maybe not \o/ because maybe it would be \o/ if they all did.)
<jasongrossman>
infinee_: Well, I find ZFS fun, but you might not. I suggest you make some test pools and play with it before trying to install NixOS on it.
<jasongrossman>
infinee_: You can make test ZFS pools backed by files, so it's completely harmless.
<jasongrossman>
infinee_: If you need help with ZFS, you can ask here but since it's not particularly a NixOS issue you can also ask at #zfs.
squidpickles has joined #nixos
<Taneb>
What's the disadvantage of enabling auto-optimise-store?
<infinee_>
jasongrossman: enabled in the installer iso? both minimal and graphical?? maybe I just missed it b/c I was following the website's manual which just shows ext4
zgrep has quit [Ping timeout: 240 seconds]
<jasongrossman>
infinee_: I think so, yes.
<squidpickles>
Trying to nix-build ‘<nixpkgs>’ -A pkgsCross.armv7l-hf-multiplatform.python3.pkgs.cffi, but I get “ #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?).””
<jasongrossman>
Taneb: auto-optimise-store runs a process that takes a significant amount of time ... although I don't imagine that would be a problem for many people.
<squidpickles>
It appears to be using headers from the build platform, not the host platform for Python
<squidpickles>
any suggestions for how to get buildPythonPackage to use host Python headers for compiling native extensions?
<jasongrossman>
infinee_: I can't test here easily, but if you've booted from the installer then just try running any ZFS command (e.g. "zfs") and see whether it exists.
<hpoussin>
Hello. I want to use NixOS, and I found a problem in a service. Is it possible to do services overlays, like it is possible to do package overlays? Otherwise, how is it possible to have my patch committed to NixOS? https://pastebin.com/cFqRXA4b
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhw0n
jasongrossman has quit [Remote host closed the connection]
<hpoussin>
symphorien: thanks. I didn't have the right keyword ('service' instead of 'module')
Zer000 has quit [Quit: Leaving]
<hpoussin>
symphorien: however, that's more a replacement than an overlay. overlays are interesting because you can change only one part of the package. luckily, my service to replace is small so that's not a problem
<symphorien>
to my knowledge, you cannot replace part of a module
<symphorien>
the only other solution to do something more subtle is to fork nixpkgs and rebuild with this fork: nixos-rebuild -I nixpkgs=/path/to/fork
<dotriacontamino>
Hi! Does anyone know if the ocaml package is going to be updated soon to 4.07? (is there anyone in particular maintaining this package?)
<symphorien>
ocaml 4.07 is available as ocamlPackages_latest.ocaml
ubert has joined #nixos
<symphorien>
> ocamlPackages_latest.ocaml.name
<{^_^}>
"ocaml-4.07.1"
mara[m] has joined #nixos
<Myrl-saki>
> ocamlPackages_latest.ocaml.version
<{^_^}>
"4.07.1"
revtintin has quit [Quit: WeeChat 2.2]
<dotriacontamino>
Oh thanks, I didn't know that existed.
<{^_^}>
[nixpkgs] @wizeman opened pull request #54533 → mfc9340cdw{lpr,cupswrapper}: init at 1.1.2-1 and 1.1.4-0 → https://git.io/fhwaA
kitl_ has quit [Ping timeout: 245 seconds]
npmccallum has joined #nixos
sigmundv_ has joined #nixos
jasongrossman has joined #nixos
fendor has joined #nixos
vidbina has joined #nixos
<ivegotasthma>
any idea how java development works in nixos? I'm trying to create a spring boot application but it's not in the packages
nikola_i has joined #nixos
fendor has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @primeos pushed to master « maintainers/maintainer-list.nix: Add my OpenPGP keys »: https://git.io/fhwwQ
<ivegotasthma>
I'm trying to find packages with `nix-env -f '<nixpkgs>' -qa nixos.java` but the synthax seems to be incorrect. How do I search for packages in the nix repo?
<fyuuri>
Hi. Which emojifont do you use in NixOS? Do the work in the terminal emulator as well? I added emojione to fonts.fonts in my config; but it seems not to work. Do I need to do something after nixos-rebuild switch to load new fonts?
jonreeve has joined #nixos
<siraben>
Is it possible to disable a service (e.g. redshift) temporarily?
<gchristensen>
how temporarily?
<gchristensen>
this might work for you? systemctl --user stop redshift
sakalli` has joined #nixos
<Baughn>
gchristensen: I know there's been some work towards reproducible builds. How far has that gotten? (What fraction of derivation outputs are bit-for-bit identical?)
<gchristensen>
a great question!
<Baughn>
Nobody knows? :P
<gchristensen>
Hydra has a "reproducibilty" jobset and can rerun builds to determine how reproducible they are
<gchristensen>
but it hasn't run in a few years now, so I don't know. if you'd like to do some quick spot-chehcks you can use Nix's --check flag
<Baughn>
I was thinking about all the package manager exploits we've seen lately, and I think I have a partial mitigation -- that is, randomly rebuild packages locally, cross-check with other NixOS instances. (Using a DHT or something. Design details later.)
<Baughn>
I'm curious if anyone is already working on that.
<gchristensen>
it has only ever been talked about
<Baughn>
Oh, I will. :D
<Baughn>
What's this threadripper for, if not repeatedly rebuilding an entire OS?
<Baughn>
Ok. Well, so far I'm also just talking about it, but I'll take a stab.
<gchristensen>
there are companies who run their own hydra for (I think) all of nixpkgs, it would be interesting to have them all contribute hashes
<Baughn>
Worst-case it'll at least give us better data on reproducibility.
<Baughn>
...mm, let's start there. Just a systemd service to randomly spot-check and upload to a server I'm running.
o1lo01ol1o has joined #nixos
<gchristensen>
bashInteractive seems reproducible
sakalli`` has joined #nixos
reinhardt has quit [Quit: Leaving]
ng0 has joined #nixos
sakalli` has quit [Ping timeout: 245 seconds]
<gchristensen>
zsh too
<gchristensen>
and file
<gchristensen>
Baughn: my understanding is quite a lot of nixpkgs is reproducible, but it'd be good to have firm info
<Baughn>
It would.
o1lo01ol1o has quit [Ping timeout: 245 seconds]
<Baughn>
I'll start there, and hopefully once the PR is merged we can put a blog post up on nixos.org.
<Baughn>
I obviously can't make it run by default.
<gchristensen>
sure
<Baughn>
...though I can strongly hint with nixos-generate-config.
<gchristensen>
eh?
palo has quit [Quit: WeeChat 2.2]
palo has joined #nixos
hpoussin has quit [Ping timeout: 256 seconds]
hedning has quit [Quit: hedning]
<Baughn>
gchristensen: I mean, if it turns out to be useful, I'll add it to the commented-out suggestions provided by nixos-generate-config.
<Baughn>
That's... probably not the best way to suggest config flags. We need an installer.
<Baughn>
Getting ahead of myself, though. Coding first.
<{^_^}>
[nixos-org-configurations] @edolstra pushed to master « Upgrade bastion to t2.large »: https://git.io/fhrvm
<ben>
sounds haunted
<ben>
does nix-env -iA nixos.weechat work?
<LeshaInc>
no, the same thing
<makefu>
can you "cat" derivation?
<makefu>
if it is empty then maybe some disk shenanigans happened (unexpected reboot)
<LeshaInc>
makefu: empty file
<LeshaInc>
how can i fix it?
<makefu>
for a quick fix, can you try to nix-store --delete <path>
<makefu>
for a complete store fix, you can run "sudo nix-store --repair --verify --check-contents"
<makefu>
(this may take some time)
<LeshaInc>
thanks, it worked
<makefu>
cool!
ToxicFrog has quit [Quit: WeeChat 2.3]
<{^_^}>
[nixpkgs] @thefloweringash opened pull request #54543 → nix-prefetch-git: propagate errors under --quiet → https://git.io/fhrft
<freusque>
Has anyone here got tmux plugins working with Nix(OS) ?
kitl_ has joined #nixos
<nixpkgsnovice>
Hello all, I am a bit confused about the cross-compliation infrastructure in nixpkgs, and was hoping one of you would be able to answer some questions.
jabranham has joined #nixos
<nixpkgsnovice>
The documentation states that the splicing approach will eventually be phased out, and the buildPackages is where it's at.
qyliss has quit [Quit: bye]
qyliss has joined #nixos
<nixpkgsnovice>
First off, what is wrong with the splicing approach, besides some of the old attribute names? With buildPackages, you only have access to the equivalent of .nativeDrv, it seems.
<nixpkgsnovice>
Also, second question might point at the source of my confusion: why can't I access the __spliced and nativeDrv attributes of a derivation brought into scope by callPackage?
<nixpkgsnovice>
For example, why can't a typical default.nix contain { go, ... }: ... go.nativeDrv ... ?
<simpson>
nixpkgsnovice: What are you building? Can you use the `pkgsCross` stuff?
<nixpkgsnovice>
I've got most of a userspace working with this: import ./nixpkgs { crossSystem.config = "aarch64-unknown-linux-gnu"; }
<nixpkgsnovice>
I have some patches for various packages that I have yet to submit upstream, mostly simple stuff like moving dependencies between buildInputs and nativeBuildInputs
<nixpkgsnovice>
The trouble that's brought me here is buildGoPackages.
<nixpkgsnovice>
For example, given the snippet I provided as default.nix next to nixpkgs, nix-build -A gosu
Tucky has quit [Quit: WeeChat 2.2]
<nixpkgsnovice>
The issue is in nixpkgs/pkgs/development/go-modules/generic/default.nix
<nixpkgsnovice>
I'm here because I feel I don't understand the cross-compilation infrastructure well enough to come up with the best solution.
<vaibhavsagar>
jabranham: the `<nixpkgs>` that you have installed
<Mic92>
go cross-compiling should work pretty well
<vaibhavsagar>
i.e. do `nix-channel --list`
<Mic92>
I also have three patches in the pipeline that make rpi3 images cross-compile
<Mic92>
on staging
<{^_^}>
[nixops] @amemni closed pull request #1060 → EC2: add a physical property for 5th gen instances → https://git.io/fp9ON
<jabranham>
vaibhavsagar: that's just "nixos https://nixos.org/channels/nixos-unstable". I'm trying to understand why if I do "nix-shell -p wesnoth" I get 1.14.4 and not 1.14.5
<nixpkgsnovice>
I'm checked out past that PR. I've working from an upstream from early January. Nevertheless, I will try on master and report back.
Soft has joined #nixos
<nixpkgsnovice>
Either way, that PR is related to my confusion about the bigger picture. You've passed go = buildPackages.go_1_11 in at toplevel.
<nixpkgsnovice>
The fact that that's necessary (if it is) suggests that buildPackages is less flexible than __spliced, as it doesn't fit in very well with the callPackage pattern
<nixpkgsnovice>
Also, one splicing is gone, will the idea be to have expressions like nativeBuildInputs = with buildPackages; [ ... ]?
kitl_ has quit [Ping timeout: 244 seconds]
<nixpkgsnovice>
I've struggled to find documentation on the cross compilation bigger picture past the manual and the source itself
<gchristensen>
is it possible to mix nixos-unstable's melpaPackages with an 18.09 nixos-unstable?
<gchristensen>
is it possible to mix nixos-unstable's melpaPackages with an 18.09's melpaPackages?
drakonis has joined #nixos
<{^_^}>
[nixpkgs] @primeos pushed to master « gpgme: Update the URL for fix-key-expiry.patch »: https://git.io/fhrk4
ThatDocsLady has joined #nixos
r5d has quit [Ping timeout: 240 seconds]
<sphalerite>
gchristensen: should be I think, since it's just a bunch of .el files
<gchristensen>
hot dog! with that, I got LSP-mode working!
<hark>
how is the /run/keys normally populated?
<gchristensen>
that is only used for nixops I think
<Taneb>
hark: nixops' deployment.keys is a special option that on deployment copies the keys there
<nixpkgsnovice>
Mic92: OOPS. I was using gosu as an example because I thought it was basically a trivial program. Turns out it depends on runc lol. All appears to be working, with a small fix to the gosu expression.
<nixpkgsnovice>
Thanks for your help!
<nixpkgsnovice>
Nevertheless, my confusion about the choice of buildPackages of __spliced and the lack of availability of the __spliced attribute remains.
ThatDocsLady has quit [Ping timeout: 246 seconds]
__Sander__ has quit [Quit: Konversation terminated!]
obadz has joined #nixos
<hark>
gchristensen: there is no similar way when not using nixops?
<obadz>
HEEEELP! I rebooted after a while and grub gives me some error like 'unknown filesystem' (won't even show me the various prompts)
<sphalerite>
obadz: uh oh
<tilpner>
obadz: What filesystem should it find?
<clever>
obadz: what does `fdisk -l /dev/sdX` say, when ran on the right device?
<sphalerite>
obadz: I'd start by booting into an installer and seeing what that has to say abobut the filesystesm
<nixpkgsnovice>
Actually I partially take it back. buildGoPackages seems to not work with cgo for cross
<obadz>
I booted on a usb stick, nixos-entered, $ NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot
<obadz>
(Deep down it does something like /nix/store/310wms2626x9vyf09bfdw7fmm5sgv013-grub-2.02/sbin/grub-install --recheck --root-directory=/root /dev/sda --target=i386-pc)
<obadz>
clever: the right thing..: /dev/sda1 2048 94373887 94371840 45G 83 Linux
<clever>
obadz: is there only 1 partition on sda?
<obadz>
So the one thing that might have thrown it off is that I used e4crypt
<obadz>
but grub 2.02 is supposed to be fine with that..
<obadz>
(I didn't encrypt anything on /)
<obadz>
clever: there are others but this one contains my / & /boot
<clever>
obadz: is boot.loader.grub.enableCryptodisk enabled?
<clever>
obadz: also, grub may need partial e4crypt support, to even know what is and isnt encrypted, otherwise, it may just refuse to open the entire fs
<obadz>
clever: what's "partial" e4crypt support?
<obadz>
clever: isn't enableCryptodisk for full disk encryption?
<clever>
obadz: enough to understand that its e4crypt, and to know what is and isnt encrypted
<obadz>
clever: I thought version 2.02 had that
<clever>
obadz: and is that enabled in nixos's build?
<obadz>
I will try that first and see if that gets me out. I need to exit nixos-enter, and close this client, so wish me luck!
obadz has quit [Quit: AAAAARGH]
<clever>
obadz: i think your simplest solution is to add a non-encrypted /boot/ partition, mount it to /mnt/boot/, add it to the configuration.nix, and then `nixos-rebuild boot` again
nikola_i has joined #nixos
ddellacosta has joined #nixos
doyougnu has joined #nixos
jonreeve has quit [Ping timeout: 240 seconds]
obadz has joined #nixos
<obadz>
… aaaaaand I'm back.
<obadz>
This worked
<clever>
obadz: i think your simplest solution is to add a non-encrypted /boot/ partition, mount it to /mnt/boot/, add it to the configuration.nix, and then `nixos-rebuild boot` again
<obadz>
I don't really need any encryption on my / so I just removed the flag.
<clever>
ah
<clever>
i use ext4 for /, luks for the rootfs, which is zfs
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « git-annex: drop obsolete patches »: https://git.io/fhrmy
r5d has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « haskell-HaTeX: enable hydra builds again »: https://git.io/fhrmx
<gchristensen>
matthewbauer[m]: here?
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhrYI
Ariakenom has joined #nixos
<wedens>
hm. when I start emacs via `emacsclient -c -n -a "" file` and emacs server is not already running, my theme becomes messed up (e.g. unreadable text color)
<jabranham>
wedens: that's because your theme is loaded before graphical elements are available to Emacs. Add a hook to `after-make-frame-functions' instead
<wedens>
jabranham: but exactly the same config doesn't have such problem on Arch machine. what's the difference?
<matthewbauer[m]>
gchristensen: yeah!
ddellaco_ has joined #nixos
<gchristensen>
matthewbauer[m]: do you know if we ever backport emacs package updates? like, would it be weird to backporta melpa update?
<jabranham>
wedens: Can't say for sure without seeing your setup. Possibly something with how/when Emacs gets started (e.g. before/after X)?
<jabranham>
wedens: hmm... not sure. If the Emacs server isn't running and you do emacs -a "", I'd expect Arch and NixOS to work the exact same way (and they do, for me :-) )
doyougnu has quit [Ping timeout: 240 seconds]
<matthewbauer[m]>
nixpkgsnovice: also, I don't think there are plans to "phase" out splicing at least not until the immediate issues are addressed. I think we will always need something like splicing behind the scenes... buildPackages should only be used when nativeBuildInputs doesn't work
<{^_^}>
[nixpkgs] @mrVanDalo opened pull request #54548 → rustc: mark compileprocess as timeconsuming → https://git.io/fhrOA
clr_ has quit [Remote host closed the connection]
<nixpkgsnovice>
matthewbauer: thanks for the clarification! i misunderstood the manual. it's now clear to me that buildPackages isn't meant to completely replace splicing.
<nixpkgsnovice>
i'll chime in on that discussion on improving splicing if i come up with anything useful!
<matthewbauer[m]>
yeah the manual is a little bit inconsistent in some of this stuff
<wedens>
jabranham: I've added this https://paste.ee/p/KuDYB and now it just hangs after loading config when I do `emacsclient -c -n -a "" file`. no frame is being shown
fendor has joined #nixos
<jabranham>
wedens: you can call "pkill -SIGUSR2 emacs" to get a backtrace that might have useful info?
<obadz>
is there a way to tell the new nix build to print the logs like the old nix-build ? (or at least use more than 1 line)
<jabranham>
wedens: I've got to run now though. Perhaps the people over in #emacs can be of some use. Good luck!
waleee has quit [Quit: WeeChat 2.3]
jasongrossman has joined #nixos
obadz has quit [Quit: WeeChat 2.3]
jabranham has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
<wedens>
what's weird is that it starts two `.emacs-wrapped --daemon` processess..
xok has joined #nixos
<xok>
Hi all... :-)
obadz has joined #nixos
<{^_^}>
[nixpkgs] @Mic92 merged pull request #54548 → rustc: mark compileprocess as timeconsuming → https://git.io/fhrOA
<ToxicFrog>
It would be absolutely fantastic if NixOS would (a) mount my filesystems in the right order and, in particular, (b) refrain from creating home directories for users until all filesystems are mounted
<Mic92>
ToxicFrog: it should do that if you specify all filesystems as systemd does a topology-sort over the mount paths
<Mic92>
it cannot do that for instance if one uses zfs with its own mount mechanism instead of legacy mounts.
<ToxicFrog>
Mic92: first of all, I have a lot of filesystems, I would like to be able to just trust `zfs mount -a` to do the right thing.
<Mic92>
use legacy mounts
<Mic92>
or don't mix zfs mounts with something else
lawlesseel has quit [Remote host closed the connection]
knupfer has joined #nixos
<ToxicFrog>
Mic92: and secondly, this is not in fact the case; if I, for example, set mountpoint=legacy on pool/srv and update configuration.nix to mount it on /srv, it still tries to create /srv/airsonic (the airsonic user home directory) before mounting /srv and the wheels fall off.
<ToxicFrog>
(that appears to be part of NixOS's bootup scripts and not something systemd handles)
<Mic92>
if you mix systemd mounts with zfs own mount mechanism things will break.
<Mic92>
this problem is not limited to NixOS every linux distribution have this problem. Solaris does mounting differently
<ToxicFrog>
Mic92: you have to use systemd mounts for at least some things, though -- AIUI Nix requires you to explicitly specify the mount points for / and (if applicable) /nix, at least -- so this basically boils down to "if you're using zfs at all, use mountpoint=legacy on all of your datasets and specify all of them in configuration.nix"
<ToxicFrog>
And this wasn't an issue on SUSE.
<neonfuz>
Mic92: thanks
<Mic92>
ToxicFrog: This is a known upstream issue. A mount-generator would be required to inform systemd about the mounts that zfs tries to issue.
<clever>
Mic92: i think i saw some recent changes to zfs/nixos, that auto-generate mount units for zfs dataset
<clever>
s
<Mic92>
clever: how would this work? the /etc/fstab is generated statically.
<Mic92>
or is this a runtime thing?
<clever>
i think its runtime
<Mic92>
I think there was a pr on zfsonlinux.
<ToxicFrog>
Mic92: a mount generator seems like overkill when you can just make zfs-mount a prerequisite of local-fs.target and then order home directory creation/daemon startup after local-fs
<clever>
[root@nas:~]# zfs list -t filesystem -o name,mountpoint
<clever>
naspool/gits /home/gits
<clever>
[root@nas:~]# systemctl | grep mount
<clever>
home-gits.mount loaded active mounted /home/gits
<Mic92>
ToxicFrog: no this would be broken. Because zfs might depend on other mounts.
<clever>
Mic92: i dont remember setting up anything in nixos for /home/gits/
<ToxicFrog>
I've taken this approach in my own configuration.nix and it mostly works, but can't account for things like boot scripts bypassing the systemd dependency ordering entirely and creating home directories willy-nilly
<ToxicFrog>
Mic92: oh, good point. That's not an issue for me specifically but it definitely would be in the general case. Thanks for pointing that out.
<Mic92>
Ideally you want to have a single source of truth.
<Mic92>
ToxicFrog: boot scripts shouldn't do that. systemd will fail if it cannot mount filesystems except if they are marked explicitly as nofail.
<ToxicFrog>
Mic92: well, none of the units start up until after local-fs, but I see this in the boot log: "stage-2-init: reviving user 'airsonic' with UID 1001"
<ToxicFrog>
and when `zfs mount -a` runs, /srv/airsonic already exists and the mount fails
<Mic92>
ToxicFrog Now I see the problem
<Mic92>
systemd-sysusers could solve that
asymmetric has quit [Ping timeout: 268 seconds]
<ToxicFrog>
I've set createHome=false for airsonic and on the next reboot (probably this weekend) I'll see if that fixes it
<Mic92>
ToxicFrog: after thinking about that it would not solve the problem
<Mic92>
you really need to use legacy mounts to avoid this
<ToxicFrog>
As noted earlier, legacy mounts do not actually solve the problem, I tried that and exactly the same thing happened.
<ivegotasthma>
if I rename a user in my configuration.nix and rename the homedir, would a new homedir be created, or the old one renamed?
<Mic92>
ToxicFrog: in that case you can take a look at the activation scripts
<Mic92>
ToxicFrog: I think it boils down to update-users-groups.pl that should first try to activate the corresponding mount unit before creating /home
<ToxicFrog>
Mic92: like I said, I suspect this is a result of createHome, so I've turned that off for now and we'll see on next boot if that fixes the issue
<clever>
Mic92: problem is, i think update-users-groups, runs before systemd has started
<Mic92>
clever: likely
<ToxicFrog>
Yeah, the boot log shows this happening before systemd startup.
<clever>
ToxicFrog: sounds like you just need to add the $HOME related FS's to fileSystems. and also set neededForBoot = true;
<Mic92>
this is a tricky one. Now idea how this could be solved
<clever>
that flag forces nixos to mount them from the initrd, before activate is ran
<Mic92>
*no idea
<ToxicFrog>
Mic92: to me, the solution seems really straightforward: don't try to create home directories until after local-fs.target (and probably before sysinit.target)
<ToxicFrog>
But there's probably some way that this breaks
<clever>
mounting /home from the initrd seems simplest
<Mic92>
ToxicFrog: you need to that if a service requires the very same user
<Mic92>
and its home
<ToxicFrog>
What service requires a user with a home directory but also starts up before local-fs.target?
<ToxicFrog>
That seems like a recipe for disaster regardless.
<Mic92>
ToxicFrog: I don't know in what order systemd tries to evaluate its plan
<Mic92>
maybe it works don't know
ixxie has joined #nixos
<Mic92>
it would require to decouple user creation and home creatoin
<Mic92>
*creation
<clever>
Mic92: systemd-analyze plot
<ToxicFrog>
Hmm. If I set a filesystem as neededForBoot=true, and it can't be mounted for whatever reason, does it panic?
<clever>
ToxicFrog: it will ask the user what to do on the console
<ToxicFrog>
Ok. Not great if there's no connected console.
<clever>
stage-1.nix will grab everything that is neededForBoot, and put it into @fsInfo@
<ToxicFrog>
(a bunch of these filesystems are not actually required for the system to boot, but nonetheless I would like them to be mounted early so that init scripts don't stomp all over their mountpoints)
<ToxicFrog>
(but if they can't be mounted for whatever reason I would prefer boot to proceed)
<clever>
ToxicFrog: the mountFS function on line 318 does the actual mounting
kitl_ has quit [Ping timeout: 245 seconds]
<clever>
ToxicFrog: upon failure, it will run the fail function
<clever>
ToxicFrog: oh, i have a nasty idea, boot.postMountCommands = "mount pool/set /mnt/foo || true";
<clever>
just manually mount it yourself at the right time, and ignore all errors
<ToxicFrog>
Possibly even nastier idea: `zpool import -a -d /dev/disk/by-path`
<ToxicFrog>
* `zpool import -a -d /dev/disk/by-path && zfs mount -a || true`
<clever>
ToxicFrog: you must set an altroot
<clever>
and its /mnt-root/ not /mnt/, oops
<ToxicFrog>
Oh, this happens before pivot-root?
<clever>
yeah
<ToxicFrog>
right
<clever>
its likely already imported as well by this point
<ToxicFrog>
All the pools needed for boot are, but there are other pools that get imported later by systemd
alex``` has quit [Read error: Connection reset by peer]
alex``` has joined #nixos
<ToxicFrog>
(after udev-settle and before zfs-mount and local-fs)
<clever>
ToxicFrog: why do you have many pools?
nixpkgsnovice has quit [Ping timeout: 256 seconds]
<ToxicFrog>
Because they have dramatically different topology and intended usage?
<clever>
ah
<clever>
nothing ive done so far has been large enough to run into that issue
<clever>
biggest single setup is the nas, with 3 drives in raidz1
<clever>
rest are either mirror or single-device
<ToxicFrog>
`internal` contains /boot and /nix and is on an internal SSD, `ancilla` is a (now internal, previously external) four-disk HDD array and contains /home and bulk live data storage, `backup` is an external (USB) mirror with drives that get regularly shuffled around and is used for, well, backups
<clever>
i would have just use an L2arc to make the hdd's faster
<ToxicFrog>
So basically it needs `internal` to do anything at all, `ancilla` to boot up properly (but it will still at least get me a root shell without it), and `backup` is optional
<ToxicFrog>
Oh, the rest of the internal SSD is L2ARC
<ToxicFrog>
It's like 64GB /nix and the other 400GB L2ARC for the ancilla pool
<clever>
another problem ive discovered with l2arc, is that it doesnt persist thru reboots
<ToxicFrog>
But since literally everything hits /nix it makes it noticeably snappier to give it its own storage rather than relying on the L2ARC
<gchristensen>
I think that is by design, clever :P
<clever>
gchristensen: it makes the tracking simpler, since you dont have to write to disk what is on the cache
<clever>
gchristensen: but it means boot cant benefit from the l2arc
<ToxicFrog>
Anyways, if I wanted to do stupid init script tricks, I guess I really want something that runs immediately after pivot-root but before systemd startup or home creation.
<clever>
ToxicFrog: after pivot-root would be stage-2 or activate
<ToxicFrog>
"boot.postBootCommands -- shell commands to be executed just before systemd is started". That probably isn't before home creation, but it looks promising.
<clever>
ToxicFrog: this puts an entire nixos install into your /boot/, using a squashfs inside the initrd
<clever>
so if you ever brick the main nixos, you can boot the backup one
<ToxicFrog>
That is pretty neat.
<ToxicFrog>
What would be even neater is if I could rig that to be booted automatically if for some reason booting the main configuration failed, since if I'm physically in front of the machine I might as well just slap in a liveUSB
<ToxicFrog>
But I may enable this anyways, just in case.
<ToxicFrog>
Thanks.
<clever>
ToxicFrog: i have thought of that, but havent written the right code yet
<clever>
ToxicFrog: basically, you need to mess with some grub commands, to change the default menu entry, as you boot the real nixos
<clever>
then ...
<clever>
boot.panic_on_fail or stage1panic=1 in the kernel params
<clever>
that will cause failure to mount anything, a panic
<clever>
panic=10, will then tell linux to reboot 10 seconds after a panic
worldofpeace has joined #nixos
<clever>
so, now failure to mount anything, reboots the machine
<clever>
and because grub changed the default before booting nixos, it now runs something else
<clever>
then you just need a systemd unit, to un-change the default, every time you boot, to say "it worked"
* ToxicFrog
nods
<clever>
4 if [ -s $prefix/grubenv ]; then
<clever>
5 load_env
<clever>
and from my grub.cfg, it will search for a grubenv file, and then load it on startup
<clever>
there is probably a save_env as well, the grub manual will help there
<clever>
ToxicFrog: oh, but grubenv likely wont like being on zfs
<clever>
ToxicFrog: my grubenv file, is exactly 1024 bytes, nearly all #######'s
<clever>
because grub's FS write support is rather dumb, and it just writes to the data blocks of a file, without any support to allocate new blocks to the file
<clever>
zfs checksums every block...
<ToxicFrog>
clever: this is a UEFI system, so /boot is on fat32 anyways
<clever>
ah
<clever>
of note, /boot/ doesnt need to be fat32
<clever>
only the /boot/EFI subdir has to exist on a fat32 fs
<ToxicFrog>
The ESP has to be fat32, and /EFI/... is on the ESP; I could make a non-FAT /boot and then mount the ESP at /boot/efi but then I'd have /boot/efi/EFI and eeeeeegh
Guest8198 is now known as ingenieroariel
<ToxicFrog>
I'd rather just put all of /boot on the ESP
<clever>
i think when you do it on nixos, its still /boot/EFI/ without another EFI inside it
pointfourone has joined #nixos
kitl_ has joined #nixos
pointfourone has quit [Client Quit]
<ToxicFrog>
How does that work? The fallback loader still needs to go in ESP:/EFI/boot/boot${ARCH}.efi
<ottidmes>
in my current Nix script I might call builtins.fetchurl with a wrong hash which will cause it to crash with an error, however I also collected a log that I want to print afterwards, but since it might crash, I have no clear way of returning the log so that it can be printed. I have a workaround of using builtins.toFile to write the log to the Nix store and then using find on the Nix store on the unique name I
<ottidmes>
provided, that works, but is ugly. Does anybody know of any other solution?
logand has quit [Read error: Connection reset by peer]
logand has joined #nixos
<clever>
ToxicFrog: if you are setting the efivars, then the fallback shouldnt come into play
agander has joined #nixos
<clever>
Boot0004* UEFI OS HD(1,GPT,27c99b08-455d-4dfe-a44f-6150cbc09ef8,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
<ToxicFrog>
clever: right, but in a situation where you need or want to create the fallback...
<clever>
ToxicFrog: in the case of my laptop (which has a vfat /boot/) the path is in the efi var
<clever>
ToxicFrog: yeah, it may need a double-efi then
<ToxicFrog>
(which I had to do while setting this up, because it was booted in legacy mode, and you can't touch the efivars in that case)
<clever>
and it looks like the efivars operate on the partuuid from gpt, not the fs uuid
<clever>
that does also make things simpler, because you dont have to read every single fs and its uuid, and support all the fs's
<ToxicFrog>
Yeah, AIUI this is part of the reason UEFI requires GTP
<ToxicFrog>
*GPT
<ottidmes>
hmm, I guess I could use builtins.exec in that case, since calling bulitins.fetchurl has a similar effect in terms of building things on the fly
<clever>
ive seen a ESP type code in MBR, but not played with it enough
<clever>
ToxicFrog: you can also do legacy on GPT, so there is no real reason to ever use MBR
alex``` has quit [Read error: Connection reset by peer]
alex```` has joined #nixos
Olgierd has joined #nixos
Olgierd has joined #nixos
Olgierd has quit [Changing host]
pie_ has joined #nixos
<samueldr>
when the ESP isn't used for /boot, yeah, it still needs an EFI folder in it
<samueldr>
(on UEFI)
pie__ has quit [Ping timeout: 250 seconds]
<johnw>
is there a Nix 2.x equivalent for nix-instantiate which gives "nix build" like build status output?
<clever>
johnw: there is a nix eval, but ive not played with it too much yet
pie__ has joined #nixos
freeman42x has joined #nixos
<johnw>
clever: I'm running: nix-instantiate --arg foo bar -A target --add-root file.drv --indirect ../shell.nix
<johnw>
s/nix-instantiate/nix eval/ just complains that -A is an unknown flag
pie_ has quit [Ping timeout: 268 seconds]
<clever>
johnw: nix eval doesnt accept a -A, it instead defaults to the main argument beng an attrpath
<johnw>
I don't know what the 2.x equivalent for the --add-root or --indirect options are
<clever>
johnw: and it instead needs a -f for files
<johnw>
ah, ok
vidbina has joined #nixos
pie___ has joined #nixos
<tilpner>
sphalerite: My server just reached 25h uptime, which it previously never did on ext4. I changed the disk schedulers from mq-deadline to none in /sys/block/sd*/queue/scheduler. I don't know what performance implications this has, and it might just be coincidence, but you may want to consider doing the same if your server dies again (or to prevent that)
<tilpner>
This matches with immaes warning about use_blk_mq
<tilpner>
immae: Well, I hope I'm not celebrating too early, I've done that too often over the past few weeks. It looks promising (oh, smart errors? That must be it!), and then some days later it dies :/
kitl_ has quit [Ping timeout: 240 seconds]
logand has quit [Remote host closed the connection]
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sphalerite>
tilpner: good to know, thanks! No further issues on my end, and I didn't change anything
goibhniu has quit [Ping timeout: 240 seconds]
<tilpner>
It was less frequent with zfs, and probably depends on usage patterns too. I would expect it over the next week, but it might not even be the same issue
vidbina has quit [Ping timeout: 250 seconds]
pie_ has joined #nixos
ixxie has quit [Remote host closed the connection]
<clever>
tilpner: for several years, i had some nasty stability problems on my primary desktop, spanning multiple FS's
<clever>
tilpner: going back to #zfs on and off for several years, and eventually somebody asked the firmware rev and linked that pdf to me
<clever>
tilpner: turns out linux and btrfs/zfs dont take a hung SSD very well, and the zfs mirror doesnt help at all to gracefully fall back to the other disk
<ottidmes>
infinisil: it still contains "# FIXME: fix quoting one day", but I see it was there originally, still I wonder how hard it is to fix
EoF has joined #nixos
hamishmack has quit [Ping timeout: 244 seconds]
<kai_w>
I'm having some trouble with pytorchWithCuda - I get 'ImportError: /nix/.../libtorch.so.1: undefined symbol: nvrtcGetProgramLogSize' when I try to import it
<kai_w>
this symbol lives in cudatoolkit-unsplit/lib/libnvrtc.so, and cudatoolkit-unsplit/lib is on the RPATH of libtorch.so.1
<kai_w>
so why can't it find that symbol?
<clever>
kai_w: but is ibnvrtc.so in the DT_NEEDED field?
<kai_w>
clever: readelf --dynamic libtorch.so.1 | grep NEED should show it right? then no
<kai_w>
it shows libnvToolsExt.so.1, but not libnvrtc
<clever>
then its simply not trying to load libnvrtc.so
<clever>
LD_PRELOAD can be used to force it to load, for testing
knupfer has quit [Remote host closed the connection]
<clever>
-lnvrtc has to be passed when linking this library, to fix it
parsnip has joined #nixos
<kai_w>
OK, thanks. LD_PRELOAD does fix it (or at least changes it to another symbol can't be found, so I guess there's multiple libs not being linked)
<kai_w>
I'm not sure why the build script does not link it, but I'll dig into it
Acou_Bass has joined #nixos
<kai_w>
is it possible that the DT_NEEDED field is deliberately omitted, so the same binary can work with/without CUDA?
<kai_w>
and if things are working correctly, dlopen should load the cuda libraries if they are detected
<mikky>
clever: that's what I did but in a non-standard path (i.e. /mnt/storage/users/user) which creates the all the directories, but intermediate ones get created with 0700
<mikky>
rendering the last user-owned directory inaccesible to the user
<clever>
i tend to do things like /var/lib/toxvpn, so only one dir has to be made
<kai_w>
clever: yes, I was thinking cuda libs might be optional, but then the symbols wouldn't be listed with ldd unless I've not understood this
<mikky>
it's just a matter of a simple chown, but it kind of defeats the purpose of nix so it's more like a philosophical problem rather than a practical one
<mikky>
or chmod, depends on use-case
<clever>
mikky: systemd has a flag, to make the prestart and start run as different users, and then you can put the chmod/chown in prestart
<parsnip>
there's 43 nixos images on aws, how would i pick?
<clever>
parsnip: if you use nixops, it will pick the right one automatically
<infinisil>
mikky: clever: I wouldn't suggest doing it in preStart, that's a very imperative way. systemd's StateDirectory/RuntimeDirectory if possible, otherwise systemd.tmpfiles, and only if that doesn't work use a script
_kwstas has joined #nixos
obadz has quit [Quit: WeeChat 2.3]
<infinisil>
(Even tmpfiles' manpage suggests using systemd's StateDirectory/etc. instead)
<mikky>
clever, infinisil: coudn't I just set umask somehow so the intermediate dirs get created with some sane rights?
<parsnip>
okay, thanks all!
<infinisil>
mikky: Does StateDirectory not do it sanely?
<mikky>
using systemd on this seems like an overkill to me, especially when I'd have to prepare a more complex structure
<mikky>
I'm not dismissing the option though, I'll definitely look into it
jabranham has quit [Ping timeout: 250 seconds]
o1lo01ol1o has quit [Remote host closed the connection]
jabranham has joined #nixos
xok has quit [Quit: Leaving.]
pie__ has joined #nixos
o1lo01ol1o has joined #nixos
agander has quit [Quit: Leaving]
phizzz has joined #nixos
<infinisil>
mikky: Well what is it? You never said that
<infinisil>
If it's not a systemd unit, I'd use systemd.tmpfiles, it's perfect for that
pie_ has quit [Ping timeout: 240 seconds]
worldofpeace has joined #nixos
<mikky>
it's really just a directory for data storage
knupfer has quit [Ping timeout: 268 seconds]
<phizzz>
if i do `nix-build '<nixpkgs/nixos>' -I nixos-config=./configuration.nix` from within a nixos virtualbox, is there a way to switch to that without messing with the VM?
o1lo01ol1o has quit [Ping timeout: 250 seconds]
<phizzz>
i'm new to nixos, so i may be using the wrong terminology
<phizzz>
nixos is a powerful beast that will take me a while to tame, despite the fact i started with linux back in '99 installing from floppy disks...
<mikky>
infinisil: I'm playing with nixops and I'm proofconcepting a fully managed machine on which an app is then deployed via ansible and run a under a user EID with some data paths hardcoded
<mikky>
does it make sense?
<tilpner>
phizzz: Why are you using nix-build here? You want to build and switch to your new configuration, right? nixos-rebuild can do that
<mikky>
I'll probably go with tmpfiles for now but it just doesn't "feel" right, you know
<infinisil>
mikky: I see, neat
<infinisil>
mikky: Yeah the name tmpfiles makes it a bit odd indeed, but it's the best declarative way we currently have
<infinisil>
Also, the description doesn't even mention this usecase, even though it's the most common one in nixpkgs:
<phizzz>
tilpner: i don't really know what i'm doing, but i can try your suggestion!
<{^_^}>
"Rules for creating and cleaning up temporary files\nautomatically. See\n<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>\nfor the exact format.\n"
<tilpner>
phizzz: "sudo nixos-rebuild switch" should work in a normal installation
<phizzz>
tilpner: with nixos-rebuild would i have to import my ~/configuration.nix into the /etc/nixos/configuration.nix?
o1lo01ol1o has quit [Read error: Connection reset by peer]
o1lo01ol_ has joined #nixos
<tilpner>
phizzz: That's the default, yes. You can tell nixos-rebuild to look for your config in other places, but if this is just a test VM you should probably just stick to defaults
<mikky>
phizzz: what is it your want to achieve?
aleph- has joined #nixos
<mikky>
infinisil: thanks, I was just about to go there:)
<tilpner>
(You would do that by adding a nixos-config item to your NIX_PATH environment variable, )
<infinisil>
,xml = Nix XML cheatsheet: <link xlink:href="https://example.com"/> <citerefentry><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry> <programlisting>let some = "program"; in some</programlisting> <literal>true</literal> <option>users</option>
<{^_^}>
xml defined
<infinisil>
Because why not
<gchristensen>
maybe also docbook.rocks
<infinisil>
,xml = Nix XML docbook cheatsheet: <link xlink:href="https://example.com"/> <citerefentry><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry> <programlisting>let some = "program"; in some</programlisting> <literal>true</literal> <option>users</option> Simple docbook reference: docbook reference: https://docbook.rocks/
<{^_^}>
xml redefined, was defined as Nix XML cheatsheet: <link xlink:href="https://example.com"/> <citerefentry><refentrytitle>man</refentrytitle><manvolnum>1</manvolnum></citerefentry> <programlisting>let some = "program"; in some</programlisting> <literal>true</literal> <option>users</option>
Peetz0r has left #nixos ["Doej!"]
jabranham has quit [Ping timeout: 240 seconds]
<aleph->
Okay time to get this stinking nodejs app built
<aleph->
Man somebody really needs to reverse how VLC added chromecast support
hamishmack has joined #nixos
obadz has joined #nixos
<sphalerite>
aleph-: playing to chromecast or mimicking a chromecast?
_kwstas has quit [Quit: _kwstas]
<mikky>
interesting, tmpfiles with undefined access rights (ie '-') get created with umask 077 although man says it should be 022
<aleph->
sphalerite: Playing to
<sphalerite>
aleph-: oh. boring :p
<mikky>
so I'm back where I was a while ago - umask. What umask nix uses when executed?
<aleph->
sphalerite: Packaging up this electron app fx_cast which in concert with a firefox extension can be used for chromecast usage via Firefox
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
<aleph->
Seriously? That was my problem? God dang it
Makaveli7 has quit [Quit: Leaving]
<gchristensen>
mikky: what do you mean creates data?
ingenieroariel has quit [Ping timeout: 256 seconds]
kvda has joined #nixos
lbolt has joined #nixos
<mikky>
gchristensen: creates a directory, fetches a git repo, expands an archive...
npmccallum_ has quit [Remote host closed the connection]
<gchristensen>
where does it put it?
kai_w has quit [Quit: Konversation terminated!]
Ariakenom has quit [Quit: Leaving]
<mikky>
tried /opt/app, /tmp/app, even tried creating a directory in /bin
kreisys has joined #nixos
<gchristensen>
sure doesn't sound like it is doing what you expect, then :)
<mikky>
apparently not :)
<mikky>
I guess Ansible does something under the hood that's somehow incompatible with how NixOS does things
worldofpeace has quit [Quit: worldofpeace]
<mikky>
but it doesn't make much sense, it looks like Ansible runs its commands in some kind of temporary chroot or something
<kreisys>
hey I'm having an issue that I think should be trivial... so I 'nix copy'd a store path to an s3 binary cache without the right signature. now I'm trying to copy again *with* the right signature but 'nix copy' isn't doing anything. I tried looking for a way to delete a store path from the binary cache but so far couldn't find a solution... halp? :)
<mikky>
I do use 'ansible_become' with sudo though
<sphalerite>
kreisys: you can use nix copy-sigs to copy just the signature
<kreisys>
sphalerite: that seems to have done the trick! awesome thanks!
davidak has joined #nixos
<kitlangton>
sphalerite: Ah, I should be more specific. I was able to install hie w/ that, but I'm not actually able to get it working w/ a text editor for a project that uses nix. There's this config recommendation https://github.com/haskell/haskell-ide-engine#using-vs-code-with-nix but I'm not really sure how that works
<sphalerite>
I don't know any more than that, sorry!
<kitlangton>
sphalerite: no worries! thanks anyhow :)
jackdk has joined #nixos
<mikky>
gchristensen: turns out Ansible does *exactly* what told it to do :) I reused an old template which had a little "dry-run" switch hidden in config
<gchristensen>
ah! :)
davidak has quit [Quit: Leaving]
<mikky>
why do I figure things out only _after_ I made a fool of my self in public?
<gchristensen>
eh
<simpson>
mikky: No worries, it's all good. Earlier today I found out that I'd been missing a closing brace for a week.
<clever>
mikky: you need a rubber duck
<simpson>
^^ Rubber ducks are great.
<mikky>
I need sleep. That's what I need :)
<mikky>
anyway, thanks guys, as usual, I'm a bit smarter after visiting #nixos :)
Guanin has quit [Quit: Leaving]
<{^_^}>
[nixpkgs] @dlifanov opened pull request #54561 → nixos/grafana: add provisioning of pre-configured Grafana with dashb… → https://git.io/fhrSI
<ottidmes>
I am trying to run builtins.exec before builtins.fetchurl (throws an error, which its supposed to in this test), so I tried using builtins.seq, to make the exec run before the failing fetchurl, but I do not see the effect of it running (writing some file to /tmp) if I run exec with the same args elsewhere it does succeed, any ideas?
carlosdagos has joined #nixos
<ottidmes>
nevermind, fixed it
jtojnar has quit [Ping timeout: 245 seconds]
<gchristensen>
builtins.exec? jeepers.
Guanin has joined #nixos
<ottidmes>
gchristensen: yep, got the get my data out before builtins.fetchurl might fail, could write to the store, but that brings a new set of problems
<gchristensen>
don't tell me, I don't want to know
<ottidmes>
gchristensen: BTW, I reported the issue I had with rnix and it got fixed soon after :) so I can continue with my plan
<aleph->
Somebody mind running this? Hunting down a bug, I can run it fine via nix-shell dev environement. But building via this file causes a test to fail. https://paste.rs/EGz
o1lo01ol_ has quit [Remote host closed the connection]
<{^_^}>
[nixos-org-configurations] @edolstra pushed to master « Upgrade to 18.09 »: https://git.io/fhrHF
freeman42x has quit [Ping timeout: 252 seconds]
<aleph->
Anybody ever get chromecast from vlc working?
<aleph->
Out of curiosity.
<ar1a>
hey, how can i install https://hie-nix.cachix.org/ using home-manager? it's a bit different because you run -f cachix.org/...
<ar1a>
more just how to install cachix in general
eadwu has quit [Quit: WeeChat 2.3]
dbmikus has quit [Quit: WeeChat 2.3]
FreddieSanchez has left #nixos [#nixos]
jb55 has quit [Quit: WeeChat 2.3]
dgarzon has joined #nixos
erasmas has quit [Quit: leaving]
<dgarzon>
Hi, does anyone know how to escape “${}” in a single string? For example: "-Djenkins.model.Jenkins.workspacesDir=${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}”. I found: https://nixos.org/nix/manual/#ssec-values, but does the double single quotes work on non-indented strings?
<infinisil>
ar1a: You can't, you need to put this in your nix config, which is not per-user, but only system-wide
<infinisil>
ar1a: That is, /etc/nix/nix.conf, which is managed with the nix.* options on NixOS
<ar1a>
oh i put it in configuration.nix :P
<ar1a>
woops
<ar1a>
wait, no im supposed to put it there!
<ar1a>
right, now its in nix.conf how do i install hie-nix?
aleph- has quit [Ping timeout: 268 seconds]
<ar1a>
nvm
<ar1a>
i just woke up, be nice to me :P
hke has quit [Ping timeout: 268 seconds]
<dgarzon>
Would this work? "-Djenkins.model.Jenkins.workspacesDir=\$\{JENKINS_HOME\}/workspace/\$\{ITEM_FULL_NAME\}"