unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: jbranso@dismail.de, "Xinglu Chen" <public@yoctocell.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Early feedback on Guix Home
Date: Thu, 24 Jun 2021 20:42:26 +0300	[thread overview]
Message-ID: <87zgvfjh19.fsf@trop.in> (raw)
In-Reply-To: <4def90894bd34c6eefd8601232f24a8b@dismail.de>

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


  reply	other threads:[~2021-06-24 17:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 13:15 Early feedback on Guix Home Ludovic Courtès
2021-06-24  5:40 ` Andrew Tropin
2021-06-29 10:25   ` Ludovic Courtès
2021-06-24  8:14 ` Xinglu Chen
2021-06-24 15:18   ` Andrew Tropin
2021-06-29 10:33   ` Ludovic Courtès
2021-06-30  6:10     ` Andrew Tropin
2021-07-10 14:18       ` Ludovic Courtès
2021-07-20 11:01         ` Andrew Tropin
2021-07-04 13:21     ` Xinglu Chen
2021-06-24 16:50 ` jbranso
2021-06-24 17:42   ` Andrew Tropin [this message]
2021-06-24 18:42     ` Leo Prikler
2021-06-25  7:03       ` Andrew Tropin
2021-06-25  4:13     ` Joshua Branson
2021-06-25  7:17       ` Andrew Tropin
2021-06-25 18:08         ` Early feedback on Guix Home and a basic almost complete sway service Joshua Branson
2021-06-30  6:03           ` Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgvfjh19.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=guix-devel@gnu.org \
    --cc=jbranso@dismail.de \
    --cc=ludo@gnu.org \
    --cc=public@yoctocell.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).