<samueldr>
and here I thought rpmotp was something about OTP
<gchristensen>
got baby hands
<samueldr>
I was confused by the lack of results
<samueldr>
yeah :)
cole-h has quit [Ping timeout: 260 seconds]
<samueldr>
if I understand this right, on AC, every hour the system (tries to) update itself, but only activates on positive prompt?
<gchristensen>
yea
<samueldr>
so you can get those modern nagboxes, just like on macOS and Windows!
<gchristensen>
yea!
<gchristensen>
I also want to add fwupd support
<gchristensen>
and it pops up a zenity window with the switch log
<samueldr>
that makes me think I want to setup *something*, be it hydra or something else, to regularly rebuild my configs so doing this would be easier
<samueldr>
I have enough to rebuild on some updates that it could get annoying if it runs on the not-fast machines
rajivr has joined #nixos-chat
<gchristensen>
yeah
<abathur>
nice
<gchristensen>
I don't do a lot of compiling on rebuild, so not such a big deal
<pie_>
i just remembered, some years ago when i was younger i tried to generate openbsd vmware images or something using a shell script
<pie_>
if only id known nixos
ldlework has quit [Ping timeout: 260 seconds]
<abathur>
gchristensen: so many resholves :)
<gchristensen>
bash is better that way :)
<gchristensen>
I think I want a `bash` builder which combines shellcheck, mutate, and resholve
<abathur>
see my links a couple hours ago to nix+CI for the sub-executable tracking projects I mentioned this morning?
<gchristensen>
I aw the link but can't brain enough to clic kthrough :(
<pie_>
abathur: what i dont see in the resholve readme is why you would want to do what it does
<abathur>
fair
<pie_>
i dont get it, but maybe that would help me get it
<abathur>
it's one of those things you probably don't know to look for until you know you need it
<pie_>
yeah
<abathur>
why would you care, for example, if one executable invokes another via a PATH lookup?
<pie_>
ive seen it before and i still didnt get it
<pie_>
i can sort of guess but
<pie_>
like... it resolves an implicit environment into explicit calls?
<abathur>
yes
<abathur>
which has a few important implications
<abathur>
1. it means you can write shell scripts that depend on specific Nix outputs, regardless of what's on PATH
<pie_>
ok now go put this in the readme :p
<abathur>
this can help in a few ways; it means shell scripts can depend on things you don't actually want/need on PATH
<abathur>
it helps you avoid surprises when some programs/scripts modify the PATH
<pie_>
(can it make it so it calls a function with the exe name instead of directly calling the resolved path?)
<abathur>
and 2. because resholve errors when executables aren't resolved, it helps you catch unspecified dependencies that you didn't realize you had
<pie_>
aha
<abathur>
can you unpack what you have in mind, a bit?
<pie_>
i dunno, add cat(){ "/bin/cat" $@} , make cat call that, put path in the function
<pie_>
now you can edit the script if you want it to use something from path
<pie_>
i only looked at the readme on a tiny screen so i didnt see what it actually does
<pie_>
also no idea if this is useful, it just popped into my head and ive been preferring to ask about things recently as opposed to not asking
<abathur>
and, 1+2 combined make it practical to package shell *libraries* with Nix, and have shell scripts that depend on those libraries (or, even scripts that depend on a chain of libraries)
<pie_>
uhuh
<pie_>
mildly intriguing
<abathur>
almostly
<pie_>
id say this almost requries a bash pacckage manager as a corollary, but nixpkgs
<abathur>
well, the main target is resolving scripts during Nix builds, so the further modifiability of the script is irrelevant
<pie_>
in that case yea
<pie_>
so you should add this stuff to the readme so i can link it to the bsd people
<abathur>
it gives Nixpkgs the ability to be an end-to-end bash package manager, yeah
<abathur>
shell modules, but also all of the executables
<abathur>
sure, I'll copy the conversation out once we're done; documentation hasn't been terribly intentional yet
<pie_>
yeah i didnt say go document the whole thing :p , just help people see whats the point
ldlework has joined #nixos-chat
<ldlework>
When I use sshfs I get a wierd error: fusermount3: failed to chdir to mountpoint: Too many levels of symbolic links
<ldlework>
but I have no idea what symbolic links it is talking about since i'm not trying to mount under symbolic link or anything
<ldlework>
so strange
<ldlework>
oops wrong channel
<pie_>
ldlework: i thnk that errror shows up in some weird palces
<pie_>
places
<pie_>
i bet theres a nonzero chance it does not mean what it thinks it means
<abathur>
Thanks for the feedback--it's timely. I've been ~neglecting intentional promotion/onboarding efforts until I finish out an API revision and make a 0.1.0 release; I can tend towards perpetual auto-bikeshedding on stuff like that without feedback so I really want to avoid doing it *twice*.
<abathur>
I've been writing the first manpage draft to help settle out the API, so really pretty perfect timing :)
<abathur>
<3 pie_
<{^_^}>
pie_'s karma got increased to 16
<pie_>
uwu
<abathur>
actually hmm
<pie_>
no backsies :p
<pie_>
ok this makes some sense now and i like it <g*hristensen> I think I want a `bash` builder which combines shellcheck, mutate, and resholve
<pie_>
ldlework: i gguess id try whats in the script and if it works start looking at whats in the unit
<pie_>
but id do it like that because im bad at systemd
<ldlework>
pie_: any idea where those are stored?
<ldlework>
i'm also bad at systemd :P
<pie_>
ldlework: try to tab complete after systemctl show :D
<ldlework>
nice thanks
<pie_>
btw is there a way to get as a pipeable thing the output of a tab completion?
<pie_>
abathur: whats the difference between known declared and present? also TOCTOU, so when?
<pie_>
i mean to me its obvious that its when youre generating the scritp in a nix script but
<ldlework>
pie_: aha I think it's that somehow it's not using my ssh key
<pie_>
the first paragraph seems good i guess
<ldlework>
since it's running as root I think
<pie_>
abathur: also short examples would probably help
<pie_>
but i dunno, ocne you start resolving the things you havent explained precisely, things do start getting a lot longer :D
<abathur>
pie_: invocation, scenario, output?
<pie_>
abathur: i dunno, try to make it make some sense for someone who has no idea why your tool needs to exist?
<abathur>
yeah, fiding the goldilocks zone on length/depth is part of where I can bikeshed myself for days on end, rewrite it 20x, and still not be happy
* pie_
thinks for a moment
<abathur>
well
<pie_>
idk theres always iterative deepening
<abathur>
the repo will probably go into more depth than the manpage needs to
<pie_>
nott that ive written any docs anyone else ever used in my life
<abathur>
if you've downloaded the tool presumably you have some clue
<abathur>
but it's good to know that the language there isn't quite deep enough for you
<pie_>
i feel like some things just dont click for me in general sometimes .p
<pie_>
part of that might be not having the usecase as you said
<abathur>
I'm hoping that means it's just-about right for the manpage
<abathur>
nod
<pie_>
i dont see why a man page should be short
<pie_>
you can put at least 4 depths in it
<abathur>
I didn't realize it was even a problem for Nix until I wanted to string some of my own shell modules (which we've discussed here before) together and fold them into my Nix config
<abathur>
and then I was like, oh, there's a big hole here
<pie_>
a short 1 or 2 lineer for someone to decide fi they care at all
<pie_>
a slightly more in depth summarz
<pie_>
an actual explanation where you dont leave out half of everything
<pie_>
and then excrutiatingly detailed reference
<pie_>
theres also the whole "4 kinds of documentation" thing
<abathur>
nod
<pie_>
im mostly making stuff up here, 4 is a coincidence
<pie_>
make the documentation you would want
<pie_>
then again im a bit of an obsessive archivist sooo
<pie_>
abathur: something i never see people doing is adding an exercises section :P
<pie_>
ok so on a cursory search there is no simple way to pipe tab completions
<pie_>
which is dumb
<abathur>
I've considered doing a few packaging-this-thing screencasts when I feel like the API is stable
<abathur>
not sure I know what you mean by piping a tab completion?
<pie_>
i want to search the output of tab completing systemctl show
<pie_>
for example
<pie_>
ldlework: yeah there you go. i was assuming it would be key related, but then i assumed you already solved that..
<pie_>
ldlework: you know how to check journalctl?
<ldlework>
yeah it wasn't super helpful
<ldlework>
running the command in the unit was though
<pie_>
right
<ldlework>
my current problem is how do you set permissions on files created with home-manager's home.file.* ?!
<pie_>
dunno if theres an easy way to increase verbosity for the command for it, but thats academic at this point
<pie_>
ldlework: dunno lol, but doesnt that take a permissions argument for each entry?
<ldlework>
I'm pretty sure the problem is that the ssh keys don't have the correct permissions
<ldlework>
The files are linked to the store, not sure how one can have user-specific permissions on symlinks.
<pie_>
by the way, i had to fight a bit to figure out how to do tis but you can temporarily put unit files in /run/systemd/system
<pie_>
thats writable
<pie_>
idk if theres other places, probably
<ldlework>
chmod: changing permissions of '/home/ldlework/.ssh/id_rsa': Read-only file system
<pie_>
so you can copy a unit file in there and edit it
<pie_>
(or something)
<pie_>
hm
<ldlework>
silly that symlinks don't have their own permissions kinda
<pie_>
ldlework: see home manager issue 242
<ldlework>
tfw when he didn't just link it
<ldlework>
lol
<pie_>
i froze my browser
<ldlework>
now i'm afraid of this issue
<pie_>
so i looked it up on my phone
<pie_>
no i mean with sigstop lol
<pie_>
it says its not supported because its world readable in the store anyway
<pie_>
and i think that makes some sense
<ldlework>
Ah OK I see .source will set the symlink source
<pie_>
oopsied the ssh key into the store and everyone can use it :p
<ldlework>
that will work perfect
<ldlework>
for a single user machine, it doesn't really matter where the ssh key :)
<ldlework>
is
<pie_>
well, theres all those other programs using your computer
<pie_>
*shrug* idk :p
<ldlework>
true, but whether your ssh key is in the store or anywhere else, if you have bad code on your computer trying to read it, it will be able to
<ldlework>
pie_: nice it was the ssh permissions issue
<ldlework>
sshfs working now
<ldlework>
key permission*
<pie_>
woohooo
<ldlework>
i don't know why it just ocurred to me that you don't have to nix-shell if you have lorri setup
<ldlework>
lol
<ldlework>
been using it for months now
<ldlework>
pie_: ah crap, but now my normal user can't access the mount lol
<ldlework>
I feel like this should do it, "idmap=user" "uid=1000"
<ldlework>
root even shows that it's owned by me, drwxrwxr-x 1 ldlework 50000 4096 Oct 3 17:46 foundry
<ldlework>
hecking heck
<ldlework>
🤔
<abathur>
doh
<abathur>
pie_: re: completions--are you using bash?
<ldlework>
nm fixed
<abathur>
if so, I assume there's some way to write what you want; I won't claim to have a good grasp of the completion system but there's a high level where you can readily generate the completions by calling compgen with the right args, but to do sub-args like `systemctl sh` you have to use the completion script for the program
<pie_>
um
<abathur>
there's info deep in the bash manpage dungeon, but basically `compgen -C <completion executable>` and `compgen -F <completion_func>` provide some way to invoke things just like hitting tab would, as long as you figure out the right things to invoke?
<pie_>
yes im using bash but google stackoverflow resutls havent yieledd anything useful so im strugglng trying to get hacks like this to work:
<pie_>
echo -ne "systemctl show\t\t"$'\cUexit' | script wat
<abathur>
I guess you might also be able to use expect?
<samueldr>
tfw you have a 20GB strace
<pie_>
huh
<abathur>
pie_ so like, the store path for systemd also has share/bash-completion/completions/systemctl
<abathur>
which is a shell script you could source
<abathur>
and then I guess you could call compgen -F _systemctl <somethingsomething>
<abathur>
oh
<abathur>
I guess you may not need to source it, I just checked in the shell on my nixos system and it's already sourced
<abathur>
or, more precisely, I ran `type _systemctl` and saw that the function's already there
<pie_>
i dont have it sourced
<pie_>
well anyway i shouldnt need to figure out what completion script to call, but i think id have to look more into how compgen works, because that doesnt work if i just put some chars there
<abathur>
yeah, not certain
<abathur>
I've used it for some basic code intel stuff (i.e., list of declared functions), but I'm not familiar with that next step into program-specific completions
<abathur>
first code-search result for `"/usr/bin/expect" bash completion` :)
<pie_>
abathur: ok expect seems more like what i want but now i have to learn tcl? xD
<pie_>
ok and now i catch up with scroll
<abathur>
I haven't successfully forced myself to learn expect, but the manpage's list of examples of what it can do makes me suspect it's the kind of underappreciated dark art I'd enjoy doing stupid stuff with
<abathur>
it smells like my kind of arcana, and that perception is enhanced by by how freaking hard to google it is
<pie_>
welllll it kind of works
<pie_>
yes <abathur> I haven't successfully forced myself to learn expect, but the manpage's list of examples of what it can do makes me suspect it's the kind of underappreciated dark art I'd enjoy doing stupid stuff with
<pie_>
i dont have a thing for arcana per se but it seems like the only thing that does what it does and
<pie_>
why the heck is it so damn hard to just echo some junk into bash?
<pie_>
which is really all i want but for some reason it doesnt work
<abathur>
I guess most of that functionality is really readline
<pie_>
right
<abathur>
and tricking non-interactive shells into behaving like interactive ones is its own dark art...
<pie_>
google suggested something called unbuffer *shrrug*
<pie_>
i think thats also part of expect
<pie_>
great, more dumb readline problems
<pie_>
its truncating the tab completion output
<samueldr>
OH, somehow the hydra eval re-used the src of nixpkgs in a new eval, and I have filled my nix store with copies of Nixpkgs + the slowly growing strace file!
<eyJhb>
Update! Which channel? Not unstable I suppose?
<eyJhb>
I might be lost here gchristensen :p
<gchristensen>
in the background, my system prepared an update, and once it was done prompted me to switch now, at boot, or not. I clicked "Now" and it popped a window with the log
<eyJhb>
Ohh, sweet!
<gchristensen>
(and it only does it on AC, of course.) next step is staging firmware updates
<eyJhb>
Do you use flakes as well? And what do you currently track for updates?
<eyJhb>
*ignore the right side, only look at left*
<aleph->
heh
<infinisil>
Please enjoy this recording of a digitalocean website bug that prevents people from logging into the ticker tracker: https://paste.infinisil.com/ZKmAotupCQ.mp4
<aleph->
hahaha
<gchristensen>
hah
<samueldr>
wonderful
<infinisil>
"Thanks for contacting DigitalOcean Support. We sincerely apologize for the inconvenience caused. This was reported to our engineering team and the issue has now been resolved. Can you please try again with your usual system and report back if the issue still persists?"
<infinisil>
gchristensen: Ah, yeah I think that repo isn't updated anymore
<infinisil>
Though I was hoping this would only be the case for >=20.09 branches
<cole-h>
Oh nice, 19.09 finally marked EOL :D
<drakonis>
20.09 lives?
neeasade has quit [Remote host closed the connection]
evalexpr has quit [Read error: Connection reset by peer]
evalexpr has joined #nixos-chat
<abathur>
gchristensen: got an earlier commit of cmdcat to at least build/run on NixOS with minimal patching, so I was able to update the README @ https://github.com/abathur/commandeer with sample test output
tokudan has quit [Remote host closed the connection]