[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Early feedback on Guix Home
From: |
Andrew Tropin |
Subject: |
Re: Early feedback on Guix Home |
Date: |
Thu, 24 Jun 2021 20:42:26 +0300 |
jbranso@dismail.de writes:
> June 24, 2021 8:14 AM, "Xinglu Chen" <public@yoctocell.xyz> wrote:
>
>> On Wed, Jun 23 2021, Ludovic Courtès wrote:
>>
>> Alternatively, one can also use it as a channel:
>>
>> (channel
>> (name 'rde)
>> (url "https://git.sr.ht/~abcdw/rde"))
>> (introduction
>> (make-channel-introduction
>> "257cebd587b66e4d865b3537a9a88cccd7107c95"
>> (openpgp-fingerprint
>> "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0"))))
>
> Maybe I'm doing it wrong...my ~/.config/guix/channels.scm
>
> ;; Add variant packages to those Guix provides.
> (append
> (list
> (channel
> (name 'guix-packages)
> (url "https://notabug.org/jbranso/guix-packages"))
> (channel
> (name 'rde)
> (url "https://git.sr.ht/~abcdw/rde")
> (introduction
> (make-channel-introduction
> "257cebd587b66e4d865b3537a9a88cccd7107c95"
> (openpgp-fingerprint
> "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))))
> %default-channels)
>
> $ guix pull
> Updating channel 'guix-packages' from Git repository at
> 'https://notabug.org/jbranso/guix-packages'...
> Updating channel 'rde' from Git repository at
> 'https://git.sr.ht/~abcdw/rde'...
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'...
> Authenticating channel 'guix', commits 9edb3f6 to 8553f00 (3 new commits)...
> Building from these channels:
> guix https://git.savannah.gnu.org/git/guix.git 8553f00
> rde https://git.sr.ht/~abcdw/rde 6d32c23
> guix-packageshttps://notabug.org/jbranso/guix-packages d4b6f35
>
> $ guix build home.scm
It should be `guix home build ./path/to/file.scm`. Also, make sure that
before first run you've set proper GUILE_LOAD_PATH. (See
https://sr.ht/~abcdw/rde/ Guix Home section, Option 2).
It won't be needed, when Guix Home will be upstreamed, but for now it is
necessary, if you want to use it from rde channel.
> $ guix pull
>
> I suppose for now I will use Ludo's suggestion:
>
> git clone https://git.sr.ht/~abcdw/rde
> guix git authenticate \
> "257cebd587b66e4d865b3537a9a88cccd7107c95" \
> "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0" \
> -k origin/keyring
> ./pre-inst-env guix home reconfigure /path/to/home-config.scm
>
> Failed to execute process './pre-inst-env'. Reason:
> exec: Exec format error
> The file './pre-inst-env' is marked as an executable but could not be run by
> the operating system.
It should work if you have a POSIX-compatible shell, but I also added
shebang to be sure that /bin/sh used. Do git pull inside repository dir
and try again. `./pre-inst-env guix home --help`
Let me know if it still fails.
>
> Eventually I'll be able to get it to work! But I do like the concept!
>
> #+BEGIN_SRC scheme
> (use-modules (gnu home)
> (gnu home-services)
> (gnu home-services ssh)
> (gnu home-services shells)
> (gnu home-services files)
> (gnu services)
> (gnu packages admin)
> (guix gexp)
> (my-home packages) ;; %defines %my-packages
> )
>
>
> (home-environment
> (home-directory "/home/joshua")
home-directory, as well as symlink-name and symlink-path are now
depricated, I'll update the manual soon.
> ;; (symlink-name ".guix-home-env")
> (packages %my-packages)
> (services
> (list
> (service home-bash-service-type
> (home-bash-configuration
> (guix-defaults? #t)
> (bash-profile '("\ export
> HISTFILE=$XDG_CACHE_HOME/.bash_history;\n"
> "if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty3
> ]]; then\n"
> "# this may fix a bug that I have with termite
> confusing backspace as space in guix environment\n"
> "# export TERM=linux\n"
> "# shepherd -c
> /home/joshua/.config/shepherd/init.scm &\n"
> "export MOZ_ENABLE_WAYLAND=1;\n"
> "export
> GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/;\n"
> "export
> XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS;\n"
> "exec dbus-run-session sway;\n"
> "fi"
> ))
> (bashrc
> '("alias lamora='ssh -p 63355 lamora'"))))
>
> (simple-service 'termite-config
> home-files-service-type
> (list `("config/termite/config"
> ,(local-file "config-files/termite-config"
> "config"))))
>
> (simple-service 'sway-config
> home-files-service-type
> (list `("config/sway/config"
> ,(local-file "config-files/sway-config"
> "config"))))
>
> (simple-service 'sway-config
> home-files-service-type
> (list `("config/sway/status.sh"
> ,(local-file "config-files/sway-status.sh"
> "status.sh"))))
home-files-service-type accepts a list, so you do not need to create so
many service)
>
> )))
>
> #+END_SRC