<slabity>
joepie91: For some reason I can't link to it. I'm in a `nix-shell -p flex bison pkgconfig` environment, and `pkgconfig --listall` doesn't show it
<joepie91>
slabity: right, nix-shell does not expose the libraries into the environment
<mpcsh>
Infinisil: so that piece, does that go directly in configuration.nix?
<Infinisil>
and then `nixpkgs.overlays = [ (import path/to/that/overlay) ]`
<mpcsh>
aha
<Infinisil>
Or you can put it directly in there
<Infinisil>
nixpkgs.overlays = [ (self: super: ... ) ] works too
<Infinisil>
(which is what i mean by directly in there)
hydraz has quit [(Ping timeout: 246 seconds)]
bennofs has quit [(Ping timeout: 240 seconds)]
<mpcsh>
Infinisil: and is there any way to, say, have path/to/that/overlay be a github repo?
hc has quit [(Ping timeout: 240 seconds)]
hydraz has joined #nixos
hydraz has quit [(Changing host)]
hydraz has joined #nixos
<Infinisil>
mpcsh: Yes, `import (super.fetchFromGitHub { ... })` should work
hc has joined #nixos
<Infinisil>
which is then IFD (import-from-derivation), which means that in needs to evaluate nix code at build time, and therefore is going to be a bit slower
<slack1256>
where is a high level design spec of what an overlay is?
<mpcsh>
slack1256: yeah that's what I was looking for
<mpcsh>
Infinisil: I read that, I feel like I understand how to use overlays but not what they are
<Infinisil>
s/specific/defailed
<Infinisil>
detailed
zeus_ has quit [(Remote host closed the connection)]
<Infinisil>
mpcsh: They take an old package set and allow you to add stuff to it
<Infinisil>
or modify stuff
pxc has joined #nixos
<Infinisil>
What do you mean by "what they are"?
zeus_ has joined #nixos
Mic92 has quit [(Ping timeout: 246 seconds)]
alx741 has joined #nixos
alx741 has quit [(Client Quit)]
alx741 has joined #nixos
<mpcsh>
Infinisil: "Overlays are used to add layers in the fix-point used by Nixpkgs to compose the set of all packages" is the description offered by the manual, but I just don't have enough grasp on nixos/nixpkgs to grok it
<Infinisil>
Ah
<Infinisil>
So you know how each package of nix can refer to any other package
<mpcsh>
I don't lol
pxc has quit [(Ping timeout: 248 seconds)]
zeus_ has quit [(Ping timeout: 246 seconds)]
<mpcsh>
I'm very new to this :)
<Infinisil>
Well now you know :P
<mpcsh>
Do you mean like any package can specify any other as a dependency?
<Infinisil>
yes
<mpcsh>
Ok gotcha
Mic92 has joined #nixos
<Infinisil>
So, at a first "iteration" of putting all packages together, there are none that exist at first, and all dependencies aren't really there just yet
<mpcsh>
okay kinda with you there
<Infinisil>
well actually it's the other way around I guess
<Infinisil>
That all packages without dependencies get added first
<mpcsh>
it's a chicken-egg problem?
<Infinisil>
kinda
<mpcsh>
OH
<mpcsh>
I get it
<mpcsh>
So you start with packages that have no dependencies and then like cascade out from there?
<Infinisil>
So, nix iterates over this function which adds all packages that can be resolved
<Infinisil>
I'm pretty sure that's how it goes yes
<mpcsh>
And so are layers the steps in that function?
<mpcsh>
er, rather, each iteration of that function produces a layer?
<Infinisil>
And, if there aren't any loops (e.g. pkg referring to itself), eventually all packages are resolved
<Infinisil>
That is a fixed point, because nothing changes anymore when applying the "resolve package" function
<Infinisil>
mpcsh: Yes
<Infinisil>
An overlay is an additional step
<Infinisil>
I think
joehh has joined #nixos
<mpcsh>
Ok I understand now, that was super helpful
<Infinisil>
I think I didn't tell you anything wrong, I didn't check the source, but that's how I understand it from what I know
<joepie91>
this pretty much explains all the override stuff and how packages can refer to each other and so on
<joepie91>
it's pretty information-dense so take the time to read it carefully (and reformat the examples if needed to understand it)
<joepie91>
but it has all the important bits :P
<joepie91>
the tl;dr is "your package set is a function that accepts a reference to itself as an argument, and then produces the 'real' package set with that recursively"
<joepie91>
so by passing in different things, you can get different 'evaluated' package sets
<joepie91>
allowing you to substitute dependencies
<joepie91>
that tl;dr is not a great explanation, but best I can do tonight :P
<Infinisil>
joepie91: Nice, read halfway through it for now (it's late indeed)
thc202 has quit [(Ping timeout: 248 seconds)]
erictapen has quit [(Ping timeout: 240 seconds)]
acarrico has quit [(Remote host closed the connection)]
<joepie91>
I think I took about 2 hours reading through it entirely, comparing to the nixpkgs code, reformatting the examples, etc.
<joepie91>
to make sure I really really understood it
<joepie91>
:p
<Infinisil>
Would need to do that too
zennist has joined #nixos
<Infinisil>
haven't looked at the Fix and Fix monad stuff in Haskell either just yet
zeus_ has quit [(Remote host closed the connection)]
zeus_ has joined #nixos
mbrgm has quit [(Ping timeout: 248 seconds)]
* Infinisil
's lightbulb is flickering a bit more strongly
mbrgm has joined #nixos
<Infinisil>
While Google's search engine usually returns great results, I don't like them being in every aspect of technology
jtojnar has quit [(Remote host closed the connection)]
<joepie91>
me neither :P
<clever>
joepie91: where you the one doing the entire syntax of nix?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] fpletz pushed 1 new commit to openssl-1.1: https://git.io/v5tYl
<NixOS_GitHub>
nixpkgs/openssl-1.1 828994f Markus Mueller: mariadb: fix socket path...
NixOS_GitHub has left #nixos []
takle has joined #nixos
jtojnar has joined #nixos
takle has quit [(Ping timeout: 240 seconds)]
<gchristensen>
Profpatsch: can you disasm and I talk about nixcon tomorrow?
<joepie91>
clever: writing a parser, yes
<joepie91>
it's an on-and-off project
<clever>
joepie91: i discovered that one of my nixops deployment files needs 33gig of ram to eval
<clever>
and the GC in nix refuses to use more then 17gig
<joepie91>
... wut :P
<joepie91>
how?
<thoughtpolice>
Impressive. I thought my 35gb tarball in the nix store was pushing it (needs 100s of GB of RAM due to no streaming support), but just for evaluation? That's medal worthy.
<clever>
joepie91: 10 nixos machines in the nixops, each with 10 nixos containers
<joepie91>
that doesn't sound like something that should require 33 gigs of RAM...
<clever>
evaling a single node needs 2.1gig
<clever>
and it scales linearly
<joepie91>
hrm. still sounds a bit ridiculous
<thoughtpolice>
Also, I would think the GC should handle plenty of RAM fine. But Boehm can fragment pretty hard I guess, and it is conservative...
<clever>
it does
<joepie91>
then again I've generally been a bit puzzled by Nix' RAM use
<joepie91>
I feel like it uses ten times as much RAM as it should
<joepie91>
for what it does
<joepie91>
I may be missing something there but it just feels off
<joepie91>
doesn't fit onto my complexity -> resource requirements scale :P
Michael__ has quit [(Quit: Leaving)]
<thoughtpolice>
I think very few people have approached optimizing Nix itself. Most of the time people tend to fix derivations to reduce memory usage/load requirements, rather than actually touch Nix.
<joepie91>
quite possibly
sary has quit [(Remote host closed the connection)]
<Ralith>
clever: wait, nixops can't scale to 100 machines? :|
<Ralith>
so much for my plans to use it at work
<clever>
Ralith: within a single deployment, i dont think it can pass 50
<clever>
but if you just split them up into multiple networks, its fine
<Ralith>
that is absolutely shameful
<Ralith>
:/
<clever>
it may also be that the nixos modules i'm using are overly complex
* joepie91
feels like some serious effort should be made on the obvious optimizations
proteusguy has quit [(Remote host closed the connection)]
<joepie91>
clever: it's not *just* that
<joepie91>
Nix absolutely has performance issues, noticeably so
<joepie91>
I'm not certain where they are yet
<joepie91>
but it's slower than it should be
<joepie91>
and I do get the impression that there are some easy wins to be had in places, once a profiler is applied
<simpson>
Ralith, clever: I am slowly moving more and more things to k8s, but more for the orchestration than the containers.
<clever>
joepie91: one thing i was thinking about, if we can find back-references within the heap, could we dedup the heap?
<joepie91>
that'
<joepie91>
oops
<joepie91>
that's of an entirely different order of optimization than the type I'm thinking about :P
<joepie91>
I'm more thinking along the lines of "cache some evaluations, profile the code to find the hot paths and make them do less work, etc."
<clever>
joepie91: if you can merge identical values, you can shrink the heap, and if you can safely merge identical thunks you could maybe speed up cpu time
<joepie91>
the "10% of the work for 90% of the optimizations" type
sary has joined #nixos
* Ralith
encourages clever not to try to be too clever
<Ralith>
:D
<joepie91>
yeah, pretty much that :P
<joepie91>
go for the easy wins first
<clever>
joepie91: another thought, if i can serialize the un-evaluated thunk, could i cache its result to disk?
<Ralith>
doing extra work to make things faster rarely works out
<joepie91>
anything that adds considerable complexity is probably not very desirable
taktoa has joined #nixos
<Ralith>
instead of trying to come up with creative ways to make it smarter, try finding simple ways to make it less dumb
ShalokShalom has quit [(Remote host closed the connection)]
<joepie91>
clever: possibly.
<joepie91>
clever: you'd want to cache selectively though
<joepie91>
specifically things that are likely to be expensive to evaluate
<Ralith>
making programming language implementations not be garbage slow is a well studied problem
<joepie91>
those kind of assessments can be really simple; for example, V8 determines whether to inline code by literally looking at the size in bytes of the functioin body
<joepie91>
function*
<joepie91>
and that *works*
<joepie91>
it's not perfect, it's not elegant, but it's super fast to do and works well in 95% of cases
<joepie91>
that's the kind of solution you want here, at least initially
<Infinisil>
Couldn't be any more basic
<Infinisil>
Never even thought of this
<joepie91>
this is extra amusing when you consider that V8 is fairly widely regarded to be one of the more insane feats of optimizations, considering the non-strictness of JS and all the optimization problems that that causes
<joepie91>
it's full of "stupid simple" heuristics like this afaik
acarrico has joined #nixos
<Infinisil>
Lol
<Infinisil>
I actually like that, more material for JS-<s>hate</s>critique
<Ralith>
I imagine the first thing you'd want to do in nix is even simpler; trawl for pessimizations
<joepie91>
funny aside; somewhere around 2010, I worked around the then-slow implementations of property lookups in JS by assigning properties to variables when they were used more than once in the same function
<joepie91>
the worst part is that that actually worked and produced notable performance benefits
<joepie91>
:p
<joepie91>
not really necessary today anymore, though
<joepie91>
but yeah, a property lookup + a variable assignment was considerably faster at the time than two property lookups to the same property
<joepie91>
it was even worse if you were looking up properties on prototypes
<joepie91>
because the further up the chain, the slower your lookup was
<clever>
joepie91: there is one neat optimization ive noticed in nix, all attribute sets use ints as keys
<joepie91>
mm?
<clever>
joepie91: behind the scenes, it looks the keyname (a string) up in a set, and then does int compares while iterating over the key=value pairs
<clever>
and certain key names like "name" are specially pre-allocated, and their id# is stored in a global variable
<Infinisil>
joepie91: Wowie
<clever>
joepie91: so nix can just ask for the attribute at key State.sName
<clever>
joepie91: which saves nix having to do a strcmp against "name"
<Infinisil>
Btw, is there any othere language that is strictly compile-time only like nix?
<Infinisil>
It's really special in that regard
<Infinisil>
Hmm, unless you consider that actually being runtime
<joepie91>
clever: right
<joepie91>
Infinisil: what do you mean with "compile-time only"?
<Ralith>
wat
<Ralith>
nix is a very mundane lazy interpreted language
<joepie91>
I don't actually know how the Nix runtime works but from what I've seen I would guess it's just a naive interpreter implementation
<Infinisil>
joepie91: the nix expression gets evaluated, there's no "runtime"
<joepie91>
no JIT or bytecode compilation or whatever else
<Infinisil>
or maybe I don't fully get it
<Ralith>
being a naive interpreted language is not unusual or special
<clever>
joepie91: at parse time, it turns things into a massive chain of classes
<joepie91>
Infinisil: still not quite following. what do you mean with a "runtime" here?
<clever>
joepie91: one sec
<dash>
Infinisi1: "make"
<Ralith>
maybe unusual in that people don't usually use such things
<Infinisil>
I am very experienced in Swift, which has many similarities to Rust, and I do know the foundation of Haskell and C
<Ralith>
the mundane parts of the type system is Haskell writ small and the novel parts are "what you should be doing in C++ anyway, except formalized"
<Infinisil>
So I think I should be fine
<joepie91>
I don't believe that any individual part of Rust is really very 'novel' (by design, iirc)
<joepie91>
rather the whole package together is novel
<Infinisil>
joepie91: Not even the memory model? Why not?
<joepie91>
as something that generally Just Works and keeps you from shooting yourself in the foot for the most part
<Ralith>
Infinisil: rust does not yet have a memory model
<joepie91>
and that makes sense design-wise
<Ralith>
joepie91: the specific application of affine types is not something I've seen before
<adisbladis>
joepie91: Where else do you see the concept of pointer ownership?
<Infinisil>
Ralith: Well I mean the whole ownership compile-time shebang
<Infinisil>
(not memory model I guess then)
<joepie91>
Infinisil: I vaguely recall something about the idea behind the Rust design being "we don't want anything in it that hasn't been around for at least a decade", although I'm probably not paraphrasing this accurately
<Ralith>
Infinisil: ah, that's not a memory model
<joepie91>
adisbladis: well... smart pointers? :)
<Ralith>
joepie91: afaik you're exactly right, but there's a lot of novel engineering, if perhaps not PL research, in the realization of that
<joepie91>
more seriously, I don't know the background of all the bits and pieces of Rust
<joepie91>
but see the above
<joepie91>
Ralith: right, but it'd be in fitting the pieces together
<joepie91>
not so much in the pieces themselves
<joepie91>
to be clear, I consider that a feature
<Ralith>
strongly agreed
<Ralith>
I settled on rust after exhaustively satisfying myself that trying to use more cutting edge PL research in a production-oriented language was not viable
<joepie91>
a lot of the really useful and 'innovative' technologies that end up being stable long-term building blocks, are old research packaged in exactly the right novel way
<joepie91>
hell, afaik bittorrent was designed in the same way
<Ralith>
rust's conservativeness is one of its best attributes
<joepie91>
one unanswered question I do have about Rust
<adisbladis>
joepie91: I'm not sure they are completely analogous but sure, pretty close :)
<Infinisil>
Ralith: I heard there is going to be better ownership analyzis coming, semantic instead of syntax-based, which means less conservative while still correct
<joepie91>
afaik it's possible to produce a .so using Rust
<joepie91>
and it's possible to consume one
<joepie91>
but that obviously flies in the face of compile-time ownership and type checks
<joepie91>
so how's that handled? some sort of metadata file? a layer of unsafety?
<Ralith>
Infinisil: yes, the non-lexical lifetimes effort
<joepie91>
if you want to talk from one Rust thing (an application) to another Rust thing (a .so)
<Ralith>
it'll be nice
<Ralith>
joepie91: none of that has anything to do with ownership and typechecking
<clever>
joepie91: another random implementation detail
<Ralith>
I expect the act of putting it into words will probably be enlightening
<clever>
joepie91: nix has 3 types of list, list1, list2, and listn
<joepie91>
I promise I normally suck less at explaining things :P
<clever>
joepie91: behind the scenes, nix uses a union type to hold the real value, and a lot of them are pairs of pointers (like a function* and argument*)
<clever>
joepie91: so, as a speed thing, the list1 and list2 types directly store the values in the union, right after the type enum
<clever>
listn, stores a pointer and size within the union
<Infinisil>
clever: I just hope this kind of optimization isn't going to be necessary at some time in the future
<Ralith>
joepie91: dereferencing a raw pointer (which is what loading a dynamic symbol gets you, and whose type you must come up with yourself) is unsafe, if that helps
<clever>
it makes lists smaller then 3 slightly faster to read, because there is one less level of indirection in ram
<Ralith>
clever: nix stores lists contiguously? that might be a perf issue
<joepie91>
Ralith: I'll just re-ask the question when I'm in a more useful state of mind :P
<clever>
Ralith: yeah, its a contiguous array of Value*
<Infinisil>
Ralith: Why is that a perf issue?
<Ralith>
might be, not is
<Ralith>
I expect that Nix expressions sometimes do a lot of appending to lists
<Infinisil>
Ah
<Ralith>
unless it's being very clever, that means copying the whole thing for every append
<Ralith>
which will thrash the heap
<clever>
if you want to append 2 lists together, you need to copy the pointers from the 2 lists, into a 3rd new list
<Ralith>
(in addition to amplifying writes)
<clever>
but because the Value objects are immutable, you can share the Value* between the source and destination
<joepie91>
clever: those all seem like sane optimizations/tricks
<clever>
so the cost is just copying arround $total pointers
<Ralith>
it's an asymptotic blowup if you're doing lots of building up lists from items one at a time, which is likely to be common
<joepie91>
random thought: I wonder whether runtime static analysis would be useful in predicting how large a space should be allocated for a list
<clever>
yeah, recursively doing list ++ [ a ] will be a bit expensive, as it has to re-copy the pointers each time, and gc the old list
zennist has joined #nixos
<joepie91>
and maybe other things
<joepie91>
but perhaps too slow
<Ralith>
gc all the old lists*
<clever>
but also, the map function knows the output size ahead of time
<Ralith>
joepie91: you can't append to a list in-place, so I'm not sure that would be useful
<Ralith>
(unless it grew some clever lifetime analyses to reuse storage)
<joepie91>
was just thinking about that
<clever>
so map is just a matter of pre-allocating a list, and then setting out[x] = f in[x];
<Ralith>
hm
<joepie91>
Ralith: you could probably have an optimization case where eg. you the list stored on the heap, with a predicted allocation size, and you can have multiple pointers pointing at it with a different length
<joepie91>
Ralith: since all values are immutable anyway
sellout- has joined #nixos
<clever>
joepie91: hmmm, let me see...
<joepie91>
Ralith: so when you append to the end of a list, you'd just create a new pointer with a larger size where possible
sellout-1 has joined #nixos
<Ralith>
maybe you could actually reuse storage easily, since purity
<Ralith>
then do exponential realloc as needed
<joepie91>
and fill up the corresponding space with new stuff
<Ralith>
that would be an interesting optimization to test
pxc has joined #nixos
<Ralith>
joepie91: right
<clever>
is there a builtin to get the first N elements of a list?
<joepie91>
that would only work if the list is only concat'ed with one other thing ofc
<Ralith>
then when you have to allocate a new one on overflow, double it
<joepie91>
so you can't do `foo ++ bar` and then `foo ++ baz` without having a copy
<joepie91>
copy operation *
<Infinisil>
clever: I'd assume it'd be called `take`
<Ralith>
you end up with log n reallocs to store a list of size n
<joepie91>
but `foo ++ bar ++ baz` would be fine
<clever>
Infinisil: no such builtin
<Ralith>
this should work in general
<Infinisil>
clever: Indeed
<clever>
Infinisil: and now that i think of it, nix has no way to know that the list is being depended on twice, as different sizes
<joepie91>
Ralith: yeah, then you can sidestep the size prediction I guess
<clever>
Infinisil: when you delete a given Value object, nix wants to delete the entire list it points to
<Ralith>
joepie91: this is how everyone implements mutable appendable arrays in imperative languages, for that reason
<joepie91>
allocation would be a bit more expensive but you'd save some static analysis which may be more expensive than the additional benefit you get from that approach
<joepie91>
right
<Ralith>
the extra allocation expense is constant-factor
<Ralith>
probably invisible
<joepie91>
Ralith: do you know if there's any prior work on the pointer-with-size approach I suggested above?
<joepie91>
I mean, I'm making this all up on the spot, it's not like I have any formal schooling in runtime optimization whatsoever
<joepie91>
:p
zennist has quit [(Ping timeout: 248 seconds)]
<joepie91>
so this may be something that people already do
<Ralith>
I'm not aware of any, but I'm not an expert on data structures
<Ralith>
let alone persistent ones
<Infinisil>
joepie91: Probably, the world is big and there's lots of programs
<clever>
joepie91: all lists greater then 2 in size are a pointer + size, but i believe nix expects a 1:1 mapping between Value instances, and the backing list
mizu_no_oto has quit [(Quit: ["Textual IRC Client: www.textualapp.com"])]
pxc has quit [(Ping timeout: 240 seconds)]
<Ralith>
it's a pretty obvious thing, so I'd expect persistent arrays to usually be implemented that way, but most languages with primitive lists like this just use linked lists and optimize the hell out of things at a higher level
<joepie91>
clever: Q: are all values in Nix stored in separate locations on the heap, or are eg. small types like numbers stored directly in the list?
sellout- has quit [(Ping timeout: 248 seconds)]
<joepie91>
afaik Nix allows different types in a list
<clever>
joepie91: the list always containers pointers to Value objects on the heap
<joepie91>
but I may be wrong
<joepie91>
hmm
<clever>
joepie91: the Value object then contains the type enum, and the int value
<Ralith>
if Nix isn't doing the small integer optimization, that's probably the absolute first thing that needs to be fixed
<Ralith>
that's a *huge* perf boost
<joepie91>
clever: 'the int value'?
<joepie91>
Ralith: I'm not so sure actually, Nix is a bit unusual in that you're mostly dealing with strings
<joepie91>
or data structures that eventually evaluate to strings
<clever>
so [ 1 2 3 ] is 4 Value objects on the heap, a list, and 3 int objects, and the list points to an array of 3 Value pointers
<joepie91>
and use strings
<joepie91>
so it may be less of a benefit in Nix than in the average general-purpose language
<clever>
joepie91: so thats 5 heap allocations
<Infinisil>
joepie91: Probably true
<Ralith>
it's still a drastic benefit for every single time a number is used
<Infinisil>
Which is like 1% of the time, so not sure if worth it
<clever>
joepie91: strings are also fatter then you think
<clever>
joepie91: for example, "${pkgs.hello}" is at least 3 heap objects, maybe more like 10 or 20
<clever>
joepie91: first, you have the Value object for the string, then you have a normal char* containing the storepath, then you have a char** containing the context
<Ralith>
it'd certainly be the very first thing I'd try
<Ralith>
low effort, low complexity, drastic benefit when applicable
MP2E has quit [(Quit: leaving)]
<Ralith>
you could save some indirection by using the spare bits for a few other common types, too
<clever>
thats what list1 and list2 are doing
<Ralith>
no, that's the small vector implementation, which is different
<Ralith>
I'm talking about tagged pointers
<Ralith>
er, optimization*
<joepie91>
clever: "then you have a normal char* containing the storepath, then you have a char** containing the context"
<joepie91>
you lost me here
<clever>
Ralith: ah, like putting the type directly before the value?
<joepie91>
I thought the context contained the store paths?
<Ralith>
no
<joepie91>
so then what does "the store path" refer to?
<clever>
joepie91: every string in nix contains a list of context, what storepaths it depends on
<Ralith>
x86 pointers have a couple(?) spare low bits
<clever>
Ralith: ooo, yeah
<Ralith>
for heap allocations, using typical malloc impls
<clever>
because all allocations are rounded to the next 16 bytes for ex
<Ralith>
historically these were often used to flag "this isn't a pointer, it's actually a 31/63 bit integer"
<joepie91>
I have a mental red flag concerning those
<clever>
Ralith: the problem, is that things start out refering to a Value of type thunk, which is a function pointer + argument pointer
<joepie91>
I'm not sure why
<Ralith>
which drastically improves performance for obvious reasons
<clever>
Ralith: upon running, that mutates into another type, and all references must follow that change
<clever>
Ralith: and nix doesnt know what the size will become, or the back-references
<Ralith>
there is no size, a tagged pointer doesn't have its own allocation
<joepie91>
clever: right, but you were speaking separately of "the store path" and "the context" as if they are two different things - or are you refering to the char* as being a part of the char**?
<clever>
Ralith: i believe a tagged pointer is basicaly taking a char* that was allocated to a multiple of 16, and then using the low-order bits to store some type info?
<clever>
Ralith: but if i start out with a function* that is stored at a multiple of 16, and type embeded into it
<Ralith>
um, it doesn't matter what type the pointer is *to*
<clever>
Ralith: and then i want to dynamicaly replace that function* with a full char[20], without changing the address
<clever>
so that all references to the function* become references to the first byte of the char[20]
<Ralith>
that isn't what tagged pointers do
<clever>
thats the problem i can see with trying to use them in nix
<joepie91>
I think that's the point :P
<clever>
yeah
<Ralith>
the point is that they don't do a thing which has nothing to do with them?
<Ralith>
I don't get it
* joepie91
tries to reword
<clever>
they cant do what nix requires
<clever>
when i do let f = complex_function in { a = f; b = f; c = f; }
<Ralith>
I don't know what that's supposed to mean, but they would work just fine in nix
<clever>
it copies the Value* for f, into the slots a, b, c, and all 3 have the same address pointing to the same Value object
<clever>
then if any of them are accessed, the type held inside the Value changes from Thunk to something else
<clever>
Ralith: how will tagged pointers, that have been copied to 4 different places, handle the type of the object changing?
<Ralith>
that's not their job?
<clever>
how would you use them in nixexpr?
<joepie91>
Ralith: so the idea is that a pointer at one moment points at a chunk of code that'll produce a value (a thunk), but once that thunk has been executed once, the pointer now points at the *result* of that thunk to prevent re-evaluating the same thing every time; therefore the type of the data it points at changes, and therefore the tag on the pointer no longer reflects the correct type
<Ralith>
a tagged pointer encoding an integer is used when you've already forced the value
<joepie91>
if I understand clever's concern correctly
<joepie91>
(I don't know whether this is actually a problem, I'm just trying to reword the issue :P)
<joepie91>
(my understanding of tagged pointers is iffy at best)
<Ralith>
it's not, the tag remains correct
<Ralith>
in that case, the tag is invariant and encodes "this is a pointer to a Value"
<clever>
brb
slack1256 has quit [(Remote host closed the connection)]
<Ralith>
but if you have a Value that's been forced to a sufficiently small integer, you can replace future uses of it with the tagged pointer encoding of that integer (for example)
<Ralith>
you could also have a tag for pointers to strings, if you like
<Ralith>
save an indirection
<Ralith>
integers are the biggie, though, because they let you reduce small heap allocations drastically
<clever>
that could work, but due to the lazy evaluation, it might always be too late to apply
<Ralith>
it might take some cleverness, yeah
Infinisil has quit [(Quit: Gotta go)]
<Ralith>
it might also be a bit of a pain since you'd have to guard every single Value* deref
<clever>
nearly all access to the Value objects goes thru a small api
<clever>
state.forceList(*args[1], pos);
<clever>
this will throw an error if the Value in [1] isnt a list
<clever>
and if its a thunk, it will run it, and apply the above check
<Ralith>
if you have a "this" for it, it's already too late
<Ralith>
so yeah, it would be a pain to implement
<clever>
Ralith: for non-virtual functions, the compiler is dumb, and will just set "this" to whatever you dereferenced, even if its invalid
<clever>
and if the member function never uses "this", you can call functions on a null pointer
<Ralith>
dereffing into a reference is also dereffing
<Ralith>
engaging in undefined behavior because you think you can guess what the compiler will do is not sound
<clever>
yeah
<Ralith>
(oddly, I'm pretty sure you can *invalidate* this, e.g. by deleting it, in a method, it just has to be valid when you start)
<clever>
QT has a this->deleteLater() to prevent that kind of issue
<clever>
it adds it to a queue, and the event loop will delete it when you return control back to the event loop
<Ralith>
no, that exists for different reasons
<Ralith>
specific to Qt
<anelson->
also for some reason the "ghcjs" binary is not in the PATH in the nix shell...
<clever>
more so the caller wont loose the reference unexpectedly
<clever>
anelson-: you must use the .env attribute on the derivation when using nix-shell
<simpson>
What do folks do for managing wireless networks defined in configuration.nix? I need to switch to a slower but less-fucked network to do big uploads and I'd like to not have to do a rebuild every time.
<clever>
anelson-: for example, nix-shell '<nixpkgs>' -A haskell.packages.ghcjs.acme-kitchen-sink.env
<Ralith>
simpson: I just use networkmanager for my wifi wrangling
<Ralith>
it's a GUI-friendly problem
<clever>
simpson: i just leave /etc/wpa_supplicant.conf untouched by nix, and do wpa_passphrase name pw >> /etc/wpa_supplicant.conf
<Ralith>
alternatively, perhaps you can connect to both networks simultaneously?
<Ralith>
I forget how versatile consumer wifi radios tend to be
<Ralith>
but I think it varies a lot
<clever>
also depends on the driver
<clever>
if both networks are on the same channel, you can use a special command to create a second wlan interface, and then control each independantly
<joepie91>
you seem to know where everything is, heh
<clever>
i had to fix a bug with parallel fetchurl calls causing nix to crash
<joepie91>
that lock yours? :P
<clever>
that lock didnt help
<clever>
the replaceSymlink function was broken
<clever>
you cant atomicly overwrite a symlink, so replaceSymlink creates a target+".foo" symlink, then uses rename to atomicly replace target
<clever>
what if target+".foo" already exists?
<joepie91>
heh
<joepie91>
oops :)
<clever>
and it tries to update the symlink to its current value, every time it checks the fetchurl cache
<clever>
so even a cache hit involves "writing" the current value back to the symlink
<clever>
so if you have a url in NIX_PATH, and run 2 nix's at once, they can collide with eachother and crash one
<dylanjust[m]>
I'm building a Haskell project. My tests have some useful debug output, which I'd like to display. With cabal I run "cabal test --show-details=streaming". Is there a way of setting this flag when building with Nix?
<mpcsh>
sphalerite: hmm, fair, so I should make fadeDelta 6 and fadeSteps 0.02?
<sphalerite>
Hmm, 50 frames = 0.34 seconds, so yeah I guess that could be an appropriate time
<mpcsh>
sphalerite: it worked! thank you!
<sphalerite>
NP haha
<sphalerite>
Although why do I often feel compelled to RTFM on other people's behalf x)
justbeingglad has joined #nixos
<mpcsh>
sphalerite: hey man if it's any consolation I was in your shoes when I was on arch :)
<mpcsh>
it's strange being a noob again
<sphalerite>
Well it was mostly the Compton docs so not even nixos docs
<sphalerite>
Also you've been here long enough to know about the options search, no? :p
Arcaelyx has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
zeus_ has joined #nixos
hamishmack has quit [(Quit: hamishmack)]
<mpcsh>
sphalerite: yes, I do :)
<mpcsh>
sphalerite: my confusion was that on arch, I think the fading option defaulted to true unless you specified --no-fading-openclose
MercurialAlchemi has joined #nixos
<mpcsh>
sphalerite: so I wasn't thinking to look for the fade = true option
<mpcsh>
either way I'm dumb :)
leat has quit [(Read error: Connection reset by peer)]
odi has quit [(Ping timeout: 240 seconds)]
Ivanych has joined #nixos
odi has joined #nixos
phreedom has quit [(Ping timeout: 252 seconds)]
endformationage has quit [(Quit: WeeChat 1.9)]
johnw_ has joined #nixos
MP2E has joined #nixos
johnw has quit [(Ping timeout: 255 seconds)]
odi has quit [(Ping timeout: 248 seconds)]
DrWaste has joined #nixos
<joepie91>
"Android supports now a feature that will connect automatically to open access points (those without any security) and it will use a Google VPN as a secure tunnel to increase security."
<joepie91>
eeeep
justbeingglad has left #nixos []
leat has joined #nixos
<sphalerite>
Isn't the first part, uh, problematic from a legal standpoint in quite a few countries?
<clever>
joepie91: also, broadpwn
<sphalerite>
joepie91: do you think this will affect your typical android user poorly though? The kind that uses Chrome and is signed in to google everywhere?
<sphalerite>
clever: how is that related?
<clever>
it is possible to exploit the firmware in the wifi chipset, just by tricking somebody into connecting to your access point
<clever>
what joepie91 just said makes that even simpler
<joepie91>
sphalerite: yes, because you're going from "Google sees a lot of your metadata" to "Google sees literally all of the network traffic you ever send"
<joepie91>
sphalerite: the one thing that could make that worse is ssl-stripping
<sphalerite>
I thought it wasn't necessary to get them to try associating clever
<clever>
sphalerite: they have to associate first, but it occurs before the WPA handshake
<sphalerite>
That's reassuring
<clever>
so you can just sniff for the ssid's they are lookign for, and spoof a router in the phones list
<joepie91>
hm, I don't actually know enough about broadpwn to know whether this is going to be an issue
<sphalerite>
spoof eduroam = tonnes of pwns
<joepie91>
broadpwn is still on my reading list, somewhere in spot #1xx
<clever>
joepie91: basicaly, if your phone tries to connect to an AP, it can execute code in your wifi chip
<clever>
and that wifi chip has DMA to the main cpu ram
<joepie91>
(currently I'm reading up on IPFS and libp2p specs, since they're finally in a usable state now)
<joepie91>
clever: right, but it's the specifics that matter here :p
<joepie91>
oh
<joepie91>
clever: funny note: my GPU seems to be abusing its DMA
<joepie91>
writing junk to my RAM
<clever>
fun
<joepie91>
this stays contained within GPU-allocated RAM when using proprietary drivers
<joepie91>
but when using radeon or amdgpu it starts writing junk to random chunks of memory allocated to applications on my system
<joepie91>
and shit randomly starts crashing and throwing errors
<clever>
oh, that reminds me of my issues
<joepie91>
not sure where the difference is, maybe the different drivers give the GPU different address ranges to write to or something?
<joepie91>
but yeah, with fglrx at least the damage is contained to rendering glitches
<clever>
with the "ati" driver (old open-source one), i have no text in KSP mods (both native and wine)
<joepie91>
and it doesn't totally destroy my system state
<clever>
steam and obs refuse to even start due to missing opengl features
<clever>
and several other issues
<joepie91>
I had some corrupted Nix store entries a while ago that were probably caused by this, too :P
<sphalerite>
joepie91: I don't see that making a huge difference. And in that user's position I'd rather trust google with everything than trust free-wifi-provider with everything
<clever>
with the non-free driver (i forget the nixos name), it crashes instantly upon turning on a 2nd monitor
<clever>
with amdgpu, everything just works
<joepie91>
sphalerite: it's a little more nuanced than that..
<sphalerite>
I suppose it's just giving more data that can be collated with what they already have, but it seems like a drop in the ocean for users who don't worry about that kind of thing anyway
<joepie91>
anyway, not enough energy for that discussion right now :P
<sphalerite>
And users who do care would just turn the feature off?
<joepie91>
clever: nixos name is ati_unfree
<clever>
ah yeah
<joepie91>
or amdgpu-pro
<clever>
dont think i tried radeon then
<joepie91>
if you're using the newer one
<joepie91>
ati -> radeon
<joepie91>
ati_unfree -> fglrx
<clever>
amdgpu is the one that fixed everything
<joepie91>
amdgpu -> amdgpu
<joepie91>
amdgpu-pro -> amdgpu-pro
<joepie91>
that's the mappings of NixOS names to real driver names
<joepie91>
clever: afaik amdgpu is a fork of radeon btw
<joepie91>
so it was probably a bug that was fixed since the fork to amdgpu
<joepie91>
bleh, amdgpu_pro -> amdgpu-pro
<clever>
ah
<joepie91>
I think that's correct
<joepie91>
(I went through all 4 of them :P)
<joepie91>
clever: so yeah, the tl;dr is that fglrx is the old proprietary codebase, and radeon is the old open-source codebase
<clever>
amdgpu didnt exist when i went thru all 2 options :P
<joepie91>
clever: and then AMD forked radeon into amdgpu(?), and started maintaining that, and built their own amdgpu-pro on top of amdgpu
<sphalerite>
I wish there were decent (and free, but worst case I'll still take proprietary ones that actually work)drivers for nvidia.
<joepie91>
containing the proprietary extensions
<joepie91>
clever: this means that amdgpu-pro uses an open-source base which solves the "linking to Xorg versions" problem
<joepie91>
or should, at least
<joepie91>
amdgpu-pro is really just amdgpu + a bunch of proprietary extensions/libraries
<joepie91>
iirc those are proprietary because it's licensed tech and AMD *can't* currently make them open-source
<clever>
neat
<joepie91>
so to my knowledge, currently everything that *can* be open-source about the drivers legally, already is
<joepie91>
so long as you use a card that amdgpu supports
<joepie91>
I may be wrong on some of the details but that's the general narrative anyway :P
<dylanjust[m]>
I'm using nix dockerTools to build a docker image. Is there a simple way to push that to a docker registry? All I really need is a hook where docker is running and I can inject some shell.
<sphalerite>
dylan.just: that would be impure, so it's not nice to do that inside of nix
<sphalerite>
I'd probably have a script that runs nix-build, then docker load (or was it docker import?) and docker push
<dylanjust[m]>
Fair enough.
<dylanjust[m]>
Righto. I'll try that. Thanks.
<dylanjust[m]>
Does the nix dockerTools actually use the docker daemon to build an image?
<sphalerite>
No
odi has joined #nixos
<sphalerite>
See its docs
<dylanjust[m]>
Sorry - I didn't realise there was docs for it!
zeus_ has quit [(Remote host closed the connection)]
zeus_ has joined #nixos
phreedom has joined #nixos
oever has joined #nixos
vandenoever has quit [(Read error: Connection reset by peer)]
oever is now known as vandenoever
zeus_ has quit [(Ping timeout: 276 seconds)]
kuznero has joined #nixos
<kuznero>
Hi All!
<kuznero>
Which package do I need to install on 64-bit NixOS to be able to run 32-bit executables?
Curiontice has joined #nixos
Capprentice has quit [(Ping timeout: 240 seconds)]
JosW has joined #nixos
robin has joined #nixos
<symphorien>
just install pkgsi686Linux.yourpackage
joehh has quit [(Ping timeout: 240 seconds)]
<kuznero>
symphorien: the thing is that I have a binary that is not distributed as a nix package, thus cannot find it under pkgsi683Linux
<symphorien>
ah then you need to patch its rpath and interpreter with packages from pkgsi686Linux
freusque has joined #nixos
<kuznero>
symphorien: thanks, can you point me to any example of how it can be done?
<kuznero>
It seems that I am actually wrong. it is 64 bit. but then why does not NixOS want to execute it? Here is what `file db2cli` shows: db2cli: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.4, not stripped
<LnL>
oh, for x86 you can just use nix-shell -p stdenv.cc
<kuznero>
LnL: got it, thanks!
arianvp2 has joined #nixos
__Sander__ has joined #nixos
arianvp2 has quit [(Client Quit)]
ThatDocsLady has joined #nixos
guillaum1 has joined #nixos
<kuznero>
LnL: that worked :) thanks! Now ldd shows a few unmet dependency that I guess I need to find :) `libstdc++.so.6`, `libpam.so.0` and `libstdc++.so.6`. Is there any way to search for those somehow? Can it be normal `nix-env -qa ...`?
<LnL>
yeah, libstdc++ should be in "${stdenv.cc.cc.lib}/lib"
<LnL>
that's a fork, but yes
<LnL>
it should also be available in the latest unstable channel
goibhniu has joined #nixos
grumble has quit [(Quit: </grumble>)]
arianvp2 has joined #nixos
<kuznero>
LnL: `nix-index` failed for some reason, trying `sudo nix-index`
<kuznero>
error: attribute ‘webkitgtk24x-gtk2’ missing, at /nix/store/rd229sm5nqf2v6bkfnnisfs9c8k32npj-nixos-17.03.1700.51a83266d1/nixos/pkgs/development/haskell-modules/configuration-nix.nix:132:45
arianvp2 has quit [(Client Quit)]
ThatDocsLady has quit [(Quit: Arma-geddin-outta-here!)]
ThatDocsLady has joined #nixos
<kuznero>
Could that problem be solved with `patchelf --rpath` because I just ran `patchelf --interpreter` before...?
<clever>
you almost always need to set both of them
<kuznero>
clever: will try it, thanks
grumble has joined #nixos
slyfox has quit [(Quit: no need to cry)]
slyfox has joined #nixos
<kuznero>
clever: trying to do something like this: `nix-shell -p stdenv.cc --run 'patchelf --interpreter ... --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib db2cli` But I guess I cannot use `${stdenv...}` in this context... How do I go about it?
<LnL>
probably easier to use an expression
mudri` has joined #nixos
<LnL>
using an actual drv also has the advantage that nix will know your binary depends on those packages so they won't get garbage collected
<kuznero>
That is a very temporary thing I am doing - just need to be able to run one stubborn executable for debugging purposes... But it might be I just need to create a proper package for it... :( Didn't expect to get that kind of context switch today :D
<kuznero>
Are there any examples of wrapping already built executable like that that you remember?
<kuznero>
Small ones preferably :)
arianvp2 has quit [(Client Quit)]
<kuznero>
Basically something without fetchgit, but copying a local file in...
dywedir has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vcunat pushed 1 new commit to staging: https://git.io/v5trb
<NixOS_GitHub>
nixpkgs/staging 8137a8c Vladimír Čunát: gawk: refactor...
NixOS_GitHub has left #nixos []
takle has joined #nixos
arianvp2 has joined #nixos
justan0theruser has quit [(Ping timeout: 240 seconds)]
arianvp2 has quit [(Remote host closed the connection)]
zennist has joined #nixos
<kuznero>
Will `fetchurl` function work with `file:///home/user/...` kind of path?
<pierron>
doing sudo systemctl suspend works fine, and does not report anythin in the log.
<pierron>
I looked at the service, but I cannot find any dependency listed in it.
* goibhniu
doesn't know if `pm-suspend` works differently
hamishmack has quit [(Quit: hamishmack)]
hamishmack has joined #nixos
<srhb>
pierron: How about allowing the user to use sudo systemctl suspend passwordlessly?
<pierron>
srhb: Can you specify a specific command in the sudoers?
<pierron>
srhb: also, this used to work, so there is a bug somewhere and we should at least identify it before doing a workaround.
<srhb>
sarah myhostname =NOPASSWD: /path/to/systemctl suspend
<srhb>
I don't remember ever being able to do this without sudo rights
<srhb>
It would be weird if I could
<srhb>
Unprivileged user logging into a server and suspending needs _some_ kind of management.
<srhb>
One could argue that on a single user system it would be nice to be able to enable that ability, but certainly not as a default measure. That would be a bug.
<srhb>
Any easy way to do so is make a power group and let users of that group be able to shutdown, suspend, etc.
<srhb>
(Just like the single user example above)
<goibhniu>
I see that desktops use dbus, and that works without root and also locks the screen etc.
<srhb>
I think we have upower too.
<srhb>
Presumably the dbus versions use that.
<bennofs>
doesn't systemd use policykit?
<srhb>
Actually enabling that might be enough.
<bennofs>
i think you can probably set a policykit rule to allow systemctl suspend without root
<srhb>
bennofs: Oh, I've never messed with policykit.
<bennofs>
it's just javascript *shrug*
<srhb>
lol
<srhb>
The description of security.polkit.extraConfig: "Any polkit rules to be added to config (in JavaScript ;-)."
<srhb>
It doesn't seem so bad. I mean, being able to do this programmatically is The Right Thing.
<Mic92>
xd1le: but take care, that your example is systemd.user.services.ipfs-daemon
<Mic92>
this is a user-based systemd service
betaboon has quit [(Quit: This computer has gone to sleep)]
<xd1le>
Mic92: yeah they made a mistake
<Mic92>
you probably want a system service so just replace systemd.user.services. by systemd.services.
<xd1le>
Mic92: thank you :)
bfrog has quit [(Ping timeout: 240 seconds)]
<Mic92>
xd1le: by the way, any module you find in nixpkgs/nixos you can also just add to your own configuration.nix
<Mic92>
nixpkgs/nixos/modules
<Mic92>
there is a config section in each module, the content of this attribute set can be copy an pasted to your configuration
cpennington has joined #nixos
stranger__ has joined #nixos
<stranger__>
hi. is it possible to use $out in let expression?
ejoy has joined #nixos
<ejoy>
I need to put a script under /etc/network/if-up.d/ to do something as soon as VPN is connected. How to do this in nixos given /etc/network does not even exist?
<Mic92>
stranger__: I remember there was something added to nix, but I am not sure, if it in nix unstable
<goibhniu>
mog it looks like you can still use teespring but set EU as the fulfilment location ... maybe you need to add a separate product for each region
<mog>
let me try to do that, id like it to be on same site for simplicity
<pstn>
Agreed, that seems to be the best solution.
<ikwildrpepper>
can I cancel my previous order?
justanotheruser has joined #nixos
<mog>
id think so ikwildrpepper but im just a user of the site not the operator
<ikwildrpepper>
hehe
<ikwildrpepper>
probably too lazy to do that anyway :D
reinhardt_ has joined #nixos
betaboon has quit [(Quit: This computer has gone to sleep)]
goibhniu1 has joined #nixos
goibhniu has quit [(Ping timeout: 252 seconds)]
<mog>
eu doesnt offer quiet same service it looks like goibhniu but ill get it done in a bit. i have to make even higher dpi version of the image for them
reinhardt has quit [(Ping timeout: 252 seconds)]
Infinisil has joined #nixos
<goibhniu1>
moar dpi for us \o/
goibhniu1 is now known as goibhniu
<disasm>
gchristensen, Profpatsch: I'm available to talk whenever you guys are free. Heading out at 3:30 EDT today for some family time.
Neo-- has quit [(Remote host closed the connection)]
Neo-- has joined #nixos
Ivanych has joined #nixos
eacameron has joined #nixos
freusque has joined #nixos
bennofs has joined #nixos
felipedvorak has joined #nixos
eacameron has quit [(Remote host closed the connection)]
thblt has quit [(Remote host closed the connection)]
zraexy has quit [(Ping timeout: 240 seconds)]
eacameron has joined #nixos
DrWaste has quit [(Quit: Run away!)]
<olejorgenb[m]>
should new commits include automatically cleaned whitespace?
<olejorgenb[m]>
ie. I'm adding to python-packages.nix and that file has existing trailing whitespace
<olejorgenb[m]>
due to .editorconfig (checked into git) it is cleared by my emacs
<xd1le>
olejorgenb[m]: just put it as a separate commit
<xd1le>
to keep the commits atomic
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] gdonval opened pull request #28536: Libsigsev old kernel fix (master...libsigsev_old_kernel_fix) https://git.io/v5q33
NixOS_GitHub has left #nixos []
<xd1le>
What's the difference between systemd.services.<name>.script and systemd.services.<name>.serviceConfig.ExecStart ? Not sure which to use.
<olejorgenb[m]>
ok :) (is there a system in place to prevent new whitespace to sneak in (besides .editorconfig)? It is quite annoying to deal with - espcesially when .editorconfig enables auto cleanup)
<xd1le>
olejorgenb[m]: not sure about that.
filterfish has joined #nixos
ixxie has quit [(Ping timeout: 246 seconds)]
mrkgnao has joined #nixos
<dash>
xd1e: nothing really
xd1le has quit [(Ping timeout: 246 seconds)]
xd1le has joined #nixos
ixxie has joined #nixos
<xd1le>
dash: hmm ok then thank you
<Infinisil>
My exams are done \o/
<xd1le>
\o/
<Infinisil>
Three weeks without any obligations, I have time to contribute :D
<NixOS_GitHub>
nixpkgs/staging 3964990 John Ericson: Merge pull request #28519 from obsidiansystems/linux-headers-improve...
NixOS_GitHub has left #nixos []
snikkers has quit [(Ping timeout: 252 seconds)]
hc_ has joined #nixos
hc has quit [(Ping timeout: 276 seconds)]
zraexy has joined #nixos
timon37 has quit [(Remote host closed the connection)]
hc_ has quit [(Ping timeout: 240 seconds)]
ertes-w has quit [(Ping timeout: 248 seconds)]
hc has joined #nixos
freusque has quit [(Quit: WeeChat 1.7.1)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vyp opened pull request #28539: Document that systemd.services.<name>.script is the same as systemd.services.<name>.serviceConfig.ExecStart (master...document-systemd-script) https://git.io/v5qCZ
<sellout-1>
Has anyone managed to get haskellPackages.scion to build? I’m running into “missing dependencies” for network-bytestring (on darwin): base <4.4, network >=2.2.1.1 && <2.3
sellout-1 is now known as sellout
hc has joined #nixos
hc_ has quit [(Ping timeout: 248 seconds)]
Lisanna has quit [(Ping timeout: 252 seconds)]
hc has quit [(Ping timeout: 246 seconds)]
<xd1le>
I want to run a command in a nix expression that requires a command line option to tell it the configuration file. But instead of requiring a file, can I somehow pass that as a nix variable pointing to a nix string?
hc has joined #nixos
pradd has joined #nixos
hc has quit [(Ping timeout: 248 seconds)]
hc has joined #nixos
leat has joined #nixos
<dash>
xd1le: You can.
<Infinisil>
xd1le: You mean something like `command --file ${pkgs.writeText "file" "content of file"}`
eacameron has quit [(Remote host closed the connection)]
ShalokShalom has joined #nixos
ertes has joined #nixos
hc has quit [(Ping timeout: 240 seconds)]
cpennington has quit [(Ping timeout: 246 seconds)]
hc has joined #nixos
<xd1le>
Infinisil: yep, I wasn't sure show to do that
<xd1le>
sure how*
<xd1le>
Infinisil: is writeText supposed to be under pkgs?
stranger__ has quit [(Quit: Connection closed for inactivity)]
hc has quit [(Ping timeout: 255 seconds)]
<pstn>
mog: Wow, that was quick with the shirt. Just bought one :-D Thanks for your efforts.
hc has joined #nixos
<mog>
cheers
<Infinisil>
xd1le: Yes, or is it not for you?
<mog>
we are getting close to 100 dollars for project now
<Infinisil>
xd1le: It's a top-level attribute in nixpkgs
guillaum1 has quit [(Ping timeout: 255 seconds)]
takle_ has quit [(Remote host closed the connection)]
FRidh has joined #nixos
hc has quit [(Ping timeout: 255 seconds)]
hc has joined #nixos
zennist has joined #nixos
phreedom has quit [(Ping timeout: 248 seconds)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] mguentner opened pull request #28540: cpython: include test.support and test.regrtest (master...python_test_support) https://git.io/v5q4d
NixOS_GitHub has left #nixos []
<xd1le>
Infinisil: no I just haven't tried it yet
cpennington has joined #nixos
<Infinisil>
Soka
hc has quit [(Ping timeout: 240 seconds)]
zennist has quit [(Ping timeout: 252 seconds)]
hc has joined #nixos
kragniz has quit [(Quit: WeeChat 1.7)]
[0x4A6F] has joined #nixos
<xd1le>
Infinisil: thanks for your help, going to continue my work later and will let you know if it works ;)
<Isorkin>
disasm: https://github.com/NixOS/nixpkgs/pull/28544/files - forgot to add a line - libmodsecurity = callPackage ../tools/security/libmodsecurity { }; - to pkgs\top-level\all-packages.nix Need to make new pull request?
<disasm>
Isorkin: nope, just make the change, commit and push to same branch, that'll update the PR.
<disasm>
they may ask you to squash your commits before it's merged, but I wouldn't worry about that now.
<maurer>
a/go 19
mrkgnao has quit [(Quit: WeeChat 1.7.1)]
rauno has joined #nixos
<tnks>
garbas: cool, you're here too. I wasn't sure if I could ask all my questions as well on Twitter.
eacameron has quit [(Remote host closed the connection)]
<tnks>
So I think I need to read pypi2nix's source code to see what all you're doing.
<tnks>
if anyone else wants to jump in and talk about Python in Nix, feel free.
<rauno>
Does anyone have an example of PXE booting file? There's one in manual but which format is used for PXE ? Got everything booting but when PXE got the provided file it crashed and reported 'illegal opcode' error
<dash>
tnks: pypi2nix is newer :)
<gchristensen>
rauno: I do!
<gchristensen>
rauno: are you actually using ipxe?
<FRidh>
tnks: I've discussed that with garbas. There are some issues with using pypi2nix for a large set like we have in nixpkgs and that has many packages providing extension modules. Anyway, one practical issue that is open is that for each python version and platform combination a package set would have to be created, and preferably all at the same time.
<FRidh>
in principle it should be solveable, its just going to be a LOT of work
<rauno>
gchristensen: nope, it said pxe 6.x.x something verion
tmaekawa has joined #nixos
bennofs has joined #nixos
<gchristensen>
rauno: ok, I _strongly_ recommend using pxe to boot ipxe, and then using ipxe to get nixos -- your boot time will be reduced by hours -- pxe is very very slow at fetching files because it uses tftp, and ipxe supports http and is way fast
tmaekawa has quit [(Client Quit)]
__Sander__ has quit [(Quit: Konversation terminated!)]
<rauno>
oh okay, good point
<rauno>
how tough is it to use pxe to boot ipxie ?
<gchristensen>
ipxe is great and has instructions on setting up dhcpd for doing this chain: http://ipxe.org/howto/dhcpd
arximboldi has joined #nixos
<gchristensen>
"PXE chainloading" is pretty much all you need to follow
<rauno>
uum, nice, thx :) will try it out now
ixxie has quit [(Quit: Lost terminal)]
mudri` has joined #nixos
python476 has quit [(Ping timeout: 240 seconds)]
<gchristensen>
rauno: fwiw it took me about 1/50th of the time to setup the chain load than it took for pxe to download the nixos boot image :)
<rauno>
wow :)
<gchristensen>
tftp is like molasses
<rauno>
another question for the future purpose, is it possible to script ipxe so it would do the whole installation of nixos without user interaction?=
<tokudan[m]>
The 17.03 channels is blocked for 7 days now, as far as i can see there are two problems: ibus (PR 28541) will hopefully fix that, and a Rust issue, that makes no sense to me
<rauno>
omg, your the man gchristensen :D
deltasquared has joined #nixos
<rauno>
totally made my day
<gchristensen>
w00p so glad to help!
<deltasquared>
what did I miss while I was enjoying a welsh holiday
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] FRidh pushed 2 new commits to master: https://git.io/v5qFW
<NixOS_GitHub>
nixpkgs/master 69a4836 Nadrieril: firefox syncserver service: run as non-root user by default
<NixOS_GitHub>
nixpkgs/master 31ba364 Frederik Rietdijk: Merge pull request #28189 from Nadrieril/ffsync-non-root...
<disasm>
Isorkin: git rebase -i <last good commit> then you can prefix in the text editor with 'd' to remove the commit.
jellowj has quit [(Ping timeout: 255 seconds)]
Ivanych has joined #nixos
slack1256 has quit [(Remote host closed the connection)]
python47` has joined #nixos
roundhouse has quit [(Ping timeout: 240 seconds)]
eacameron has joined #nixos
zeus_ has quit [()]
eacameron has quit [(Ping timeout: 240 seconds)]
<rauno>
gchristensen: i successfully loaded ipxe, and after that when providing the netbook.ipxe file (generated with nix-build) it says operation not supported
<rauno>
i used filename "netbook.ixpe", should it be http instead ?
stanibanani has joined #nixos
oever has joined #nixos
vandenoever has quit [(Read error: Connection reset by peer)]
<slabity>
So I use to have zsh tab-completion for nix-env packages, but not anymore. Does anyone else get completion when they do `nix-env -iA nixos.<tab>`? If so, how do you set that up?
<gchristensen>
iirc programs.zsh.enable = true does it?
<slabity>
gchristensen: I have that enabled. But still no tab-completion for nix-env
<rauno>
gchristensen: okay, makes more sense now, i think i can make use of it :) at least this type-0 booted up quite fast with my netboot
<gchristensen>
rauno: are you using packet.net?
<gchristensen>
slabity: hrmm sorry not sure :/
<rauno>
nope
<gchristensen>
oh ok :)
<rauno>
just a plain server in a datacenter :)
<rauno>
but i think it didnt install, just booted a live one
<gchristensen>
I had to do a good bit of work to make it do the install
<gchristensen>
its all in that repo though
<rauno>
i belive you yep, but will save a lot of time if i take yours as base
<pbogdan>
slabity: IIRC I needed zsh-completions and nix-zsh-completions packages and "programs.zsh.enableCompletion = true;", other than that not sure :/
Filystyn has quit [(Quit: Konversation terminated!)]
Filystyn has joined #nixos
Filystyn has quit [(Changing host)]
Filystyn has joined #nixos
freeman42x[m] has joined #nixos
freeman42y[m] has quit [(Read error: Connection reset by peer)]
<slabity>
pbogdan: I don't suppose you have your configuration.nix publicly, do you?
<olejorgenb[m]>
slabity: poke me if following pbogdan advice doesn't work (I co-maintain nix-zsh-completions)
<mog>
what is the purpose of systemd.user?
<gchristensen>
user-services
<pbogdan>
slabity: I don't but here are zsh-related bits in case that helps http://dpaste.com/2QR7H4W I'm using that on 17.03
<mog>
but you have to define the nix file as root anyway/
<gchristensen>
mog: indeed, and the user services are sorta buggy :(
<mog>
and systemd.services you can define the user
<gchristensen>
user services run on login and what-not
<mog>
oh
<mog>
also the startAt format is the same as cron yes?
<gchristensen>
I reckon
<mog>
trying to get rid of cron on my new box and switch over to pure systemd
<slabity>
LnL: I'm not sure. I don't really know how zsh plugins work in the background. But I do know that if I don't call compinit manually then I don't get tab completion for `nix-env -iA nixos.<TAB>`
<slabity>
It sounds like it to me, but I'm not making any assumptions on the specific issue
eacameron has quit [(Remote host closed the connection)]
cpennington has quit [(Remote host closed the connection)]
<olejorgenb[m]>
LnL: my somewhat qualified guess is "yes"
<LnL>
ok, I'll take a look at it tomorrow
sellout- has joined #nixos
<slabity>
Can you make a derivation for an overlay? And then use the derivations in that overlay?
ignat has quit [(Ping timeout: 260 seconds)]
justbeingglad has joined #nixos
justbeingglad has left #nixos []
Coyin has quit [(Quit: Leaving)]
sellout- has quit [(Quit: Leaving.)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] lpenz opened pull request #28551: Revert "gnu global: set path of default gtags.conf in wrapper" (master...globalconfrevert) https://git.io/v5mL9
NixOS_GitHub has left #nixos []
snikkers has joined #nixos
<mog>
if i define a list in nixos can i append to it later? i want to have enviroment.systemPackages defined in one file with some packages, and then i want to add a package to that list in another file
tippenein has joined #nixos
yegods has quit [(Ping timeout: 252 seconds)]
takle has joined #nixos
zeus_ has quit [(Read error: Connection reset by peer)]
zeus_ has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] MP2E pushed 1 new commit to master: https://git.io/v5mtc
Filystyn has quit [(Quit: Konversation terminated!)]
<tokudan[m]>
mog: i believe if you're importing the second file the lists automatically get merged
takle_ has joined #nixos
<mog>
hmm ill try that
takle has quit [(Read error: No route to host)]
cement has quit [(Ping timeout: 240 seconds)]
<tnks>
I'm watching some videos about Nix, and at the end of one, someone commented that "I rerun 'nix -i' because the semantics for 'nix -u' are bad"
<tnks>
sorry, I mean't nix-env.
<gchristensen>
nix-env or nix?
yegods has joined #nixos
<mog>
tokudan[m], you are correct
<mog>
thanks
yegods_ has joined #nixos
<tnks>
but re-running 'nix-env -i' requires knowing all the installed packages, right? I think "nix-env -i" would install all of Nixpkgs, right?
<tnks>
that's probably a separate point. I'm curious why people would avoid 'nix-env -u'
<mog>
tnks, i avoid doing it as i prefer to have all my system defined declartively
<mog>
so i can just nixos-rebuild switch --upgrade my whole system
<gchristensen>
domenkozar: I fear that to do the ppNix part I have to actually just call out to js
<mog>
i tend to use nix-env -i to try something or use something once
<mog>
than i add it to the core
<tnks>
mog: okay, I'm not sure if this commente was in the context of nixos.
<tnks>
but yeah, even with just nix-env, you can maintain a list of packages to install in config.nix.
<mog>
*nods*
<tnks>
though the talk was by garbas about ways Nix can be made easier for beginners.
yegods has quit [(Ping timeout: 252 seconds)]
Sonarpulse has quit [(Read error: Connection reset by peer)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] tokudan closed pull request #27870: Add nixops-keys support to grafana while also keeping the old interface (master...grafana-nixops) https://git.io/v7uTD
NixOS_GitHub has left #nixos []
<tnks>
in that regard, the packageOverrides attributes in ~/.nixpkgs/config.nix is less than desirable.
<tnks>
I guess I was expecting some specific complaint about why "nix-env -u" wouldn't work as you would want or expect.
JosW has quit [(Quit: Konversation terminated!)]
<pxc>
I think I've used `nix-env -e '*'` more times than I've used `nix-env -u`, lol
erictapen has quit [(Ping timeout: 276 seconds)]
[0x4A6F] has quit [(Ping timeout: 276 seconds)]
propumpkin is now known as contrapumpkin
mudri` is now known as mudri
yegods_ has quit [(Ping timeout: 248 seconds)]
<catern>
argh I really hate that nix-devel moved to google groups
<catern>
very frustrating
<pxc>
catern: I don't have strong feelings about Google Groups. Why does it matter? Does it mean you're forced to use a web browser or something?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] romildo opened pull request #28552: oblogout: add description for configuration options (master...fix.oblogout) https://git.io/v5mY9
NixOS_GitHub has left #nixos []
<catern>
pxc: yes
<catern>
it also means that gmane no longer works
<pxc>
:-(
<catern>
which means that I can't read it from gnus
<catern>
mailing lists are for fools
<catern>
NNTP is best
<catern>
but now I can't use it anymore :(
<gchristensen>
so google grouups isn't the problem, just that it moved at all?
<mog>
i think its harder to scan backlogs than mailman archives
<mog>
but thats just me being an old curmudgeon
<catern>
gchristensen: well... yes, for the most part
<gchristensen>
ok :)
<pxc>
couldn't it have moved anywhere as long as it was still a mailing list and still be archived on gmane?
<catern>
it's very upsetting, this is the first mailing list I read that has fallen off gmane :(
<catern>
pxc: gmane's interface to add new lists/update existing lists no longer works
<pxc>
aw geez
<gchristensen>
well frankly gmane hasn't been helpful in this regard
<gchristensen>
nor did they reply to my numerous emails
<catern>
do you mean Lars?
<catern>
or the new owners
<gchristensen>
new owners
<catern>
Lars is under no obligation, but yeah, the new owners are being completely lame about this
<catern>
they seem completely incommunicado
eacameron has joined #nixos
<catern>
maybe I should set up my own copy of gmane
<catern>
are the scripts public I wonder?
<tokudan[m]>
wow, travis still hasn't started the 5m build of PR 28541 from 5h ago
<niksnut>
I thought gmane no longer exists?
<gchristensen>
barely
<catern>
the useful part of gmane certainly still exists
<catern>
yes, I was just looking, weaverd and weft
<catern>
but I don't see the mail to news gateway
eacameron has quit [(Ping timeout: 276 seconds)]
<obadz>
globin: the firefox cherrypicks seem to be breaking 17.03
phinxy has joined #nixos
<tokudan[m]>
how can I figure out which nix store paths depend on a specific path that i want to delete, but is still considered living?
<slabity>
I know it's not the best idea, but I don't suppose there's a way to fetchFromGitHub the HEAD and ignore the sha256?
<dash>
slabity: use nix-prefetch-git to get the sha256
<slabity>
dash: I know that, but I'd prefer not needing to update the hash every time the upstream changes.
Isorkin has quit [(Read error: No route to host)]
<slabity>
Unless there's a way to call that in configuration.nix?
Isorkin has joined #nixos
<dash>
slabity: the whole point of nix configuration is that the system doesn't change until the config file changes.
HurricaneHarry has joined #nixos
Ivanych has quit [(Ping timeout: 252 seconds)]
pie_ has quit [(Remote host closed the connection)]
hiratara has quit [(Ping timeout: 246 seconds)]
pie_ has joined #nixos
pie__ has joined #nixos
pie__ has quit [(Remote host closed the connection)]
<slabity>
I figured that would be the answer
Isorkin has quit [(Read error: No route to host)]
Sonarpulse has joined #nixos
Sonarpulse has quit [(Remote host closed the connection)]
Isorkin has joined #nixos
Sonarpulse has joined #nixos
Isorkin has quit [(Client Quit)]
hiratara has joined #nixos
phreedom has joined #nixos
<pie_>
is there a package for ddrec?
* pie_
waiting for firefox to load
Isorkin has joined #nixos
ison111 has quit [(Ping timeout: 248 seconds)]
<pxc>
pie_: are you excited for the new Firefox? I was running some nightlies the other day and right now I'm running the current beta. They've made huge strides
<pie_>
pxc, whats new?
<slabity>
WebExtensions
<pie_>
besides the new plugin ...yeah that
<pie_>
idk im just waiting for all the plugins to not work xD
<pie_>
ah it was called ddrescue
<pxc>
pie_: yeah, many extensions are broken on Firefox 57 (current is 55, beta is 56, nightly is 57)
<pie_>
anyway my ff is slow to load because lots of tabs xD
<pie_>
though it has always bothered me that just having a lot of unloade tabs shouldnt be such a big load
<pie_>
i mean obviousy idk how FF works under the hood so *shrug(
<pxc>
basically Firefox now loads in less than a second even with literally thousands of tabs
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] dywedir opened pull request #28554: rustRegistry: 2017-07-23 -> 2017-08-24 (master...rustRegistry) https://git.io/v5mno
NixOS_GitHub has left #nixos []
<pxc>
it's dope af
<pie_>
oh god im not alone anymore....
<pie_>
pxc, noooooo :O really :OOOOO
<pie_>
shittttt
<pxc>
oh wait, maybe not less than a second. I was looking at the wrong thing. but it's way way, faster
<pxc>
pie_: I use tree-style tab and usually have a few hundred open and I've noticed improvements
<pie_>
maybe i hsould get that
<pxc>
anyway, yeah, addon breakage is coming but so are huge improvements for users of large numbers of tabs :-D
<pie_>
this makes me happy
<pxc>
most addons are already being ported to WebExtensions, though, and we've got a release in between
<pxc>
it might go pretty smoothly
<pie_>
well probably a lot of the more obscure addons are gonna stay broken but eh...
<pxc>
and Firefox's WebExtensions will remain more powerful than Chrome's extensions API, somehow. So we can still keep some of the advantages of FF. I'll see if I can find the mozilla blog post
<pxc>
or Quora answer or whatever itw as
<pie_>
so i never did actually look into what webextensions changes
<pxc>
yeah idr. Supposedly we'll still be able to do some things that Chrome can't. I couldn't find the post I was thinking of quickly enough so I'm abandoning the search lol
<pie_>
k
dywedir has joined #nixos
<olejorgenb[m]>
pxc: what changes besides better overall performance? (I'm hoping for a native tab-suspender)
ison111 has joined #nixos
<pxc>
olejorgenb[m]: not sure. I'd like that feature, too. I currently use some addon which uses internal APIs to do tab suspension; you and I might be using the same one
<pxc>
I guess the shift to WebExtensions will make some Chrome extensions usable on Firefox, which seems like a good thing
<olejorgenb[m]>
pxc: Yeah, but the one that's compatible with ff57 has some problems so I'm currently without any - relying on regular restarts to suspend tabs ;)
<pxc>
lol I guess that's one way
<pxc>
I'm using ff56 rn
<olejorgenb[m]>
(scrolled up and found the blogpost linked - seems like restart tab suspending save even more memory - that's good)
<samae>
aszlig: hey, I've update and successfuly synced taskwarrior and taskserver with a manually defined certificate, thanks for the mid-july patch
<olejorgenb[m]>
pxc: yeah, so the functionality to suspend tabs is there - just to bad one have to restart to trigger it
<pie_>
suspend as in unload or pause?
<samae>
minor issue: it is not trivial to get the user key (the long 12345-12345-12345) since it does not appear in the logs, but appart from that, it seems to work ok
<olejorgenb[m]>
pie_: as in unload the whole page from memory but remember the tab history, scroll position (preferrably filled in forms) etc.
<olejorgenb[m]>
so some dynamic state will be lost
<olejorgenb[m]>
but the tab should in theory take almost no memory and no cpu
<pxc>
it was pretty much the only way to get by with high-tab workflows on older versions of Firefox
<pxc>
at least it seemed that way to me
ShalokShalom has joined #nixos
NightTrain has joined #nixos
gnuhurd has quit [(Remote host closed the connection)]
ShalokShalom has quit [(Remote host closed the connection)]
pie_ has quit [(Remote host closed the connection)]
<slabity>
I am super confused on how nix overlays work. I've got nixpkgs-mozilla in my nixpkgs.overlay list, but I can't seem to access firefox-nightly-bin at all.
<joepie91>
slabity: afaik firefox is not in the overlay
eacameron has joined #nixos
<joepie91>
slabity: confusingly, that repo contains two separate things - an overlay for Rust things, and some other form of packages for Firefox and such
<joepie91>
at least last I checked
<joepie91>
slabity: oh, nevermind, it has a firefox-overlay now as well
<joepie91>
apparently this was fixed a week ago
<slabity>
joepie91: Well now I'm even more confused.
<joepie91>
yeah, no, ignore what I said :)
<slabity>
No, I mean I'm even more confused with it being corrected
<slabity>
I'm not getting any errors or anything, but it looks like it changes nothing
<olejorgenb[m]>
Using eg. nix-repl to actually evaluate `THE_DERIVATION.builder`, `THE_DERIVATION.args` and `THE_DERIVATION.buildPhase` is a way to find out how the build happens <- fresheyeball The actually builder args is often set deep down in some generic function
<joepie91>
slabity: hm, I don't know whether that works; I personally have a copy of nixpkgs-mozilla checked into my config repo because the versions are generated from metadata anyway (afaik)
<joepie91>
so you don't need to constantly keep nixpkgs-mozilla updated
<joepie91>
I don't know if that also applies for Firefox
<joepie91>
slabity: I haven't used buildRustPackage at all yet
<boomshroom>
Yesterday, my Nexus 5x got LGed, so I'm currently using my Nexus 4 as a backup. Since I had installed Sailfish on it, which is a full GNU/Linux distrobution, I thought about the possibility of installing Nix on it. What do you guys think of using Nix on a mobile phone?
<joepie91>
nor anything that uses it, I think
pie_ has joined #nixos
<joepie91>
pie__: I'm running an FX-6300 and it seems that's sold at about 75 EUR here, as lowest price
<joepie91>
oh sorry
<joepie91>
I read CPUs
pie__ has quit [(Read error: Connection reset by peer)]
<joepie91>
nevermind :D
digitus has quit [(Quit: digitus)]
sellout- has joined #nixos
erasmas has quit [(Quit: leaving)]
filterfish_ has joined #nixos
filterfish has quit [(Ping timeout: 248 seconds)]
Rotaerk has joined #nixos
filterfish_ has quit [(Ping timeout: 248 seconds)]
sellout- has quit [(Quit: Leaving.)]
markus1199 has joined #nixos
<dylanjust[m]>
Hi all! I'm trying to run nix-prefetch-git and pass the output as an argument to to a nix file (with nix-build). Basically, I want to check out a given revision and have nix import that.