IRC channel logs
2024-09-15.log
back to list of logs
<meaty>how can I figure out what my gexp actually does from the repl <meaty>I'm trying to debug some services that I wrote that just crash immediately <RavenJoad>meaty: Honestly, the fastest way I have found to debug a service that builds but does not work is to just inspect the built output. There may be better ways, but that is usually the fastest I have found. I usually combine it with the test-operating-system from (guix test) to build small VMs very quickly. <meaty>"built output"? What is that for a service that just starts a daemon? <RavenJoad>When you build a service, Shepherd needs to know what Guile script to run. So I look at the build Shepherd's config, find the service I added, and look at the generated file there. If a config file is involved too, "guix build" output will show its derivation name, which you can look inside of to find the actual config file. <meaty>hello, I did a `guix pull` and how my udev service won't start <meaty>is anyone there to help me troubleshoot? <RavenJoad>Just a guix pull should not have stopped your udev service from working. "guix pull" is like "apt update" and does not alter anything currently running (or at least it should not). <meaty>you're right, it was the reconfigure <meaty>I got udev to run but the file-systems service still won't start <meaty>I get 'device or resource busy' errors, should I just reboot? <RavenJoad>Which file-systems services are not starting? I would make sure / is marked to be mounted, so you don't get stuck without a real system, but a reboot would be my first suggestion. <meaty>RavenJoad: file-system-/{boot/efi,sys/{fs/cgroup,kernel/debug}} <meaty>fdisk to check that the partition table is ok, right <RavenJoad>So long as you do not change the table, yes. <RavenJoad>You can look at /run/current-system/etc/fstab to make sure your mount points are right. <meaty>ok I rebooted and everthing was fine <PotentialUser-62>Hi! I'm trying to create a dev environment with guix system containers instead of guix shell. This is because the application is composed of a database, a web server, and several internal processes that talk to each other using http, Up until now everything mostly works, but I noticed that I can't use the guix command from inside the container, I'm <PotentialUser-62>wondering there's an equivalent to --nesting for system containers? Or if a workaround is possible? <bdju>hm the swaylock/locale issues have also broken my clock in waybar and it disabled the module. annoying. <jaft_r>bdju: (if you don't mind explaining) what swaylock issues have been going on? I've seen it mentioned a few times but, otherwise, out of the loop. <bdju>jaft_r: the package is currently failing to build on my system, and as it's a system package I can't easily skip it or work around it, and after my last reboot my locales are now broken and lots of programs are complaining. I suspect if I could completly my guix system reconfigure that it may fix my locale issues, but due to swaylock I am stuck. <bdju>and I am not willing to go entirely without swaylock either as I use it every time I get up from my PC <bdju>if you have any ideas, I'm all-ears <bdju>swaylock seems to be one of the more neglected packages for some reason, not the first time I've had a problem with it, and the last time was only back in '23 May <jaft_r>Gotcha; unfortunately, no clue but, maybe if I act as a sentient rubber duck (at least for a moment; I need to get some sleep, soon…), something may shake out? Has this been solely your machine? No one else has mentioned any issue with Swaylock? <bdju>I dunno, I reported it to the mailing list and no one replied to it yet <bdju>maybe there are only a handful of swaylock users on guix <bdju>the package failing to build is usually a universal problem, the only questionable bit is that I have this swaylock-no-pam thing set up to work around the last issue I had, but since it inherits the swaylock package I was thinking it's most likely not just me <jaft_r>Maybe, for debugging purposes, it may be useful to remove Swaylock, reconfigure, restart, check if it's fixed your locales, and then try adding Swaylock back in to see if you run into the same issue, again? <bdju>I don't really get my hands dirty with the packaging stuff so really I just have to hope some kind soul here can take a look at it, I don't think I can fix it myself. so just waiting and hoping. <jaft_r>Ah; that's right. I remember you mentioning, before. <bdju>uh, no, I'm unwilling to do that because then I will be stuck without swaylock and unable to install it again until I roll back my whole system generation which I think will require rebooting at least twice at the end of everything. just thinking about it stresses me out <bdju>as it is I had 100 days of uptime before this last reboot that broke stuff and I only stubbornly rebooted because my networking wasn't working for some reason and restarting the networking service wasn't enough to fix it <bdju>thanks for listening though. hopefully will take under 6 months to see this sorted out but really hard to say <jaft_r>Obviously, the only major difference you have is swaylock-no-pam modification but I wouldn't expect that to cause locale issues (but I also barely know anything about most of these, anyway). The "screen-locker-configuration" does have a "using-pam?" configuration; would that, possibly, accomplish the same as your swaylock-no-pam modification? <jaft_r>Can't gaurantee it'd solve your issue but, like you, I try to stick to the out-of-the-box setup, as much as possible, and that'd, at least, get you closer to the default upstream, if nothing else. <jaft_r>bdju: ☝️ (just in case you stepped away and haven't seen it) <bdju>well the no-pam thing has been working in my config over a year, I just suddenly can't successfully do a guix system reconfigure <bdju>since swaylock doesn't build anymore <bdju>I'm a bit busy this weekend but maybe I'll try harder to figure it out in some days <Rutherther>swaylock builds fine for me with latest master. So either only certain architectures are affected, or it's swaylock no pam modification <jakef>in a package we can have (native-inputs `(("FOO" ,foo-1.1) ("BAR" ,bar-1.0))) <jakef>and using modify-inputs we can (append baz-1.0), but can we append something like ("BAZ" ,baz-1.0)? <bdju>Rutherther: guix master or sway master? and how did you test? is there something like guix shell that's good for that? I could try building it outside of my system config and seeing if there's any difference <bdju>ughhhhhh forgot guix shell runs it, have up a lockscreen I can't unlock for some reason now. what a mess <bdju>okay managed to get past it. ctrl-c ing out of the one guix shell ran just made the screen red but then running my normally installed one worked and that one was unlockable. horrible stuff. I don't think I am gonna mess around with this after all <lilyp>jakef: it's better if you forget about labels <Rutherther>bdju: I meant guix master. I just did "guix build swaylock". <Rutherther>bdju: of course if you don't have pam setup and you install swaylock without no-pam lock you won't be able to unlock, you need to setup pam first <nckx>bdju: I've been using swaylock for years and haven't noticed any regressions. Although now I'm hesitant to lock my screen. You can send it a signal to gracefully unlock, though (not TERM!). <bdju>I vaguely recall being able to send a signal to unlock but I was in somewhat of a state of panic and couldn't find whatever the command was in my shell history <nckx>I'm not sure what 'guix shell runs it' means though, unless you explicitly (but perhaps unintentionally) added '-- swaylock'. <nckx>bdju: Understandable. I once had some über valuable state on my locked desktop and had trouble even typing my password. <bdju>I did actually put -- swaylock lol <bdju>admittedly I have no idea how guix shell works and I copied the syntax from something in my shell history <bdju>I recalled something about a pure and not pure way to do something and thought maybe that'd make it only include itself and not other stuff from my env <nckx>Nope, that's '--pure' :-p Everything after the optional '--' is the command to run. Without '--' you get a shell, as if defaulting to '-- sh'. <nckx>Doesn't affect the environment. <nckx>Oh I really don't know it by heart, it was just a comparison. <bdju>didn't have a problem doing `guix build swaylock` either so yeah something different about my system profile. maybe the no-pam modification. <TemporaryUser>Hello folks, there's a few issues that I've opened, alongisde the patches. Would anyone mind taking a look at them? <jakef>that label is useful for using modify-inputs and replace, for example <jakef>unlike packages, i don't think origins have a name that you can refer to in modify-inputs' replace <pjals>Hello. Why is bazel from guix-science not in the main repos? It doesn't seem to be downloading binaries and it's completely free software. Is guix-science some sort of forbidden channel? <sneek>pjals, nckx says: lol ‘ecostuff’. <Rutherther>bdju: can you send how the no-pam modifications looks like? btw. why don't you just switch to the pam one? <nckx>pjals: There are no ‘forbidden channels’ that would somehow taint otherwise-free software. <jakef>pjals: someone might have deemed it not in scope of guix main channel <nckx>You know what to do this holiday season 😏 <nckx>(Scope? There's a scope?) <pjals>nckx: If only there would be a Java importer :P <bdju>Rutherther: my config.scm is linked in my bug-guix post, it's just some new package that inherits the old one, someone here wrote it for me, I don't really know how it works. at the time swaylock was not working *at all* and it was an emergency workaround. there might be another way by now but I have not touched it as I didn't want swaylock to be broken again. I suppose I have to find another way now. <bdju>unsure what setup may or may not be needed for PAM, I think I was using setuid for swaylock in the past and that's what had broken before <Rutherther>bdju: just read the docs for screen-locker-service-type it even has example with swaylock setup <bdju>will give that a go, thanks <bdju>do I need additional setup for PAM to work? should I just reverse the false/true in the example and use setuid to be safe? <bdju>ughhhhhhhhhhhhhhhhhhhhhhhhh I got all excited when the reconfigure went through and my clock started working in waybar again but of course now swaylock is broken <Rutherther>no, you won't be safe with setuid, you won't be able to log in. Just use the example as is to be able to log in <Rutherther>you don't need any additional setup apart from having %base-services present <bdju>okay that does seem to work <bdju>screenlockers are just on my short list of things that really should not ever break so it gets pretty upsetting pretty fast. glad that's sorted again for now. hopefully doesn't break next time I reboot. <efraim>finally swapped out my graphics card, hopefully now I won't have random noveau crashes anymore <attila_lendvai>"bash: /run/setuid-programs/sudo: No such file or directory"... am i screwed? i think it's due to having done a `guix system roll-back` <Rutherther>attila_lendvai: it shouldn't return anything. It should just reset cached sudo used in your sh/bash session. <attila_lendvai>"sudo: /run/current-system/profile/bin/sudo must be owned by uid 0 and have the setuid bit set" <attila_lendvai>i have two problems. my initial report is coming from `guix system reconfigure`. the rest comes from my attempt to become root to fix it. <Rutherther>okay, so you probably don't have /run/privileged/bin in your PATH. You can execute that directly or reboot your system to get it in your session properly. Or at least relog <attila_lendvai>`/run/privileged/bin/sudo -s` returns the shell prompt without printing anything <nckx>/run/setuid-programs are/should be just symlinks to /run/privileged/bin, but either should come before /run/current-system/profile/bin/sudo in your $PATH, regardless of old or new Guix. <nckx>There should always be a working (setuid) sudo in one or both of those locations. <attila_lendvai>nckx, "sudo: /run/current-system/profile/bin/sudo must be owned by uid 0 and have the setuid bit set" <Rutherther>attila_lendvai: you need to use the privileged bin, current-system/profile/bin/sudo is expected to not work <attila_lendvai>err, the sudo file is length 0: -r-sr-xr-x 1 root root 0 Sep 15 13:11 /run/privileged/bin/sudo <attila_lendvai>damn! i'm already on the tangent of a tangent here, two steps deep in the stack from what i originally wanted to do... <attila_lendvai>Rutherther, no, or not in a way that i found alarming and remember now <nckx>Weird, it's just COPY-FILE. <attila_lendvai> /run/setuid-programs/ has no files. luckily i have pysical access, and i have a root login on the console. i'll try to copy a sudo binary to the right place. <nckx>I wonder whether the presence of symlinks in /run/setuid-programs confuses old versions of Guix that expect regular files. Although, I don't see how it could, since we call ENSURE-EMPTY-DIRECTORY on it before creating anything. <attila_lendvai>yay, i have a working sudo (but only when i access it with full path in /run/privileged/bin/sudo, otherwise i get the one from current-system) <nckx>That's a lot less worrisome. Just a $PATH issue. <attila_lendvai>nckx, this is after i have copied it by hand to /run/priviledged... <nckx>/run/current-system/profile/bin/sudo has never worked, nor is it expected to. <Rutherther>nckx: why is sudo even included in the profile by default? does it have some files that are necessary? <nckx>Rutherther: Necessary is subjective, but yes, for commands like ‘visudo’ and the man pages, upon which emacs auto-completion relies. <nckx>Rutherther: If you don't care about that, you can remove it without issue. <futurile>fnat, ekaitz: Fabio's creating the Meet-up link and we'll promote it to the lists. Apologies for the delay! <PotentialUser-62>If I run `guix system container --share=$(pwd)=/home/user/app os.scm`, then /home/user/ directory appears empty, except for ~/app. Anyone has a clue at what might be going on, and how to fix it? <Rutherther>PotentialUser-62: fix what? you requested to have current pwd exposed on /home/user/app, why would there be other files? <PotentialUser-62>There's supposed to be some dot files in ~ e.g. ~/.bashrc, ~/.guix, and some files like guix-home-config.scm <futurile>PotentialUser-62: sorry share=/home/<whatever> <nckx>If you're still confused, think of it this way: if --share=…=/home/user/app implied sharing /home/user, why wouldn't it also imply sharing /home, and hence also imply sharing your entire / directory? <PotentialUser-62>futurile: well, if I do `guix system container share=$(pwd)=/home/app` (or any other target location for that matter), then /home/user does get populated with the correct dot files, but only if I mount it in a subdirectory of /home/user, I get this issue. <futurile>PotentialUser-62: I assume your current working directory is actually somewhere where those dot files are right? You're not accidently in the wrong location? <PotentialUser-62>I don't have any of those dotfiles in my current directory, I assumed they were auto-generated by guix system container... <nckx>ACTION is trying to launch a container, but can't nsenter it due to missing /proc/PID/ns/time… <nckx>Maybe we shouldn't recommend ‘-a’ by default. Anyway, I can actually reproduce this. <nckx>I (and likely everyone here) assumed you meant that your own dotfiles weren't exposed. <nckx>I agree that creating /home/alice/app in the container shouldn't remove the default dotfiles in /home/alice, or it's at least dubious if intentional. <futurile>yeah, I assumed they were trying to share their dotfiles for sure. Nice catch PotentialUser-62 <PotentialUser-62>I've stumbled into similar issues with docker and it's usually because the monted volume overrides the directory inside the container. Maybe /home/user doesn't exist yet at the time I run `guix system container`, and mkdir -p is performed and for some reason the parent directories don't get write-permissions? <PotentialUser-62>Oh, just checked and /home/user is owned by root and never chowned to the actual user. <PotentialUser-62>nckx: `sudo nsenter -a -t 4229` for me also gives an error about a missing `/proc/4229/ns/user` file. I've been using `guix system container exec $PID run/current-system/profile/bin/bash --login` and that works. <nckx>I worked around it by manually specifying ‘nsenter -p -m’ (PID & mount namespaces), which is enough to play around here, but I wonder if it's possible for Guix to reliably print a more complete nsenter command. <nckx>PotentialUser-62: Are you using a non-default-linux-libre kernel? <nckx>I ripped out a few of the less pointful namespaces and assumed that's what caused my errors. <PotentialUser-62>nckx: my os.scm doesn't specify any kernel, and my host OS is arch btw :p <nckx>It would be the .config more than the exact kernel at play here. <nckx>Even if your Guix System container OS specified a kernel it would have no effect. <nckx>Eh, Arch ostensibly has CONFIG_USER_NS{,_UNPRIVILEGED}=y, but I'm getting into irrelevant weeds here. <PotentialUser-56>> Oh, just checked and /home/user is owned by root and never chowned to the actual user. <PotentialUser-56>Anyone has an idea on how to work around this, besides mounting it somewhere else? <Rutherther>dotfiles or the permissions? as for permissions maybe exposing a dummy empty folder to /home/user would work. For dotfiles I don't know <nckx>In hopes of a real solution: could you report a bug by mail to bug-guix at gnu dot org? 🥺 <nckx>People tend to overthink it. Just send an e-mail to that address and you're done. <Rutherther>just send an e-mail with description of the issue to that address, nothing complicated <Rutherther>it's marked as bug by sending it to bug-guix address <nckx>Include as much details (such as the bogus ownership) as you have the time to include. <PotentialUser-56>I'm trying to create a dev environment with guix system containers instead of guix shell. This is because the application is composed of a database, a web server, and several internal processes that talk to each other using http. <rovanion>I maintain a list of packages that I install in Debian and Guix, with a translation from Debian to Guix names. At the moment I store them as a bash array in a bash script and run `guix install $package_list`. But I would like to include this package list in guix system configurations. How would you go about reading that list into scheme? Would you store the list in a format easily read from both Bash <rovanion>and Scheme, print the list in a way easily readable from Scheme running a Bash script or something else? <Rutherther>rovanion: seems like a simple call-with-input-file that will be used to read the lines from file, and then map it with specification->package to obtain the packages from the lines(specifications) <aswjrisp>rovanion: If you are more comfortable with bash scripting you could have the script put the guix package names in the list of packages in your system configuration. <aswjrisp>rovanion: You could look in the manual at operating-system Reference section. It talks about packages and has an example. <aswjrisp>Yesterday I got guix installed on a computer with a luks partition housing a btrfs filesystem. Today I went to proceed with the post installation documentation in the manual. I was able to do a guix pull but doing a reconfigure failed with an error https://termbin.com/pfez <aswjrisp>I do not know why it is trying boot directory //boot. <Rutherther>okay, so you are missing file-system mount of /boot for the esp <Rutherther>it is trying it because you have it in your config and guix needs to update it so that you can boot to your new generation <rovanion>aswjrisp: I am, but I really don't like Bash or POSIX Shell as a language. I'm always one syntax quirk away from shooting myself in the foot. But yeah, bash variable substitution in the config.scm file should be possible. <apteryx>aswjrisp: glad to read you got past the original boot issue! <aswjrisp>So in the config add to the list of file systems the esp partition mounted at /boot <aswjrisp>apteryx: Yes I did get it working thanks to the help from you and Rutherther. <Rutherther>aswjrisp: yeah, but you will need to mount it yourself now until you switch to the generation that will be able to mount it itself <aswjrisp>Rutherther: Okay I will try adding that file system to the list in my config, mount the esp partition to /boot manually and then reconfigure. <aswjrisp>For the file-system I am adding to the config. I was looking at file-systems in the manual for type the different options are not listed. For a fat32 filesystem should I say it is type vfat? blkid tells me it is type vfat. <aswjrisp>As I am mounting it in the luks partition at /boot would it need (dependencies mapped-devices)? <Rutherther>aswjrisp: yes, use vfat. No, the dependency is not necessary, and it could potentially lead to errors if added <ekaitz>futurile: thanks! sorry i was afk when you wrote <ekaitz>efraim: any news on the riscv bootstrap integration? <aswjrisp>I am getting getting errors when I try to reconfigure with the added fat32 partition in my config. It is mounted at /boot. It looks like the errors are coming from the device part. When I use the UUID from blkid (short xxxx-xxxx) it says invalid. When I use the longer partuuid from blkid it says not found. When I use the label I gave it during install and that is listed by blkid "esp" it says not found. <aswjrisp>Yes let me get it. Shuttling by usb stick. <efraim>ekaitz: I just got back home last week so I haven't had any time to work on it :( <aswjrisp>I will get the error output for each of the three I tried. <nckx>(uuid "7b34-e1ab") is invalid. <nckx>Because 7b34-e1ab is not a valid DCE UUID. Use (uuid "7b34-e1ab" 'fat). <aswjrisp>Here are the three error messages and the output of blkid. I double checked the uuids for typos. <aswjrisp>nckx: I will try (uuid "7b34-e1ab" 'fat) <ekaitz>efraim: it's ok, keep me posted with it so I can help you when needed <aswjrisp>Rutherther: nckx: Thanks for the help. Now it is able to successfully reconfigure. After reboot the partition is mounted at /boot and reconfigure completes successfully. <nckx>You're welcome! But I only chimed in near the end. <PotentialUser-35>Hello Guix users. I am an avid NixOS user but I am thinking of switching over to Guix, starting with Guix home and someday Guix System. I am looking for a long list of Guix System and Guix Home configurations so that I may learn from examples. Where can I find a long list of example configs? NixOS has <futurile>PotentialUser-35: there isn't a single collected list of configurations that I know of <PotentialUser-35>Then what is the easiest way to find a large amount of configurations? Just searching on GitHub? <futurile>PotentialUser-35: there's the systemcrafters.net community which is organised by David - they have a messageboard and he has configs <futurile>PotentialUser-35: the manual is the main one - you really have to read through it piece by piece <futurile>PotentialUser-35: and most discussion is on the mailing list - rather than a bulletin board <futurile>PotentialUser-35: I think systemcrafters makes an install image as well - so that would be the easy place to start <aswjrisp>I have just setup guix on a computer. When I started the manual install process the installer gave a warning about incompatible hardware. It said it might be a false alarm and that I might have to use nomodeset and play with some other kernel module (can't remember the name). As graphics are working given I can start sway using gdm, I was wondering what hardware it might have been refering to. <aswjrisp>What are good ways to look into what hardware in that computer in incompatible with free software? <podiki>i defined a shepherd service in my system config, how can i see the actual guile code it produces/used by the system? i don't see it in the activate system list <hako>podiki: guix gc -R "<...>-system" | grep "shepherd-<...>" <podiki>ah yeah i figured, since i found it by looking back at the output from guix build system and saw the derivation there <nckx>aswjrisp: It was definitely warning about the GPU (possibly a false positive, but more likely that not all ‘advanced’ hardware features may not be available; whether you care or even notice is up to you). I wouldn't know where to look, though. <aswjrisp>nckx: Thanks, I will test it to see if it can do the graphical programs I am interested in using.