***lukedashjr is now known as luke-jr
<Fare>Hi. I'm trying to run guix in qemu to test my software installation, and it fails while trying to load the kvm module, even though I specified no such thing in the initrd-modules or anywhere in my guix-config.scm. How do I disable kvm, and/or tell guix to proceed if some kernel module fails to load? <Fare>Actually, proceed would be important to build images that can work on different machines (such as for a bootable USB stick): "try all these modules for these various machines, which work may depend on the machine" <boogerlad[m]>what's the difference between `guix environment` and `guix profile`? <apteryx_>the later does not exist as a command ;-) <atka>hi guix, does anyone know what the default tty font in guix is or a command that shows the font in use? showconsolefont just shows the glyphs. <Fare>OK, so I'm at the point where guix correctly does a cryptsetup luksOpen, but fails to do a vgscan. also due to the kernel module issue above I cannot test inside qemu so I have to reboot every time. And the path isn't setup properly in ,bournish so I can't invoke the programs I want <Fare>OK, apparently, the source of the lvm is NOT the target of the cryptsetup, but the target of an implicit vgscan. <Fare>... rebooting to try it out <Fare>Yay! I managed to boot up my first guix installation. It was pretty useless so I rebooted back into NixOS. But that's a start. The inability to boot under qemu is sad, though. <Fare>what is the guix equivalent if any of nixos-install --chroot, and/or nixos-enter, that allows you to enter an nixos environment in a chroot? <Fare>which package would be the argument to that? the -system package? <Fare>and how do I extract that package from the guix-config.scm file? <Fare>(plus the /guix "root" directory) <vidak>hey all, sorry to just drop in for the first time with a problem/issue/question - but could someone please teach me how to use guix copy? i want to copy a big package from a beefy terminal to a smaller, less powerful one. <Fare>I'm a beginner too—have you tried guix copy --help <vidak>yes, and i have read the documentation too -- i think my issue revolves around how to set up ssh properly <vidak>i am getting an error message about being unable to read id_rsa? <vidak>normally i have a good command of ssh, but i don't understand what i am doing wrong <apteryx_>oh, fun fact; did you know the mcron 'job' specifier procedure accepts 'displayable' as its last argument? which can be anything, and it'll use that to show as its name. <apteryx_>which means we can put an end to this "Lambda function" clutter in the output of 'herd schedule mcron' ;-) <apteryx_>I should say, last *positional* argument (before any keyed ones). <apteryx_>leoprikler: the correct time spec for mcron meaning "at 5 AM, every 3 days" was: '(next-hour-from (next-day (range 1 31 3)) '(5)) <lfam>vidak: If you try the command `ssh $remotehost`, using the same remote host name that you are using for `guix copy`, does it work? <lfam>I wonder why `guix copy` can't read the key <vidak>do i need to have all the same user accounts on both machines? <retropikzel>cl-sdl2 cant find libSDL2-2.0.so.0 in guix environment, anything I can do to fix it? <retropikzel>I'm not using cl-sdl2 from guix repo. I load it from directory <leoprikler>retropikzel: IIRC guix hardcodes the path, so you might want to do that as well ***dongcarl1 is now known as dongcarl
***guix_data_servic is now known as canant
***soheil_ is now known as soheil
<formbi`>I installed Guix on my phone (using the instructions from the blog) <formbi`>and I can't run the daemon or anything because I get «invalid ELF header» <jahor>Good morning! How should I specify an output of a package in Guile? I've found only how to do it in CLI like clang:extra if I want an extra output of clang. Thanks. <muradm>(define my-args '("-a" "-b" "-c")) (define my-prog "/some/prog") <muradm>(execl my-prog my-prog my-args) seems not to work, how to pass list as arguments? <muradm>i want to make (program-file with args to (execl and preset (setenv cals <maximed>muradm: maybe (execl my-prog my-prog arg1 arg2 ...) <maximed>See documentation of 'excl' in the Guile manual for how to call 'execl' <muradm>maximed: yes (apply execl my-prog my-prog args) should solve will try it thanks <Irvise>formbi`: what blog if I may ask? That issue sounds like the binary is not compatible with the platform, imho. <formbi`>uname -a shows aarch64 and that's the version I downloaded <Irvise>formbi`: what happens if you run `file someguixbinaryfile`? What is the output? <roptat>formbi`, maybe newer versions of android don't like elf files for -linux? <formbi`>Irvise: /gnu/store/…-guix-1.3.0/bin/guix-daemon: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/…-glibc-2.31/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, not stripped <muradm>(match-lambda (($ <some-record> field1 field2) (...expr...))) returns function that takes one argument of type <some-record> ? <muradm>where does (match-lambda ...) defined? <bricewge>muradm: Yes. Guix also has a useful `match-record` <muradm>bricewge: yes i saw, in comments it says does not support thunked fields <muradm>in (match-lambda (($ <some-record> field1 field2 ...) are positionally fields, not name matching, right? <muradm>lets say i have <some-record> with field1 field2 field3, and in match-lambda i need only field3 <muradm>how to omit field1 field2 ? is it _ (underscore) ? <muradm>(match-lambda (($ <some-record> _ _ field3) ? <muradm>(match-lambda (($ <some-record> field1 _ field3) ? <bricewge>You can use _. It's just a convention so you can use other name if you want <muradm>and if it is last field3 i don't want, i don't have to mention it at all, like this: <muradm>(match-lambda (($ <some-record> field1 field2) <muradm>bricewge: you know everything :) thanks, what about accessing expanded record in expression, is it possible? something like this: <muradm>(match-lambda (($ <some-record> field1 field2) (some-other-func this-record))) <muradm>where this-record is of type <some-record> that was expanded <bricewge>No, I just know a little, I'm just starting to get comfortable with Guix <muradm>i want to use match-lambda, which returns a function with first argument of <some-record>, and then within the lambda reference the instance of <some-record> passed again, not only fields it expand <muradm>otherwise i have to use field1 field2 field3 to assmeble a new record and pass it to match-on-record-2 <bricewge>I don't know. Why do you want to do this in the first place? <muradm>any ways, looks i found some solution <bricewge>`,use (guix monad-repl)` then `,help guix` <muradm>should this work? (mixed-text-file "hello\n" (program-file "prog.scm" #~(execl "echo" "echo" "hello")) "\n") <muradm>execl could be wrong, just to illustrate example <muradm>i expect that (mixed-text-file ...) will contain two lines, one "hello" and the other one is full path to "prog.scm" <muradm>i get string-append invalid type #procedure .... <bricewge>The first parameter is the name of the file, you should probably drop `\n` <muradm>yes sorry, it is there of course, just typo: <muradm>(mixed-text-file "some.txt" "hello\n" (program-file "prog.scm" <muradm> #~(execl "echo" "echo" "hello")) "\n") <ix>Im using rde's emacs service <ix>When emacs crashes, the home shepherd doesnt restart it <ix>When i manually restart: system-error("getpgid" "~A" ("No such process") (3))\nService emacs-server has been stopped.\nService emacs-server has been started. <dstolfa>ix: hm, i haven't looked at it, does it have respawn? set to true? <dstolfa>if so, i wonder if it's a shepherd bug, or maybe it's trying to respawn but failing for some reason and gives up after 5 tries <bricewge>muradm: I think you are looking for gexp->script <muradm>,run-in-store (some-func) which returns (gexp->script <muradm>$1 = #<derivation .....drv => .....my-script.scm 1245434> <muradm>what to do with $1 to acquire actual script? <muradm>it makes drv file, but not .scm file <muradm>in examples i see that absolute .scm file should be returned <emestee>what's the current state of kde in guix packages? <muradm>(let* ((inner (gexp->script ....))) (gexp->script "wrapper.scm" #~(execl #$inner #$inner))) <muradm>how to refer to absolute file name of (gexp->script ...) ? <ix>dstolfa: so, docs say respawn defaults to true <ix>So i dont think its that"" <dstolfa>ix: do you know if the service gets disabled perhaps? it may be trying to restart it, but failing too quickly 5 times and then disabling the service <dstolfa>which means you have to herd enable again <ix>dstolfa: it doesnt, i can restore the state with herd restart <ix>With the output i mentioned <muradm>any one to help with this? (let* ((inner (gexp->script ....))) (gexp->script "wrapper.scm" <muradm>struggling to refer (gexp->script result within another gexp <ix>Who should i ping for shepherd dev? <Faremacs>Yay! I'm joining this channel from guix for the first time. I failed to login via X, but M-x irc in emacs in a terminal works fine. ***TheCreeper2 is now known as TheCreeper
<Faremacs>What could cause X to log me out immediately after I'm logged in? Maybe I need to configure some Window Manager and/or Desktop Environment? <muradm>&gexp-input-error: #<procedure 7fdae157d120 at guix/gexp.scm:1816:2 (state)> <abrenon>how are po/guix/*.po files generated ? how should one be updated after a new string is added to a script ? <bricewge>ix: It's probably a rde issue, start by reporting your issue to abcdw <ix>bricewge: having read the rde code, i don't see how, do you? <bricewge>My user's shepherd service stops with `(make-system-destructor "emacsclient --eval '(kill-emacs)'")` not `(make-kill-destructor)` <ix>bricewge: the problem is, stop is never called <ix>Thats why this is an issue <ix>Its still "running" until i restart <ix>I assumed it could be a config issue but if nobody else has any idea how, it probably is a shepherd bug <bricewge>How do you know that "stop is never called"? <ix>bricewge: because until i restart, it's still running <ix>bricewge: for extra proof, i can whip out my shepherd.log, which is not very elucidative except for the crash output, then the stop error from above when i try and restart <Faremacs>What is a reasonable way for a script to autodetect whether it's running on nixos or guix... especially when both are installed? ***lukedashjr is now known as luke-jr
<Faremacs>is there an easily visible difference in their /etc ? <bricewge>There are several suggested method in the logs <Faremacs>looks like nixos creates an empty file /etc/NIXOS <bricewge>And it as a `/etc/os-release` as most standard distro nowadays <Faremacs>but guix doesn't (at least not this fresh install) <Faremacs>That's OK, I just need a quick-and-easy way to distinguish between plain NixOS, plain GuixSD, Nix on top of GuixSD, Guix on top of NixOS. <Faremacs>Thanks a lot for your help! Rebooting into NixOS for now to configure things from a fully functional environment. <Faremacs>Oops, guix took over my GRUB, and now I can't (easily) boot into NixOS anymore... <ix>Alright, well thats simple then. Just need to edit the service <bricewge>ix: You did not read the right docs, the you linked is for Guix's shepherd system service not user service (or rde or (guix home)) <ix>bricewge: is that not what's used? The service is defined through guix <ix>At the bare minimum that's wildly unhelpful <bricewge>The behavior should be the same for user and system service I think tho <dstolfa>sounds like it might be worth pinging abcdw about this, but yeah it's not merged yet <dstolfa>finding stuff like this is pretty crucial though, because people would run into it after the merge then :) <bricewge>Yes, thank you for the early testing ix ! <ix>sneek: later tell abcdw could you make emacs-service configurable to auto-restart? Apparently <restart?> defaults to false, so when it crashes it stays down until manual restart <dstolfa>ix: btw, how come your emacs is crashing? what's causing it to fall over? <ix>Im running unstable builds and doing unstable things <ix>As well as mixing guix packages and straight.el <ix>(its generally ok until i do something unexpected or require something new) <ix>Actually, how _do_ you edit a shepherd service in unmanaged code? Modify-service just modifies the parent guix service <ix>Do you have to fold services and modify the result? <ix>Or do i edit the record type... <ix>Oh, edit the functions! <muradm>still can't solve this problem... <muradm>(let* ((inner (gexp->script ....))) (gexp->script "wrapper.scm" <ix>bricewge: dstolfa: nope, thats not it <ix>Run this in a repl: (shepherd-service-respawn? (first ((@@ (gnu home-services emacs) add-emacs-shepherd-service) (home <ix>-emacs-configuration (server-mode? #t))))) <ix>So the docs are right <ix>sneek: later tell abcdw nevermind, it is true by default... not sure whats wrong, probably a shep bug <bricewge>ix: What is the result of `LC_ALL=C herd status emacs`? <bricewge>Since you are using unstable software, maybe make your stop procedure `make-kill-destructor` send SIGKILL instead of SIGTERM <ix>bricewge: the process isnt even running after a crash <ix>I dont think a different signal will help <dstolfa>ix: could it be that when emacs crashes, it leaves a stale pidfile/socket and shepherd thinks it's still running? <ix>dstolfa: Perhaps. The service doesnt specify a pidfile, but maybe one is inferred? <muradm>in emacs lisp there is type-of function, is there similar in guile? <dstolfa>ix: it seems like shepherd detects that a service went bonkers by monitoring for SIGCHLD, whose handler gets installed when you write a forkexec constructor. it could be that the service is getting started wrong and therefore there is never a SIGCHLD handler being called which tries to respawn it, since shepherd doesn't actually know it died <dstolfa>hm, nvm, it seems like it runs with make-forkexec-constructor based on that link <dstolfa>still, it seems like it never gets SIGCHLD? that's weird <ix>Oh, emacs might eat sigchld? <ix>Emacs does weird signal things <dstolfa>would be worth writing a minimal C program that monitors for SIGCHLD and spawns emacs in --fg-daemon and seeing if it ever arrives in that C program <dstolfa>certainly easier than trying to debug shepherd at the moment (sadly). <dstolfa>this is one of the things i'd like to hack on as i get time, but i don't have time... :-( <ixmpp>Will have to find a way to reproduce a crash, i guess ***lukedashjr is now known as luke-jr
***lukedashjr is now known as luke-jr
<ruffni>does anyone here know of any examples where gnustep-make is used to build a package? <bricewge>How can I get all the package provided by a specific channel? <muradm>bricewge: match-lambda also does not work with thunked fields <muradm>(let* ((script1 (gexp->script "scr1" #~(begin ...)))) (mixed-text-file "hello\n" script1)) <muradm>(let* ((script1 (program-file "scr1" #~(begin ...)))) (mixed-text-file "hello\n" script1)) <muradm>^^^^ (mixed-text-file "txt1" "hello\n" script1) <muradm>(append-map (match-lambda ((var . val) (setenv var val))) (list ("VAR1" . "val1") ("VAR2" . "val2"))) <muradm>source expression failed to match any pattern in form (var . val) <cbaines>More of a Guile question, but (list ("VAR1" . "val1") ("VAR2" . "val2")) is invalid <cbaines>You probably want a quoted s-exp, like '(("VAR1" . "val1") ("VAR2" . "val2")) <cbaines>or you could do (list (cons "VAR1" "val1") (cons "VAR2" "val2")) <muradm>cbaines: will (quote ("VAR1" . "val1") ("VAR2" . "val2")) do the job? <cbaines>So you'd need to do (quote (("VAR1" . "val1") ("VAR2" . "val2"))) <muradm>i'm trying to put above gexp into program-file <muradm>where extra-env is list of tuples and command-args is list of args <muradm>trying to figure out way how to pass it easily <muradm>(list #$@command-args) for list it seems to be simple <muradm>(append-map (match-lambda ((var . val) (setenv var val))) (quote (("VAR1" . "val1") ("VAR2" . "val2")))) <muradm>source expression failed to match any pattern in form (var . val) <muradm>do match-lambda require (use-modules (ice-9 match)) ? <Guest58>Hi everyone. Having a problem with jupyter notebook.mkdir(name, mode) <Guest58>OSError: [Errno 30] Read-only file system: '/gnu/store/vkg9bnh8avasg5xgqk03l689zi45h5bx-profile/etc/jupyter:' <lfam>I'm not familiar with Jupyter but, basically, it needs to be told to write whatever it is trying to write to another directory <lfam>All of /gnu/store is immutable and read-only to user applications ***Guest58 is now known as kappa
<lfam>I guess the only thing remaining is to document the services in 'doc/guix.texi'? <kappa>I'm pretty sure it's trying to write config file in ~/.guix_profile/etc/jupyter/ <kappa>Worked fine before rebooting though <lfam>kappa: Yes, that directory is a symlink to the directory named in the error message <lfam>Before rebooting, it was probably writing to another location <lfam>What are you trying to do? <lfam>Like, what did you do that resulted in the error? <kappa>I want to launch jupyter notebook <kappa>It can't launch without writing config <lfam>The program must have an argument that controls where it puts the config file <kappa>Specifying different config path makes more permission errors <kappa>lfam: I did literally nothing. Just installed and launched it. <muradm>lfam: i can add the docs also, just a question, currently i have to separate files (gnu services seatd) and (gnu services greetd) do you think that this fine? or do you want me to put these to some other place, idk like (gnu services base) where mingetty reside and (gnu services desktop) where elogind reside <lfam>muradm: I wouldn't put them in the base module, since they won't be part of the base system, at least not immediately <lfam>I think that the desktop module is a good place for them <muradm>one more thing that cgroups thing <muradm>i explained before, that cgroups is mounted by elogind <muradm>then docker-service-type require elogind <lfam>kappa: "Permission denied: '/usr/local/share/jupyter/nbconvert/templates/conf.json'" <muradm>although seatd does not require cgroups <lfam>Does /usr/local/share exist? Is this on Guix System or a different operating system? <rndd>i have a problem, i need to use xrandr script when after login in my vm, how i can do it? (usually i put xrandr script in ~/.profile on debian based disctros. but it does not work in guix system <lfam>kappa: Also, how did you start Jupyter? I want to try reproducing it but I don't know how to invoke the program <kappa>from package python-notebook <muradm>there are two ways to do: 1) separate cgroups to dedicated service-type 2) seatd will mount cgroups in the same way as elogind <kappa>And again for some reason it worked perfectly before, I'm not sure if changed something.... <lfam>rndd: Quoting from the generated ~/.profile on a different OS: "This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists" <muradm>separating cgroups will touch elogind, docker <lfam>kappa: Hm... I tried reproducing it on Guix on Debian and it seems to work (launches a web page). Is there anyone else here who uses Jupyter, and can test it on Guix System? <muradm>more clean, however it is different issue which can be prerequisite before seatd/greetd <lfam>muradm: Maybe the people who know about that stuff will join this conversation. Otherwise it's best to start a discussion on the guix-devel mailing list <lfam>People do use Jupyter in Guix, but they may be less likely to be here on a Sunday <lfam>It's definitely not great that it worked for a while and then stopped <kappa>Ok. I've seen PurpleSym helped someone before with similar issue. Maybe he will join sooner or later <lfam>You can send a message to people who aren't here using the sneek bot. When they come back, sneek will relay your message when they speak <lfam>sneek: later tell kappa: Hello <sneek>Welcome back kappa, you have 1 message! <lfam>You might also ask the Jupyter people. Although Guix has an unusual filesystem layout that makes it more likely to confuse programs, I'd guess that Jupyter does get used sometimes on systems with parts of the filesystem locked down. Like scientific computing systems <rndd>lfam: hi! not really, bash files used after running bash shell <rndd>i need something that run after login <lfam>rndd: My point was that you should use ~/.bash_profile <kappa>Actually seems like nbconvert is not guix related <lfam>Or, you can source ~/.profile from within ~/.bash_profile, rndd <lfam>That's good, but it would be best if it was working :) <kappa>Is there an easy solution to downgrade packages in guix? <rndd>lfam: i'll try it now, thank you <lfam>kappa: It depends what you mean by "downgrade" <lfam>There are the Guix rollbacks <lfam>`guix build --with-source=package@version=source` <lfam>Maybe, or maybe --with-commit, if it's in a Git repo <kappa>Another non related question. How do I start something that doesn't have herd service by default. For example I want to start searx server on start. <lfam>That's a longstanding pain point on Guix, compared to systemd-based systems <lfam>There is per-user Shepherd, but it doesn't start automatically when you boot <kappa>Oh ok. Thanks for the answer <lfam>You would make a file like that, write your services based on those examples, and then you could start shepherd, maybe like this: `[ -z $(pgrep -U $(id --user) shepherd) ] && shepherd` <lfam>(That just prevents you from trying to start it more than once) <lfam>And then you can do `herd status searx`, etc <lfam>Guix Home will be the real solution, though <lfam>I use user shepherd and it's just not as nice as systemd user services... yet! <lfam>That whole answer is based on if you wanted to run searx as a "user service" or if it was more of a system-level thing. If it was a system service, then "someone" would have to write a service for it and add it to Guix :) <lfam>I wonder if Andrew is here... <rndd>lfam: thank you, it works. as i see .bash_profile called after log in, right? <lfam>rndd: Yeah, only on login. Check the section FILES of the bash man page for a little more detail <lfam>The Zsh man page has a more comprehensive section, STARTUP/SHUTDOWN FILES, although it's obviously not documenting bash. It's similar though <lfam>In general, Guix exposes the differences between login and interactive shells more than other distros <lfam>I found it helpful to learn the difference for a better understanding of Guix