IRC channel logs


back to list of logs

<tsmish>Kabouik: yeah, chrooting will also work and probably be simpler than what I am suggesting
<simpleton>Kabouik the chrooting works. Did only test that for interest just in case i eed it. Did not adapt system settings there or other stuff
<nckxmas>I'm having a hard time following what you {a,we}re trying to do. A swapfile on a dedicated subvolume? Why? Zstd compression that you then need to make sure to disable with chattr +C? OK...
<nckxmas>ACTION zzz
<Kabouik>I can edit with e indeed, it may be better to start with that. I don't know the Grub cli syntax and did not know it could do that tsmish
<Kabouik>I was following nckxmas
<peanuts>"# Mount root btrfs to create swap subvolumesudo mount /dev/mapper/your-btrfs-d -"
<Kabouik>Which I think I followed on my previous Guix machine, successfully
<simpleton>tsmish readlink -f /var/guix/profiles/per-user/root/current-guix shows my current profile, right? the one holding the broken manifest. Do i have to do any additional steps like system reconfigure afterwards i change link?
<Kabouik>But I was following the recipe without being a cook myself
<tsmish>simpleton: yeah, it should show you your current profile with broken manifest. You can run reconfigure, if you want to upgrade/reconfigure system, but you shouldn't need to.
<simpleton>tsmish but do i not have to take care of creating a profile residing in "/gnu/store"? like some form of commit or similar?
<tsmish>simpleton: /tmp/test is already in /gnu/store, you can test it by running "readlink -f /tmp/test"
<tsmish>simpleton: make sure to symlink path in /gnu/store and not /tmp/test to /var/guix/profiles/per-user/root/current-guix or things will surely go bad.
<simpleton>tsmish  `readlink -f /tmp/test-1-link` is in store `readlink -f /tmp/test` is not
<tsmish>simpleton: huh, okay, I thought /tmp/test points to /tmp/test-1-link which points to /gnu/store and readlink follows symlinks recursively. my bad.
<tsmish>But yeah, that path in /gnu/store should be your profile.
<tsmish>*new profile
<simpleton>@tsmith Thanks so much for taking the time
<simpleton>command `ln -sf $(readlink -f /tmp/test-1-link)  /var/guix/profiles/per-user/root/current-gui` fails. `ln: failed to create symbolic link '/var/guix/profiles/per-user/root/current-guix/qqw3f5sqx4f8lps9gg6xkp61587sk1gk-profile': Read-only file system`
<tsmish>simpleton: drop the slash at the end of ln's second argument
<simpleton>tsmishthere is no slash...or is it?
<tsmish>simpleton: Could you also remember what /var/guix/profiles/per-user/root/current-guix points to originally, to test if it gets removed by gc or not.
<simpleton>tsmish `/var/guix/profiles/per-user/root/current-guix` points to `/gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile`
<tsmish>simpleton: You can try rm-ing /var/guix/profiles/per-user/root/current-guix and linking a new version to it afterwards. Error message that you posted suggests that ln tried to make a link in current-guix instead of replacing it. It happens when there is a trailing slash at the end of a link destination.
<simpleton>tsmish `rm` worked. `ln -sf` afterwards worked too. `guix pull` seems to work now too...
<tsmish>simpleton: try 'guix gc' after that and check if `/gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile` no longer exists and /root/.guix-profile still exists and things generally work.
<tsmish>because we kinda edited internal guix database based on my cursory glance at my setup and source code, which may lead to funny consequences.
<rebiw>Is it possible to set environment variables using a manifest.scm with guix shell ?  I want to move some direnv code to guile.
<tsmish>simpleton: also, if 'guix package -i <something>' results in new profile.
<simpleton>tsmish will try. give me a few secs
<tsmish>simpleton: eh, 'guix pull' works and results in new profile, 'guix package -i' is different profile entirely.
<simpleton>guix gc deletes quite a lot from gnu/stoe... :) ...just saying... it is a testsystem so no worries
<tsmish>simpleton: I actually messed up, because current-guix points to current-guix-<number> typically and not to store directly, but we'll see.
<tsmish>simpleton: guix pull should probably do the right thing and create a new profile, then point current-guix to it.
<simpleton>tsmish link-chain of `/root/.guix-profile` is still valid.. after `guix gc` in gnu store still exists `/gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile`. `guix package -i` downloaded some packages, gave a warning and advised to run  `guix package -u` ...does not look broken to me
<tsmish>simpleton: does 'guix pull -l' list some familiar dates. If it does, you can use 'guix pull -S <number>' to switch to a particular generation. You could have probably done this at the beginning to instead of doing weird things, but that's my fault.
<tsmish>simpleton: just test that something in /var/guix/profiles/per-user/root/current-guix-*-link points to `/gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile`.
<tsmish>I think that's the profile you got after you did guix pull successfully one time.
<tsmish>and that "file /var/guix/profiles/per-user/root/current-guix" says it is a symbolic link to current-guix-*-link
<simpleton>current profile links to  /gnu/store/qqw3f5sqx4f8lps9gg6xkp61587sk1gk-profile. `find -L` shows no broken links
<simpleton>oops....why is all bold?
<tsmish>simpleton: 'guix pull' works?
<simpleton>tsmish interestingley i do not have command `file` available . readlinks says it points to /gnu/store/qqw3f5sqx4f8lps9gg6xkp61587sk1gk-profile
<simpleton>tsmish `guix pull` works
<tsmish>simpleton: 'guix pull' should fix whatever mess we created
<tsmish>simpleton: do you use readlink with -f flag or not?
<simpleton>tsmish good old `guix pull` . Regarding readlink: first without `-f`  but `readlink -f` shows the same
<tsmish>simpleton: readlink /root/.config/guix/current => /var/guix/profiles/per-user/root/current-guix
<tsmish>should point that way (note readlink without -f)
<simpleton>tsmish it does. + `-f` it points to gnu/store
<tsmish>and what does "readlink /var/guix/profiles/per-user/root/current-guix" say?
<simpleton>tsmish allwas point to gnu/store no matter if readlink provided with `-f` or not
<tsmish>hm, are there files in /var/guix/profiles/per-user/root/ like current-guix-<number>-link.
<tsmish>simpleton: theese are pull "generations", you can probably say guix pull -S <number> on the highest number (just check that manifest in that directory is no empty) and it should fix links. In particular /var/guix/profiles/per-user/root/current-guix should point to one of them.
<simpleton>tsmish not files. there are paths `current-guix-<NUMBER>-link` but the basenames ar all plain basenames sys ` find -L /var/guix/profiles/per-user/root/ -type f -exec basename {} \;`
<tsmish>simplton: theese should be directories that point to profiles
<tsmish>simpleton: and ls would have worked just fine, they are directly in the directory.
<apoorv569>I have this home shepherd service for brightnessctl to save and restore brightness on shutdown and start respectively,
<apoorv569>But it fails to start. `herd status` just says this,
<apoorv569>What am I doing wrong?
<simpleton>tsmish i see ...ok...
<tsmish>apoorv569: shepherd docs say ` A one-shot service is a service that, as soon as it has been successfully started, is marked as “stopped.”`. I'm also unsure that stuff you wrote in stop field is correct, since make-kill-destructor only receives a single argument - a signal to send. I suggest using exec-command instead. (btw, never worked with shepherd and don't know whether stop even works on one-shot)
<apoorv569>tsmish: I see. I'll remove the one-shot then.
<apoorv569>`exec-command`? I can't anything in `guix` docs about this.
<peanuts>"Service De- and Constructors (The GNU Shepherd Manual)"
<rebiw>apoorv569 your syntax looks different than the shepherd manual.
<Kabouik>So I am chrooting my system and config.scm looks alright, I really don't know why grub is trying to boot from /swap/gnu/store/… Could that maybe be a symptom of broken btrfs subvolumes? How could I check that (i.e., that I did not somehow make my / move to /swap)?
<simpleton>tsmish what i do not get is why manifest in  /gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile/manifest is empty. Should't his have content? my  ~/.config/guix/current/manifest which was previously empty now has version 3 content
<tsmish>apoorv569: guix implicitly imports shepherd into g-exps of start and stop (look at shepherd-service-file in gnu/services/shepherd.scm), so you should have exec-command defined. I think the way to go here is disabling respawn, making #:start into exec-command, making #:stop into something like (compose (exec-command ...) (const #f)).
<tsmish>simpleton: /gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile is probably your original profile that got borked. ~/.config/guix/current is just symlink to /var/guix/profiles/per-user/.../current-guix, which points to current-guix-<number>-link, which points to store.
<Kabouik>Yay it boots!
<simpleton>Kabouik Congrats!
<Kabouik>Congrats for breaking it stupidly, yeah! :p
<Kabouik>So hibernation still does not work of course, but after many hours lost for nothing, it does feel good to be back at the same point, instead of having regressed significantly. :0
<simpleton>tsmish /gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile was broken. had empty manifest and so did ~/.config/guix/current/manifest. Now we did some magic with `guix pull -p /tmp/test` . then we switched the link to new-destination in gnu/store. Somehow now file ~/.config/guix/current/manifest has content but the new profile
<simpleton>/gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile has still an empty manifest. They are connected aren't they?
<simpleton>tsmish at which point turned `~/.config/guix/current/manifest` from a file with no content turn into a file with version3 content?
<tsmish>simpleton: ~/.config/guix/current points to /var/guix/per-user/root/current-guix, we switched /var/guix/per-user/root/current-guix to profile in /tmp/test, which changed ~/.config/guix/current/manifest, because it no longer points to /gnu/store/972zn7876v32hfxglxsdq8lxcx9fy4ld-profile/manifest, but to /gnu/store/qqw3f5sqx4f8lps9gg6xkp61587sk1gk-profile/manifest
<tsmish>simpleton: And 'guix pull -p /tmp/test' created new profile in /gnu/store/<whatever>-profile and made /tmp/test point to it.
<apoorv569>tsmish: Is this correct?
<tsmish>apoorv569: are you sure exec-command receives lists?
<apoorv569>No. I can't its docs, can't say. Its not in `shepherd.scm` either.
<tsmish>apoorv569: I think it's just #~(exec-command #$(file-append brightnessctl "/bin/brightnessctl --restore")))
<simpleton>tsmish Oh man. so sorry... i confused myself and most probably you. Ok, all good!!! both files are the same(diff proven)! ...oki oki oki ...
<tsmish>apoorv569: Also you're missing (const #f) as second argument in compose (which is required because apparently running value=#f means that service could be started again).
<apoorv569>Ah! Yes.
<apoorv569>What do you think looks good?
<rebiw>apoorv569 also remember to reload the shepherd config files or changes to the services are not detected.
<tsmish>apoorv569: missed braces around const #f, that's a function execution. But other than that, I think it looks fine. Try running it.
<apoorv569>OK. Running home reconfigure now..
<rebiw>herd load root ~/.config/shepherd/init.d/your-service.scm
<Kabouik>tsmish: you suggested full dmesg earlier. This is dmesg when I try an hibernate, see my screen locking (swaylock), then screen off, but fan still spinning,anf after a few seconds the screen gets back on:
<rebiw>can be used to reload your service
<apoorv569>It errored out,
<apoorv569>This is the current definition,
<rebiw>the --restore part is an argument
<rebiw>#$(file-append brightnessctl "/bin/brightnessctl") " --restore"
<apoorv569>Oh! I assume same for the `--save`?
<tsmish>Kabouik: 'PM: Cannot find swap device, try swapon -a'
<Kabouik>It ran with no error tsmish
<Kabouik>And i3status-rust can see my swap and its size
<tsmish>Kabouik: That's the error. It's in dmesg. You don't have a swap device it tries to write to. Use "swapon /swap/swapfile".
<tsmish>Kabouik: ok, that's weird, I assume "free" also knows about your swap?
<Kabouik> tsmish
<Kabouik>Yes, `free` lists it
<Kabouik>0 used, 33554428 free
<Kabouik>(I resized it to 32GB)
<tsmish>Kabouik: ugh, may be relevant
<peanuts>"202803 Hibernation does not work with BTRFS and swapfile on 5.0 kernel. Cannot find swap device."
<Kabouik>I found that earlier too, but really that doesn't explain why the same setum (I even largely re-used the config.scm) works on my other laptop with btrfs and Guix
<apoorv569>Still error,
<Kabouik>The other system is Intel though, this one has an AMD CPU, not sure if that makes a difference
<Kabouik>Oh I'll check that tool they linked tsmish, maybe that's the issue, and my offset from using filefrag is just wrojng. Fingers crossed.
<Kabouik>sudo btrfs inspect map-swapfile /swap/swapfile gives me another offset, fingers double crossed.
<rebiw>@apoorv569 your syntax looks different than the shepherd manual.
<peanuts>"The GNU Shepherd Manual"
<apoorv569>rebiw: Is this updated? Because I took mine from David from systemcrafters config.
<rebiw>apoorv569 The shepherd manual is updated, it is from july 2023.
<tsmish>I don't think that the syntax apoorv569 uses is exactly shepherd, it's gnu/services/shepherd which depends on shepherd, but may be somewhat different.
<tsmish>apoorv569: can you post your current definition?
<apoorv569> this is what I have currently.
<Kabouik>Yeah it works tsmish! Thanks a ton! It was the offset that was wrong, because I used filefrag from the Guix documentation, but the offset returned by filefrag is wrong for btrfs filesystems. So either use that tool created in 2019 (requires compiling and then dividing the output), or just run `sudo btrfs inspect map-swapfile /path/to/swapfile`, to use that as resume_offset=xxx.
<Kabouik>Phew, what a nightmare, I've been at it for two days including a system breakage and rescue with chroot earlier today!
<tsmish>Kabouik: that's what you get for not using separate swap partitions. What laptop is that anyway? It looked interesting.
<Kabouik>Thanks a lot for finding that bug report that described the issue, I couldn't. I did save some documentation from my previous laptop that mentioned using that obscure tool, but found `filefrag` on the Guix documentation and figured it was probably some new, more convenient way to calculate the offset. I guess it should be written somewhere in the Guix doc that this won't work for btrfs systems, because much of the Guix doc is actually using btrfs
<Kabouik>I prefer avoiding a partition actually tsmish. The idea of swap files that can be easily removed or resized just is more seducing to me.
<Kabouik>That is the device tsmish: It's supposed to be a gaming handheld, but I haven't played more than 2 hours on it. :p
<peanuts>"GPD WIN Mini: 7-inch 120Hz Gaming Handheld Console | Indiegogo"
<tsmish>apoorv569: Could you try
<peanuts>"debian Pastezone"
<rebiw>apoorv569  this is working for me
<peanuts>"debian Pastezone"
<Kabouik>I think I finally got everything working on it now. Maybe the one thing I am missing is adding a `xremap ~/path/to/config` to my `/etc/sudoers` to remap some of the keys/buttons, but couldn't find how to do that since /etc/sudoers requires full paths, and Guix-installed programs change hash at every update (using the path in ~/.guix-profile/ did not work)
<Kabouik>I'd like Sway to launch xremap, so I need to suppress the need for a password
<rebiw>sorry, I got confused by the previous link. This is the link
<peanuts>"debian Pastezone"
<rebiw>It is working, the only missing piece is the stop call, it should call brightnessctl --save and return #f I believe.
<tsmish>Kabouik: there is whole sudoers file infrastructure in gnu/system.scm. You can probably make a derivation that will generate sudoers file with absolute paths to xremap.
<apoorv569>this one is not working..
<peanuts>"debian Pastezone"
<tsmish>Kabouik: i.e. (computed-file "sudoers" #~("user ALL=(ALL:ALL) $#xremap")
<rebiw>apoorv569  should use the syntax that appears in the shepherd manual. works fine.
<peanuts>"debian Pastezone"
<Kabouik>I use (sudoers-file (local-file "sudoers-custom")) with this sudoers-custom tsmish, but have yet to find exactly how to make the first command work (the others do)
<Kabouik>Will try to merge what you just suggested with my current config, but I don't master transformations/gexp
<tsmish>Kabouik: what I wrote is just an example, it is wrong, probably on many levels, $# is actually #$, but I think something like that may work.
<tsmish>and I think gexps are not expanded in string, so you'll have to use string-append.
<Kabouik>I really don't have any knowledge on this though, not sure I'll figure it out this year. :>
<apoorv569> can't check herd status either now
<apoorv569>Is it safe to reboot? Did I break something?
<tsmish>apoorv569: I think shepherd died. It should be back on relogin. If it isn't you can try rollbacking your home profile.
<tsmish>apoorv569: I think you can also start it manually by entering shepherd.
<Kabouik>tsmish: I detailed the rocky road here. It may be redundant with the issue already described on, and quite verbose, but it's my own issue tracker so hopefully I'll find it next time I have this issue. Hopefully it can help others too.
<peanuts>"~mlaparie/guix-config#1: Hibernate on LUKS encrypted Guix system
<apoorv569>can't reboot or shutdown..
<tsmish>apoorv569: works.
<peanuts>"debian Pastezone"
<tsmish>apoorv569: I assume herd status errors out?
<apoorv569>yes.. cant reconfigure home either..
<apoorv569>starting shepherd manually errors out as well
<tsmish>apoorv569: Can you run 'guix home roll-back'?
<apoorv569>shepherd connection refused error
<apoorv569>hard reboot?
<tsmish>apoorv569: won't help
<tsmish>apoorv569: do you have file .config/shepherd/init.scm
<tsmish>apoorv569: you can run shepherd by shepherd -c /dev/null
<tsmish>apoorv569: then try guix home roll-back
<apoorv569>error still.. exception caught while executing load on service root
<tsmish>apoorv569: do you have directories in /var/guix/profiles/per-user/<username>/guix-home-<number>-link
<tsmish>apoorv569: can you get one with lower number and run activate script in it
<apoorv569>same error..
<apoorv569>should I remove brightnessctl from init.scm?
<tsmish>Yeah, try that
<tsmish>but you can't it's immutable
<apoorv569>yea, read only
<tsmish>Actually remove brightnessctl from configuration, then run guix home build on it
<tsmish>then run activate script in it, it will fail, but it should redefine init.scm
<apoorv569>but shepherd is dead connection refused
<tsmish>I think guix home build doesn't contact shepherd
<apoorv569>running home reconfigure..
<tsmish>apoorv569: wait, it works?
<apoorv569>doing something...
<apoorv569>not failed yet..
<tsmish>well, I tried to kill my system like I killed yours and things work fine even after shepherd death. Had to killall -9 it though.
<apoorv569>its fine, not a big deal..
<apoorv569>i like these little adventures.. :D
<apoorv569>it did reconfigured fine, but failed at the end because connection refused to shepherd
<apoorv569>but now running shepherd manually starts the services correctly..
<apoorv569>assuming i can reboot safely now..
<apoorv569>i need shepherd running in another tty though..
<tsmish>apoorv569: you can daemonize it by pressing Ctrl-Z, then bg, then disown
<apoorv569>ctrl z does nothing for me
<tsmish>also, my shepherd daemonizes by default
<apoorv569>i did shepherd &
<apoorv569>rebooting now
<singpolyma>( thing & ) & is another option
<apoorv569>singpolyma: what do you mean?
<the_tubular>I think I'm misunderstanding how guix works
<singpolyma>For demonizing
<apoorv569>Ah! i thought you gave me some lisp code lol
<the_tubular>Why when I useradd a user, and the run guix system reconfigure, the user I manually added is still present ?
<the_tubular>After the reconfigure
<apoorv569>the_tubular: you dont do stuff manually on guix
<apoorv569>only via config file
<tsmish>apoorv569: I don't know how your user shepherd interfered with reboot, but I'm glad you worked it out.
<the_tubular>I know I'm not supposed to apoorv569, I'm just trying to understand why this is happening
<apoorv569>cant reboot still though
<tsmish>apoorv569: does sudo reboot not work?
<apoorv569>no.. connection refused still.
<apoorv569>hard reboot I guess..
<tsmish>apoorv569: Connection to what? system shepherd? did you reconfigure the system?
<apoorv569>it just says shepherd.. no i did not reconfigure system
<the_tubular>apoorv569 why does it not wipe the user ? Or whatever else modification you've done ?
<tsmish>uhm, sudo -i reboot?
<apoorv569>already did hard reboot now..
<apoorv569>now after booting, i can sudo reboot fine..
<tsmish>that was weird, whatever you did as a user should not have affected pid1.
<tsmish>apoorv569: well, anyway, I wrote and tested it in container, works for me.
<peanuts>"debian Pastezone"
<apoorv56`>Could you send link once more, I'm on laptop now.
<apoorv56`>Before I was talking via phone
<peanuts>"debian Pastezone"
<apoorv56`>How did you test in container BTW? Might be useful in future to test before running code on main system.
<apoorv56`>oh wait
<apoorv56`>my username is wrong
<apoorv56`>let me join again
<apoorv569>I'm in.
<simpleton>Topic: File `~/.guix-profile/manifest` . is there a way to extract from this file similar to what one would do with a json?
<simpleton>it has a packages section i would like to read out and get the 1st value or something like that....
<tsmish>apoorv56: guix home container
<apoorv569>tsmish: Oh! Cool.
<apoorv569>home reocnfigured successully now.. let me test if it works now.
<apoorv569>guix home reconfigured successfully but service doesn't seem to work as expected.
<apoorv569>nothing happened.. I changed brightness to 50 before rebooting but at boot it was 100% again.
<Kabouik>When writing a package definition, can I automatically import the inputs and corresponding use-modules from one of its packag dependencies? I'm building something that requires mpv, and the list of iputs for mpv is quite huge
<tsmish>Kabouik: you can use package-inputs to get all inputs of a package as a list. Also, when building something that requires mpv, you should just add mpv as an input.
<Kabouik>I added mpv as an input but somehow it keeps asking for mpv inputs during build, i.e., "Package 'jack', required by 'mpv', not found". But I'll look into package-inputs.
<simpleton>can 'guix' return json somehow? would like to see my `guix search` requests as jsons. Something like this possible?
<tsmish>apoorv569: I replaced brightnessctl with bash commands that just put 1 and 0 to /tmp/run and it works, try running brightnessctl by hand and check that it works.
<apoorv569>brightnessctl --save and --restore works via terminal.
<tsmish>apoorv569: does herd start brightnessctl and herd stop brightnessctl work?
<apoorv569>Oh yea, it does work.. I lowered the brightness then stopped the service then raised it then started the service and it did lower it back to last value
<apoorv569>why didn't it work on user session login then?
<tsmish>simpleton: you can probably use guile interface to work with guix programmaticaly.
<simpleton>tsmish would i approach editing `guix search` ? is there a scm and a seperate repos etc?
<simpleton>tsmish `guix edit guix`  ??
<tsmish>simpleton: you can try stealing from
<peanuts>"package.scm\scripts\guix - guix.git - GNU Guix and GNU Guix System"
<Kabouik>As you can see mpv is listed as an imput here tsmish, but when trying to build the package, it still fails due to cmake looking for packages required by mpv: (everything that is commented is mpv-inputs that I started to add one by one, but this can't be right, so I commented them out when you said this should not be done this way anyway).
<simpleton>tsmish just as a newb question, how did you find this that fast?
<tsmish>simpleton: there is this huge monorepo at guix folder contains implementation of package manager. gnu folder contains all the packages, installer, services, initrd generators etc..
<tsmish>simpleton: ripgrep on guix folder
<simpleton>tsmish installed ripgrep. Can you share your command?
<tsmish>simpleton: ripgrep is just fast grep, you can use it to find particular strings in a directory fast. Honestly, I just know that all guix commands are in guix/scripts, so I looked at guix/scripts/search.scm, then at package.scm, then searched for "search" using editor, then looked at implementation until I found function that looked like it could be useful.
<tsmish>Kabouik: It tries to build qt, I think I'll wait until substitutes are done.
<Kabouik>No problem, but do you see something obviously wrong that would keep it from using mpv inputs directly? Here are the build logs:
<adanska>Hi Guix!
<tsmish>Kabouik: try replacing pkg-config with pkgconf
<tsmish>Kabouik: sorry, won't work, it pulled pkg-config from debian (which is implemented by pkgconf). But I think I understand why cmake fails to build there. mkv.pc contains a lot of library dependencies in private section. They are needed for static linking, but pkg-config still wants to know what they are. So it tries to find .pc files for them, fails and refuses to do anything which results in package failing to build.
<tsmish>Kabouik: that's the full list of packages "guix shell mpv pkgconf pkg-config -- pkgconf mpv --cflags" complains about:
<peanuts>"debian Pastezone"
<simpleton>simply running dockerd after `guix install dockerd` does not work. complains `failed to start containerd: exec: "containerd": executable file not found in $PATH`
<apoorv569>I'm trying to define base system config to which I can inherit from, to modify other system configs.
<apoorv569>I'm getting a few weird errors that were not there the config was on big file and no inheriting..
<apoorv569>In the inherited config I have this, `(udev-rules-service 'brightnessctl-udev-rules brightnessctl)`
<apoorv569> getting this error
<apoorv569>why it says expecting empty list
<simpleton>aaaah had to `guix install containerd` manually...
<tsmish>Kabouik: actually the story with Requires.private is somewhat more complicated, because they are added as includes in cflags for some reason. There even was a flamewar at redhat bugzilla about something similar Your best bet is probably including all of these packages as native-inputs (they are not needed at runtime). If you are fealing particularly daring you can make your own mkv.pc without privates and
<tsmish>put it in PKG_CONFIG_PATH, which should probably work. The worst that would happen is broken build.
<peanuts>"224148 pkgconfig: Requires.private creates unnecessary depencencies"
<tsmish>apoorv569: empty list is a misnomer, append actually just wants lists as arguments.
<tsmish>apoorv569: you can try wrapping service in a list like (list (service...)).
<efraim>wow, compare `guix shell pkg-config mpv -D mpv -- pkg-config --libs mpv` with `guix shell pkg-config mpv -D mpv -- pkg-config --libs --static mpv`
<apoorv569>I have (services (cons* BUNCH_OF_SERVICES.. ))
<apoorv569>in the base system config which I inherit from..
<efraim>I've been thinking about mpv-mpris since I saw the mpv-0.37 patch. The easiest solution that I don't like is to add (package-inputs mpv) to the inputs of the dependant packages
<apoorv569>this udev-rules one is in the config that is inherited from base config
<apoorv569>and has the same (services (cons* ... ))
<apoorv569>I thought of doing `(define-public base-system-services (list BUNCH_OF_SERVICES.. ))` in the base and doing `(services (append (list ... ) base-system-services))`
<apoorv569>would that work?
<tsmish>apoorv569: should work. Error complains about brightnessctl-udev-rules-udev-rules, maybe look in the place that defines it.
<apoorv569>I get error saying error: base-system-services: unbound variable
<efraim>I unfortunately have nothing to add to the brightnessctl discussion other than the useless It Works For Me™ without the udev rules on my pinebook pro
<apoorv569>not sure why though, its in the same as `(define-publib base-system` that the other config inerits from..
<tsmish>apoorv569: do you 'use-module' config that has base-system-services?
<efraim>can you post your OS config? it might be easier for making suggestions
<apoorv569>efraim: Its not just brightnessctl there are many errors like that if I like comment the udev one out..
<apoorv569>tsmish: Yes I do, `#:use-module (apoorv system base)`
<apoorv569>Hold on let share the config.. there is a lot of commented code BTW...
<apoorv569>This is supposed to be the base system config,
<apoorv569>I have redacted couple of things here BTW
<apoorv569>This is the other config that is inheriting from the base one,
<apoorv569>6th line from bottom is where I have base-system-services var being used
<efraim>what if you change it from udev-rules-service to simple-service like the mtp udev-service?
<efraim>I'm guessing it's not happy with multiple udev rule services being declared
<efraim>also I think you'd want %backlight-udev-rule instead of brightnessctl for the udev-rules-service if you leave it as-is
<apoorv569>By removing (services ) from base config I'm getting some new errors.. like libvirt group can't be added to my user because it doesn't exists as the service is defined a variable
<apoorv569>perhaps I can move user creation to individual config
<apoorv569>but tha defeats the point of inheriting config
<apoorv569>guix system: error: supplementary group 'libvirt' of user 'apoorv' is undeclared
<the_tubular>Someone has a /etc/hosts, that is managed through guix ? Not too sure on how to do this, and would like to look at an example
<nckxmas>the_tubular: 'Manage' is a big wurd for my
<the_tubular>Thanks :) !
<the_tubular>That still looks like magic to me lol
<the_tubular>But at least I can use it!
<apoorv569>Guix is magic!
<the_tubular>But learning to do magic is hard :/
<apoorv569>is there a znc-service?
<apoorv569>the_tubular: Can agree.
<apoorv569>But at the same time fun as well.
<the_tubular>nckxmas, quick question, is there anything left to from guix side to use bcachefs once next released will be pushed ?
<apoorv569>I'm to the point, I feel like I wanna do everything via guix, one config to rule them all..
<the_tubular>s/left to/left to do
<the_tubular>I'm also at this point, but I can't do it :/
<apoorv569>the_tubular: language issue?
<the_tubular>Yeah, I'm not a programmer
<apoorv569>Can understand.
<the_tubular>So I try to adapt nckxmas's config to do what I want :P
<apoorv569>I kind of do the same thing, I take what I like from other people's config and change it slightly for my needs.
<simpleton>hmm... trying to get buildah working which requires podman etc ...running into one problem after it working to the point that the images can be build via buildah but can not run them. `Error: setup network: plugin type="bridge" failed (add): failed to find plugin "bridge" in path [/usr/local/libexec/cni`
<nckxmas>Uh, I'm not a programmer either, I just pretend to be one (mostly when programming).
<nckxmas>Well, it's more that I'm to programming what a horny 16-year-old is to poetry.
<nckxmas>the_tubular: Mmm. GRUB support, or Guix support for separate /boot, so you don't have to hack together your own.
<the_tubular>What's special about /boot ?
<the_tubular>That shouldn't be using bcachefs or any cool fs right ?
<nckxmas>mount.bcachefs is also a bit shaky (I don't even remember which version we currently ship, but the future is definitely the Rust version). That said I have a 2-SSD bcachefs root in my laptop that boots fine with (targets '("/dev/foo:/dev/bar")) and doesn't use mount.bcachefs anyway.
<nckxmas>the_tubular: No, but Guix doesn't have a built-in way to copy kernel+initrd to it.
<the_tubular>Got it
<the_tubular>How does it do it for other fs ?
<nckxmas>GRUB can read those directly and get to the sweet /gnu/store inside.
<nckxmas>ACTION awayish a bit.
<the_tubular>nckxmas, that does add to your hostfile or it replaces your host file ?
<the_tubular>it adds right ?
<the_tubular>I'd like to use it as a poor-man's DNS as I'm having trouble with the one on my network
<nckxmas>There's a top-level field to override the whole thing if you like.
<the_tubular>No, I want it to add to the file :)
<simpleton>oki...that was kind of an adventure. as already mentioned i tried getting `buildah` to work and got it to the point that it errored out at `buildah run $container bash` . Had to build and install manually. Works now...wondering if i have missed something as i am surprised that containernetworking is
<simpleton>not available in guix. Though it is covered in cni-plugins...
<peanuts>"GitHub - containernetworking/plugins: Some reference and example networking plugins, maintained by the CNI team."
<alexey`>Hello there!
<alexey`>Error log of 1.4.0 default installation
<peanuts>"debian Pastezone"
<alexey`>guix system --substitute-urls= init /mnt/etc/config.scm /mnt
<peanuts>" Build farm"
<alexey`>the command.
<alexey`>My poor Guile understanding forces me to ask a question. Is the reason the internet connection?
<alexey`>substitute: In procedure write_wait_fd: unimplemented
<alexey`>What's that?
<jpoiret>alexey`: can you use the latest installer? I think this particular bug has been fixed (you might still have transient connection issues though)
<jpoiret>nckxmas: i'm considering writing my own Linux/kexec-based bootloader just to try out having a root bcachefs
<jpoiret>should be possible but i've been procrastinating a lot these days
<alexey`>jpoiret: Hello! Did you mean the development snapshot? I used this
<alexey`>The official *stable* image.
<jpoiret>it's not considered a stable image but rather just a point release
<jpoiret>there are no updates to point releases after the initial release process
<jpoiret>guix doesn't have a concept of *stable* vs *unstable*
<alexey`>Ok, That's my Debian speak. Thanks. I'am going to try it.
<alexey`>Unfortunately, the page refers to the, which is not available in Russia, at least directly.
<alexey`>Trying to resolve the issue ...
<alexey`>Something is downloading :)
<alexey`>Are there any signatures to verify the downloaded file?
<alexey`>I don't see them.
<jpoiret>you can also use a guix installed on another distro to generate the image
<jpoiret>i don't think so, unfortunately
<sarg>stable releases have signatures
<alexey`>Ok, at least, it looks like an image :)
<alexey`>Considering its size.
<alexey`>sarg: yes, these guys in the middle do not sleep :)
<alexey`>All right. Can anyone with access to the verify the size of the file, which is 1065406464.
<alexey`>The latest development snapshot from here
<tsmish_>alexey': You can probably install guix system from Debian livecd if you are paranoid. As long as you downloaded over https and not through dodgy http proxy, you should be fine.
<tsmish_>Also, I think guix pull gets yourself a latest guix, so as long as you can pull, you can use ~/.config/guix/current/bin/guix for system install.
<apoorv569> using this service
<peanuts>"GNU Guix Reference Manual"
<apoorv569>it defaults to `~/.gnupg` but my `GNUPGHOME` is under ~/.local/share/gnupg
<apoorv569>anyway I can change it?
<alexey`>tsmish_: I downloaded Debian's *.iso image once and didn't verify it. To my surprise, it was corrupted. It's not a joke. Since that, I have a habit to verify what I download, but thank you very much.
<hacknorris>someone knows if that OS is working well on pendrive instead of disk? and if it have some desktop environment?
<simpleton>is there a special way to handle terminfo files under guix? I'm trying to use kitty to connect from remote to my guix which works but can not start tmux because of `missing or unsuitable terminal: xterm-kitty`. Tried via creating `~/.terminfo/x/xterm-kitty ` manually on guix but problem persists...
<hacknorris>*and also wanted to know hardware requirements for that...
<simpleton>My terminfo issue:  installed as user in guix `guix install ncurses-with-tinfo` - Fixed the Problem
<simpleton>hmmm... after `sudo su -` tried to start tmux as root but error: `missing or unsuitable terminal: xterm-kitty` . Works as user but not as root?
<alexey`>hacknorris: Hello! I'm installing from a USB flash drive right now. The installation image provides basic utilities, but you can download what you need using the `guix package -i <your package>' command. For instance, that's what I did for the `lvm2'.
<hacknorris>is it persistent ?
<alexey`>It's like a livecd.
<alexey`>If I got your question right.
<hacknorris>:( not persistent :( sad :(
<alexey`>But what do you mean by `persistent'?
<alexey`>An important note. Plese, do NOT use this image . It has bugs. Use this for amd64.
<alexey`> jpoiret: Thank you. The development snapshot seems to have been installed successfully.
<f1refly_>I'm trying to use xfburn to burn some music to an audio cd. xfburn complains "Failed to initialize gstreamer transcoder" and prints the warning "a pipeline element could not be created" to the console. is there something one needs to do before starting xfburn after installing it to the user profile?
<paren>Belated happy christmas/your equivalent, Guix :)
<Kabouik>What can this build exception indicate? The build went fine to 100% but is erroring out at one of the last steps.
<unmatched-paren`>Kabouik: the error seems to be that there's too many arguments provided to `mpv_opengl_init_params'; i don't know but maybe you've provided the wrong release of the library or something?
<Kabouik>Oh I missed that error, thanks unmatched-paren. I didn't do much with mpv in the package definition, it's just an input, so I am not sure what to do.
<unmatched-paren`>it's buried underneath gazillions of warnings, so i don't blame you :) the downsides of parallelisation...
<Franciman>unmatched-paren`: are you maintaining kak-lsp and kakoune?
<unmatched-paren`>Franciman: no i haven't used those for a while
<unmatched-paren`>i use emacs with evil now and have done for what, more than a year...?
<Franciman>oh ok cool, so i will try to update the packages!
<unmatched-paren`>there aren't really maintainers as such in guix
<Kabouik>Nix seems to have had the same issue unmatched-paren: But I can't read Nix syntax, trying to understand what they did to fix it now
<peanuts>"qimgv: 1.0.2 -> 1.0.3-alpha by cole-h ? Pull Request #201831 ? NixOS/nixpkgs ? GitHub"
<unmatched-paren`>which is good because i'd be on the hook for a few things :P
<unmatched-paren`>the new web package interface is very cool
<Kabouik>I think I should just fetch a tarball that is not 1.0.2 for my package to build unmatched-paren, will try.
<ennoausberlin>Hello. I want to ask for some help with a package definition of geographiclib. This is what I have so far. The build stage works mostly but fails at building the manuals. There is no skip-manuals in gnu-build-system as I know. Would you have a look at it?
<peanuts>"geographiclib package definition -"
<unmatched-paren`>UGH am i gonna need to replace wpa-supplicant with iwd now
<Kabouik>The problem is the only release after that is an alpha, which will break the string-append to download the tarball
<lilyp>gcc-toolchain is probably wrong as an input
<unmatched-paren`>'service 'connman' requires 'iwd', which is not provided by any service'
<lilyp>There are both autotools and cmakelists available, you might want to try the latter
<unmatched-paren`>oh, right i put '(iwd) in SHEPHERD-REQUIREMENT and forgot
<Kabouik>I am getting 404s with
<ennoausberlin>lilyp: It builds, just the last step for building the manuals fails. The files are in pod format, but it complains about missing .1 files
<Kabouik>Scrap the 404s, the issue was likely on my end, as usual.
<lilyp>you probably want pod2man – perhaps there's also an implicit makefile rule missing that I don't know of
<ennoausberlin>lilyp: I added gcc-toolchain because of c++ is needed to build geographiclib
<lilyp>yeah, you don't need to
<lilyp>We have GCC 11 by default, which can compile C++
<unmatched-paren`>gcc-toolchain is for use by users only iirc, it's considered bad form to put in actual packages
<lilyp>if you need newer C++ features, you'd still just use gcc-13
<ennoausberlin>lilyp: I was not aware of this. I will replace gcc-toolchain then.
<lilyp>You also don't need gnu-make, it's an implicit input
<Kabouik>Yay it builds unmatched-paren! I needed to use the latest dev tarball, the previous release had this issue with newer mpv. Thanks also to tsmish for finding out that I needed pkgconf as input and not pkg-config
<ennoausberlin>lilyp: the configure scripts tests for doxygen. I might add this as well.
<lilyp>i do wonder how exactly it builds fine without it, but sure
<Kabouik>I had no idea adding gcc-toolchain to packge definitions was discouraged, I'll remove it from a coupleon my side too.
<ennoausberlin>lilyp: I can see in the error log that it builds the library but of course the guix package is not build
<lilyp>well-written configure scripts wouldn't let you pass that far
<paren>i can't get bluetooth to work; does 'Bluetooth: Patch file not found ar3k/AthrBT_(blahblah).dfu' mean anything or can i ignore it?
<ennoausberlin>lilyp: My understanding of the c ecosystem with autotools etc is very limited. I am surprised to get so far
<paren>ah, maybe the bluetooth functions of my wireless card don't work without nonfree firmware
<ennoausberlin>lilyp: doxygen does not help. make[1]: Entering directory '/tmp/guix-build-geographiclib-2.3-master.1b0be83.drv-0/source/man' make[1]: *** No rule to make target 'CartConvert.1', needed by 'all-am'.  Stop.
<Kabouik>Does anyone has any experience with using nbfc-linux on Guix? I'm looking for an example on how to configure the service to use a custom configuration in config.scm, I really don't know where to start as I cannot even make it use a custom config from cli.
<lilyp>ennoausberlin: The Makefiles are missing those rules, it's as simple as that. Probably, the autotools build isn't that well supported
<lilyp>Looking at man/ it defines a .1 suffix, but no suffix rule
<ennoausberlin>lilyp: I might modify one phase to build the missing .1 files from .pod files. Or modify the Makefile somehow. But there is no open issue on github. The library is well spread and packaged for a lot of distros
<lilyp>do other distros use the github source or a tarball?
<lilyp>do they use autotools or cmake?
<ennoausberlin>lilyp: No idea. The only package definitions I write is for Guix and they are mostly python related.
<ennoausberlin>lilyp: I don't even know how other distros store their recipes
<ennoausberlin>lilyp: If I do not use a git checkout but the release the .1 files are included in the tar.gz. Thank you for the pointer
<Kabouik>I am looking for examples of a system.scm with (sudoers-file …) if anyone uses it. I am currently using it with a local-file, but this does not allow using binaries in /gnu/store/hash, so I should probably favour plain-file. However I don't understand how to use it from the Guix manual.
<PotentialUser-76>Hello : I tried to install guix on a external usb drive w no success...
<PotentialUser-76>Is tailscale viz mullvad supported ?
<Franciman>wow, guix import crate -r improved _A LOT_
<Kabouik>It made me a 2500ish-line output for i3status-rust that I wanted to update. Kinda cool, but also VERY discouraging. :>
<Franciman>once i wrote my package definition how do i test it?
<Franciman>i want to see if guix can build it or there are errors
<ennoausberlin>Franciman: The way I test packages I create is by adding them to my own channel. Guix can get additional package definitions from a git repository prepared as a channel
<Franciman>i am damn impressed by guix import crate O.O
<Franciman>last time i tried it was around 10 years ago, and the recursive import didn't work properly
<Franciman>now i think it got the right definition of my package on the first try
<Franciman>thanks ennoausberlin
<jpoiret>Kabouik: you probably want mixed-text-file instead
<jpoiret>basically you can do (mixed-text-file "some-name-you-want-to-give-the-file" "some first string" (file-append some-package "/bin/some-bin") "some other string") etc.
<jpoiret>you can also grep guix source for some examples
<nckxmas>Franciman: Another option is to add the (variable) name of the package to the bottom of the .scm file and run 'guix build -f FILE'. Less clean but saves some work (commit && push && pull).
<Franciman>trying this route first, thanks
<Franciman>really I am astonished about guix import crate -r
<Franciman>it did 80% of the work
<Franciman>nckxmas: sorry but after i push, do i need to run guix pull and recompute all the derivations just to check the package definition works?
<nckxmas>'All the derivations' of a guix pull, yes. Hence my alternative suggestion to avoid constant pulling.
<Franciman>yes the derivations of a guix pull are a bit expensive lol
<Franciman>thanks sorry i thought it was a git pull there
<jpoiret>there's also the -L switch and GUIX_PACKAGE_PATH, both documented in the manual
<nckxmas>I was lazy above. It's git commit, optionally git push (if you don't use a file:// URL), then guix pull.
<nckxmas>-L will very occassionally give me stale packages, but I don't know if Guix is to blame for that.
<Franciman>running guix pull after fixing a tiny typo is so frustrating lol
<Franciman>i guess i'm going to switch to -L
<cmiller>The cmd "./configure --localstatedir=/var --sysconfdir=/etc" returns "configure: error: Git is missing; please install it." although I am using the Guix shell environment through "guix shell -CPW". I freshly clonsed the repository and just followed the steps of the manual for building Guix with the Git repository.
<peanuts>"GNU Guix Reference Manual"
<sektor>Howdy, guix!
<sektor>Does anyone know if there are bindings to the alsa interfaces in Guile? I need to whip up a sound card unmuter service for my Guix image.
<attila_lendvai>i'd like to create a free-form service type to start any daemon binary as a shepherd service. i can use profile-service-type to install the necessary packages into the system service, but what i should probably do is assemble a profile, and start the daemon's binary in that profile. is there any example of something like this?
<attila_lendvai>an actual use case is starting something like this as a service: guix shell python python-virtualenv python-pytzdata autoconf openssl libxml2 libxslt libjpeg libffi eudev zlib pkg-config ffmpeg gcc-toolchain -- bash -c "cd /srv/hass && source bin/activate && hass"
<attila_lendvai>this works fine from a shell, but making it work as a simple-service is... troublesome.
<Kabouik>jpoiret: would (mixed-text-file …) go within (operating-system (sudoers-file …))? I ripgreped in Guix and all examples I found were in (define … (let …)), is that what I need to do in my system config too?
<attila_lendvai>hrm, cuirass may be such an example. it's using the profile of the user that the daemon is running under. which makes sense.
<attila_lendvai>but i don't see where cuirass service code modifies the cuirass user's profile. it probably doesn't, because it wouldn't make sense to modify that as part of a guix system reconfigure... right?
<Franciman>is there an example of copy-build-system somewhere?
<lilyp>enough of them, just grep for it in gnu/packages
<Franciman>nice, thanks
<Franciman>i just have to find where the source code of guix is :P
<peanuts>"guix.git - GNU Guix and GNU Guix System"
<attila_lendvai>a (fork+exec-command ... #:user some-user ...) will not activate the user's profile by default, right?
<attila_lendvai>and assuming no... is there something like (program-file ...) but for shell scripts instead of guile scripts?
<attila_lendvai>or shall i just feed a (plain-file ...) to the bash binary? i guess the executable flag will not matter then.
<Franciman>ok uhm, i want to use copy build system to install the binary of texlab, since for now it's too difficult to properly package
<Franciman>how do i tell copy-build-system that the binary is the output of the package?
<Franciman>the binary i downloaded*
<attila_lendvai>Franciman, did you check whether the binary runs as-is?
<Franciman>yes it runs
<attila_lendvai>usually one needs to apply patchelf at least, but then you're lucky
<Franciman>it's all statically linked iirc
<Franciman>ah patchelf hmm
<cmiller>build-utils.scm test fails on latest commit
<Kabouik>jpoiret: is that what you meant?
<mhcat>heya, my emacs/geiser isn't finding ice-9/boot-9.scm when I try to invoke geiser-edit-symbol-at-point (M-.), when I'm using a repl started from an emacs started in a guix-shell environment. Instead of taking me there, it tries to take me to a new file called boot-9.scm, in a non-existant subdir ice-9 of my project root
<mhcat>I realize this is a guile/emacs question, but I think it's related to the interaction with the GUIX_ENVIRONMENT in some way
<mhcat>is that a thing that rings any bells for anyone?
<mhcat>fwiw, it finds symbols in modules installed in the same env, under .../site/3.0, just not .../3.0/
<mhcat>and this is guile-next, which might also play a role
<jdlugosz963>Hi, is someone of guix community in 37C3 congress?
<cmiller>Someone using Emacs M-x compile with guix shell? I would like to use it while adding a package to Guix.
<rebiw>I'm trying to auto login using guix system vm. But the cookbook example does not  work. Anyone with a working auto login setup?
<cmiller>rebiw: gdm or which one do you use?
<rebiw>I'm trying to use mingetty, the same code as in the cookbook.
<cmiller>Ah. In that case no
<Kabouik>Is there a way to make `which` return the realpath by default? I need the realpath, which works on most distributions but Guix/Nix, and this is for a script so I have to cover all cases. I guess I could detect the distribution, and if it is Guix/Nix, replace `which` by `which $(realpath…)`, but that's ugly
<singpolyma>I'd avoid `which` in general
<Kabouik>I need the full absolute path
<Kabouik>Note that maybe I can simply use `realpath (which binary)` anyway, it'll work even on other distributions where realpath returns the same as which…
<Kabouik>Yeah I think I'll just do that.
<mhcat>quick followup to my question: I found this issue which I think explains what I'm seeing
<peanuts>"geiser-edit-symbol-at-point: problem with relative paths (#33) ? Issues ? emacs-geiser / guile ? GitLab"
<Kabouik>jpoiret: yay that was it, this config works to whitelist commands using binaries in /gnu/store! Thanks a ton.
<Kabouik>Woops sorry my repo is private, L52
<nckxmas>jdlugosz963: ...maybe! I admit to not reading the whole thread:
<peanuts>"Guix at 37C3 Chaos Communication Congress in late Dec?"