<ekleog>
srxly github? you have github actions, github pages, but to deploy from github actions to github pages, one has to use a third-party action?!
evanjs has joined #nixos-chat
<ekleog>
</rant>
<ldlework>
lol
<ekleog>
(my original search was for how to deploy to github actions without giving write access to all my repositories to all the people who have write access to the repository… well, that's not figured out yet, *all* the guides require a $GITHUB_TOKEN)
<ekleog>
(and it's fun to see how many OSS projects apparently just did that… while AFAIU a github token gives full write access to *any* repository one owns)
<elvishjerricco>
Interesting. I was messing around with booting straight off a ZFS mirror using grub's ZFS support and `boot.loader.grub.devices`. Works fine normally, but detaching one of the disks doesn't work.
<elvishjerricco>
Grub actually boots the kernel just fine no matter which disk you detach. But NixOS just starts repeating`.[ 3.862966] blk_update_request: I/O error, dev fd0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0`
<elvishjerricco>
Wonder what that's about
parsley936 has quit [Remote host closed the connection]
<elvishjerricco>
Gets farther if I blacklist the `floppy` module, but still gets stuck importing the pool
<elvishjerricco>
Oh nvm I just didn't wait long enough :P
<elvishjerricco>
Heh, booting off one disk and then booting off the other creates cksum errors because both disks were written to and have diverged. Looks like ZFS just picks one to be correct and overwrites the divergent data on the other.
<gchristensen>
I thnik it picks the one with a higher txgid
<elvishjerricco>
gchristensen: What if they're the same?
<gchristensen>
is that possible?
<gchristensen>
hm
<elvishjerricco>
gchristensen: Probably. When they diverge, they both have the same txgid, so they'll have the same txgid if they experience the same number of divergent writes
<evelyn>
what does ubuntu do when it has zfs as root
<evelyn>
or does it just boot off a separate boot part?
<elvishjerricco>
evelyn: I believe it creates two separate ZFS pools; rpool and bpool. I think the bpool just has some ZFS features disabled since grub can be picky about unsupported features, allowing rpool to have all the latest stuff
<elvishjerricco>
The graphical installer for Ubuntu doesn't have a mechanism for making a multidisk pool
<lovesegfault>
ekleog: heh, when I encountered that I was also WTF'd
<ekleog>
I've contacted their support, hopefully that'll have been an oversight
<elvishjerricco>
Huh, grub also seems to support booting from raidz, even when a disk is missing. Sweet.
<evelyn>
does grub support ZFS encryption?
<gchristensen>
supreme doubt
<evelyn>
even if it did it could well be extremely slow, given how long it takes to unlock LUKS
<evelyn>
(one of my biggest qualms with it)
<elvishjerricco>
evelyn: It doesn't. In fact at first it wouldn't even boot any pool with the encryption feature enabled, even if the necessary files were on an unencrypted dataset
<elvishjerricco>
I think they fixed that issue though
ajs124 has quit [Quit: killed]
das_j has quit [Quit: killed]
ajs124 has joined #nixos-chat
das_j has joined #nixos-chat
evanjs has quit [Ping timeout: 264 seconds]
drakonis has quit [Quit: WeeChat 2.8]
drakonis has joined #nixos-chat
drakonis has quit [Client Quit]
drakonis has joined #nixos-chat
drakonis has quit [Client Quit]
endformationage has quit [Quit: WeeChat 2.6]
<colemickens>
joepie91: hey, what is Neo?
<colemickens>
just saw your feedback on the new riot layouot
<pie_>
neo is knock knock
<pie_>
oh my god i just realized the white rabbit is an alice in wonderland reference
* pie_
facepalms
<ldlework>
lol after all these years
<ldlework>
you just made me "lose the game" for some reason
<ldlework>
holy shit, that's gotta be like 15 years
<ldlework>
man brains are weird
<pie_>
damn me too
rardiol has quit [Ping timeout: 256 seconds]
slack1256 has joined #nixos-chat
<ldlework>
pie_: you don't lose the game when someone reminds you
<ldlework>
the whole gimmick is that the game comes back randomly
<cole-h>
What is "losing the game"?
<ldlework>
if someone just makes you think of the game, that's pointless
<danderson>
damnit, lost again
cole-h has quit [Quit: Goodbye]
cjpbirkbeck has quit [Quit: cjpbirkbeck]
<pie_>
the game is a highly purified meme
<ldlework>
yes
waleee-cl has quit [Quit: Connection closed for inactivity]
tilpner has joined #nixos-chat
slack1256 has quit [Remote host closed the connection]
<manveru>
i wasn't even playing it anymore :(
<makefu>
pie_: according to american scientists the game is one of the five proto-memes from which all other memes come from
<pie_>
heh
<jtojnar>
575759 store paths deleted, 557432.11 MiB freed
<jtojnar>
accumulated since the end of November, nix-collect-garbage took 2 hours
<adisbladis>
infinisil: mkPoetryApplication keeps it's current behaviour
<adisbladis>
Just with an extra passthru attribute
<infinisil>
Actually it does so even with dependencyEnvironment, because it's a buildEnv and the app is included in it (-> all the apps binaries are included too)
<eyJhb>
adisbladis: so I can test whatever I want in it, as long as I have a lib in Python for it?
<adisbladis>
eyJhb: I've only ever used it with the built-in http libs
<adisbladis>
I don't know how well other things would work
<MichaelRaskin>
OK, I am stupid. Does runtimeDeps in httpstat expression have any effect?
<infinisil>
MichaelRaskin: Never seen that
<infinisil>
propagatedBuildInputs it would be for python runtime deps
<infinisil>
And wrapping the resulting binary with a different PATH for a dependency on the curl binary
<MichaelRaskin>
I know the boring solution!
<MichaelRaskin>
I am trying to understand what is going on there.
<infinisil>
Maybe it comes from
<infinisil>
,runtimeDeps
<{^_^}>
In order of preference: Patch source OR ((if it uses PATH -> wrap with new $PATH) AND (if it uses dlopen, (patchelf --set-rpath in postFixup OR wrap with new LD_LIBRARY_PATH)))
<infinisil>
(the command name itself!)
<MichaelRaskin>
I mean, there are a few places that define runtimeDeps then use these to build a wrapper. Indeed, the code looks clean this way
<MichaelRaskin>
But here the second shoe doesn't drop and I am wondering if I am missing something…
<infinisil>
Definitely looks like a mistake to me
<infinisil>
I don't think it currently does anything
<MichaelRaskin>
That is my current working assumption, too
<adisbladis>
infinisil: Could you have a look of the two latest commits I pushed to your dependencyEnv branch?
<infinisil>
adisbladis: Problem: The getDeps is from the old app
<adisbladis>
I think that's fine?
<infinisil>
Hm that might be fine yeah
<adisbladis>
It's not really well supported to override dependencies outside of the overlay mechanism anyway
<adisbladis>
Actually!
<infinisil>
I'm not a big fan of introducing additional overridable functions
<adisbladis>
infinisil: `extraLibs = [ app ];` is sufficient
<infinisil>
Ah!
<adisbladis>
I'm pushing that fixup and then I think we're good to go
<infinisil>
adisbladis: Wait I don't think this includes the binaries from dependencies
<infinisil>
Or does it?
<adisbladis>
Yes it does
<infinisil>
Huh
<cole-h>
Don't forget my spelling suggestion :D
<adisbladis>
s/cole-h/nitpicker/ ;)
* cole-h
is now known as nitpicker
<infinisil>
Ah yes it is included in propagated deps
<infinisil>
the deps I mean
<infinisil>
Almost feels like it's not worth having that passthru then
<infinisil>
When it's just python.buildEnv { extraLibs = [ app ]; }
<adisbladis>
infinisil: It's not though
<adisbladis>
You still need to do it on the correct interpreter
<infinisil>
Hm true, I guess it would be app.python.buildEnv.override { extraLibs = [ app ]; }
<adisbladis>
I still think it's worth it just for that :)
<infinisil>
Yeah sounds good
<infinisil>
adisbladis: Not sure if the app overriding is needed though
<infinisil>
Can be done with .override { extraLibs = [ (app.override ...) ]; }
<infinisil>
Hm I wonder if the override could get applied to the passthru automatically..
<adisbladis>
I don't think so
<adisbladis>
Not without moving makeOverridable to mkPoetryApplication
<adisbladis>
Which I don't want to do
<infinisil>
Damnit, I really want to improve the override stuff in nixpkgs, it's horribly complicated and inconsistent
<adisbladis>
And a total memory hog
<MichaelRaskin>
That last part can probably be kind of improved already by using lib. functions instead of stored function
<MichaelRaskin>
Then we can keep just the path to re-import instead of all the tasty data
<infinisil>
I think I attempted this before, but got stuck on how to actually see whether it improved anything
<infinisil>
I guess that goes into the question of "NixOS module system vs .override and co."
<infinisil>
(fixing the .override inconsistencies that is)
<infinisil>
Because the module system is rather consistent and has similar power to .override and co.
<cole-h>
Execpt when you're not on NixOS
<infinisil>
cole-h: Module system is usable without NixOS :)
<infinisil>
E.g. home-manager, haskell.nix, nix-darwin all use it too
<cole-h>
You said "NixOS module system" so I was figuring you were talking about `security.doas.enable = true;` kind of thing.
<infinisil>
It is that kind of thing, just with different option sets
<cole-h>
How would you use a module to "override" something? Genuinely interested in an example
<cole-h>
(Or a brief overview of how one might approach it)
<infinisil>
cole-h: E.g. to change buildInputs you'd add a module that does `package.hello.buildInputs = [ foo ]`, which then gets merged with all the other buildInputs into a final list
<infinisil>
Overriding the default definitions would be with a mkForce
<infinisil>
This would e.g. also easily allow you to do package.hello.src = { version = "..."; sha256 = "..."; }
<cole-h>
Wait what
<cole-h>
That's actually crazy]
* cole-h
goes to convert all his overlays to modules
<cole-h>
infinisil: But what if you want to remove a package from an input list? `mkForce [ list without that one package ]`?
<adisbladis>
infinisil: How would I override a single build input for a package ?
<adisbladis>
Very similar problem to what cole-h is asking about :)
<infinisil>
cole-h: adisbladis: I guess that's where my *other* idea comes in play of getting rid of lists in the module system because of this problem :P
<infinisil>
Similar with how I'd want it to be `environment.systemPackages = { inherit (pkgs) foo bar; }`
<MichaelRaskin>
adisbladis: Not sure. Module system is kind of scaringly non-local
<MichaelRaskin>
Many things start looking like global shared mutable state
<adisbladis>
Hm
<infinisil>
MichaelRaskin: Maybe we should do an extensive comparison of overrides vs the module system
<MichaelRaskin>
I like self:super: idiom
<adisbladis>
Given that fact evaluation of a single package would shoot up
<adisbladis>
Because you have to evaluate all packages to know which packages affect another package
<adisbladis>
Just like the NixOS module system
<MichaelRaskin>
infinisil: I think it is quite clear that this boils down to values dissonance…
<infinisil>
Hm, maybe we could have a module system Lite version, which doesn't do any checking to speed it up
<adisbladis>
That'd be pretty neato
<__monty__>
Can't we change the name to NixOS *Option* system or something? It's unnecessarily confusing.
<adisbladis>
Like, only a single file can define an option ?
<infinisil>
adisbladis: I'm thinking to remove checks for a matching type, defined options, etc.
<adisbladis>
Omg this discussion makes me want to have a hackathon :D
<MichaelRaskin>
Globality seems to be a larger problem, at least for transparency
<infinisil>
and you'd get obscure nix errors instead if something bad does happen -> in which case you'd turn off the Lite version
<drakonis>
actual feature request
<infinisil>
MichaelRaskin: I do have some ideas for adding restrictions to the module system :D
<drakonis>
being able to run multiple service instances
<infinisil>
MichaelRaskin: But yeah, the global namespace is a bit of a problem
<MichaelRaskin>
infinisil: and without, polishing self:super: performance sounds nice…
<infinisil>
drakonis: Can't be implemented in general. E.g. think about what should happen if a module defines /etc/foo.conf. What would the automatically duplicated one use?
<MichaelRaskin>
Although I guess the balance to cover some of the use cases would be «push maximum of implementation to overlay-style level, and on the top level some people prefer overlay-style / SvdB posts / etc., and some prefer module system because imperative enabling of things but safely is what they _actually_ want»
<drakonis>
well, actually, containers would be a totally valid use of how to implement that
<adisbladis>
drakonis: Then I recommend NixOS containers ;)
<drakonis>
:thejoke:
<infinisil>
drakonis: I think you still need a manual port mapping then though
<MichaelRaskin>
infinisil: ideally, the module _itself_ would still be able to access the file directly in store, and for global use in _my_ system I say what I import from which service
<adisbladis>
NixOS containers are pretty heavy at evaluation time though
<infinisil>
MichaelRaskin: Hm not sure I'm getting what you're saying there
<drakonis>
not looking into derailing the discussion
<infinisil>
We're already way off-topic for #nixos-chat I feel :P
<adisbladis>
Everything is on-topic here?
<__monty__>
Except for NixOS.
<infinisil>
I'd say everything that doesn't fit in other channels is on-topic here
<infinisil>
E.g. this discussion about the module system/overrides is probably better for #nixos-dev
<MichaelRaskin>
I claim that my position is sufficiently off-mainstream (even though I am not completely alone in disliking how module system is right now) that my crazy flamewars would be offtopic in #-dev !
<infinisil>
Hehe, I don't mind it here
<infinisil>
I personally am a big fan of the module system, but if the .override things would be more consistent, I can see me liking that too
<aanderse>
infinisil: bored and up for the challenge of helping me?
<adisbladis>
It's a trap
<infinisil>
aanderse: Possibly, what's it about?
<aanderse>
definitely
<aanderse>
fortunately infinisil has weaknesses i know about
<aanderse>
:D
<MichaelRaskin>
I like the self:super: part, and prefer the other stuff existing to not existing (but recognise kludginess)
<aanderse>
throw a semi-interesting problem his way and good chance he'll get hooked
<infinisil>
Damnit
<MichaelRaskin>
Let me guess: it is a problem about module system?
<adisbladis>
Temptations are my only weakness
<aanderse>
infinisil: i can't seem to successfully use the `isDefined` attribute of options
<aanderse>
for reference: grep -nR isDefined nixos/modules/ in a nixos checkout
<infinisil>
Oh that hooks me
<aanderse>
yeah, i really had a feeling it would :)
<cole-h>
As opposed to `with lib.maintainers; [ cole-h adisbladis ]` -- no functions necessary
<MichaelRaskin>
Well, _first_ the things that needed lib used stdenv.lib because it is less impact, then it became a tradition!
<infinisil>
stdenv.lib seems to just have been introduced as a shorthand since stdenv is always in the argument list, not a fan of this
<adisbladis>
cole-h: For sure a tradeoff
<adisbladis>
cole-h: I think the fact that `with` makes things hard to reason about is enough to ban it in nixpkgs
<infinisil>
adisbladis: cole-h: I mean we could make maintainers an attribute set, allowing you to do `maintainers = { inherit (maintainers) foo bar baz; }` directly
<adisbladis>
And it's harder to make tooling that allows for exceptions
<cole-h>
I definitely agree (and I've gone off on a committer who wanted to put `with stdenv.lib;` before even the `stdenv.mkDerivation` line)
<adisbladis>
<3
<cole-h>
infinisil: I would like that, tbh.
<adisbladis>
infinisil: Yes, tbh mkDerivation could do that transform into a list foc backwards compat
* gchristensen
likes `with`
<qyliss>
I'm not sure I've ever found myself having trouble reasoning about things because of with
<qyliss>
But I also think we'd be fine without it.
<adisbladis>
qyliss: When you have >1000 lines of Nix and your expression begins with a few nested with's things get hairy ;)
<infinisil>
My main gripe with `with` is that it prevents static variable checking
<eyJhb>
qyliss: helps if you know where things tend to come from. For newcomers it is no fun
<adisbladis>
^ this too
<infinisil>
E.g. you can have a file with all gibberish variables. Slap a `with {};` in front and Nix won't complain at parse time
<qyliss>
idk, it's not used enough in most derivations for it to be a problem
<qyliss>
I was a newcomer once
<adisbladis>
It became a problem when I wanted to write more complex things
<joepie91>
I've had trouble *often* trying to track down where a `with`ed thing came from
<adisbladis>
Admittedly it's not really a problem in most derivations
<adisbladis>
I think of nixpkgs as something that should showcase how to use Nix
<adisbladis>
Reading stuff in nixpkgs is how I learnt Nix at least
<infinisil>
The semantics of `with` are also confusing
<joepie91>
especially the combination of `with pkgs` and `with pkgs.stdenv` and `with lib` or whatever makes it very not fun to figure out how to solve a problem from an existing expression
<adisbladis>
And the use of `with` is something I came to deeply regret in complex expressions
* joepie91
would like very much for `with` to go away
<joepie91>
(incidentally I'm pretty sure that we're rerunning a discussion that was had in JS-land 10 or so years ago, when `with` was nuked in strict mode :P)
<adisbladis>
Huh?
<adisbladis>
JS had with?
<joepie91>
yeah
<adisbladis>
joepie91: You are an excellent source for strange js trivia :D
<infinisil>
Looks like js got better semantics though
<infinisil>
> let x = 10; in with { x = 20; }; x
<{^_^}>
10
<infinisil>
This would be 20 in js
<adisbladis>
The "Ambiguity contra" section is great
<aanderse>
infinisil: ok now i'm confused... does `isDefined` mean the user has filled out a value for the option, as opposed to leaving it whatever the default is?
<adisbladis>
I was explaining how Nix `with` works to a colleague the other day
<infinisil>
aanderse: Ah no that's not the case. isDefined is true if even a default is set
<adisbladis>
He's pretty experienced with Nix and hacking on the CPP Nix code but was _still_ wrong how `with` should work
<infinisil>
aanderse: However you can check for the options `highestPrio` to see if it's at a "default" value
<joepie91>
adisbladis: btw, conversely, it's kinda funny and surreal to me to see someone classify `with` as "strange js trivia", considering that I still remember the drama over whether it should be okay to use it or not :D
<adisbladis>
To me that's a warning sign when frequent contributors misunderstand language features
<aanderse>
infinisil: oh, so you can't actually check if the user has explicitly filled out a value?
<infinisil>
aanderse: If by the user you mean whether they have it in configuration.nix, the answer is no, because configuration.nix is no different than all other modules
<MichaelRaskin>
adisbladis: maybe the opinion was correct on how it _should_ work, just not on how it _does_?
<aanderse>
infinisil: ok, thanks
<adisbladis>
MichaelRaskin: That was totally the case imo
<infinisil>
aanderse: However, if the user assigns it normally (without a mkDefault), the highestPrio will be 100 I think
<infinisil>
Which is lower than what it would be if the default applies (1000 I think)
<qyliss>
I've never seen with pkgs.stdenv
<qyliss>
that sounds horrible
<adisbladis>
> let foo = "bar"; in with { foo="baz"; }; foo
<{^_^}>
"bar"
<MichaelRaskin>
But yeah, reminds me of the argument I used to advertise removing URL syntax: «first of all, the documentation is wrong, it cannot be implemented as documented, and it has _more_ differences with documentation than explained by these problems»
<adisbladis>
This is what I sent him
<adisbladis>
And asked what it evaluates to
<qyliss>
My concern with banning with is that we wouldn't be able to at some point ban rec
<qyliss>
Which I think is much more confusing
<aanderse>
infinisil: thanks again, very helpful
<MichaelRaskin>
Erm, rec is local and useful!
<qyliss>
let self = with self; ...; in self is much better than rec
<adisbladis>
qyliss: Rec also needs to die in a fire
<MichaelRaskin>
rec is good
<qyliss>
rec is why my overlays never work
<infinisil>
I see the Nix Lite version is coming along nicely
<MichaelRaskin>
adisbladis: what example you find surprising?
<adisbladis>
cole-h: :(
* adisbladis
cries
<qyliss>
MichaelRaskin: pkgs
<cole-h>
Oh sorry, you said `with pkgs.stdenv`
<adisbladis>
MichaelRaskin: How it relates to overrides
<qyliss>
The rec in all-packages.nix makes overlays not apply properly.
<qyliss>
If I use an overlay to override openssl, anything referring to openssl in all-packages.nix won't have by replaced openssl, because of rec.
<adisbladis>
(mkDerivation rec { pname = "foo"; version = "0.1"; name = "${pname}-${version}"}).overrideAttrs(old: { pname = "baz"; })
<infinisil>
qyliss: Only ones where it's locally referenced though
<qyliss>
Yes
<adisbladis>
name is still "foo-0.1"
<qyliss>
Which makes it even more confusing
<qyliss>
Because it's not consistent.
<qyliss>
I'd much rather deprecate rec in favour of with that deprecate with.
<adisbladis>
A `let pname = "foo"; version = "0.1"; in mkDerivation { inherit pname version; name = "${pname}-${version}"; }`
<adisbladis>
Is more syntactically "honest"
<qyliss>
I'd happily deprecate both, but I think it would be difficult to do that
<adisbladis>
About scoping
<MichaelRaskin>
Hm. self:super: does need with, and _technically_ nothing _inside_ this fule guarantees that «self» is that self…
<adisbladis>
qyliss: Totally 100% agree, I want to remove both
<infinisil>
Yeah I'm +1 for removing both too
<qyliss>
adisbladis: fine by me, but that's going to be a big change to all-packages.nix
<adisbladis>
Also agree that `rec` is the worse off the 2 offenders
<MichaelRaskin>
infinisil: and what instead of self:super:
<infinisil>
MichaelRaskin: What does that need with for?
<MichaelRaskin>
To not bee horribly annoying to write?
<qyliss>
I don't really care about with. But making sure removing it doesn't make it more difficult to remove rec, which is worse, is important.
* infinisil
has been using super. and self. for a while without problems
<adisbladis>
qyliss: I see an incremental path here ;)
<MichaelRaskin>
That's annoying
<qyliss>
I usually do self: super: with self; { ... }
<adisbladis>
First ban `rec`, and in that ban using `with` is fine
<cole-h>
infinisil: Well, if you try to basically re-write the entire derivation, it'll get annoying... `buildInputs = [ super.baz super.bar super.bim super.bap ];` gets old after a while
<infinisil>
cole-h: I think all of nixpkgs could use some restructuring
<MichaelRaskin>
Dropping rec will people use let _even more_ and we already use it too much, though
<adisbladis>
cole-h: derivations are usually function inputs added by callPackage though
<MichaelRaskin>
Too many things that are vert convenient to have are hidden
<qyliss>
MichaelRaskin: if you drop rec without dropping with that's not a problem.
<qyliss>
But it is if you drop both, yeah...
<adisbladis>
Btw, `rec` is _also_ pretty awful for performance
<MichaelRaskin>
Some people will move to opaque lets even after just rec being dropped
<adisbladis>
Scopes all over the place
<infinisil>
Oh, while we're discussing stuff to deprecate
<infinisil>
Dynamic attributes
<cole-h>
If we remove `rec`, wouldn't we then have to write `let version = "6.9"; in ... inherit version; ... src = { rev = "v${version}"; ... };` for it to work as expected?
<MichaelRaskin>
Why do you dislike specifically syntax support for dynamic attribute names?
<LnL>
now you just used rec again so I don't think that solves anything
<cole-h>
qyliss: Sorry, I'm not grokking what you mean by that...
<LnL>
instead of rec (or let rec) you want behaviour like pname
<qyliss>
cole-h: let self = stdenv.mkDerivation { name = "hello"; version = "1.0.0"; src = fetchurl { url = "https://example.com/hello-${self.version}.tar.gz"; }; in self
<qyliss>
I forgot a }; but you get the idea
<cole-h>
Oh, OK -- thanks for the concrete example, I understand now.
<qyliss>
Quite a few packages do this already
<infinisil>
> let exists = _: if result ? key then "exists" else "doesn't"; result = { ${exists 0} = null; ${"key" + ""} = null; ${exists 0} = null; }; in result
<qyliss>
Not for version, but for other things you can't really get statically.
<infinisil>
> let exists = _: if result ? key then "exists" else "doesn't"; result = { ${exists 0} = null; ${exists 0} = null; ${"key" + ""} = null; }; in result
<LnL>
qyliss: it's no different tho
<{^_^}>
dynamic attribute 'doesn't' at (string):310:94 already defined at (string):310:74
<qyliss>
LnL: yes it is, because it happens after passing to stdenv
<infinisil>
MichaelRaskin: The only difference between these two is the ordering of an attribute
<infinisil>
This showcases one problem of dynamic attributes, but there's others too
<qyliss>
LnL: this doesn't work: stdenv.mkDerivation rec { pname = "foo"; version = "1"; passthru.hello = name; }
<qyliss>
LnL: this does work: let self = stdenv.mkDerivation { pname = "foo"; version = "1"; passthru.hello = self.name; }; in self
<LnL>
qyliss: I don't see that, this is it's own fixpoint just like rec so it'ss nnot overidable
<qyliss>
Hmm, that's truee.
<qyliss>
Maybe callPackage should pass self
<infinisil>
I guess that's an advantage of the module system: Such deep changes are not a problem
<LnL>
it just uses another language construct to express the same thing
<qyliss>
It doesn't express the same thing at all
<qyliss>
Or, is my example broken?
<MichaelRaskin>
Module system is like nix-env -iA
<aanderse>
ugh i just found out network manager stores state in /etc :\
<MichaelRaskin>
It is pretty imperative, and useful for some cases (and probably could be slightly modified to be more useful), but should be as thin a layer as high up as feasible.
<infinisil>
MichaelRaskin: How is the module system imperative?
<infinisil>
Overlays in comparison are much more imperative, they actually sequence change operations
<MichaelRaskin>
It's the best approxiation to imperative people could get inside Nix.
<infinisil>
How is it imperative?
<MichaelRaskin>
The problem with imperative is not order, it is extent
<MichaelRaskin>
No clear locality rules
<MichaelRaskin>
And module system is about letting people say, «oh and just put this there»
<infinisil>
"In computer science, imperative programming is a programming paradigm that uses statements that change a program's state"
<infinisil>
MichaelRaskin: imperative doesn't seem to be the right word for this
<MichaelRaskin>
A typical module does look like a set of statements «change this configuration like that, change that configuration like this»
<LnL>
guess you can kind of look at options as statements, which can influence the state of any other modules
<infinisil>
With imperative programming, you have sequenced get and set instructions
<infinisil>
Earlier get's can influence later set's
<infinisil>
That's not the case with the module system
<infinisil>
The only change you have is that the result changes
<infinisil>
But that's the case in all programming languages if you change the code
numkem has quit [Ping timeout: 246 seconds]
<emily>
the NixOS module system is bad but not all bad things are imperative
<infinisil>
I'd say it's pretty good actually!
<emily>
it's global and full of spooky action at a distance and implicit dependencies, based on singletons with no real instancing model, ...
<MichaelRaskin>
infinisil: You do have get's influencing set's is NixOS module system
<emily>
I mean, there are lots of things worse than it!
<infinisil>
Ah yes, it's a bit global and implicit
<emily>
but I do see where MichaelRaskin is coming from
<MichaelRaskin>
«a bit global»
<emily>
I just don't think it's really "imperative"
<infinisil>
MichaelRaskin: Can you read environment.systemPackages and add `hello` if `gnupg` is in the list?
<MichaelRaskin>
I dunno, given in modern multicore (and worse) caching the order guarantees for get's and set's are pretty weak…
<MichaelRaskin>
infinisil: not sure, I have succesfully avoided module system for years, so I might not be able to find a trick to make this converge.
<infinisil>
I can say with certainty that it doesn't work
<emily>
MichaelRaskin: "I have succesfully avoided module system for years" -- can you at least stipulate that your NixOS configuration is to be released in your will? my curiosity grows boundlessly :p
<emily>
"Syncing from Monotone" somehow I'm completely unsurprised
<MichaelRaskin>
Well, these do refer to some things outside that won't be released, but stupid stuff like the list of hostnames I do not want to be googlable together
<MichaelRaskin>
emily: there are some scripts integrated with all that that are not online, as they are also integrated with my other scripts that I will never get around to cleaning up
<MichaelRaskin>
So you might have previously asked about something like that
<MichaelRaskin>
<flame> macOS support is getting closer to NixOS level, both in package coverage and in requirement to manage disk volumes </flame>
<__monty__>
MichaelRaskin: Isn't that only if you want an encrypted /nix/store?
<LnL>
lol
<MichaelRaskin>
__monty__: no, apparently you really want _some_ volume, as you cannot just store arbitrary data on the root volume in macOS. We-ell, as Graham advertises, you should not store data in root volume on NixOS!
<LnL>
not until they bring their reinvented bind mounts to users
<__monty__>
Oh, right. For some reason I assumed the installer created a non-encrypted volume for you.
cransom has quit [Ping timeout: 260 seconds]
numkem has joined #nixos-chat
<eyJhb>
Wondering, how many in here has an active Gitlab ?
<gchristensen>
I have a gitlab I created once but I didn't have the patinece to figure out how to use it
<eyJhb>
What did you need to figure out?
<eyJhb>
Wondering what features etc.
cransom has joined #nixos-chat
<gchristensen>
well like
<gchristensen>
every time I view a PR on gitlab I have to scour the UI to figure out how to see the diff
<eyJhb>
Ah.. How long ago is it you used Gitlab?
<gchristensen>
every few months I think
<gchristensen>
oh it looks like it got easier, there is a "Changes" tab
<eyJhb>
Yeah, that's why I was wondering. Maybe I started using it at the perfect time!
<eyJhb>
Btw... If I wrongly based a branch on the wrong one, and have made 1-4 commits in it. How can I then base those commits on master instead?
<eyJhb>
Hoping for some git foo here
<srk>
cherry-pick
<__monty__>
Sounds like a simple rebase?
<eyJhb>
Thinking I might have to create a tmp branch and cherry-pick
<eyJhb>
srk: thinking so too. __monty__ how would I do that?
<LnL>
I generally just rebase -i
<eyJhb>
I only want commits HEAD~4 to HEAD, to be rebased on master
<LnL>
then delete whatever you don't want to keep
<eyJhb>
LnL: unsure how sadly
<__monty__>
Yeah, interactive is probably easiest. git rebase -i master
<LnL>
what do you mean?
<LnL>
rebase -i opens the list of commits in your editor, just delete the lines you don't want
<LnL>
it's the same as cherry-pick, you just don't have to run a bunch of commands with the right commit refs
<eyJhb>
Well, have to find the start of the 40 commits then :p
<eyJhb>
Nvm
<eyJhb>
Got it. thanks!
<eyJhb>
No clue if it is a bad or a good habit I have, where I will push any changes I have on a branch as "up-to-date", just to ensure they are there
<eyJhb>
gchristensen: It seems that Gitlab has gotten better, but today I prefer it. But mostly because it isn't as big of a money machine as Github
<eyJhb>
And all the goddie features
<gchristensen>
yeah, github makes me a bit uncomfortable
<{^_^}>
nix#3573 (by edolstra, 2 days ago, open): Flake support
<drakonis>
its coming
<eyJhb>
gchristensen: I switched to Gitlab because I needed more private repos for a team. Couldn't give me anything... And I like being able to hack away on the source! But Github is faster
<drakonis>
am i late?
<eyJhb>
Gitlab is waaay too slow
<eyJhb>
`edolstra wants to merge 651 commits into master from flakes` wow
<drakonis>
finally... the time has come
* eyJhb
still doesn't know what it is
<drakonis>
the low hanging fruit is that it ditches channels
<eyJhb>
But what is wrong with channels?
<drakonis>
imperative
<colemickens>
-_-
<drakonis>
an example
<genevino>
helloooo!
<gchristensen>
its pure-by-default evaluation is pretty good
<drakonis>
when setting up a new install, i'd like to use home-manager, i cannot directly make it available out of the box because of channels
<gchristensen>
the evaluation cache is incredible
<genevino>
drakonis: i have the same problem
<drakonis>
i have to go out of my way to install it on the post
<drakonis>
its annoying
<drakonis>
so i have a half finished system that has to be set up on reboot
<colemickens>
I'm not following.
<colemickens>
I don't use channels or flakes and I use HM as part of my nixos config
<drakonis>
hm is made available through channels mind you
<drakonis>
unless you're using the release on nixpkgs
<drakonis>
it makes it easier to compose systems
<drakonis>
there's already a dozen repositories that have to be made available through overlays
<emily>
currently I maintain a branch "emily" that's basically just a few of my PRs / local branches merged on top of nixos-unstable{,-small}. I was thinking it'd be cool to instead make it a flake that automatically applies those branches on top of nixpkgs
<emily>
because it's a pain to rebase
<MichaelRaskin>
cole-h: I have also taught set theory stuff. And probability theory. And array algorithms, which is basically «second semester students keep trying to code»
<emily>
e.g. if I change a feature branch (even just because there's a conflict to resolve), I need to get rid of the commits and merge the branch in again
<emily>
lots of fussing about with cherry-pick and so on
<MichaelRaskin>
emily: I think flake input specification is still far from complete enough to be good
<emily>
cole-h: yeah. so the problem is this only des one branch at a time
<cole-h>
MichaelRaskin: Sounds like a lot of work... What is your actual doctorate in, if you don't mind me asking?
<emily>
I can't depend on the GitHub .patch/.diff URLs for each branch because there's no generic "fetch a file from HTTP" input
<cole-h>
I know little-to-nothing about upper-levels of academia lol
<emily>
and I can't just fetch emilazy/nixpkgs and do the branch merging in a derivation because there's no leaveDotGit equivalent
<emily>
hm
<cole-h>
emily: Time to file another issue? :P
parsley936 has quit [Remote host closed the connection]
<emily>
I could depend on my own repo to get a revision/hash, and then do a """pure""" fetchgit with leaveDotGit inside... no, wouldn't work, the hatch wouldn't match
<MichaelRaskin>
cole-h: these were different semesters, of course
<emily>
cole-h: not really sure what I'd want to file, it's like 3 feature requests that could all solve my issue I guess
<cole-h>
emily: Right. Distill it into a feature request for some new input something-or-other, like a "generic 'fetch a file from HTTP'"
<cole-h>
Or something like that
<cole-h>
Communicate what you're trying to do and why and maybe Eelco (or somebody else) will think it's a good idea to have
<MichaelRaskin>
Theoretical CS, although of course in Russian terms it is inside physico-mathematical sciences, as mathematical logic in this case. Which is nominally together with algebra and number theory, for reasons.
<emily>
perhaps instead I should write an HTTP proxy that wraps arbitrary URLs in a tarball and use the tarball fetcher.
<cole-h>
MichaelRaskin: Theoretical anything frequently goes over my head :D
<arianvp>
I guess in your case the resources aren't 'type-checked' by nix right?
<adisbladis>
arianvp: Indeed they are not
__monty__ has quit [Quit: Too slow, zaeph : /]
numkem has quit [Ping timeout: 260 seconds]
<cole-h>
:( I was able to get v4l2loopback working for my webcam in OBS, but jitsi in both chromium and FF were unable to connect to it :(
<cole-h>
Double sad face :(
<gchristensen>
check the readme for v4l2loopback?
<colemickens>
and try tweaking the pixel format in obs for the plugin. oh and I think I had more success when shrinking the output stream resolution. I had apparently been trying to stream full 1440p ultrawide which I don't think is typical for a v4l2 device.
<colemickens>
also, does "unable to connect" mean it didn't show up in the list, or failed when the webapp tried to use it? I think those are different cases. This is all assuming it wasn't just exclusive_caps of course
<cole-h>
(one sec, compiling other things before I try obs-v4l2sink again)
<cole-h>
But what I did was basically exactly what gchristensen did on the obs-v4l2sink PR (minus the kernel stuff -- I did that with Arch+dkms for obvious reasons)
<gchristensen>
you didthe modprobe arguments thing for caps?
<cole-h>
Yep
<cole-h>
Copied your modprobe word for word (except s/sudo/doas/)
<cole-h>
Weird, now it doesn't show any picture at all :D
<cole-h>
o
<cole-h>
wrong scene
<colemickens>
you know, you have to send the jitsi link so we can watch your struggles and successes.
<cole-h>
colemickens: In Chrome, clicking on the webcam button says "Cannot use camera for unknown reason"
<cole-h>
Oh wiat there was a warning just above it
<cole-h>
Could not start video source :D
parsley936 has joined #nixos-chat
<cole-h>
Oh
<cole-h>
Problem is that OBS was using the camera because I hadn't closed it............
<cole-h>
Anybody know how to boost mic volume? It's really low...
<colemickens>
pulsemixer is my best friend
slack1256 has quit [Remote host closed the connection]
<colemickens>
if I can't do it with pulsemixer I assume that you have to be a PA dev to do it :P
<cole-h>
I mean I can put it to 150, but it still sounds quiet...
<ashkitten>
you can set it to any value with pacmd
<colemickens>
oh, sometimes alsa has really weird volumes set for certain devices
<colemickens>
alsamixer, I think? but usually that's for weird usb headphones, I don't think I've ever had that happen to an input
* colemickens
wonders if the NixOS ZFS wiki page reflects all of the wisdom from the chat earlier this morning.
<cole-h>
ashkitten++ I did `pacmd set-source-volume jack_in 150000` and it's a decent balance between loads of whitenoise and actually being audible. Thanks!
<{^_^}>
ashkitten's karma got increased to 7
<gchristensen>
probably not, it could use a rewrite from start to finish
<cole-h>
gchristensen++ Thanks for putting your `modprobe` v4l2loopback thing, so I didn't have to think about anything :D
<{^_^}>
gchristensen's karma got increased to 289, it's a crit!
lopsided98 has quit [Remote host closed the connection]
lopsided98 has joined #nixos-chat
<emily>
so other than nixops, what are the options for Nix-y automated install/provisioning/deployment of fussy non-cloud "pets" (like, "my laptop", "my (non-Cloud) Hetzner machine I got at an auction price", not the kind of stuff Terraform would be suitable for)
<qyliss>
I just use nixos-rebuild --target-host
<emily>
(also open to declarative non-Nix options that could be integrated into NixOS, of course, just... googling around and all the options seem kind of depressing, but that's likely due to my inability at searching)
<emily>
qyliss: I'd really like something that can handle automated install too, possibly including partitioning; there's a lot of busywork in setting up a new host that nixos-install doesn't capture that's currently just a pile of comments in my config
<emily>
if my task for redeploying a host was reduced to "boot nixos on it and run something from my flake" and I made new hosts by copying existing declarations of partitions, filesystem options, etc. and then provisioning that in a more automated way I'd be a lot happier