Re: Racket REPL not working

2023-07-04 Thread Chris Keschnat


Sorry, I would not know how to find that out.

"Philip McGrath"  writes:

> On Sun, Jul 2, 2023, at 12:12 PM, Chris Keschnat wrote:
>> This works
>>
>> ck@brak ~  $ guix shell --no-grafts racket -- racket
>> --version
>> Welcome to Racket v8.8 [cs].
>>>
>>
>
> That's very useful!
>
> I'm not exactly sure how to do this, but can we determine which grafts
> are otherwise being applied to `racket` in your environment? Hopefully
> knowing what is being grafted will help to narrow down how grafting
> might be going wrong.



Re: Getting Guix to shutdown my laptop properly with Sway and no DE

2023-07-04 Thread Skyler Ferris
On 7/4/23 12:26, danclm--- via wrote:
> Hello everyone!
>
> My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during shutdown 
> after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot. It 
> just sits there and only resolution is hard poweroff. It happens often.

In case this is relevant I am experiencing a similar issue in a VM 
running kmscon. I /think/ it happens when I reconfigure my system in a 
way that changes the services running on the OS (maybe the user services 
too, I don't run any at the moment) but this is based on anecdotal 
observations, I haven't found time to thoroughly test or root-cause 
anything. So it might be a different issue with the same symptom, or 
Sway might not be a relevant detail (or both).




Re: Getting Guix to shutdown my laptop properly with Sway and no DE

2023-07-04 Thread danclm--- via
Hi Robby, 
thanks for your response.

Do you mind sharing your config? 
I never managed on Guix to autologin and automatically start Sway without a 
display manager.

Daniele
-- 

Jul 4, 2023, 23:21 by cont...@robbyzambito.me:

> Hi,
>
> I don't have any suggestions for you, I just wish to add that I am also
> having the same issue, and I use Sway and Elogind (but no display
> manager). I have been dealing with it by hard powering off also, but it
> would be nice to have a proper solution :)
>
> Robby
>



Getting Guix to shutdown my laptop properly with Sway and no DE

2023-07-04 Thread danclm--- via


Hello everyone!

My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during shutdown 
after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot. It just 
sits there and only resolution is hard poweroff. It happens often.

Is there something that I'm missing in my system.scm?

```
;; My Guix config with the SwayWM 

(use-modules
  (gnu) (gnu system nss) (gnu system setuid))
(use-service-modules
  dbus desktop networking sddm sound ssh)
(use-package-modules
  certs  
  compression
  disk   
  emacs  
  finance
  fonts   
  fontutils  
  freedesktop
  glib  
  games  
  gnome  
  gnupg  
  gnuzilla  
  gtk
  haskell-xyz  
  image 
  libreoffice
  linux
  package-management 
  password-utils
  pulseaudio 
  rsync  
  ruby   
  ssh
  terminals  
  tex
  texinfo   
  version-control   
  wm)

(operating-system
(host-name "t420")
(timezone "Europe/Rome")
(locale "en_US.utf8")

  ;; Keyboard layout.
  (keyboard-layout (keyboard-layout "us"))

  ;; Bootloader
  (bootloader (bootloader-configuration
   (bootloader grub-bootloader)
   (terminal-outputs '(console))
   (targets (list "/dev/sda"))
   (keyboard-layout keyboard-layout)))

  ;; Specify a mapped device for the encrypted root partition.
  ;; The UUID is that returned by 'cryptsetup luksUUID'.
  (mapped-devices
   (list (mapped-device
  (source (uuid "8022876e-e0cc-4ec5-8363-0f07c590cdbc"))
  (targets (list "guix-root"))
  (type luks-device-mapping

  (file-systems
   (append
    (list (file-system
   (device (file-system-label "guix-root"))
   (mount-point "/")
   (type "ext4")
   (dependencies mapped-devices)))
 %base-file-systems))

  (swap-devices (list
(swap-space (target "/swapfile"

  ;; Define users and groups.
  (users
   (cons (user-account
  (name "dani")
  (comment "")
  (group "users")
  (home-directory "/home/dani")
  (supplementary-groups '("wheel" "netdev"
  "audio" "video" "input")))
 %base-user-accounts))

  ;; Sudoers
  (sudoers-file
   (plain-file "sudoers" "\
%root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: /run/current-system/profile/sbin/reboot\n"))

  ;; This is where we specify system-wide packages.
  (packages
   (append
    (list
 adwaita-icon-theme
 alacritty
 at-spi2-core
 dbus
 emacs
 font-awesome
 fontconfig
 font-dejavu
 font-gnu-unifont
 fzf
 git
 gnupg
 grim
 gtypist
 icecat
 keepassxc
 ledger
 libreoffice
 nss-certs
 openssh-sans-x
 pandoc
 parted
 pass-otp
 password-store
 pavucontrol
 pinentry
 pulseaudio
 rsync
 ruby-asciidoctor
 slurp
 stow
 sway
 swayidle
 swaylock-effects
 texinfo
 texlive-base
 unzip
 waybar
 xdg-utils
 zip)
    %base-packages))

  ;; Some programs need to run with “root” privileges, even when they are 
launched by unprivileged users
  (setuid-programs (cons*
    (setuid-program
 (program
  (file-append swaylock-effects "/bin/swaylock")))
    %setuid-programs))
  
  ;; Services
  (services
   (cons*
    (service alsa-service-type
 (alsa-configuration
  (pulseaudio? #t)))
    (service dbus-root-service-type)
    (service elogind-service-type)
    (service openssh-service-type
 (openssh-configuration
  (openssh openssh-sans-x)
  (port-number 22)
  (password-authentication? #f)
  (permit-root-login 'prohibit-password)
  (authorized-keys
   `(("dani" ,(local-file "/home/dani/.ssh/authorized_keys"))
    (service polkit-service-type)
    (service sddm-service-type
   (sddm-configuration
  (auto-login-user "dani")
  (display-server "wayland")))
    ;; Static networking for one NIC, IPv4-only.
    (service static-networking-service-type
 (list (static-networking
    (addresses
 (list (network-address
    (device "wlp1s0")
    (value "192.168.1.200/24"
    (routes
 (list (network-route
    (destination "default")
    (gateway "192.168.1.1"
    (name-servers '("1.1.1.1" "1.0.0.1")
    (service wpa-supplicant-service-type
 (wpa-supplicant-configuration
  (config-file "/etc/wpa-supplicant/wpa-supplicant.conf")
  (interface "wlp1s0")))
    %base-services))

  ;; Allow resolution of '.local' host names with mDNS.

Re: guix shell readline issue with R

2023-07-04 Thread Edouard Klein
Credit where credit is due, the shebang's idea comes from guix's manual.

You can also do the following:

#+begin_src bash
#!/usr/bin/env bash
# Autowrap self in guix shell
if [ -z "${GUIX_ENVIRONMENT:-}" ]
then
guix shell YOUR DEPENDENCIES HERE -- "$0" "$@"
exit 0
fi
ACTUAL CONTENTS OF THE SCRIPT HERE
#+end_src

Cheers !

Edouard

Kyle Andrews  writes:

> Edouard Klein  writes:
>
>> Here is a script that restores the ctrl-C behaviour of R, whithin a guix 
>> shell.
>>
>> I must admit I don't exactly understand the finer points of why it works, 
>> but just trapping SIGINT in the script is enough for R to behave.
>>
>> My intuition is SIGINT is sent to the whole group. The script
>> interrupts R. If we trap it in the script, it does nothing. R gets it as 
>> well and acts on it like you expect.
>
> Thanks, Edouard!
>
> Your script worked perfectly just as you described. I was sorely missing that 
> `set -m' call and passing true from the bash function. I also really like 
> your idea for the shebang line.
>
> Best Regards,
> Kyle