<pie_>
but looks like its either ?pretty printed + extra line breaking? or you get a big blob
Supersonic has joined #nixos
<pie_>
do you know if there's a way to disable only the optimizations that result in variables being <optimized out> without disabling all optimizations?
ng0 has quit [Quit: Alexa, when is the end of world?]
Supersonic has quit [Client Quit]
<nh2>
dtz matthewbauer Ericson2314 clever: I have this big blocker problem currently for musl builds:
<nh2>
Any idea?
<nh2>
When I override `curl` in an overlay, while also adding a `fetchpatch` to the proper `libdrm/default.nix`, then the the fetchpatch causes `curl` to build and fail with linker error. That is because while it does build the curl from my overlay, it seems to ignore what I've given in `.override` (e.g. I give `gssSupport = false`, but inside e.g. `configurePhase` it's still `true` again).
Supersonic has joined #nixos
selfsymmetric-mu has left #nixos ["gone to the land of dead hiccups and extinguished light bulbs"]
<infinisil>
nh2: Not sure, but curl is a bit special in that a modified version is used for pkgs.fetchurl
<infinisil>
nh2: See all-packages.nix line ~276
<infinisil>
There buildPackages.curl is used with gssSupport overwritten
szicari has quit [Ping timeout: 276 seconds]
<drakonis>
is there any particular reason why the systemd ntp daemon is breaking?
<gchristensen>
is there any particular way it is breaking?
___laika has quit [Ping timeout: 248 seconds]
<drakonis>
Aug 11 21:58:14 nix systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
<drakonis>
on rebuild
<nh2>
drakonis: then you need to look into `journalctl -u systemd-timesyncd -e` to check what made it shut down repeatedly, or `systemctl status` to see the status code / exit reason if there are no log messages
<nh2>
infinisil: that place certainly seems to be very involved in the problem, if I set `gssSupport = false;` then it's false in my build
<drakonis>
Aug 11 21:59:40 nix systemd[30115]: systemd-timesyncd.service: Failed to set up special execution directory in /var/lib: Not a directory
<drakonis>
Aug 11 21:59:40 nix systemd[30115]: systemd-timesyncd.service: Failed at step STATE_DIRECTORY spawning /nix/store/md7jdq475ij8cpifxb5rrh7y51qrfypq-systemd-242/lib/systemd/systemd-timesyncd: Not a directory
<drakonis>
there's the answer
<pie_>
nh2: i mean maybe that gss argument it being set some other way than what is modified by the bool argument
<nh2>
pie_: yes, I think the place that infinisil mentioned is simply overriding mine again
<{^_^}>
systemd/systemd#12131 (by kouros17, 19 weeks ago, closed): RFE: migrate StateDirectory= and friends back from DynamicUser=1 subdir to regular one if needed
<infinisil>
Along with a commit that supposedly does an automatic migration
<nh2>
infinisil: something seems special about `fetchurl` that it itself can't be overridden: `fetchurl = super.fetchurl.override {};` gives `value is a function while a set was expected`
stepcut has quit [Remote host closed the connection]
<pie_>
zmlww: if you run nix show-derivation on it it should show the correct phase
<pie_>
zmlww: well "normal"...
<infinisil>
nh2: Oh right, can't override functions like that..
stepcut has joined #nixos
<drakonis>
looks like they've dealt with it on the next systemd release cycle?
<drakonis>
the state is probably storing local time in case of failure?
stepcut has quit [Remote host closed the connection]
<infinisil>
nh2: Probably `fetchurl = args: super.fetchurl.override { ... } args` can work
stepcut has joined #nixos
<drakonis>
what kind of state would a ntp daemon could possibly have other than that?
stepcut has quit [Remote host closed the connection]
<zmlww>
pie_: But I was loading it into nix-shell to test it; how am I supposed to test my unpackPhase?
stepcut has joined #nixos
<pie_>
zmlww: im also curious about the solution to this
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
stepcut has quit [Remote host closed the connection]
<nh2>
infinisil: doesn't work, and I think it can't, because `super.fetchurl` is a function taking `{ url, ... }`, not a derivation, so it doesn't have an .override attribute
stepcut has joined #nixos
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
stepcut has quit [Remote host closed the connection]
<infinisil>
Hm..
<ldlework>
Anyone around that uses the `dotnet` cli tooling? Know a way around the issue that you can't install new dotnet tools because: Failed to create shell shim for tool 'dotnet-warp': Failed to create tool shim for command 'dotnet-warp': Access to the path '/home/ldlework/.dotnet/tools/dotnet-warp' is denied
stepcut has joined #nixos
<ldlework>
Which I have full access too....
<gchristensen>
why do you want to override fetchurl?
stepcut has quit [Remote host closed the connection]
<infinisil>
nh2: Oh, the fetchurl derivation isn't callPackage'd
stepcut has quit [Remote host closed the connection]
<infinisil>
I think it should then use __functor so you can both use .override on it directly but also call it
<infinisil>
gchristensen: Usecase for __functor, right there ^^ :2
<gchristensen>
I can't wait for you to start liking C++ too
stepcut has joined #nixos
* gchristensen
kids
<nh2>
infinisil: `callPackage` seems to make it work. Should that be changed this way?
<ornx>
i have a python program that i would like to make into a nix package, is there a good example of a python program somewhere that i can use as a template for this?
<infinisil>
Though I'm not sure what impact making fetchurl be a __functor will have
<ornx>
thank you i will give that a look
<infinisil>
nh2: gchristensen: Seeing the eval stats for that will be interesting
<pie_>
ornx: you could try grepping nixpkgs for various instances of the things in there
<gchristensen>
yes, yes it will
<pie_>
(the solution is to make the evaluator fastor :P)
<gchristensen>
looking forward to your PR, pie_ :)
<nh2>
ornx: might want to grep for `buildPythonApplication` in nixpkgs for examples
<ornx>
i see some of the examples of stdenv.mkDerivation and some have buildPythonApplication
<ornx>
does buildPythonApplication make its own derivation?
<ornx>
apologies if that is a stupid question
<nh2>
ornx: yes, eventually all packages make a derivation, that's what makes it manifest as a directory in the nix store
<ornx>
ahh i see!
orivej has quit [Ping timeout: 276 seconds]
<ornx>
hm, so, i tried to run that buildPythonPackage example from https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md by putting it in nixpkgs/applications/misc/rivalcfg/default.nix and doing nix-env -f blahblah -iA nixos.rivalcfg, and it complains with error: the expression selected by the selection path 'nixos.rivalcfg' should be a set but is a function
dl4mfo_ has joined #nixos
<clever>
ornx: you probably also want to use `nix-build` when testing, not nix-env
<infinisil>
Seems like a lot of NixOS modules get written and PR'd, but then abandoned..
<infinisil>
Maybe my reviews are too discouraging :P
<drakonis>
people write oneshot modules and then leave it lying around
<drakonis>
driveby PRs
<infinisil>
Kinda yeah
<infinisil>
Oh well
<Ralith>
patchbys
justanotheruser has quit [Quit: WeeChat 2.4]
<nh2>
infinisil: I think we should write some good instructions on how to write good services at some point. I regularly have to patch up existing services so that they have good behaviour, especially in respect to restaring in systemd for server systems that shall recover by themselves after problems
szicari has joined #nixos
<infinisil>
nh2: I personally don't have much experience with this, can you give a really quick explanation for how to go about this?
<clever>
one thing i should look into, to see if its ever been fixed, is the synergy services
mwc has quit [Quit: Lost terminal]
<clever>
originally, it "just worked" because somebody had accidentally disabled xauth cookies, since basically day 1 of nixos having xorg support, lol
<clever>
any user on the machine could connect to :0 and do anything
<clever>
but somebody eventually fixed that bug, which broke synergy
<{^_^}>
[nixpkgs] @worldofpeace merged pull request #66449 → nixos/ibus: do not default-install ibus-qt → https://git.io/fj7XL
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fj5vb
<aanderse>
hmm... taking a high quality module or two and then critiquing it bit by bit with comments on exactly why everything is the way it is would probably be valuable
<aanderse>
valuable for copy/pasting, and valuable for understanding
<aanderse>
also why haven't i written a mkDatabaseOption yet :-\
<drakonis>
mkdatabaseoption?
tgamblin has joined #nixos
tgamblin has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fj5vh
<nh2>
infinisil: For me common pain points are:
<nh2>
* Systemd's default startup timer, that will stop trying to start a service after a couple of times. That means servers won't recover after, say, a 5 minute network outage. There are numerous pitfalls in making a systemd service truly try to restart forever, and showing how to do that would be useful.
<nh2>
* Services that don't have `requiredBy = [ "multi-user.target "];` don't count to switch-configuration / nixops deploy failing on start failure, meaning stuff can silently fail, with you noticing only later (it is desirable that nixops deploy fails hard and with exit code if the service fails on first start)
<aanderse>
drakonis: many modules require database connectivity and database.* is a very common pattern
<aanderse>
name, user, passwordFile, etc... repeated again and again
<drakonis>
ah i see
<aanderse>
and inconsistency between modules
<aanderse>
would be very nice to have a common naming convention, etc...
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fj5fe
georges has quit [Ping timeout: 245 seconds]
<drakonis>
so, a case of reducing code duplication?
<infinisil>
nh2: Ah nice
Taneb has quit [Quit: I seem to have stopped.]
<infinisil>
aanderse: I've been kind of wanting a service abstraction layer for NixOS, something like tasks.*.{enable,user,group,database,openFirewall,port,...}
<infinisil>
aanderse: All the kinds of options you might need for the average service, abstract them away into a systemd.services.*-like interface
<infinisil>
Although that would make the manual rather bad
<infinisil>
Because none of these service-specific options would be documented
<aanderse>
infinisil: yeah you have mentioned before. sounds like a nice idea. requires some careful thought to get right, but would be very useful if you nailed it :-D
<aanderse>
well generic documentation works for some of it
<aanderse>
and if you can override the default generates docs for the rest
<aanderse>
but treewide is hard because you always find some nasty edge cases which require application specific knowledge to figure out
mexisme_ has quit [Ping timeout: 248 seconds]
Supersonic has joined #nixos
MinceR_ has joined #nixos
<drakonis>
i got a bit of a nasty combo to work atm
<drakonis>
i need to do some python and qt stuff and i don't have a lot of time on hand to figure out how to it to work under nixos
<drakonis>
what's the recommendations for getting a graphical environemnt for this?
MinceR has quit [Ping timeout: 248 seconds]
georges has joined #nixos
nexgen has joined #nixos
<ornx>
is there a difference between packages that need to do system-level tasks (like add new users/groups, change nixos options like add extra udev rules) and packages that just produce a runnable program in the store?
<nh2>
infinisil: another question: Can I in my overlay make that `fetchurl = super.fetchurl.override (old: { curl = old.curl.override { libkrb5 = super.libkrb5; }; })`, so that fetchurl just uses the non-static-overridden libkrb5?
<nh2>
It doesn't seemt work like I wrote that there, because using `super.libkrb5` results in infinite recursion.
<infinisil>
nh2: You could always define additional top-level attrs like libkrb5_nonstatic or so
<nh2>
ornx: yes; program "packages" are in `pkgs/`, and NixOS-system things that modify the system are "modules" in `nixos/modules/`
fusion809 has quit [Remote host closed the connection]
<ornx>
ah, so, does that mean that a program that wants to add users/set nixos options should be a module and not a package? or should it be split into installation of the program, and a module that handles all the nixos option setting?
<nh2>
e.g. the nginx systemd service is a "module"; it may define some nginx UNIX user account. It uses the nginx "package". Naturally, modules are available only on NixOS, while most packages work fine on any system that can run nix
<infinisil>
nh2: Oh actually, the inf rec probably comes from the fact that super.libkrb5 depends on fetchurl
<nh2>
ornx: yes, all system-level things (users, nixos options, services) have to go into `nixos/`, all packages/libraries have to go under `pkgs/`, as you say
<nh2>
infinisil: yes I think so
<ornx>
this has been very helpful, thank you
* infinisil
is gonna get some sleep now
<nh2>
infinisil: yeah we should really go to bed :D
justanotheruser has joined #nixos
<infinisil>
Hehe yes
mexisme_ has joined #nixos
selfsymmetric-mu has joined #nixos
slack1256 has joined #nixos
growpotkin has quit [Ping timeout: 272 seconds]
___laika has quit [Ping timeout: 245 seconds]
jgt has joined #nixos
white_bluff[m] has joined #nixos
mrCyborg has joined #nixos
jgt has quit [Ping timeout: 276 seconds]
slack1256 has quit [Remote host closed the connection]
aanderse has quit [Ping timeout: 252 seconds]
aanderse has joined #nixos
mexisme_ has quit [Ping timeout: 272 seconds]
<pie_>
ping me if you ever start on this :D <infinisil> aanderse: I've been kind of wanting a service abstraction layer for NixOS, something like tasks.*.{enable,user,group,database,openFirewall,port,...}
<pie_>
wouldnt that make the manual better because then there would be standards <infinisil> Although that would make the manual rather bad
<pie_>
what do you mean by service specific options not being documented
<clever>
samueldr: time to reverse engineer hydra-in-a-bag!
<etu>
so instead of: { a = a; b = b; c = c; } you can have { inherit a b c; }
<dminuoso>
etu: Sure, but for a single attribute that seems a bit lackluster.
<etu>
I guess it comes down to convention then
<etu>
and that it may feel silly to type out the name twice when you don't have to
oida has quit [Remote host closed the connection]
oida has joined #nixos
rsoeldner has joined #nixos
seppellll has joined #nixos
<Cale>
dminuoso: Here's a puzzle for you: let x = 1; in with { x = 2; }; x
<vegai>
1.5?
<Cale>
haha
seppellll has quit [Remote host closed the connection]
<dminuoso>
Cale: It's 1. My reasoning is as follows: If it were ⌜2⌝ you wouldn't have bothered asking the riddle.
<Cale>
haha, correct
<Cale>
with statements can't shadow bindings that are already in scope
<dminuoso>
But granted, I dont understand why.
<Cale>
which seems a bit like the principle of maximal surprise to me, but that's how it is
<Cale>
well, sorry, that's imprecise
<Cale>
I should say, they can't shadow bindings bound by other means
<Cale>
with { x = 1; }; with { x = 2; }; x
<Cale>
evaluates to 2
kenshinCH has joined #nixos
<Cale>
(x: with { x = 2; }; x) 1 --> 1
<dminuoso>
Cale: So ⌜with⌝ can only shadow bindings introduced with ⌜with⌝?
<Cale>
I believe so, yeah
<Cale>
Another fun thing
<Cale>
(x: x)
<Cale>
is the identity function
<Cale>
(x:x)
<Cale>
is a string
<pie_>
Cale: argh damn i keep forgetting about that :P i was thinking it depends on the parenthesization
<DigitalKiwi>
oh cale is here
<pie_>
looks like Cale is in all the good channels
<srhb>
There's an RFC to deprecate URL literals.
<srhb>
That would clean up some nasty language surprises..
<ivan>
a mere x:x is a string too :(
<Cale>
Yeah, the parens were redundant in both cases
<Cale>
x : x
<Cale>
is also the identity function
<Cale>
[x : x]
<Cale>
is a parse error
<Cale>
(obvious, but still kind of amusing)
<Cale>
[{x = 1;}.d or null] is not a parse error though
<Cale>
(so maybe it's not as obvious?)
___laika has quit [Ping timeout: 276 seconds]
<Cale>
[{x = 1}?d] isn't okay though
___laika has joined #nixos
<pie_>
lists like you to have elements parenthesized :p
<Cale>
It's just a little bit funny that 'or' is somehow fine
<pie_>
im pretty sure the last one is okay depending on what you mean by ok
* pie_
checks why he is wrong
<Cale>
and '.'
<pie_>
ok well apparently that also needs parenthesizing. weird...
<pie_>
Cale: guess you could write a book :P
jgt has joined #nixos
<Cale>
This isn't really the stuff I'd write a book about though... the thing which really gets to me is the manner in which we're working in a language where equational reasoning ought to work, except that somehow we're constantly undermining our ability to use it, by making it nearly impossible to get a concise definition of anything most of the time. Everything is defined by these nested fixed points on attrsets that are
<Cale>
spread out through many files and override things in piecemeal ways, and just finding the relevant bits and pieces can be hard, let alone fully understanding how they evaluate.
<Cale>
Oh, and nearly everything is defined to be a function of (some incarnation of) nixpkgs
<Ashy>
will guix save us?
<Cale>
Imagine if you were writing a Haskell program, and you somehow bundled up every definition in your program as a record and passed it to everything, and those things would then do weird stuff with that record...
<Cale>
Nothing will save us if the problem is that we're writing our programs in a way that's fundamentally hard to understand.
jgt has quit [Ping timeout: 264 seconds]
<Cale>
I partly understand why it's done -- nobody wants to explicitly work out all the dependencies between things and reflect them as explicit function applications. Instead we have callPackage which uses that weird property of lambdas in nix that you can tell the names of the variables they bind.
<srhb>
And the sweeping redefinitions that affect everything are very central. But, yes, it's hard to reason about at times.
rauno has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed 3 commits to haskell-updates: https://git.io/fj5UX
<pie_>
Cale: thanks for expressing something thats been bothering me
<pie_>
Cale: on the other hand im not sure how to fix that because it seems kind of inherent to the paradigm
<srhb>
Ashy: If anything I'd imagine it's even less constrained, given guile..
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fj5U1
<srhb>
(But maybe also more principled? I think that's mostly an implementation detail of "guixpkgs" if it is, though)
<srhb>
I'm not sure I'd very much like a much more restrictive ADT for nixpkgs though.
Okinan has quit [Quit: Konversation terminated!]
<srhb>
That said, it's hard to imagine how things could be. I haven't seen any convincing suggestions..
<pie_>
hm, though I didnt think about this too hard, just the tangle _has_ bothered me a lot.
<pie_>
and our tooling isnt up to par to compensate
<Cale>
srhb: At the very least, it doesn't really make sense that we have library stuff mixed in with packages
<pie_>
(though a lot of the tooling problems are doable...)
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fj5Uy
<Cale>
Yeah, you end up feeling like an imperative programmer without a debugger.
<Cale>
Instead of implicit state, you have implicit context, but there's so much of it that it amounts to the same confusion.
<pie_>
youre not wrong
<pie_>
:(
FRidh has joined #nixos
<Cale>
srhb: Another thing I think would really help is if there were greater correspondence between the attrsets being constructed and where the .nix files were located in the directory structure
<Cale>
Haskell's system isn't great about this: it can be hard to tell which module a name got bound in, and then which package the module is in. But having discovered that, I generally know exactly which file to go look in for the definition.
steshaw has quit [Quit: Connection closed for inactivity]
<Cale>
With the way we're doing things with nix, I'm left grepping for things and hoping to find something relevant, and that I don't miss some override that happens later to completely change the thing I'm trying to look at.
freeman42y has joined #nixos
<pie_>
Cale: alternatively, we generally need some way to trace where things are coming from
<Cale>
Yeah, that would help
<Cale>
hnix is going to try to provide that
Jackneill has joined #nixos
<pie_>
im really hopeful we can have good things as time passes
<pie_>
>.>
<Cale>
I'm not sure what it'll look like...
<Cale>
Some sort of stack of attrsets that track the provenance of the value? :D
<pie_>
(i need to try hnix one of these days)
<Cale>
(me too)
<Cale>
I just work next to people who work on hnix
<pie_>
lucky :p
<pie_>
what do you do anyway?
<pie_>
(man stuff is really complicated thoguh if you think about it, i hope we can simplify things...)
<Cale>
I'm a software developer with Obsidian Systems. We build web and mobile applications for various clients using Haskell, and all our build infrastructure is in nix.
<pie_>
oh cool ive seen people do stuff on github :p
<srhb>
Cale: I hadn't thought of that. I think that makes sense :)
<srhb>
(Re. the locations of files vs. attrset defs)
<pie_>
obsidian systems people seem pretty overpowered >_>
<Cale>
yeah
___laika has quit [Ping timeout: 276 seconds]
<srhb>
OS is a cool place :)
<Cale>
I tried making an ur-default.nix which used only builtins to read all the subdirectories of the current directory and if they contain a default.nix, import it, building an attrset from those keys
<Cale>
I've yet to really try using it for anything
<srhb>
If flakes pans out there's some opportunity to standardize a bit over that as well.
<srhb>
Then again, with the option for decentralization, it may make things worse :-P
<srhb>
Though I think that's a cost we have to take anyway...
<Cale>
But in my head, there's a version of reflex-platform which is just broken down nicely into a handful of platform subdirectories, each of which has a whole bunch of thunks in it
<srhb>
That would be great. :)
Chiliparrot has joined #nixos
sveitser2 has quit [Quit: WeeChat 2.2]
domogled has joined #nixos
sveitser has joined #nixos
jgt has joined #nixos
___laika has joined #nixos
freeman42y has quit [Ping timeout: 250 seconds]
hmpffff has joined #nixos
hoijui has joined #nixos
___laika has quit [Ping timeout: 248 seconds]
szicari has quit [Remote host closed the connection]
szicari has joined #nixos
kleisli_ has quit [Ping timeout: 272 seconds]
domogled has quit [Remote host closed the connection]
<pie_>
oh...if you unmount it via the cli it doesnt do it
<pie_>
*blood pressure reducing*
nexgen has quit [Remote host closed the connection]
nexgen has joined #nixos
sigmundv has joined #nixos
rndd has quit [Ping timeout: 246 seconds]
o1lo01ol1o has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @hkjn opened pull request #66516 → Add `python3Packages.ckcc-protocol` package, and list is as a dependency for `electrum`. → https://git.io/fj5kg
orivej has quit [Ping timeout: 276 seconds]
sigmundv has quit [*.net *.split]
fendor has quit [*.net *.split]
veske has quit [*.net *.split]
cfricke has quit [*.net *.split]
nhey_ has quit [*.net *.split]
rsoeldner has quit [*.net *.split]
rauno has quit [*.net *.split]
mexisme_ has quit [*.net *.split]
stepcut has quit [*.net *.split]
justanotheruser has quit [*.net *.split]
xorAxAx has quit [*.net *.split]
reanimus has quit [*.net *.split]
{^_^} has quit [*.net *.split]
lopsided98 has quit [*.net *.split]
ThatOtherGuy has quit [*.net *.split]
gerschtli has quit [*.net *.split]
sellout- has quit [*.net *.split]
smolboye[m] has quit [*.net *.split]
badmutex[m] has quit [*.net *.split]
bnasty[m] has quit [*.net *.split]
bricewge has quit [*.net *.split]
Lem_ has quit [*.net *.split]
marcinkuzminski has quit [*.net *.split]
scott has quit [*.net *.split]
eddyb has quit [*.net *.split]
ajmcmiddlin has quit [*.net *.split]
chrisaw has quit [*.net *.split]
nwspk has quit [*.net *.split]
monotux has quit [*.net *.split]
victorbjelkholm has quit [*.net *.split]
philipcristiano has quit [*.net *.split]
georgew has quit [*.net *.split]
englishm has quit [*.net *.split]
Guest19806 has quit [*.net *.split]
dongcarl has quit [*.net *.split]
abcrawf has quit [*.net *.split]
fadenb has quit [*.net *.split]
pointfree has quit [*.net *.split]
ericsagnes has quit [*.net *.split]
Forkk has quit [*.net *.split]
awygle has quit [*.net *.split]
markasoftware has quit [*.net *.split]
b42 has quit [*.net *.split]
craige has quit [*.net *.split]
shlevy has quit [*.net *.split]
bwe has quit [*.net *.split]
nikola has quit [*.net *.split]
mdash has quit [*.net *.split]
marcinkuzminski has joined #nixos
bnasty[m] has joined #nixos
ThatOtherGuy has joined #nixos
Guest19806 has joined #nixos
nlofaro has joined #nixos
georgew has joined #nixos
sellout- has joined #nixos
justanotheruser has joined #nixos
stepcut has joined #nixos
nwspk has joined #nixos
dongcarl has joined #nixos
lambda-11235 has joined #nixos
mexisme_ has joined #nixos
eddyb has joined #nixos
monotux has joined #nixos
gerschtli has joined #nixos
ajmcmiddlin has joined #nixos
chrisaw has joined #nixos
philipcristiano has joined #nixos
mankyKitty has joined #nixos
sigmundv has joined #nixos
<pie_>
uhhh...my nixos-rebuild is failing with whatever this weird cache error is.. https://bpaste.net/show/ai4-
victorbjelkholm has joined #nixos
realrokka has quit [Ping timeout: 244 seconds]
fendor has joined #nixos
o1lo01ol1o has joined #nixos
<pie_>
oook looks like thats intermittent again
cfricke has joined #nixos
lopsided98 has joined #nixos
reanimus has joined #nixos
scott has joined #nixos
badmutex[m] has joined #nixos
Lem_ has joined #nixos
englishm has joined #nixos
veske has joined #nixos
awygle has joined #nixos
pointfree has joined #nixos
shlevy has joined #nixos
abcrawf has joined #nixos
nhey_ has joined #nixos
Forkk has joined #nixos
ericsagnes has joined #nixos
rsoeldner has joined #nixos
rauno has joined #nixos
bricewge has joined #nixos
fadenb has joined #nixos
xorAxAx has joined #nixos
smolboye[m] has joined #nixos
b42 has joined #nixos
mdash has joined #nixos
bwe has joined #nixos
nikola has joined #nixos
markasoftware has joined #nixos
craige has joined #nixos
scott has joined #nixos
scott has quit [Changing host]
smolboye[m] has joined #nixos
smolboye[m] has quit [Changing host]
bricewge has joined #nixos
bricewge has quit [Changing host]
englishm has joined #nixos
englishm has quit [Changing host]
badmutex[m] has joined #nixos
badmutex[m] has quit [Changing host]
{^_^} has joined #nixos
scott is now known as Guest51328
lambda-11235 has quit [Quit: Bye]
selfsymmetric-mu has quit [Ping timeout: 272 seconds]
lsix has joined #nixos
Guest51328 has joined #nixos
Guest51328 has joined #nixos
Guest51328 has quit [Changing host]
Guest51328 is now known as scott
pie_ has quit [Quit: No Ping reply in 180 seconds.]
<maralorn>
Any hints how I can figure out which protocols client and server are using? Which protocols are there even and how can I change what is used?
pingiun has quit [Ping timeout: 245 seconds]
<maralorn>
(I am trying to use the nix.nixServe with substuters = ssh//nix-serve@myhost
<pie__>
elvishjerricco: I ... I broke something again...
<pie__>
so I was minding my business rearranging partitions: original: [sda1: "NIXOS"][sda2: luks], i deleted sda1 and had gparted left extend sda2 to fill the empty space
<pie__>
now sda2 is called nixos for some reason and i think the os thinks its ext
<maralorn>
I use a substituter which is defined in my /etc/hosts "http://hera:5001" How do i need to call it in the trusted-public-keys option? "hera:5001:..." gives a parser error. (unsurprisingly)
<pie__>
i did the stuff, and the linux partition caches did not get updated, because htey suck. when the device became availible again after the partition operations, it got mounted automatically, and the OS still thought its ext4. so it overwrite the luks header with some garbage
<ajs124>
I don't think it could mount that, if there is not ext4 there. Did you unmount it beforehand? And doesn't gparted call partprobe?
<eyJhb>
Ahh, doing the stuff is not always good :p
<ajs124>
pie__: just do it by hand with gidsk and dd next time. at least then you know exactly how you fucked up.
<pie__>
i unmounted it, and partprobe never seems to work
<pie__>
ajs124: dont ask me how but it got mounted at some point
<pie__>
(now that i think about it, probably a bad interaction with kde damnit)
<pie__>
i figured gparted can do it better than me. also its a bit harder if there isnt enough space for a single step move
<ajs124>
pie__: if partprobe doesn't work, you can also reset the scsi bus. or if that doesn't work, you can unbind and rebind the sata controller driver on PCI, assuming you don't have any other sata drives in use.
<pie__>
*bit more tedius
<ajs124>
you can also un- and replug the drive
<clever>
or just reboot? lol
<pie__>
ajs124: i did actually unplug and replug the usb device
<clever>
sometimes, its simpler to just treat it like windows
<pie__>
didnt help in this case because something is bad with the data obviously -_-
<ajs124>
clever: I was thinking of switching a power breaker off and back on, but rebooting might also work.
<pie__>
also you cant really do those things if youre operating on your root hardware :D
<pie__>
'cept reboot
veske2 has quit [Quit: This computer has gone to sleep]
<pie__>
i need to stop wanting to do high level surgery and go back to duct tape and wd40
selfsymmetric-pa has quit [Ping timeout: 264 seconds]
veske2 has joined #nixos
veske2 has quit [Client Quit]
<exarkun>
hm, monday. guess that means it's time to go back to trying to understand propagatedBuildInputs.
<gchristensen>
how is NixOS's support for wayland but not sway?
<pie__>
luks should have a backup header at the other end like zfs does -_-
Theuni2 has joined #nixos
acarrico has joined #nixos
<exarkun>
pie__: you can do separate storage backup, `cryptsetup luksHeaderBackup ...`
<clever>
pie__: something i have noticed they do, is that the key slot material is striped, i think so that if any one block range is recovered, you cant actually make use of it
<clever>
pie__: ive read similar things about nuclear bomb computers, how they want to spread the data around the physical chip, so even if you recover a 1x1mm fragment of the silicon, it wont be of use in recovering keys, lol
<pie__>
exarkun: i was thinking about that 5 miutes before you mentioned it
<pie__>
exarkun: the thing is i dont think anyone does that until theyve screwed up their luks header a few times
<pie__>
exarkun: alternatively, put it in the protocol and prevent some amount of foot shooting?
<pie__>
clever: yeah
<{^_^}>
[nixpkgs] @primeos opened pull request #66527 → ffmpeg_4: Enable support for AV1 decoding via dav1d by default → https://git.io/fj5mF
<exarkun>
sure, maybe it'd be better if there were automatically a few copies in the volume
<pie__>
clever: otoh, one set of stripes vs two set of stripes?
<pie__>
s/stripes//
<clever>
pie__: yeah
veske2 has joined #nixos
joshuagl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fusion809 has joined #nixos
<lucus216>
How do I create an option that errors when used / a removed option?
joshuagl has joined #nixos
<clever>
lucus216: simplest is to just not define the option, anything not in options= will be an error
<lucus216>
sure, but I'd like to return a useful error redirecting the user to a similar option
<lucus216>
buildkite-agent was removed in favor of buildkite-agents
Neo-- has quit [Ping timeout: 252 seconds]
Neo-- has joined #nixos
<Ashy>
anyone using nixfmt from the repo with nix-shell?
<lucus216>
Ashy: As in it is listed in shell.nix, but after running nix-shell, it's not in your path?
ddellacosta has quit [Ping timeout: 268 seconds]
<clever>
lucus216: i believe this will alias it over to another name, and print a warning if the old name is used
<Ashy>
nix-shell fails with error: attribute 'stylish-haskell' missing,
<clever>
lucus216: or just mkRemovedOptionModule
<lucus216>
Ashy: Ah, looks like the shell.nix specifies your local nixpkgs rather than the pinned one, that is my mistake.
<lucus216>
Ashy: You can use this for now: nix-shell --arg pkgs 'import ./nixpkgs.nix'
dispanser has quit [Ping timeout: 246 seconds]
<lucus216>
I will fix it soon
mexisme has joined #nixos
hoijui has quit [Ping timeout: 264 seconds]
<Ashy>
cheers
<pie__>
about 10 more minutes before the search for "LUKS" hits the presumed start of the old partition, afterwards i will announce the patient dead and attempt to restore from backup
<clever>
pie__: there are partition undelete tools, that do things like search at multiples of the block size
<alex``>
after `nix-shell` doing `rails new blog`, `cd blog`, `rails server`
<alex``>
my Gemfile having `gem 'rails'` in it
<manveru>
yeah
Neo---- has joined #nixos
<manveru>
but `rails new` created a new Gemfile
<alex``>
but rails does nnot serve
<manveru>
in the blog folder
<manveru>
which has all the actual dependencies
<{^_^}>
[nixpkgs] @herrwiese opened pull request #66529 → [19.03] Linux 5.2 → https://git.io/fj5YP
<alex``>
oh
cfricke has quit [Ping timeout: 244 seconds]
Neo--- has quit [Remote host closed the connection]
<alex``>
how to do a new rails app then?
<alex``>
since I have manually created a fresh Gemfile
<alex``>
but rails generate new one
<alex``>
manveru: to have rails, I have to create a bare Gemfile `gem 'rails', and once Rails is installed, I have to create a new Gemfile generated by Rails, and re-execute the bundix command in it? :D
cfricke has joined #nixos
<alex``>
a Gemfile to bootstrap rails which booststrap a complete Gemfile
<alex``>
is it correct?
Shoubit has quit [Quit: Leaving]
Neo---- has quit [Remote host closed the connection]
Neo---- has joined #nixos
domogled has quit [Quit: domogled]
zupo has joined #nixos
<alex``>
manveru: Thanks for your help, quick replies as usual :-)
eskytthe has joined #nixos
<zeta_0>
when trying to do a rebuild i am having some package collisions(`ghc-with-packages` and `ihaskell-with-packages`), in order to try and fix this i want to set package priorities declaratively in home.nix but i have no idea how, is there some instructions anywhere on how to do this in nixos?
siers is now known as ij
<infinisil>
zeta_0: I already told you last time..
veske2 has quit [Quit: This computer has gone to sleep]
<zeta_0>
infinisil: yes, but you did not give very much detail on how to do it, does the nixos documentation have some instructions somewhere on how to do this correctly?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsx has quit [Quit: dsx]
xkapastel has joined #nixos
zupo has joined #nixos
ThatDocsLady has joined #nixos
dsx has joined #nixos
___laika has quit [Read error: Connection reset by peer]
<exarkun>
ie ... the propagate to other python packages but not to python.buildEnv
* exarkun
reads buildEnv docs again
<pie__>
ajs124: does replugging a usb device not count towards a rescan
<ajs124>
pie__: if you just want to kill it: dd if=/dev/zero of=/dev/sdc bs=1M count=2 should be enough to overwrite the partition table
<ajs124>
replugging should be more than enough. when in doubt, always check dmesg
<pie__>
ajs124: i already used gparted to write a new one xD
<pie__>
it says sdc1 now instead of sdc2 so thats progress
<ajs124>
you can also use wipefs -a (the -a makes it so that it actually wipes things)
<ajs124>
that does sound like a new entry in the partition table then, if it's 1 instead of 2 now
<pie__>
but the partition metadata is still there xD
<ajs124>
contents will probably still the same
<pie__>
its not that i want to wipe it
<pie__>
the question is how it survived
<pie__>
ok so yeah no mkfs and whatever
<ajs124>
hm? how what survived?
<pie__>
i guess that would make sense
<pie__>
how the uuid and label survived
<ajs124>
yeah. partition table entries are just pointers in a table.
<zeta_0>
infinisil: that's fine i was just looking for some example code for reference but i'll let you know if i still can't get it to work
npmccallum has joined #nixos
<o1lo01ol1o>
why might nixops be failing to ssh into a new ec2 deployment? I have a security group that allows { toPort = 22; fromPort = 22; sourceIp = "0.0.0.0/0"; }
<gchristensen>
do you have an internet gateway with routes?
<o1lo01ol1o>
exarkun: I found a reference for that: SSH_AUTH_SOCK='' nixops deploy yadda yada
<o1lo01ol1o>
seems to be working. . .
<exarkun>
so I can't have a working python environment :(
Neo---- has quit [Remote host closed the connection]
Neo---- has joined #nixos
<exarkun>
is `python.buildEnv` broken? It seems broken to me. If I put X into `extraLibs` then I should be able to import `X` in the resulting environment ... even if `X` has dependencies.
<adisbladis>
exarkun: You can do something like (python3.withPackages(ps: [ ps.somepackage ])).override(old: {ignoreCollisions=true;})
<exarkun>
adisbladis: aha
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<exarkun>
adisbladis: that seems to help with that problem ... but now I see the resulting environment is still weird
<exarkun>
eg pyhamcrest does not appear in it
gentauro has joined #nixos
<exarkun>
even though it is a propagatedBuildInput from one of the python packages provided
<exarkun>
and even if I explicitly list it as a package to include!
<adisbladis>
exarkun: Could you share your expression?
<exarkun>
I can, moment
Neo---- has quit [Remote host closed the connection]
<adisbladis>
exarkun: And what's in tahoe-lafs.nix?
<exarkun>
adisbladis: it's alongside in the repo
<adisbladis>
Oh, I'm obviously blind
<exarkun>
adisbladis: it's _mostly_ just copy/paste of nixpkgs tahoe-lafs but updated to a newer version and turned into a module instead of an application
<adisbladis>
and/or an idiot
<exarkun>
it's not exactly a minimal example, sorry about that
hoijui has joined #nixos
___laika has quit [Ping timeout: 272 seconds]
mexisme has joined #nixos
<adisbladis>
That's ok
<adisbladis>
I have a hunch, just confirming it
owickstrom has joined #nixos
erasmas has joined #nixos
Neo---- has quit [Remote host closed the connection]
Neo---- has joined #nixos
gentauro has quit [Quit: leaving]
<{^_^}>
[hydra] @edolstra pushed 5 commits to notifications: https://git.io/fj536
Theuni2 has quit [Ping timeout: 250 seconds]
mexisme has quit [Ping timeout: 250 seconds]
<adisbladis>
exarkun: I think this should work (you're gonna have to re-adapt your nixpkgs pinning) http://ix.io/1Rq2/nix
* exarkun
reads
rndd has joined #nixos
<rndd>
hi everyone
<rndd>
have a question... cannot open new terminal in xmonad
<exarkun>
adisbladis: I don't know if I quite understand that. On line 6, it would be better to do `with ps;` right? But isn't ps just exactly `pkgs.python27Packages`?
<adisbladis>
exarkun: By default yes, but you want to create your custom package sets
realrokka has joined #nixos
* adisbladis
should write a blog post or something about how to avoid all the sharp edges in python packaging
<exarkun>
please do :)
<adisbladis>
exarkun: Anyway, in my paste on line 6 I create my own package set, and that's `ps` on line 12
<simpson>
adisbladis: Good luck. Last time I seriously worked on this, I ended up concluding that Python's module system made impossible, *and* also that there's no minimal modification to Python which fixes the problematic design elements.
<simpson>
Or I guess you might mean Python in nixpkgs specifically. Yes, please do more of that.
<adisbladis>
Yes, nixpkgs specifically
<adisbladis>
I'm _not_ gonna fix the python module system ;)
<exarkun>
adisbladis: I think I get it ... Sounds like a good rule of thumb is to never mix different versions of pythonPackages
<adisbladis>
exarkun: Yeah :)
<adisbladis>
And nixpkgs makes it far too easy to accidentally mix
<adisbladis>
(or misunderstand)
<rndd>
-_-
<adisbladis>
simpson: Fixing the python module system would probably result in not-python
<andi->
dos buildPythonPackage require anything special for .pyx files? Should I "compile" them during the build phase?
<exarkun>
okay trying to adapt this solution now
<exarkun>
my first try did not succeed
zeta_0 has joined #nixos
<FRidh>
andi-: nothing special
<FRidh>
just add cython
<sphalerite>
andi-: maybe adding pyrex to the build inputs
<FRidh>
setup.py arranges the build
<sphalerite>
oh
<exarkun>
is there something wrong with this idiom? `withPackages (ps: [ (ps.callPackage ./tahoe-lafs.nix { }) ])`?
<sphalerite>
yeah listen to FRidh , FRidh knows what FRidh is talking about. Unlike myself :D
<FRidh>
exarkun: that's ok
<andi->
sphalerite: thanks
<rndd>
guys
<rndd>
pls help
<infinisil>
rndd: This isn't an xmonad channel
<rndd>
but I launched xmonad within nixos
<Taneb>
rndd: try asking in #xmonad
<FRidh>
exarkun: withPackages is just a thin wrapper around buildEnv to make it easier to use. There should be no reason you need ignoreCollisions, except for namespace packages in Python 2
ThatDocsLady_ has quit [Quit: Leaving]
<infinisil>
rndd: You'd at least have to provide your config, it's almost impossible to help otherwise
<exarkun>
FRidh: Twisted has this "dropin.cache" thing that always collides in a mostly meaningless way. I seem to need ignoreCollisions to get past that.
selfsymmetric-pa has joined #nixos
<FRidh>
exarkun: which packages together give the collisions?
<exarkun>
FRidh: eg twisted and nevow
<FRidh>
ah, I think we need to remove the cache file during the build
<exarkun>
fwiw my problems now seem to have to do with things other than the choice between buildEnv and withPackages
<{^_^}>
[nixpkgs] @samueldr pushed commit from @rasendubi to release-19.03 « acpilight: add to module-list »: https://git.io/fj53F
<FRidh>
had to do the same with pytest
<exarkun>
FRidh: yea that'd be reasonable. particularly if then some buildEnv hook could generate a new one combined all the packages in the env ...
Neo--- has joined #nixos
noudle has joined #nixos
Neo---- has quit [Remote host closed the connection]
<infinisil>
It's lowPrio, I only accidentally wrote loPrio at some point
o1lo01ol1o has quit [Remote host closed the connection]
dm9 has joined #nixos
o1lo01ol1o has joined #nixos
leothrix has joined #nixos
<enteee>
I need android-studio with additional libraires in the fhs-env. I have created two scripts which are more or less copy & pasted from nixpkgs with minor additions. Can somebody have a quick look and maybe give me a pointer on how I can achive the same without copy & pasting from nixpkgs?
Neo---- has quit [Remote host closed the connection]
ThatDocsLady_ has joined #nixos
dansho has joined #nixos
ThatDocsLady has quit [Ping timeout: 252 seconds]
Neo---- has joined #nixos
<ivegotasthma>
hello, I have a python module that I fails to build because of django.settings not being found. Is there a way I can fix that? I tried injecting django / django-sr / django_compat but they have 0 effect.
<erba>
Can someone give me some insight when it comes to installing things with nix-env rather than through configuration.nix and nixos-rebuild? I've only modified configuration.nix (and my imported nix configs) as well as through shell.nix for some cases.
kenshinCH has joined #nixos
<sphalerite>
erba: you mean when it's useful?
<{^_^}>
[hydra] @edolstra opened pull request #668 → Turn hydra-notify into a daemon → https://git.io/fj5sW
<sphalerite>
erba: it's useful on non-nixos platforms where you don't _have_ nixos-rebuild
<erba>
sphalerite: yes, and does it not mutate the system state?
<sphalerite>
it does have a number of drawbacks in its primary intended use case though
<sphalerite>
,imperative
<erba>
sphalerite: oh
<{^_^}>
nix-env has multiple drawbacks as an imperative package manager. nix-env -u will sometimes upgrade to the wrong thing; the outputs to install are very finicky to override; and packages that have been removed or are otherwise unavailable will remain in your profile without any warnings. Consider using a ,declarative setup instead.
<sphalerite>
it can also be used by unprivileged users, which can be useful
<erba>
{^_^}: Yeah I keep using declarative setup then ;)
MmeQuignon has quit [Ping timeout: 245 seconds]
<sphalerite>
{^_^} is a bot ;)
<adisbladis>
erba: {^_^} is a bot :)
<erba>
sphalerite: Thanks, I didn't even consider non NixOS distros :P
<{^_^}>
[nixpkgs] @kalbasit pushed commit from @WilliButz to master « prometheus-varnish-exporter: 1.5 -> 1.5.1, use buildGoModule (#66472) »: https://git.io/fj5sl
lsix has quit [Quit: Konversation terminated!]
noudle has quit []
<erba>
sphalerite: lol ok xD
<erba>
adisbladis: that last msg was meant for sphalerite :P I got confused
<sphalerite>
erba: and it makes mixing nixpkgs versions less fiddly than nixos itself does, though nixos arguably still does it _better_ (in terms of declarativeness)
<sphalerite>
erba: it has its uses, but if you're happy with system-wide config through the nixos configuraiton then stick with that :)
zeta_0 has joined #nixos
<erba>
I see, thanks guys :)
drakonis has joined #nixos
<erba>
sphalerite: I've been using that and shell.nix for some projects.
Lukas4452 has quit [Ping timeout: 244 seconds]
<zeta_0>
infinisil: after fixing the typo i am still getting an error, do i need to add the nixpkgs.pkgs option in order for it to work?
<clever>
zeta_0: what is nixpkgs.pkgs set to?
<infinisil>
zeta_0: "getting an error", if you're getting an error, *show* the error, that should be obvious by now..
rauno has joined #nixos
drakonis_ has quit [Ping timeout: 268 seconds]
Lukas4452 has joined #nixos
<Miyu-chan>
Is there a way to transform `:: Map k [v]` into `:: Map v [k]`? That is, it changes the values into keys, and keys into values.
wildtrees has joined #nixos
<Miyu-chan>
I know that I can do it with recursiveUpdate, but the code's, uh, not too intuitive, IMO.
<zeta_0>
clever: well that is the only place i see the `lib` option, i am trying to find a simple way to set package priorites because there is a collision between: `ghc-with-packages` and `ihaskell-with-packages`, is that the option i need to set?
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #nixos
<clever>
> builtins.listToAttrs (lib.mapAttrsFlatten (k: v: { name = v; value = k; }) { key = "value"; })
<zeta_0>
clever: ihaskell does not build when i try to install it together with my other haskell packages, apparently something is broken in nixos 19.03
o1lo01ol1o has quit [Remote host closed the connection]
<exarkun>
Does ... ugh
<exarkun>
if a propagatedBuildInput isn't explicitly referenced is it removed from the closure?
o1lo01ol1o has joined #nixos
<mdash>
exarkun: yes, closures only contain things referenced in the outputs
pietranera has quit [Quit: Leaving.]
<exarkun>
How does this work with the python support though
<mdash>
exarkun: "propagated" means that it comes along as a build input to anything else that depends on the thing
<exarkun>
"import hamcrest" is not clearly a reference to pyhamcrest
<mdash>
i.e., 'foo.propagatedBuildInputs = [ baz ];' means that anything that does 'buildInputs = [ foo ];' gets baz as a build input too
<adisbladis>
For python propagatedBuildInputs _are_ referenced in the output
<exarkun>
it seems like pyhamcrest is incorrectly a twisted propagatedBuildInput when it should really be a checkInput but given that it is a propagatedBuildInput I don't understand why I can't "import hamcrest"
<mdash>
adisbladis: ah, that's why it's so confusing
<adisbladis>
mdash: They're in `$out/nix-support/propagated-build-inputs`
wfranzini has joined #nixos
<gchristensen>
colemickens: ping when you're 'round?
<exarkun>
I think the problem I have is that some obscure part of the nixpkgs python infrastructure is broken on 19.03 and I have been using various revisions of 19.03.
<exarkun>
and assuming all the while that the problem was my fault, not nixpkgs' fault.
Lukas4452 has joined #nixos
<exarkun>
now I'll try switching my pin to something closer to master@HEAD and see what happens
<infinisil>
zeta_0: Put the ")" after pkgs.ihaskell
<exarkun>
adisbladis: That's consistent with your observations right?
<Miyu-chan>
Does this look like it can be simplified? Eep
Neo---- has quit [Remote host closed the connection]
zeta_0 has quit [Quit: doing another rebuild]
<Miyu-chan>
> lib.zipAttrs ((lib.mapAttrsToList (n: vs: lib.listToAttrs (map (v: lib.nameValuePair v n) vs))) { a = [ "x" ]; b = [ "x" ]; })`
<{^_^}>
error: syntax error, unexpected $undefined, expecting ')', at (string):262:127
<{^_^}>
[nixpkgs] @gnidorah opened pull request #66533 → musescore: use qt5's mkDerivation → https://git.io/fj5sj
<Miyu-chan>
> lib.zipAttrs ((lib.mapAttrsToList (n: vs: lib.listToAttrs (map (v: lib.nameValuePair v n) vs))) {a = [ "x" ]; b = [ "x" ];})
<{^_^}>
{ x = <CODE>; }
<Miyu-chan>
> :p lib.zipAttrs ((lib.mapAttrsToList (n: vs: lib.listToAttrs (map (v: lib.nameValuePair v n) vs))) {a = [ "x" ]; b = [ "x" ];})
<{^_^}>
{ x = [ "a" "b" ]; }
zeta_0 has joined #nixos
lucus16 has joined #nixos
<ornx>
i am making a nix package for a python program, in my package there is a file that i would like to be in the store, but it isnt installed there - how do i install that file to the store in my package?
o1lo01ol1o has quit [Remote host closed the connection]
<adisbladis>
exarkun: I tried, master, unstable and 19.03
<adisbladis>
Only 19.03 is broken
<adisbladis>
I don't have the energy to chase down why it's not in the env derivations site-packages right now
o1lo01ol1o has joined #nixos
<exarkun>
ornx: probably change your setup.py or setup.cfg or MANIFEST.in or one of the other 78 python knobs for what's in a package
kleisli_ has joined #nixos
<exarkun>
ornx: as a first step, see if you can get it into the archive created by `python setup.py sdist`
<ornx>
ahh
<exarkun>
adisbladis: that's cool. I briefly looked at the diff between 19.03 and master for the python support and it's huge. I'm not gonna dive into that either. If it works on master, that'll be good enough for now.
<ornx>
its not actually my program so any changes i make to the source have to be done via patches
<jlv>
When making a package, where would I put a dependency with an executable that is called at runtime?
<clever>
jlv: makeWrapper
<lucus16>
Hmm, how do I get the correct hash for a manually created fixed-output derivation?
<clever>
,tofu lucus16
<{^_^}>
lucus16: 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.
<alienpirate5>
is it an array of strings, or a single string?
<clever>
alienpirate5: both work
<clever>
alienpirate5: stdenv.mkDerivation will force all of its arguments down to just a key/value set, with strings as values, lists turn into space seperated strings
shibboleth has joined #nixos
<alienpirate5>
i see
<alienpirate5>
seemingly none of them work
<clever>
lucus16: and what command are you running to cause the failure?
<clever>
alienpirate5: is it giving an error?
<zeta_0>
infinisil++
<{^_^}>
infinisil's karma got increased to 118
<lucus16>
clever: nix-build . -A minecraft-forge-server (with a trivial entry in all-packages)
<zeta_0>
vaibhavsagar: finally got ihaskell up and running in home.nix
<zeta_0>
vaibhavsagar++
<{^_^}>
vaibhavsagar's karma got increased to 2
Jackneill has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @fpletz merged pull request #66476 → nixos/prometheus2: replace alertmanagerURL with new alertmanagers option → https://git.io/fj7dk
<exarkun>
So ... more propagatedBuildInputs shennanigans
orivej has joined #nixos
<exarkun>
twisted propagatedBuildInputs has appdirs in it, tahoe propagatedBuildInputs has twisted in it, withModules (ps: [ tahoe ]).env does not have appdirs in it
<kraem>
i'm trying to create a notification when my battery is low with these options https://bpaste.net/show/VqH3 - I can see that the script gets in the if statement and executing the echo but it won't send a notification to dunst. If I run the script with just a simple bash script file it works. Anyone have any pointers?
sigmundv has joined #nixos
<srhb>
kraem: You should probably try adding set -x so you get an idea about the values of your various env vars
<srhb>
kraem: At a guess, you're missing something that notify-send expects.
<srhb>
kraem: Which you'll hopefully see with set -x
MmeQuignon has quit [Ping timeout: 245 seconds]
<kraem>
srhb: ah smart, didn't think of that. i'll try with set -x
<srhb>
kraem: It might also be a permission error in which case the log should already have something useful for you.
<kraem>
the log shows exit code 0 success - trying with a nixos-rebuild and set -x right now
zupo has joined #nixos
<srhb>
kraem: If I run notify-send in a pure shell I get no notification, so maybe you can skip a step and start bisecting your env until you find the relevant variable.
o1lo01ol1o has quit [Remote host closed the connection]
<srhb>
Or maybe it has a useful man page that tells you what it uses :-)
<{^_^}>
[nixpkgs] @ornxk opened pull request #66534 → rivalcfg: init at 3.6.0 → https://git.io/fj5Z9
<kaliumxyz>
`{a, b} = {a:5; b:9;}` resulting in `a` being set to 5 and `b` being set to 9
<exarkun>
there's a lot of language features nix doesn't have
<exarkun>
language development is a lot of work
<exarkun>
why haven't you written a proposal to add destructuring binds to the language? :)
<srhb>
kaliumxyz: Ah, sort of a pattern match on sets.
<kaliumxyz>
For sure, just wanted to know if there was some eqv?
<mdash>
kaliumxyz: it's not often needed since this can be done in function parameters
<kraem>
srhb: how would i go about bisecting my env? :o
<kaliumxyz>
pattern matching is different though.
<infinisil>
> :p { inherit ({a = 5; b = 9; c = 10; }) a b; }
<{^_^}>
{ a = 5; b = 9; }
<srhb>
kraem: dump env, unset everything, reset half of it, rinse and repeat? :)
<infinisil>
kaliumxyz: This works ^^
<kaliumxyz>
oh cool, thanks c:
<mdash>
kaliumxyz: also --
<srhb>
kraem: Or you can make some educated guesses at what may be relevant.
<mdash>
:p ({a, b}: a + b) {a=5; b=9;}
<mdash>
> :p ({a, b}: a + b) {a=5; b=9;}
<{^_^}>
14
<{^_^}>
[nixpkgs] @eadwu opened pull request #66535 → nixos/raspberryPi: use buildPackages for extlinux → https://git.io/fj5nv
<mdash>
so, this destructuring works in function parameters but not let bindings
<{^_^}>
[nixpkgs] @kalbasit opened pull request #66536 → vimPlugins: turn filetype and syntax before sourcing the plugins → https://git.io/fj5nf
<mdash>
but as infinisil shows, you can use 'inherit' in many scenarios
<kaliumxyz>
I'd like it to work in let bindings to use for importing credentials as to not commit the credential file.
<infinisil>
Yeah the `inherit` also works in let's
<kaliumxyz>
Let me try that c:
<aminechikhaoui>
Is there an stdenv/nixpkgs function like substituteAll but that doesn't require input/output files ?
<exarkun>
You don't _need_ destructuring binds to be _able_ to do things, they just save some typing
<exarkun>
> let x = {a = 5; b = 6;}; a = x.a; b = x.b; in a + b
<{^_^}>
11
o1lo01ol1o has joined #nixos
<ivegotasthma>
how do I set an env variable while packaging a package?
zupo has quit [Ping timeout: 248 seconds]
<srhb>
ivegotasthma: FOO=bar
<ivegotasthma>
inside the nix expression?
<srhb>
ivegotasthma: All nix vars in mkDerivation are available to the builder.
sigmundv has quit [Remote host closed the connection]
<srhb>
As shell vars.
<mdash>
ivegotasthma: string attributes on derivations are turned into env vars
<mdash>
aminechikhaoui: you can just use string interpolation if it's not a file
<mdash>
> :p let foo = "nix"; baz = "strings" in "example of ${baz} in ${foo}"
<{^_^}>
error: syntax error, unexpected IN, expecting ';', at (string):262:34
o1lo01ol1o has quit [Remote host closed the connection]
<mdash>
> :p let foo = "nix"; baz = "strings"; in "example of ${baz} in ${foo}"
<{^_^}>
"example of strings in nix"
<mdash>
heh i never put enough semicolons...
<kaliumxyz>
:d exarkun I went with that solution.
<kaliumxyz>
I always feel like its better to not add too much candy to a language :d
<kaliumxyz>
^ on pattern matching
<kaliumxyz>
*I mean deconstructing
<kaliumxyz>
:d
<kaliumxyz>
though interesting that nix has pattern matching and not deconstructing.
<exarkun>
it's a pretty limited form of pattern matching
<exarkun>
it's only for sets. probably because most of what you do with nix is work with sets.
<ivegotasthma>
mdash: srhb: thanks guys
sigmundv has joined #nixos
sigmundv_ has joined #nixos
<kaliumxyz>
anyways, thanks c:
sigmundv has quit [Client Quit]
<elvishjerricco>
A password has ended up in my system logs.
<kaliumxyz>
I might take that suggestion of trying my hand at writing a deconstructing proposal actually, it makes sense given that pattern matching function arguements works in the same way.
<kaliumxyz>
rip elvishjerricco :c
<elvishjerricco>
I don't want to delete my whole log history, but I'd like to delete the part of the journal that has this password written to it
<elvishjerricco>
Is there a way to do that with journalctl?
<gchristensen>
better change the password
<kaliumxyz>
lol
vButtner[m] has joined #nixos
<kaliumxyz>
you can clear the units log (probably) instead of the entire thing.
klntsky has quit [Remote host closed the connection]
gxt has quit [Remote host closed the connection]
jtojnar has quit [Ping timeout: 245 seconds]
klntsky has joined #nixos
gxt has joined #nixos
selfsymmetric-pa has quit [Ping timeout: 246 seconds]
<kaliumxyz>
I think you can find the specific line and remove it from the system.journal file.
<elvishjerricco>
Could I just.... `rm system.journal`? :P
bakakuna has joined #nixos
liberiga has joined #nixos
dftxbs3e has quit [Quit: Leaving.]
rycee has left #nixos ["User left"]
rycee has joined #nixos
<srhb>
kraem: (In case you didn't find it, the problem is likely DBUS_SESSION_BUS_ADDRESS)
orivej has quit [Ping timeout: 268 seconds]
<silver_hook>
I have trouble with nixos-rebuild because it seems it times out on downloading nerd-fonts. I managed to download the full archive with wget, where should I copy it to, to successfully restart the build?
<Shyim[m]>
Hey. I have an issue with nixos-install. With my configuration I get a c++ error. Same config nixos-rebuild works. In which repository do I have create an issue?
<{^_^}>
[nixpkgs] @singron opened pull request #66538 → kernel generate-config.pl: Allow whitespace in values → https://git.io/fj5nK
<srhb>
silver_hook: Aah, okay, that makes sense.
<kaliumxyz>
elvishjerricco you can just edit the password out of the system.journal file
<kaliumxyz>
inb4 this corrupts
<kaliumxyz>
let me test
<kaliumxyz>
yea that just werk
ilikeheaps has quit [Ping timeout: 244 seconds]
<kaliumxyz>
just replace it with ******* lol
drakonis has quit [Ping timeout: 264 seconds]
doug457 has joined #nixos
___laika has quit [Ping timeout: 258 seconds]
<elvishjerricco>
Looks like there's only a few days worth of logs in the active journals. I'm just gonna `journalctl --rotate` them and delete the archive files
<kaliumxyz>
Just edit the password out
<kaliumxyz>
You can do that easily.
<kaliumxyz>
Turns out it stores messages in plain text.
dsiypl4 has joined #nixos
<doug457>
any body have experience with installing NixOS in VirtualBox?
o1lo01ol1o has joined #nixos
<srhb>
silver_hook: Oh, I forgot, you're probably going to have to unpack it too: nix eval '(builtins.fetchTarball "file:///path/to/tarball")'
<doug457>
I keep running nixos-graphical-19.03.173251.56d94c8c69f-x86_64-linux.iso in VirtualBox v6.0.10 r132072, but it keeps hanging shortly after I select the installer option on grub
<srhb>
doug457: Hanging how?
<silver_hook>
srhb: Before or after
<doug457>
CPU Usage spikes for 10 to 15 seconds, as I assume its loading the kernel/booting/whatever, but then CPU usage drops, and it just displays some info
<srhb>
silver_hook: I'm a bit puzzled that the sum of those doesn't seem to add up to the size of the full ball.
<srhb>
silver_hook: Maybe there's even more unnecessary cruft in it?
<silver_hook>
silver_hook: Noto is cca. 800 MiB
chloekek has quit [Ping timeout: 248 seconds]
<gchristensen>
is there a way to make firefox and friends automatically detect my network printer and just print?
<gchristensen>
I keep forgetting to put the cups config in a place not erased on each boot :P
<srhb>
doug457: Oh, that was unexpected, but oh well :-)
fendor has joined #nixos
o1lo01ol1o has joined #nixos
orivej has joined #nixos
<andi->
gchristensen: let cups discover printers with avahi and make sure that something in your network advertises the printer? (most do that themselfs)
drakonis has joined #nixos
<gchristensen>
oh cool
<gchristensen>
I'll go look in to avahi :)
<makefu>
andi-: i have yet to see avahi work without issues under NixOS. it seemed a lot of tools are missing avahi bindings to resolve .local addresses . at least that was my experience last year
<makefu>
hopefully it got better :)
<andi->
I think I saw ONE printer in my list that was discovered
___laika has joined #nixos
doug457 has quit [Remote host closed the connection]
<srhb>
I've never had issues with avahi and browsed stuff.
<fendor>
small question, since I just noticed that nixos is on opencollective, are monthly contributions or yearly contributions better for the nixos project? E.g., fewer taxes in yearly contributions
<colemickens>
gchristensen: I'm back online for an hour or two, what's up? :)
shabius has quit [Quit: Leaving]
o1lo01ol1o has quit [Remote host closed the connection]
zupo has joined #nixos
o1lo01ol1o has joined #nixos
<simpson>
fendor: If you donate code, then you owe no taxes at all~
___laika has quit [Ping timeout: 272 seconds]
<fendor>
simpson, would love to donate code, unfortunately, not yet ready to do it, but I am working on it :)
<judson_>
"Burn a DVD as you normally would" which, sure, but then Brasero insists that it cannot find the drive I want to use, and xorriso gives me unsupported media errors :)
<judson_>
Also "the rules for swap size are no different than other distributions" is quite a punt.
shabius has joined #nixos
<kaliumxyz>
Will check out that source in the nearby future. I don't really have the time budget to expiriment with using node2nix again right now, I'll check yarn2nix out on a project in the future. c:
fendor has quit [Ping timeout: 245 seconds]
<kaliumxyz>
I'll make the derivation fail if you do not have a node_modules folder in the project root.
<kraem>
srhb: would i substite systemd.<myownusername>.services ? or how do i define the user? i can't find anything in the nixos options
<simpson>
kaliumxyz: Okay, but you're likely making things hard on yourself by not reading. The technique is to alter some JSON, call a batch script, and wait for a few minutes for nixpkgs to regenerate that portion of the tree. It's not fun, but it's not bad.
<turion>
I have a webserver running NixOS, nginx and nextcloud. I've written a webapp with Haskell & servant. I want to run it there, probably with nginx as reverse proxy. Is that possible so far?
drakonis has quit [Quit: Leaving]
hoijui has joined #nixos
<turion>
cabal2nix generated a file from my .cabal. Can I include that in my config and start a systemd service somehow?
<srhb>
kraem: No, it just exists for all users.
shibboleth has quit [Remote host closed the connection]
<infinisil>
turion: Yeah, use services.nginx.virtualHosts.<name>.locations.<name>.proxyPass to proxy to localhost, systemd.services.<name>.serviceConfig.ExecStart = "${pkgs.haskellPackages.callPackage ./file.nix {}}/bin/foo" to run the service
<infinisil>
(might need some more stuff, but those are the most important bits)
thc202 has quit [Ping timeout: 250 seconds]
<turion>
infinisil: Awesome!
<turion>
Is there a place to read up on that stuff? I couldn't find something like this in the nixpkgs manual
<turion>
I sort of had the nginx part and some of the systemd figured out, but how to call my haskell executable was a mystery
<turion>
One thing I don't understand: If I change my configuration.nix, then my haskell servant web app is sometimes recompiled even if I didn't change anything about its config
<kraem>
srhb: i'm totally stuck. can
justanotheruser has quit [Quit: WeeChat 2.4]
<kraem>
do you know anywhere i can read up on systemd services in nixos? the wiki isn't very exhaustive
<jgt>
betaboon: …you know these messages are in chronological order, right?
<betaboon>
"and now I'd like to hear from someone who actually knows what they're talking about"
<betaboon>
just pointing to the part that i would find rude
<jgt>
betaboon: I understand that, but I didn't start out by being rude
<kaliumxyz>
:d nginx mods kinda overreacted but life is hard
<gchristensen>
it was certainly a bit on both sides, but definitely was escalated by that second to last comment
<kaliumxyz>
no warning?
<gchristensen>
at any rate, let's chalk that up to a learning moment, and please do remember to be polite, even in the face of rudeness
<gchristensen>
and welcome to the channel :)
<jgt>
no warning, but like I said, I understand now why that person may have less patience than the average person
<betaboon>
jgt: yeah i saw that you didnt "start it". but well... in the end it doesnt matter who threw the first stone if everyone involved ends up with a slap in the face
<jgt>
betaboon: well, I think I have to agree
<gchristensen>
sounds good :)
erba has quit [Quit: WeeChat 2.4]
zeta_0 has joined #nixos
<betaboon>
jgt: i guess i learned that the hard way in relationships with the other sex XD communication is sometimes even harder than reading code xD
Neo--- has joined #nixos
* jgt
concurs
Neo---- has quit [Ping timeout: 252 seconds]
<andi->
jgt: that remind me of trying to get freeradius support without using the boilerplate default config…
<andi->
*reminds
growpotk- has joined #nixos
<jgt>
in any case, I managed to fix the issue I was having. It helps that there are lots of good Nix examples on GitHub
<spacekookie>
Does anyone know if I need to install something to make all the settings in the firefox print dialog show up? A bunch of them are just grayed out
<andi->
you mean in like page setup?
zeta_0 has quit [Quit: rcirc on GNU Emacs 26.1]
<spacekookie>
Yea, for example "pages per page" setting isn't available
<nh2>
The best way to get stuff done on the Internet is to be always very polite in text chat. It is higly likely that some person one just pissed off is just the person one needs to answer a question, either a current one or another question a week later.
<nh2>
A good response to "what's this weird system you're using" is to bring the discussion back on topic with something neutral and non-judging like "I think this doesn't really matter for this question, I care mainly about how nginx interprets this config file, not how it's being generated or what the file system structure is".
<nh2>
Accusing ignorance to somebody will only make that person and everyone else not like you, not help you, and thus waste lifetime.
<spacekookie>
And I have someone setting next to me who has several more tabs in there. But he's on Debian
<gchristensen>
nh2++ so true
<{^_^}>
nh2's karma got increased to 15
<andi->
spacekookie: that probably depends on the selected printer?
<jgt>
nh2: I agree with you, but what I was met with was very much _not_ "what's this weird system you're using"
<gchristensen>
jgt: the important takeaway is: it doesn't matter. always take the very polite route. it doesn't matter how they treated you, only how you treat them
<spacekookie>
andi-: I'm just trying to print another PDF
<spacekookie>
Which should support all the features
<jgt>
gchristensen: yes, I conceded that earlier :)
<nh2>
spacekookie: I am not sure but I observe that my Firefox and `eog` print dialogues look very similar (probably some standard GTK thing) but have different numbers of tabs. So it seems quite likely that you can install or configure something system-wide that affects how many tabs are shown. I also observe that the number of tabs changes depending on the printer chosen
<gchristensen>
jtojnar: then I am confused by your "I agree with you, but"
<gchristensen>
oops, sorry jtojnar. jgt ^
<spacekookie>
nh2: Oh interesting, actually there seems to be a difference between "print to file" and "print to PDF" which this person has, but I don't
<jgt>
gchristensen: because by misquoting the other person, it becomes a strawman argument, and it changes the narrative to one of me having overreacted. If the language were "what's this weird system you're using", I would have interpreted that as an innocent curiosity, and happily discuss further.
<spacekookie>
I have service.printing or whatever enabled
o1lo01ol1o has quit [Remote host closed the connection]
<andi->
I think the keyword here is "portals" that is how those cross-application dialogs are implemented IIRC
<nh2>
jgt: it can be anything from "what's this weird system", over "I don't like your system" or "XYZ is crap" to "I don't like your face". The best approach is to just ignore 100% of snark, and drive the conversation back to the topic as if you were a robot without feelings
<elvishjerricco>
pie__: Dual header thing?
<pie__>
elvishjerricco: zfs stores copies of metadata at both ends
freeman42x has quit [Ping timeout: 252 seconds]
<elvishjerricco>
Right, the uberblock
<elvishjerricco>
the label, more accurately
<Miyu-chan>
I may be misremembering, but weren't there PRs(issues?) w.r.t. packaging Windows binaries with WINE?
<{^_^}>
#66506 (by nh2, 17 hours ago, open): fetchurl: Don't force-override curl's gssSupport to on unnecessarily
<nh2>
infinisil: that addresses the original problem we found yesterday; I found that the force-overriding behaviour wasn't necessary, and probably an accidental side effect of a fix specific for Darwin/Windows
zeta_0 has joined #nixos
orivej has quit [Ping timeout: 246 seconds]
<Miyu-chan>
Well, I think linking WINE configuration just got it revived. :D
<Miyu-chan>
... commented 15 seconds ago
kenshinCH has quit [Ping timeout: 244 seconds]
<gchristensen>
looks scary, nh2
<gchristensen>
but that low in the bootstrapping phase spooks me :P
<worldofpeace>
nh2: four months ago so, I'm not sure what I've mean't. Would you like me to look over everything again?
<nh2>
worldofpeace: I don't think that's necessary, I can bring you up-to-date with some details:
growpotkin has quit [Ping timeout: 268 seconds]
<worldofpeace>
nh2: We also realized that everything imobile related should be updated at once. so we need to try to match the dates of the commits from the packages already in nixpkgs
<nh2>
In your comment, you had propsed that I add `libplist` to the dependencies of my newly added package `idevicerestore`. I suspect that you proposed that because the upstream project lists it as a dependency here:
<nh2>
I believe that thus I don't need to list it in `idevicerestore`'s `buildInputs`, because it's already automatically pulled in.
<nh2>
However, I think that the upstream project (idevicerestore being an executable), simply has it in that list because it's a dependency of its dependency library, `libimobiledevice`.