<matthewcroughan>
Well, if I stop asking questions, I guess I've gotten bored haha.
<matthewcroughan>
Lots of smart people ask questions.
<ajs124>
lukegb: right. although, in general, how can you be sure PIDs haven't wrapped around? what if one process just "races" through the pid space until it arrives at a desired value?
<lukegb>
it _could_ be doing that, sure, but I trust it not to be doing that :P
<matthewcroughan>
Sorry, my bad. It was me who suggested this was "order of operations". But that was a misunderstanding on my part about what that phrase even meant.
<matthewcroughan>
() is the order in which things are composed/put together, instead of the order things are calculated in.
<tpw_rules>
to be more specific, it's ensuring it is seen as one argument. because function arguments are separated by spaces
<matthewcroughan>
So the math example you gave confuses it with what I learned at school, because it has nothing to do with BODMAS, the order in which `/` and `*` and more are applied.
<ajs124>
math should just not use infix notation. but that's a whole different topic.
<matthewcroughan>
lol, haven't you read the math pills?
<lukegb>
Can we not do that, please, thanks. We get it.
<ajs124>
tejing: I'm sure javascript somehow managed to fuck even that up. Like when I found out that calling a function in it with too few arguments, they're just undefined? and too many? that's obviously not an error.
<tejing>
and callPackage is smart enough to realize you wanted to import it if you give it a path
<lukegb>
but it's nested several layers deep :P
<tpw_rules>
ajs124: i mean it can do whatever indexing scheme you want :D but yess all the builtins expect 1 indexed tables
<matthewcroughan>
Yeah, there is no such thing as learning this language by reading the Nix Pills, only by reading code.
<gchristensen>
it is pretty "funny" that callPackage, our workhorse, isn't documented
<tpw_rules>
you have to read the pills to understand the code
<gchristensen>
that isn't true, the Nix Pills has a ton of great documentation about how nixpkgs works
<gchristensen>
that isn't true, either, you don't have to -- but it'll probably help
<tpw_rules>
well sorry. the pills are a great resource for understanding the code
<matthewcroughan>
is funny a string or a url? gchristensen
<lukegb>
please don't use URL literals :P
<ajs124>
tpw_rules: right… my favourite list thing in any language(ish) I've encounted so far is still how the exim config does list separation and how it can be redefinded for most lists
<gchristensen>
determination up to the reader
<matthewcroughan>
gchristensen: Not suggesting they're not good. I am suggesting that by reading them I will not know everything.
<gchristensen>
of course not
<gchristensen>
anyway, I'd encourage anyone not enjoying this conversation to stop participating
<matthewcroughan>
And by the end of the 1 week stint, I'll then be able to get back the task I'm actually doing right now, which is packaging something :p
<matthewcroughan>
You know how it is. RFTM.
<lukegb>
I have spent several day long stints bothering gchristensen and debugging undocumented behaviours of things. Some of which are bugs :P
<gchristensen>
:D
<matthewcroughan>
Oh man, I inverted the T and F, now it has a different meaning..
<gchristensen>
very often with great results, thank you for it lukegb
<lukegb>
alas it's what I enjoy doing in my spare time :P
<lukegb>
now I'm trying to figure out why the i686 installer tests don't work properly
<gchristensen>
thats the good stuff
<matthewcroughan>
lukegb: Hah. Yeah.
<matthewcroughan>
There's some old posts in here from me getting that working on my i686 laptop.
<lukegb>
(they hang indefinitely waiting for the second VM to start up, and the first qemu process ends up a zombie for some reason)
<matthewcroughan>
The solution to bypass that is to grab the old 19.03 installer ISO which worked with i686, then change the channels to 20.09, then do the install.
<l33[m]>
sometimes, when wrestling with nix code, and enjoying it, i forget that at the end of the evaluations, your actually suppose to run applications with it.
dsrt^ has joined #nixos
<matthewcroughan>
lukegb: Wait, you've been testing it on QEMU?
<matthewcroughan>
On real hardware, systemd complains about 64/32 bit timers.
<matthewcroughan>
at some point, systemd has been compiled without 32 bit timer support, even when the target is i686, do you think qemu would be able to show you that behavior?
<lukegb>
So as part of releasing new commits to the nixos-unstable/nixos-20.09, a bunch of NixOS tests are run
<lukegb>
If you haven't come across them, they're basically "run NixOS in a qemu VM inside a Nix build"
<gchristensen>
lukegb: it isn't totally clear to me that there is a lot of value in supporting i686 these days
<lukegb>
other than for e.g. steam, etc.?
<lukegb>
some people avidly complain when we produce things in the binary cache that require more than the absolute minimum i686 baseline :P
<gchristensen>
yeah
<matthewcroughan>
Nix is the best distro for i686, better than NetBSD actually.
<l33[m]>
but is it better than windows 95?
<matthewcroughan>
NetBSD may have some crazy hacks for some hardware, but the latest Linux kernel seems better to me.
<ajs124>
since we were talking about cursed things earlier, `config.system.build.toplevel.overrideAttrs (oA: { […] })` isn't a bad idea, right?
<matthewcroughan>
And using a remote builder, it feels pretty great to be able to run old hardware on NixOS like that.
<l33[m]>
matt collects many of his systems out of skips.
<matthewcroughan>
I have racoon blood, this is true.
<lukegb>
one of these days I'll stop storing my secrets in the Nix store
<matthewcroughan>
What happens to endless running commands in a Nix build?
<matthewcroughan>
If you run a daemon in `runCommand` it seems to take that and be okay with it, the build never seems to end.
<matthewcroughan>
Also, does anybody know if there's a way to be taken directly to where a function is defined in an editor via the repl?
h0m1 has quit [Ping timeout: 260 seconds]
<matthewcroughan>
there is :e, but I've never been able to run that on a function.
maisem has quit [Read error: Connection reset by peer]
maisem has joined #nixos
<matthewcroughan>
Ah..I just did. That seems to work with callPackage, there's some others I swear that didn't work though.
<tpw_rules>
why not use writeShellScriptBin to create a command which runs godot or whatever how you want
<tpw_rules>
then you don't have to block building forever
<matthewcroughan>
It was a curiosity question
<matthewcroughan>
I'm not actually stuck with anything right now
<matthewcroughan>
but yeah if I `:e` a builtin for example, the repl will say error: package 'builtins.import' has no source location information
h0m1 has joined #nixos
<matthewcroughan>
and also fetchFromGitHub, but for callPackage this seemed to work.
<matthewcroughan>
Both things are functions aren't they?
<matthewcroughan>
I often find myself wishing I could find the source code for functions. It would be great if I could just use :e in the repl, but it's inconsistent. I'm wondering why :)
<matthewcroughan>
tpw_rules: the goal of my derivation/package/unsure is to produce a pck file that a systemd service then runs.
<matthewcroughan>
godot is the thing that creates the pck file
<tpw_rules>
ok
<matthewcroughan>
But the thing is that stdenv and mkDerivation actually screws up the output, the textures in the game go all funny.
<matthewcroughan>
Probably something to do with stripping, so I was recommended to use runCommand instead, since it's not going to do any of that.
<fuiltilt>
The semicolon is just part of the syntax of certain constructs in the Nix language, like "let" and "with" and sets ("{ ... }"). Outside one of those things, it means nothing and won't be accepted.
<matthewcroughan>
On line 21, godot exports the pck file. This file cannot be exported to *any* other directory than $src
<matthewcroughan>
that is the behavior of Godot, it won't allow you to export things outside of the source dir where the project file is.
vidbina has quit [Ping timeout: 252 seconds]
<tpw_rules>
you're already making all these temp dirs why not copy $src in there somewhere
<lukegb>
^
<matthewcroughan>
ah okay, didn't realise this would be necessary or good practice, thanks.
<matthewcroughan>
Is that what mkDerivation does then?
<lukegb>
Most Nix derivations end up doing this, yeah
<matthewcroughan>
I was using mkDerivation earlier and it was pretty much abstracted away from me, so I never encountered this issuse?
<tpw_rules>
yes that's the purpose of unpackPhase
<matthewcroughan>
What is runCommand then? Is it more primitive than mkDerivation? You said it's a wrapper around mkDerivation, but it seems like it's doing a lot less?
vidbina has joined #nixos
<lukegb>
It's a "trivial builder"
<lukegb>
the best documentation for it is probably a combination of the source code and the nixpkgs manual
<lukegb>
when you unwrap the onion, yes, you discover that it's just a wrapper around stdenv.mkDerivation
<matthewcroughan>
tpw_rules: I've done that, but now I can't cd into it haha
<winterqt>
A program that I'm packaging (from source) wants to read a file from `/etc` that it has bundled in it's source. how would I go about including that file in my package correctly?
<winterqt>
i assume i'd have to substitute the path in source?
<winterqt>
but to what, when would i copy it
<tpw_rules>
you could copy it to $out in the installPhase
<tpw_rules>
then you would know the path and you could sub it in in the patchPhase
<tpw_rules>
alternately maybe the program can take it as a command line argument and you can write a wrapper script? that would be nice if possible
<winterqt>
you mean patch the binary, tpw_rules?
<tpw_rules>
no i would patch the source
<tpw_rules>
patchPhase is before compilation
ahmed_elgabri has quit [Ping timeout: 250 seconds]
kimmovanschaik has quit [Read error: Connection reset by peer]
tdeo has quit [Excess Flood]
sangoma has joined #nixos
tdeo has joined #nixos
jesystani has joined #nixos
jonringer has quit [Ping timeout: 276 seconds]
<jesystani>
hello, im having trouble with X not setting the PATH in zsh properly, i have my shell in configuration.nix set to pkgs.zsh, and then i have home-manager settnig all my options for zsh and setting zsh.enable to true. is there anything else i should be doing for it to work properly?
ahmed_elgabri has quit [Ping timeout: 260 seconds]
ddellacosta has quit [Ping timeout: 268 seconds]
<jesystani>
uhh this may be a dumb question, but up until now ive just been putting in a fake hash, and pasting the real one when nix tells me its wrong, whats the correct way to find the hash for a git repo?
KarlJoad has quit [Quit: ERC (IRC client for Emacs 27.1)]
lsix has joined #nixos
<etu>
jesystani: That's how most of us do it :)
<etu>
,tofu jesystani
<{^_^}>
jesystani: To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000), then replace it with the correct hash Nix expected. The library functions lib.fakeSha256, lib.fakeSha512, lib.fakeHash are available for this.
<eyJhb>
also, if you use vim/emacs/whatever, just remember it is 52 zeros. So I usually put in a 0, x it, and then 52p :D
<xdej>
eyJhb: 52a0<escape> is faster to append 52 zeros.
VideoGameEnjoyer has joined #nixos
<eyJhb>
xdej: 51a0<esc> then I guess? Else you get 53 zeros
<eyJhb>
But yeah, true. I should really do some more in terms of `how to do stuff faster` with vim modals, etc.
beertoagunfight has joined #nixos
domogled has joined #nixos
nschoe has quit [Ping timeout: 260 seconds]
exondation has joined #nixos
turlando has joined #nixos
<jesystani>
woo got it working, rounded corners with picom :)
fendor_ is now known as fendor
Krner[m] has joined #nixos
<Krner[m]>
hello, how is switching from grub to sysd boot stable those days? i remember trying that out like a year ago and it broke the whole generation system
<Krner[m]>
i dont neccesarily wanna reinstall the whole thing because it takes long time to download and install the packages
<jesystani>
is there a way to pin the nix registry `nixpkgs` to the version of nixpkgs my system was built with?
<eyJhb>
ehm jesystani What do you mean? Are you using channels?
stree has quit [Ping timeout: 252 seconds]
<jesystani>
eyJhb: im using flakes, and i can use `nix registry` to set the entrise that i use for, example, `nix shell nixpkgs#hello`, and i can pin those registries, but i was wondering if theres a way to like, declaritively set a registry entry to the thing it was set at the time i did the rebuild
tbreslein has joined #nixos
<eyJhb>
Oh, if it's flakes then I am out. I don't use that jesystani
evanjs has joined #nixos
<azazel>
anyone knows after migrating to use a flake for my machine configuration, when i run a "nix flake show nur" I get a "error: cannot write modified lock file of flake 'flake:nur' "
<azazel>
even if I run it as root?
<azazel>
jesystani: use nix.registry in configuration
nly has left #nixos ["ERC (IRC client for Emacs 27.1)"]
cfricke has quit [Ping timeout: 248 seconds]
ahmed_elgabri has quit [Ping timeout: 248 seconds]
kinroy has joined #nixos
<Guest48893>
hello, I'm using nix for isolated development environments. is it possible to use a specific nodejs with the latest npm? I've tried various incantations that attempt to customise extraLibs or buildInputs, but none seen to surface the non-bundled npm to the resulting shell.
kinroy has quit [Disconnected by services]
kinroy has joined #nixos
kinroy is now known as Guest14306
Guest14306 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
Guest14306 has joined #nixos
Guest48893 has quit [Quit: Connection closed]
hiro98 has quit [Ping timeout: 240 seconds]
arjen-jonathan has joined #nixos
hiro98 has joined #nixos
cfricke has joined #nixos
<Luker>
is there a way to add/remove cflags globally (I know how on a per-pkg basis)? For example for hardening of classic arch/tune=native?
<{^_^}>
[nixpkgs] @sternenseemann pushed to haskell-updates « lib/maintainers: add haskell team »: https://git.io/J30x4
<SomeoneSerge>
Guys, I'm trying to `nixos-install` from a nixos-minimal-...iso on an offline machine with an autogenerated configuration.nix (almost untouched) and the script, it seems, is trying fetch a bunch of unvailable derivations even though other revisions are already available in the iso's store
<SomeoneSerge>
I just don't see why does it resolve to other revisions of derivations than those used in the live iso
<SomeoneSerge>
E.g. it's trying to build /nix/store/2adm...-attr-2.4.48.tar.gz.drv, but there exists /nix/store/y7i...-attr-2.4.48/ and I would expect nixos-install to resolve into those readily available paths
Frosku has quit [Remote host closed the connection]
Frosku has joined #nixos
<thibm>
SomeoneSerge: OK. You can also generate an installation media (or even not an installation media but the "installed" distro) yourself on a networked machine and use the result on the non-networked machine
<SomeoneSerge>
thibm: oh yeah, I remember trying it once, worked like a charm
<{^_^}>
[nixpkgs] @roberth pushed 260 commits to staging-20.09: https://git.io/J3Eql
abstrn has quit [Ping timeout: 240 seconds]
beertoagunfight has joined #nixos
abstrn has joined #nixos
<conkker>
is there a way to do impure caching in nix? for situations when I don't care about purity and just want a fast build
beertoagunfight has quit [Read error: Connection reset by peer]
<conkker>
say I wanna cache the `build` directory, the second time I run nix-build it will be populated with files from the previous nix-build
<Raito_Bezarius>
I'm doing pkgs.vscode-with-extensions.override { vscodeExtensions = [ some-base-extension ]; }; in a flake and I'm getting an incomprehensible error
<Raito_Bezarius>
> error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument
<{^_^}>
error: syntax error, unexpected IN, at (string):494:8
<Raito_Bezarius>
the stack strace shows something with the flake-utils during the evaluation of the runCommand of the vscode with extensions drv
<Raito_Bezarius>
whenever vscodeExtensions = []; it works
<Raito_Bezarius>
but when vscodeExtensions is eval'd, it fails
zgrep has quit [Remote host closed the connection]
<conkker>
sounds to me like a broken derivation
<Raito_Bezarius>
in which sense?
<Raito_Bezarius>
because I can just write down a test.nix without flakes that does the very same thing and produces the VSCode with extensions
<qyliss>
is your code using fetchTarball?
<Raito_Bezarius>
I'm using nixpkgs-unstable, so I would believe it's either an upstream issue or something more subtle
<Raito_Bezarius>
qyliss: afaik no
zgrep has joined #nixos
<qyliss>
Raito_Bezarius: can you use --show-trace and see where it's being used?
<xdej>
eyJhb: you only get 53 zeros if you had one zero left before using 52a0<escape>
ddellacosta has joined #nixos
<eyJhb>
True xdej. ALso, mine is only 2 key presses longer :p i0<esc>x52p
phalrax has joined #nixos
<eyJhb>
Can we golf it further than yours xdej ?
<phalrax>
Hi, I want to set up a second NixOS host and want to manage both in a single git repo. I could just import the common .nix files, but I've noticed they won't be that common after all. Is there a way to import from a file, but then override some of the configuration? The next best thing is copying all files from my first host and adapt them for the
<phalrax>
second, but they will drift apart after a while I guess
karantan has joined #nixos
<karantan>
where can I find the definition of the `buildGoModule`? I assume it somewhere here https://github.com/NixOS/nixpkgs/ but I can't find it
<Ke>
phalrax: you can even make them nixos modules
figgyc_ has quit [Ping timeout: 240 seconds]
<Ke>
but if you don't want to use imports, you can just make the nix-files functions that take parameters
<{^_^}>
[nixpkgs] @eduardosm opened pull request #121588 → Sip renamepythonPackages.sip: rename to sip_4, @eduardosm pythonPackages.sip_5: rename to sip → https://github.com/NixOS/nixpkgs/pull/121588
shibboleth has joined #nixos
<Raito_Bezarius>
does .override merge the arrays being overriden? if not, can I still recover it?
zebrag has quit [Quit: Konversation terminated!]
beertoagunfight has joined #nixos
<lukegb>
Raito_Bezarius: it turns out .override can _also_ accept a function, which takes oldArgs as a parameter
<lukegb>
so the answer is no and yes in that order
<Raito_Bezarius>
lukegb++ :)
<{^_^}>
lukegb's karma got increased to 22
<Raito_Bezarius>
thanks!
<superherointj>
A PR I've made is failing CI: "ofborg-eval - This PR does not cleanly list package outputs after merging." I'd appreciate some input on this. Thanks.
<superherointj>
Not allowing parameters when building from command line in Flakes was a downside to me. Because I cannot easily test overrides that way. Maybe it has a solution?
<Orbstheorem>
Is there an issue (or other) where I could read about what parts are stable or not?
avaq_ has joined #nixos
<qyliss>
no part is (guaranteed to be) stable
<qyliss>
that's why it's still experimental
<qyliss>
aiui
<qyliss>
it could all change at any time
<Orbstheorem>
Oh :(
avaq has quit [Ping timeout: 252 seconds]
zupo has joined #nixos
<Orbstheorem>
What about nix-command?
<qyliss>
same deal
<qyliss>
this is what it means for a feature to be experimental
<Orbstheorem>
I thought that 'experimental' meant something more like _we're not sure about how to expose this functionnality_.
<Orbstheorem>
I guess, I prefer the “It'll be ready when it is ready” attitude, but from a practical point of view I find these feature so much easier and accesible to newcomers to use.
<edef>
"unsure how to expose it" implies that the interfaces may change, though
h0m1 has quit [Ping timeout: 245 seconds]
<edef>
so i'm unsure how that's meaningfully different from "everything can still change"
h0m1 has joined #nixos
<Orbstheorem>
The way I see it is that in the former we have a very good idea of what we want, hence semantics are relatively fixed (or at least one refactor or some renames away); whereas "everything can still change" tells me I can't rely on any aspect nor principle of the feature whatsoever.
<Orbstheorem>
My 'usecase' is that I have friends who'd like to learn about and try NixOS, but I am unsure whether I should point them to nix-command & flakes (which I personally almost exclusively use) or to the rather old clunky system.
stree has quit [Ping timeout: 240 seconds]
<qyliss>
when I'm teaching people I tend to teach the old system
turlando has joined #nixos
<qyliss>
but lots of newcomers do seem to be using all the unstable stuff
<eyJhb>
Well... Seeing as Flake isn't really part of Nix yet, then it isn't even "new". It is just.. not
<Orbstheorem>
Another thing worth mentioning is that it's harder to support a config I don't personally use.
mkaito has joined #nixos
mkaito has quit [Changing host]
mkaito has joined #nixos
<Orbstheorem>
I think I would feel really unconfortable when my friend complains 'evaluation takes too long' what do you do and I have to answer _I'm using experimental features very different from the Nix I told you to use_.
<Orbstheorem>
And the Nix learning curve for newcomers is already high enough, learning two sets of features only makes it harder.
<qyliss>
that's why I stick to the one that works consistently and has stable documentation :P
<qyliss>
but it's really up to you to decide how you want to teach people, you know the tradeoffs
<Orbstheorem>
There's also an argument to be made that you don't really need to learn nix and its plumbing to use NixOS, which I disagree, but may apply better for someone running a single server and laptop with packaged apps not doing any packaging nor fancy modules.
<qyliss>
if a newcomer is using unstable features, though, they should definitely be made aware of that, and what it means for them to be unstable
<Orbstheorem>
Yes, the usual warnings “use with caution” apply.
<Orbstheorem>
I wonder if there's a page debating whether you need to learn nix as a function of your usecase.
<__monty__>
I'd say it depends on whether you're easily bothered by your system not behaving precisely the way you want. If you don't mind waiting for patches and updates until they're available then you might not have to learn much nix. If otoh you want to go to the trouble of overlaying and overriding things rather than waiting then I don't see how you could avoid learning nix.
<xdej>
eyJhb: also try vi"r0 to replace a hash under cursor with zeroes.
<__monty__>
clever: I don't think you need surround for `ci"` which changes everything up to the first " in either direction.
<Orbstheorem>
What's the difference between nixos-unstable and nixpkgs-unstable?
<clever>
__monty__: oh, that works perfectly!
<Orbstheorem>
os the later updated after hydra finished building the former?
<Ke>
Orbstheorem: nixos-unstable has more mandatory tests to pass
<clever>
Orbstheorem: nixos-unstable does extra tests to ensure it wont brick a nixos machine
<__monty__>
Orbstheorem: Different tests. nixpkgs-unstable has some Darwin tests that need to pass while nixos-unstable has more Linux tests.
<Ke>
basically it trails some days or hours behind
<Orbstheorem>
Oh, right, all the vm tests
z0k has quit [Quit: WeeChat 3.0]
<clever>
Orbstheorem: nixpkgs-unstable once had a bug corrupting grub.conf, dozens of mis-configured users started showing up, as they bricked the system
<clever>
no rollbacks when grub.conf is missing a / in just the wrong spot!
<lukegb>
orion_: hmm, I definitely get the same hash as is currently there
<orion_>
lukegb: Did you first delete the file from the store, as well as set `substitute = false`?
<__monty__>
clever: Yeah, i for in and a for around are great, works with quotes, brackets and html tags.
<lukegb>
orion_: no, building cargoDeps with --check
<clever>
__monty__: i still need to sit down and learn how vim actually works, despite having used it for ~17 years!
<__monty__>
Did you really have to go and make me think about how long I've used vim? Now I feel really old -_-
<lukegb>
hmm, --check should do that
<qyliss>
diffoscope time!?
<__monty__>
clever: I'm working on the stdenv and passing a set with paths to the store on the cli. This is triggering the "dumping very large path" warning and taking a long time each build. Is there a way to avoid that with a fetchzip trick or something (I suppose the tarball is causing most of the problem)?
civodul has joined #nixos
turlando has quit [Remote host closed the connection]
<clever>
__monty__: nix doesnt really allow passing a pre-built storepath into an expr, it will treat it the same as ./foo, copy the whole thing back into the store, loosing all runtime deps
ddellacosta has quit [Remote host closed the connection]
<clever>
i think builtins.storePath can work around that, but its recommended to just use the expr that made it in the first place
<lukegb>
orion_: oh no, my problem was stupider than that, I was in the wrong repo
<__monty__>
Problem is at the point where I need the bootstrapFiles the branch is in a state where make-bootstrap-tools.nix generates a different or even fails to generate bootstrapFiles : /
<clever>
__monty__: you can import a second copy of nixpkgs to work around that
<clever>
__monty__: though, the bootstrap tools are a special case...
<clever>
__monty__: usually, the bootstrap files are fetched with import <nix/fetchurl.nix> {, and get re-patched for the new $out
<lukegb>
sorry hexa-
<hexa->
what for? :D
<hexa->
i blame github for allowing the racyness in the first place :D
<lukegb>
racing you to the reopen PR button
<lukegb>
hah
<__monty__>
clever: Yes, but I'm trying to use the bootstrapFiles argument to make developing on them locally easier. Rather than repeatedly committing different local paths that won't work for others anyway.
<orion_>
lukegb: In general, should changes be submitted to master, staging, or a different branch?
<clever>
__monty__: in that case, i would just use 2 copies of nixpkgs, one to build it from a cached stdenv, the 2nd to then make a new stdenv from the bootstrap files the 1st produces
<clever>
__monty__: just edit the 2nd one to basically do `import ~/nixpkgs1/pkgs/stdenv/linux/make-bootstrap-tools.nix` in the right place
<lukegb>
Things which cause mass rebuilds (definitions vary a bit, usually 500+ is a good guesstimate iirc) should be targeted to staging
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jonringer has joined #nixos
<{^_^}>
[nix] @edolstra merged pull request #4750 → nix build: make dry-run to print a json output if --json is enabled → https://github.com/NixOS/nix/pull/4750
ddellaco_ has quit [Remote host closed the connection]
infandum has joined #nixos
<infandum>
I installed nixos on a Windows system dual boot
<infandum>
I erased the /boot because I didn't know windows had efi stuff there
rubm has joined #nixos
<infandum>
as a result, nixos worked but windows would not boot. I tried a bunch of nixos configuration.nix options but none worked. Then I realized what I had done, used bcdboot on the boot partition and now it works again (the windows side). However, now there are many UEFI entries in my BIOS, how can I remove them / list them in nixos?
<infandum>
How do I know which are needed?
<lukegb>
For the first one, you can use efibootmgr
<infandum>
There are some like nixos uefi, UEFI OS, Windows Boot Manager, etc.
<lukegb>
As for knowing which are needed... that's a trickier proposition
<infandum>
(this is choosing boot order in my bios, not the bootloader)
<infandum>
So right now I'm using UEFI OS (of which there are 5 identical ones or so), and it works, but nixos isn't updating the generations (but windows and nixos can boot from the options in the boot loader)
<infandum>
lukegb: Can I delete them all and rerun nixos-rebuild?
<infandum>
or would that do the bootloader options only, not the bootloader itself
<infandum>
Yes, efibootmgr is perfect btw
<lukegb>
You need to set NIXOS_INSTALL_BOOTLOADER=1 when you do a rebuild
romildo has joined #nixos
<lukegb>
but otherwise you should be able to wipe away all the NixOS ones
romildo has quit [Client Quit]
<infandum>
So I have 3 UEFI OS, 2 Windows Boot Manager, NixOS-boot, NixOS-boot-EFI, and a rEFInd Boot Manager (from my old Arch installation which never got removed I guess)
vidbina has joined #nixos
<infandum>
Will this destroy my windows efi stuff again?
<lukegb>
If you don't delete Windows Boot Manager it shouldn't, no.
<infandum>
there are two of them though
<infandum>
which one to keep?
<infandum>
maybe one won't work?
exondation has quit [Ping timeout: 260 seconds]
<lukegb>
It's possible one won't work, yeah
<infandum>
ah
<infandum>
but they have the same name haha
exondation has joined #nixos
justanotheruser has joined #nixos
<lukegb>
You could see if they have the same content with -v?
<lukegb>
is the BCD UUID they refer to different, for instance?
<infandum>
lukegb: Okay, figured out the working windows one. Should I delete ALL other partitions (including nixos) then rebuild vanilla, rebuild with NIX_INSTALL_BOOTLOADER=1, or rebuild with --install-bootloader)
<infandum>
errr, not delete partitions, delete boots
<infandum>
lukegb: Well deleting everything but the windows one and rebuilding did not put a new entry on, unfortunately, so I'll need to use the installation media
<Felix[m]6>
I tried using a `gcc-unwrapped` and `binutils-unwrapped`, but they can't find things like `crt1.o` which do exist in `/usr/lib` in the FHS-env
<QueenUhohsheherv>
Can I see an example of a good rust binary for Nix?
<Henson>
is there a way I can, in the REPL or some derivation, import a configuration and have nix iterate or converge or whatever it does with that configuration to come up with the final attribute set, which I can then explore? I'm trying to programmatically explore a nixops configuration in a way that the "show-option" command doesn't allow.
anandprabhu has joined #nixos
<Henson>
I'm kind of muddling my way through figuring it out using nixpkgs/nixos/lib/eval-config.nix, but maybe there's a pre-canned easy way to do it that I'm unaware of
<{^_^}>
#105049 (by ncfavier, 22 weeks ago, open): systemd timers treat all timezones as UTC
<Henson>
ajs124: thanks for that tip. Unfortunately that avenue isn't any easier than the one I was investigating. I'll probably have to read the source of the nixops tool to figure out how it loads in the configuration.
ahmed_elgabri has joined #nixos
<Henson>
ajs124: putting in a system configuration, yes, but putting in a nixops configuration, which is a bit of a mix of things, not so easy.
ahmed_elgabri has quit [Ping timeout: 245 seconds]
beertoagunfight has quit [Read error: Connection reset by peer]
beertoagunfight has joined #nixos
numkem has joined #nixos
xenophile has joined #nixos
numkem has quit [Client Quit]
<xenophile>
Hello! So Im very interested in nixos and I'm currently trying to switch to nixos from arch. The only thing that I'm struggling with is I can stand the graphical display managers and the ly tui display man is available as a nix package. But for some reason I can't seem to start it as a service in my configuration.nix. I'm not quite sure how to get
<xenophile>
ly as my display manager on nixos. Any suggestions?
<xenophile>
*can't
<veleiro>
its not available as a module, you'd have to write one
xenophile has quit [Remote host closed the connection]
cantstanya has joined #nixos
ddellaco_ has quit [Remote host closed the connection]
<pennae>
eyJhb: ntfs-3g was fuse, right? we remember something about having to set allow_others in some global config for that to work
Frosku has quit [Ping timeout: 240 seconds]
<eyJhb>
I think transmission overtook my folder, and then screwed with the permissions...
Mindavi has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #nixos
justanotheruser has quit [Ping timeout: 260 seconds]
attila_lendvai has quit [Ping timeout: 246 seconds]
h0m1 has quit [Quit: WeeChat 3.1]
Mindavi has joined #nixos
buffet has joined #nixos
simukis_ has quit [Quit: No Ping reply in 180 seconds.]
<grg9>
i'm trying to work out when changes(/fixes) made to nixpkgs master are available to me to install. according to the nix channels wiki page, i can find what changes are available by checking https://status.nixos.org/.
<grg9>
the most recent update to nixos-unstable is 5 hours ago but a fix i need (PR #121122 from 4 days ago) doesn't seem to be available. does anyone know why that could be? have i misunderstood something?
<infandum>
I'm having issues with my bootloader. New installation dual boot with windows. I have boot.loader.systemd-boot.enable = true; useOSProber = true; and canTouchEFIVariables = true; I have an issue with "Failed to write LoaderSystemToken", which is a known issue (same bootctl error as https://github.com/NixOS/nixpkgs/issues/97426 for instance). This is on a 20.09 liveusb. Is there a solution without using nixos-unstable for the whole
<lukegb>
infandum: oh right, yeah, it's read-only now after some... unfortunate incidents
<infandum>
yikes
<infandum>
lukegb: I did get success using grub, but grub does not detect the windows partition (although useOSProber is enabled)
<infandum>
and os-prober the command does see /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
<lukegb>
weird
<infandum>
and after getting into the system, changing back to systemd-boot and disabling grub, nothing is changed even though it was "successful", it still uses grub
<lukegb>
yeah, it won't uninstall grub
<infandum>
ah, it just doesn't add systemd for some reason to the list of bootloaders?
<infandum>
this is with nixos-rebuild --install-bootloaders
karantan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cgbrewster[m]>
Does anyone have experience with using overlayfs with a nix store? In particular, modifying the lower dir is technically undefined behavior, but is this a big deal with `/nix/store` since most subdirs in there are read-only?
est is now known as est31
beertoagunfight has quit [Read error: Connection reset by peer]
<Henson>
is there a way I can use pattern matching on the left hand side to bind set attributes to variables kind of like {a,b} = {a=1;b=2} resulting in a=1 and b=2?
<Henson>
or something equivalent to bind set attribute keys to variables names in the current scope?
<SumnerEvans[m]>
> ({a, b}: a) {a=1; b=2;}
<{^_^}>
1
<chisui>
You can pass the set to a lambda
<pennae>
Henson: with set;
<pennae>
though that necessitates let splitting
<chisui>
> let a = 1 in ({ b, ... }: a + b) { b = 2; c = 3;}
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):494:11
<Henson>
penguwin: what's let splitting?
<chisui>
> let a = 1; in ({ b, ... }: a + b) { b = 2; c = 3;}
<Henson>
oops
<{^_^}>
3
<Henson>
pennae: what's let splitting
<pennae>
Henson: like, let x = 1; {a, b} = set; in ... --> let x = 1; in with set; ...
<pennae>
if there's a y dependent on a or be you need a let, thus splitting the original one
<nh2[m]>
that doesn't seem to be necessary, you can directly write `with { a=1; b=2; }; ...code involving a and b here...`
<nh2[m]>
> with { a=1; b=2; }; "In this string we have access to ${toString a} and ${toString b}"
<{^_^}>
"In this string we have access to 2 and 2"
<nh2[m]>
wat
<nh2[m]>
why does it print "2 and 2"? My `nix repl` prints `1 and 2`
<chisui>
> a
<{^_^}>
2
<Henson>
nh2[m]: oh yeah, the "with" statement will bring these in for me the way I'm wanting. Thank you!
<Henson>
and thank you, others, for your suggestions.
fendor has quit [Remote host closed the connection]
<Henson>
is there a way I can determine if an attribute in the configuration set is defined? I'm travering a system's configuration and want to extract a value from one of the options but only if that option is defined.
chisui has quit [Quit: Connection closed]
chisui has joined #nixos
<chisui>
nh2: the second Sentence still mentions "all keys", but the Examples should illustrate the issue nicely. Thanks
<qyliss>
nh2[m]: well, it depends exactly what Henson wants to do, because isDefined is true even if the option has a default value and hasn't otherwise been set
ddellaco_ has quit [Remote host closed the connection]
<pie_>
yeah that gets screwy but sounds reasonable
<pie_>
screwy @ "well is it set if its the default value?"
<nh2[m]>
Yes. Henson, have a look if `isDefined` is the semantics you want
ddellaco_ has joined #nixos
<Henson>
yeah this particular configuration item has no default value, so in some cases it contains a useful value, and in other cases it's undefined.
<pie_>
(there's probably some way to check for equality to the default value?)
<Henson>
touching it when it's undefined causes the evaluation to crash
<pie_>
that sounds odd
<pie_>
the option should still exist i think
<pie_>
but im not a modules expert
<pie_>
i guess i never poked at options that dont have a default
orbekk has quit [Quit: WeeChat 2.9]
<Henson>
so "isDefined" is just an attribute of the option? Like config.foo.isDefined
<qyliss>
Henson: no, it's under options, not config
<qyliss>
config gives you the actual values, options gives you reflection on options
<Henson>
ahh, ok. I'll have to adjust my derivation to pass that information along too
<Henson>
thanks qyliss and pie_!
<Henson>
and nh2[m]
<qyliss>
:)
ddellaco_ has quit [Ping timeout: 240 seconds]
<pennae>
hmm is there way to configure a stringification function for an option? say we wanted to configure something as an attrset, but then have the whole set expand to a path later
ntqz has joined #nixos
jul1u5 has joined #nixos
orbekk has joined #nixos
<qyliss>
pennae: yes, you can use __toString, but I'd urge you to think carefully before doing so
<pennae>
qyliss: haven't gotten that to work properly when we tried and apparently nobody else is doing it in nixpkgs? (for good reason tho)
<qyliss>
> toString { __toString = _: "hello"; }
<{^_^}>
"hello"
<qyliss>
definitely works
<pennae>
the attrset is supposed to be a typed option, not a plain attrset
<qyliss>
(but I don't think it should be used in nixpkgs)
<pennae>
last we tried something complained
<pennae>
can't remember exactly what though, just gave up and did the more sensible thing of having a uniq subattr that's calculated from the rest instead
<qyliss>
my first attempt I forgot that it had to be a function, not just a string. maybe you made the same mistake.
<flokli>
adisbladis: it seems emacsPackages.project got depublished :-/
domogled has quit [Remote host closed the connection]
<flokli>
eglot has project as packageRequires
cr4y1 has joined #nixos
<tazjin>
adisbladis: I think eglot depending on project is a bug
<tazjin>
it's in its Package-Requires header, but project is a builtin
<pennae>
hm, might have not declared __toString as an option last time
<tazjin>
so the version on ELPA was probably something from the pre-bundling time or a dev release
fresheyeball has joined #nixos
strawberry has joined #nixos
strawberry is now known as ahituna
ahituna is now known as ahituna_
ddellacosta has quit [Ping timeout: 260 seconds]
<pennae>
yeah, declaring it as an option too does work. i don't like it.
BlessJah1 has joined #nixos
aml has quit [Ping timeout: 268 seconds]
Reiko2 has joined #nixos
<ahituna_>
I used a nix-shell as such https://alexn.org/wiki/nix.html#nix-shell-cheatsheet ... not really knowing what I'm doing. Now the packages under buildInputs are available everywhere, in every shell, globally
<fresheyeball>
I got all deps to build with profiling turned out for my ghcjs project
<fresheyeball>
but my project itself wont build with profiling on
<ahituna_>
tbh this baffles my understanding of nix-shell... nix-env -q is still empty (only home manager)
<fresheyeball>
anyone out there ever used ghcjs profiling in nix?
civodul has quit [Ping timeout: 260 seconds]
<pie_>
pennae: i can understand the will to do weird stuff since im like that, but im a bit apprehensive to change the type of the value though i cant think of any concrete issues.
<pie_>
like, when could some sort of round-tripping happen?
<pie_>
whats the error? <pennae> yeah, declaring it as an option too does work. i don't like it.
<ahituna_>
which node reveals /home/user/.nix-profile/bin/node ... I don't have nodejs or any other packages that I used in my nix-shell anywhere on home manager or /etc/nixos/... (I grep'd all the files) ... how is node still living on my system?
Reiko2 has quit [Read error: Connection reset by peer]
<pennae>
pie_: if __toString is not also declared as function-typed option it's ne regular "option undefined but set" error. if it *is* an option then, well, it's also an option with all the implications that has. but it does stringify as originally intended
<pennae>
point is we have have some things that should be exposed under a non-store path that also includes the hash of the thing. would've been great to refer to the whole submodule in a string and have it generate that path, but giving it an extra .path option that's uniq works just as well
<kini>
this is sort of peripheral to nixos, but does anyone know how mach-nix determines requirements of packages it's taking directly from nixpkgs? It's telling me that `aws-sam-cli` requires `docker==4.2.*,>=4.2.0`, even though the requirements.txt has been patched out in the nixpkgs expression so that it says only `>=4.2.0` (at least, as far as I can tell)
<Henson>
say I'm working on writing/debugging a derivation with a big huge "let ... in" section. Every assignment in this section has to end with a semicolon. Why, in the REPL, can you not end assignment with a semicolon? It would be so easy to copy and paste a portion of the let block into the REPL to play with it. But instead I have to painstakingly remove the semicolons from each assignment.
<Henson>
is there maybe a way of doing this copy-paste kind of thing that is easier in the REPL?
jgt_ has joined #nixos
melg8 has quit [Quit: Connection closed]
mbrgm_ has joined #nixos
cr4y1 has quit [Ping timeout: 268 seconds]
supersandro2000 is now known as Guest35175
Guest35175 has quit [Killed (card.freenode.net (Nickname regained by services))]
<jackdk>
I'm trying to use a new binary cache (private s3 bucket). I have added the key to trusted-public-keys, the bucket as s3://mybucket?profile=foo to substituters, but when I run nix-shell it still wants to build everything. Now it seems to have cached the fact that there's nothing good in the caches; is there a way to force a recheck of my substituters?