waleee-cl has quit [Quit: Connection closed for inactivity]
energizer has left #nixos-chat ["Leaving"]
drakonis has quit [Quit: WeeChat 2.7.1]
ZaraChimera has quit [Quit: Quit]
ZaraChimera has joined #nixos-chat
<cole-h>
lovesegfault: You looked into utilizing flakes for your config? Or are you satisfied with your current way of doing things
<lovesegfault>
cole-h: flakes aren't usable yet, last I heard
<cole-h>
lovesegfault: Stable, no. Usable, relatively? I'm sure you've seen this repo, which takes advantage of it: https://github.com/nrdxp/nixflk
<lovesegfault>
I've seen it, yeah, just not played with it much
<lovesegfault>
I'm going to wait out until niksnut's work is further along
<cole-h>
Maybe by then, I'll be on NixOS :P
* cole-h
is working on making sure most of his (hm) config should work with minimal changes on NixOS
<lovesegfault>
cole-h: just make the jump!!
<cole-h>
I'm too scared :s I think my plan is to install to an unused HDD I have lying around so I can still have my "stable" system if I need it for any reason
<cole-h>
This Week™
<lovesegfault>
cole-h: the only way is to jump head-first
<lovesegfault>
like getting in the cold water
<lovesegfault>
if you go slowly it hurts more
<cole-h>
True.
<cole-h>
lovesegfault: Related to me doing this: do you know if there's a way to "embed" a GPG key to the NixOS ISO?
<lovesegfault>
there is definitely a way
<lovesegfault>
with Nix there's always a way
<lovesegfault>
it's just usually paved in sharp glass, fire, lava, acid, exposed wiring, and coronavirus
<lovesegfault>
but it's there, you can take it :D
<lovesegfault>
Jokes aside, that doesn't sound _too_ hard; what do you mean by "embed" exactly?
<cole-h>
Just so I can pull from my private git repo before I actually install-install
<cole-h>
Basically, any way to make it accessible is fair game
<cole-h>
Yeah, I can already generate an ISO. It's just not obvious what I need to do to make my GPG key available inside of it :P
<lovesegfault>
well, if this ISO is for your eyes only you can just... add it to the nix store :D
<lovesegfault>
make a pkg just with your key, add to the env
<lovesegfault>
or an etc file
<cole-h>
Fair enough
<lovesegfault>
you get the idea
cole-h has quit [Quit: Goodbye]
ZaraChimera has quit [Quit: Quit]
<MichaelRaskin>
lovesegfault: I think the part about lava and coronavirus in the paving of the way is not true. Nix is about making sure the obstacles do not change their properties over time! So, acid, sharp glass and razor wire it is.
<MichaelRaskin>
pie_[bnc]: actually, X session handling is why I stopped using NixOS mainline
<MichaelRaskin>
Back in the day there was no systemd so X could just do things correctly…
<{^_^}>
#83646 (by deliciouslytyped, 7 hours ago, open): Default (lack of) configuration for startx is REALLY bad / starting multiple x sessions
waleee-cl has joined #nixos-chat
<MichaelRaskin>
Yep, that's actually what I reacted to.
<pie_[bnc]>
ah
<MichaelRaskin>
I think there are two ways of starting X on NixOS, take-over-current-console and make-another-systemd-unit.
<pie_[bnc]>
im fine with the former
<pie_[bnc]>
but the naive startx thing somehow screws over the other running one
<MichaelRaskin>
Might be that something needs to be setuid or setcap to be able to take over the console correctly
<pie_[bnc]>
i never wanted to figure out x but i just might right now
<pie_[bnc]>
looks like sddm is doing something
<MichaelRaskin>
I can tell you everything about extracting X configuration out of NixOS modules while still inside the Nix evaluation…
<pie_[bnc]>
like, whatever i have running currently via my console fiddling, results in two running X, but the one on tty 7 ends up "killing" the session if i switch away from it and starting it again if i switch back
<MichaelRaskin>
Argh
<MichaelRaskin>
And it can be multiple things
<MichaelRaskin>
For me some xrandr operations create a session if I have switched away
<MichaelRaskin>
But I use no SM and no DM, just a WM, so I can perfectly control RandR operation timing
<MichaelRaskin>
Do you want the second session to be with the same config, or different?
<pie_[bnc]>
probably same
<pie_[bnc]>
i would say I "just" want a running X11, but no I want more than a blank dekstop with some xterms
<MichaelRaskin>
Well, you can use my old exportConfiguration thing, and just write a second unit manually
<pie_[bnc]>
that sounds like progress?
<MichaelRaskin>
Well, once you have Xorg running, you can just DISPLAY=:1 icewm
<MichaelRaskin>
Or something
<pie_[bnc]>
yeah i guess but then i get the sddm screwery re: the restart behaviour
<pie_[bnc]>
normall my sessions do not die if i switch the tty :p
<pie_[bnc]>
but yeah ok one thing at a time i guess
<MichaelRaskin>
You can start two manually managed X sessions, I guess
<MichaelRaskin>
I wonder if it is SDDM or your desktop environment
<pie_[bnc]>
MichaelRaskin: i closed the (last?) xterm and my session closed and my machine restarted after the timeout ran out
<pie_[bnc]>
*ok hand* quality configuration
<MichaelRaskin>
Wait what timeout
<MichaelRaskin>
I think it is the first xterm that is mission critical with NixOS setup
<MichaelRaskin>
I have a custom set of flags for starting Xorg anyway
lassulus_ has joined #nixos-chat
<MichaelRaskin>
Yes, including «do not exit on losing the initial X client»
<pie_[bnc]>
the timeout on the TTY where if a service is stuck or something it gives it 1min 30seco
<pie_[bnc]>
MichaelRaskin: how do other distros manage to not f*** this up massively
<MichaelRaskin>
Oh. I have lost track on desktop systemd behaviours by now
<MichaelRaskin>
Do they?
<MichaelRaskin>
I remember explanations about manually editing unit files
<pie_[bnc]>
aha...
<pie_[bnc]>
so we could be cool kids if we could do this decently
<pie_[bnc]>
man i dont have the capacity for this
<MichaelRaskin>
Maybe you are missing some setuid — in legacy Linux package managers package can just setuid startx or something
lassulus has quit [Ping timeout: 256 seconds]
lassulus_ is now known as lassulus
<pie_[bnc]>
MichaelRaskin: i guess i can make this another one of my projects but you seem a lot better qualified
<MichaelRaskin>
In NixOS you need to configure it separately
<MichaelRaskin>
I do not care about NixOS mainline anymore
<pie_[bnc]>
i bet people wouldnt even merge it lol
<MichaelRaskin>
We-ell
<MichaelRaskin>
If I used NixOS I would get a non-committer mintainer to test it independently, then self-merge.
<MichaelRaskin>
Not sure people would remember to actively object.
<pie_[bnc]>
so do you have any code snippets or something
<MichaelRaskin>
But systemd is for systems that are used either for serving webpages or for viewing webpages. My laptop is not exactly used for that, so it's easier for me to write my own bootscripts than make systemd work
<MichaelRaskin>
My config is online, but a part of boot process uses Common Lisp
lassulus_ has joined #nixos-chat
<MichaelRaskin>
Maybe just use nested X sessions? Xnest or something
<MichaelRaskin>
Erm. If Alt-SysRq-B doesn't work, but power button does, either you have magic-SysRq disabled, or you are doing it wrong
<pie_[bnc]>
ok you know what
<MichaelRaskin>
Go to text console and use Alt-SysRq-h to get the list of commands; if you fail …
<pie_[bnc]>
how do itest magic sysrq
<pie_[bnc]>
ok
<pie_[bnc]>
yeah its enabled
<pie_[bnc]>
you scared me for a second there
<pie_[bnc]>
that id been spouting garbage to people all night
<MichaelRaskin>
I mean, if B does not work, then power button cannot do any good
<MichaelRaskin>
Hmmm unless you get a very specific damage to _kernel keyboard driver_
<pie_[bnc]>
i dont want to try sysrqing my machine right now but ill see if i can try the qemu
<MichaelRaskin>
But really, my Firefox profile generation runs in Xvnc
<MichaelRaskin>
If a test suite doesn't run under Xvnc, try disabling whatever doesn't like Xvnc.
<MichaelRaskin>
It's fragile anyway
<pie_[bnc]>
probably works under xvnc
<pie_[bnc]>
at this point im mostly angry at nixos
<MichaelRaskin>
Ah. I gave up long ago.
<pie_[bnc]>
yeah...
<pie_[bnc]>
well you seem to be good enough to not need to care:
<pie_[bnc]>
:P
<__monty__>
Could a C afficionado tell me what happens if you longjmp without a setjmp?
<MichaelRaskin>
Well, I came to NixOS with the understanding that this is a better way to do what got messy when done on LFS via UnionFS
<MichaelRaskin>
Boot scripts are truly not too hard nowadays, though.
<MichaelRaskin>
__monty__: rocks fall everyone dies?
<MichaelRaskin>
I mean, _where_ do you even get the contents of the jump description buffer without setjmp?
<pie_[bnc]>
__monty__: (maybe answered by what does the assembly look like?)
<pie_[bnc]>
MichaelRaskin: sounds reasonable
<pie_[bnc]>
MichaelRaskin: looks to me like this x11 stuff you have starts X and does nothing else? (which would fit with the way you do things)
<__monty__>
pie_[bnc]: I can't easily check that though. I'm reading a book so getting set up to run C code would take more effort than this obscure question motivates me to expend : )
<MichaelRaskin>
pie_[bnc]: yep
<pie_[bnc]>
__monty__: gold...whatsitcalled
<MichaelRaskin>
__monty__: read man setjmp, caveats section
<pie_[bnc]>
__monty__: godbolt
<MichaelRaskin>
It is even undefined to reuse the buffer across threads
<MichaelRaskin>
Oooh, even setjmp without longjmp is already bad.
<pie_[bnc]>
right, when in doubt assume undefined xD
<MichaelRaskin>
When in no doubt, assume you have missed something and again expect undefined
<pie_[bnc]>
:D
<pie_[bnc]>
MichaelRaskin: yep just confirme with qemu sysrq b does nothing
<pie_[bnc]>
*after startx and an x session comes up
<MichaelRaskin>
Hmm, so systemd disables _some_ of the SysRq parts??
<MichaelRaskin>
Does it work before startx?
<pie_[bnc]>
yes
<MichaelRaskin>
Hmm
<__monty__>
Hmm, my man page doesn't have a caveats section.
<__monty__>
Looking at godbolt.
<pie_[bnc]>
of course godbolt is just an empirical test
<MichaelRaskin>
Caveats are a part of NOTES
<pie_[bnc]>
MichaelRaskin: actually alt-sysrq-h worksbut -b might not at all
<__monty__>
I have DESCRIPTION and ERRORS. No CAVEATS, no NOTES.
<pie_[bnc]>
oh.
<pie_[bnc]>
my.
<pie_[bnc]>
god.
<pie_[bnc]>
> this sysrq operation is disabled
<{^_^}>
undefined variable 'this' at (string):293:1
<pie_[bnc]>
i thought people meant sysrqs all on or all off, i didnt know they meant idividually ;_;
<MichaelRaskin>
Well, I did mean all-off as the first risk, but after the first Qemu test I asked about disabling some operations
<pie_[bnc]>
yeah i went back and tested -b before the startx...
<MichaelRaskin>
__monty__: hmm, Nixpkgs package manpages contains a man setjmp that has NOTES
<__monty__>
I'm on nix-darwin. Probably a macos system man page.
<MichaelRaskin>
Ah, sure
<pie_[bnc]>
19.09 release notes:
<pie_[bnc]>
" We now install the sysctl snippets shipped with systemd.
<pie_[bnc]>
This also configures the kernel to pass core dumps to systemd-coredump, and restricts the SysRq key combinations to the sync command only. These sysctl snippets can be found in /etc/sysctl.d/50-*.conf, and overridden via boot.kernel.sysctl (which will place the parameters in /etc/sysctl.d/60-nixos.conf). "
lassulus_ has joined #nixos-chat
<MichaelRaskin>
Bwahaha
<pie_[bnc]>
MichaelRaskin: you were saying about desktop users and service managers...
lassulus has quit [Ping timeout: 256 seconds]
lassulus_ is now known as lassulus
<MichaelRaskin>
I mean, if the system is just for viewing web pages, why would you need SysRq beyond sync, right?
<pie_[bnc]>
why do they even disable those
<MichaelRaskin>
I mean, Alt-SysRq-e _could_ be a violation of security assumptions in some weird situation
<MichaelRaskin>
But basically, user doing anything except browsing webpages is bad, and Alt-SysRq-e is something which is not browsing webpages
andi- has quit [Remote host closed the connection]
andi- has joined #nixos-chat
edef has joined #nixos-chat
<adisbladis>
Omg I hate python packaging so much -.-
<adisbladis>
I hate python people so much
* adisbladis
flips table
<adisbladis>
(╯°□°)╯︵ ┻━┻
<edef>
gchristensen: i don't have any articles on ssh CAs
<edef>
gchristensen: but i do have a custom SSH CA backed by my GnuPG setup, which i've been meaning to write about
<edef>
gchristensen: (this keeps the certification key on a hardware-backed token, namely a YubiKey)
<eyJhb>
adisbladis: why)
<eyJhb>
?
<adisbladis>
eyJhb: Because they have no sense of packaging quality.
<adisbladis>
I was looking in to home-assistant
<adisbladis>
And even their _core_ package is not solveable.
<eyJhb>
You love it, and you know it! - How come?
<adisbladis>
It has in the order of 100s of dependency conflicts.
<adisbladis>
The only reason it "works" for them is because `pip install` doesn't give a shit and just allows you to install conflicting packages
<adisbladis>
And I'm trying to bring up the problem with the home-assistant devs and I'm met with shrugs and whatever's
<__monty__>
Eww
<adisbladis>
"just use docker"
<eyJhb>
Generally everything is basically a dependency hell in all languages
<__monty__>
That's not my experience.
<eyJhb>
Sounds like a nice solution... Seems like it is hacked and slashed together
<adisbladis>
eyJhb: Homeassistant?
<adisbladis>
I went from "this looks cool" to "shit's on fire yo"
<adisbladis>
I would never ever use it at this stage.
<pie_[bnc]>
arguably thats the fault of the packaging tool for not enforcing
<pie_[bnc]>
fault in the sense of if you dont users will just do whatever
<MichaelRaskin>
eyJhb: in Common Lisp it isn't. Because Quicklisp maintainer heroically checks that everything included builds with a single version per package and drops whatever doesn't fit from the released list of packages…
<adisbladis>
pie_[bnc]: Yes, but I don't really care who's at fault :/
<pie_[bnc]>
adisbladis: i know
<pie_[bnc]>
a problem is a problem...
<eyJhb>
MichaelRaskin: there can still be a dependency hell in the sense that there are just so many packages included. It wouldn't stop that
<eyJhb>
...
<adisbladis>
At least that's something you can work with
<eyJhb>
I still hate displaylink
<eyJhb>
Reminded of it so often
* adisbladis
should just stop looking at this and file home-assistant under the "do not use" category
tokudan has quit [Remote host closed the connection]
tokudan has joined #nixos-chat
tokudan has quit [Remote host closed the connection]
tokudan has joined #nixos-chat
lovesegfault has quit [Quit: WeeChat 2.7.1]
KeiraT has quit [Ping timeout: 240 seconds]
KeiraT- has joined #nixos-chat
KeiraT- is now known as KeiraT
<cole-h>
gchristensen: I think you said before I don't need any special permissions to get ofborg to do things... Is this still true if I want ofborg to build on darwin?
<gchristensen>
no, darwin requires access
<cole-h>
Thought so. I'll just wait for mic92 to come along and run that (or some other darwin user) then
<joepie91>
query builder proof-of-concept is coming along nicely
<gchristensen>
oh neat
<joepie91>
need to flesh out the relations bit a bit more, auto-generate the correct relation objects
<joepie91>
so it seems to me like the design is working out well :P
<joepie91>
but in the past 2 days of working on this, I've already had 3 unexpected "... huh. that Just Works" moments
<joepie91>
(and then the actual implementation of the query building and relation handling etc. still remains to be done, of course)
<joepie91>
most importantly, it seems I've achieved my goal of a fully-composable API
<pie_[bnc]>
whats this?
<joepie91>
a query builder for JS that (hopefully) doesn't suck, and can resolve relations
<joepie91>
while treating the DB as authorative on what those relations actually are
<pie_[bnc]>
resolve relations?
<joepie91>
but less stupid :P
<joepie91>
like what an ORM does
<joepie91>
yeah
<pie_[bnc]>
aha
iceypoi has joined #nixos-chat
<joepie91>
I don't like how ORMs squeeze you into having a separate "model definition" for everything, and then require you to re-specify stuff like "this table relates to that table" which is all information *that the database already has*
<joepie91>
and generally ORMs are just designed really monolithically and non-composably
<gchristensen>
sounds sort alike how DBIx infers its relations automatically
<joepie91>
not familiar with DBIx :P
<gchristensen>
it creates the models from an actual database as a build step
<joepie91>
Perl thing, right?
<gchristensen>
sure
<joepie91>
ah right, I'm going for runtime introspection here rather than a build step, and no actual model definition anywhere
<joepie91>
or well, not requiredly so
<gchristensen>
ah
<joepie91>
it's a composable API, so you could build your own model abstraction on top of it if you wanted to for some reason :P
* colemickens
stares at his phone as it repeatedly disconnect/reconnects from the wifi network I told it to join.
<colemickens>
apparently android no longer prompts if it thinks the network is non-ideal, it just sits there and resets it over and over non-stop.
<joepie91>
but yeah, the best query-building option currently available in JS is Knex
<joepie91>
and it's, uh
<joepie91>
"not awful" is the most positive description I have for it
<gchristensen>
I really prefer it when projects just have SQL :/
<joepie91>
it *kinda sorta* has composition and it *kinda sorta* has a workable API and basically everything about it is "kinda sorta" - it's a reasonable first design, but it kinda got stuck with its own tech debt and design decisions (highly imperative and mutable and everything)
<joepie91>
amongst the ORMs, Objection.js is also "not awful" but it's based on Knex (and therefore constrained by its limitations) and still very model-esque
<joepie91>
basically everything else is decidedly in the "awful" category
<joepie91>
gchristensen: SQL is extremely non-composable unfortunately, and I don't consider its language design to be good either
<gchristensen>
sure
<joepie91>
there's basically no way to ergonomically integrate SQL into application or library code without essentially rolling your own ad-hoc query builder that only does half the stuff
<joepie91>
that's what I'm trying to address here :)
<gchristensen>
yeah, I know, I just prefer it when there is regular SQL, though
* joepie91
doesn't for above reasons
<gchristensen>
I find it really hard to go back to a maintenance-mode project and figure out how their query mechanism works, and the peculiarities of how it decides things
<joepie91>
I'd love to see RDBMSes adopt a more... code-friendly... querying interface, so that this query-building stuff is not (or less) necessary
<joepie91>
gchristensen: that's exactly the problem I have with the inevitable outcome of "regular SQL", though, namely that ad-hoc query builder (because how else are you going to implement filterable responses etc.)
<gchristensen>
ideally in my mind the project won't use a query builder
<joepie91>
I end up having to spend a lot of time and energy understanding that project's specific query construction mechanism
<gchristensen>
gotcha,
<joepie91>
I'd much rather have a single, well-thought-out, consistent query building approach
<gchristensen>
yeah, that's cool
<joepie91>
(this is actually one of the main design criteriums of my query builder project; it must be easy to reason about how it works, with minimal special cases... which as far as I can tell no other query builders in JS have done)
<joepie91>
part of that is explicitly documenting the 'implicit type' of any literals passed in anywhere; eg. for the `where(left, condition)` syntax, it would explicitly document that if `left` is just a string, it will be interpreted as `column(left)`
<joepie91>
so that readers of code using this aren't left guessing how it behaves :P