unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* guix home: no target of type 'home-profile' for service 'home-bash'
@ 2021-10-12 11:46 Dustin Lyons
  2021-10-12 13:09 ` Oleg Pykhalov
  0 siblings, 1 reply; 6+ messages in thread
From: Dustin Lyons @ 2021-10-12 11:46 UTC (permalink / raw)
  To: help-guix

Hello,

I had a working guix home configuration, happily importing all of my
dotfiles into the guix store, but a most recent guix pull broke it. I now
see

1) an error due to no 'home-profile' and
2) none of my services to be found and instead a generic fontconfig service
to be built, resulting in a completely empty home configuration.

I've been debugging on my end but am failing to find a solution. Did
something change? I confirmed in the repl that I'm passing a list of valid
simple-service types into my (home-environment). Do I need to provide
something else? I'm new to guix, so any debugging tips would also be
appreciated.

Github link:
https://github.com/dustinlyons/guix-config/blob/main/build/felix-home.scm

*Error running guix home reconfigure:*
$ guix home --load-path=./build reconfigure ./build/felix-home.scm























*error: channel: unbound variablehint: Did you forget `(use-modules (guix
channels))'?error: desktop-operating-system: unbound variablehint: Did you
forget a `use-modules' form?felix-home.scm:25:13: warning: resolving
'build/.Xmodmap' relative to current directoryfelix-home.scm:25:13:
warning: resolving 'build/picom/picom.conf' relative to current
directoryfelix-home.scm:25:13: warning: resolving 'build/.Xresources'
relative to current directoryfelix-home.scm:25:13: warning: resolving
'build/polybar/colors.ini' relative to current
directoryfelix-home.scm:25:13: warning: resolving 'build/polybar/bars.ini'
relative to current directoryfelix-home.scm:25:13: warning: resolving
'build/polybar/modules.ini' relative to current
directoryfelix-home.scm:25:13: warning: resolving
'build/polybar/config.ini' relative to current
directoryfelix-home.scm:25:13: warning: resolving 'build/Thunar/uca.xml'
relative to current directoryfelix-home.scm:25:13: warning: resolving
'build/dunst/dunstrc' relative to current directoryfelix-home.scm:25:13:
warning: resolving 'build/printers/printers.conf' relative to current
directoryfelix-home.scm:25:13: warning: resolving
'build/alacritty/alacritty.yml' relative to current
directoryfelix-home.scm:25:13: warning: resolving
'build/emacs/zeroed-theme.el' relative to current
directoryfelix-home.scm:25:13: warning: resolving 'build/openbox/autostart'
relative to current directoryfelix-home.scm:25:13: warning: resolving
'build/openbox/rc.xml' relative to current directoryfelix-home.scm:25:13:
warning: resolving 'build/rofi/launcher.sh' relative to current
directoryfelix-home.scm:25:13: warning: resolving 'build/rofi/theme.rasi'
relative to current directoryguix home: error: no target of type
'home-profile' for service 'home-bash'make: *** [Makefile:32:
--install-felix-home] Error 1*

*Source file ./build/felix-home.scm:*

(define-module (felix-home)
  #:use-module (gnu home)
  #:use-module (desktop)
  #:use-module (dl utils)
  #:use-module (gnu home-services)
  #:use-module (gnu home-services shells)
  #:use-module (gnu services)
  #:use-module (gnu system)
  #:use-module (gnu packages)
  #:use-module (guix build utils)
  #:use-module (gnu packages admin)
  #:use-module (guix gexp))

;; Returns a list of home-file-service structs for each dotfile
(define (dl/generate-dotfiles-services dotfiles)
  (if (null? dotfiles)
    '()
  (let ((config-file (string-append "config/" (car dotfiles)))
        (build-file (string-append "build/" (car dotfiles))))
    (cons
      (simple-service 'load-build-files
        home-files-service-type
          (list ;; pair of destination path and source path
            `(,config-file
            ,(local-file build-file "config"))))
      (dl/generate-dotfiles-services (cdr dotfiles))))))

(home-environment
  (packages (map specification->package+output %dl-packages))
  (services (append (list

(simple-service 'felix-environment-variables
home-environment-variables-service-type
`(("LANG" . "en_US.UTF-8")
("LIBGL_ALWAYS_INDIRECT" . #t)
("HYPHEN_INSENSITIVE" . #t)
("COMPLETION_WAITING_DOTS" . #t)
("OSH" . "$HOME/Resources/code/oh-my-bash")
("GUIX_PROFILE" . "$HOME/.guix-profile")
("OSH_THEME" . "agnoster")))

(service home-bash-service-type
        (home-bash-configuration
          (guix-defaults? #f)
          (bashrc '("# Export 'SHELL' to child processes.
# Programs such as 'screen' honor it and otherwise use /bin/sh.
export SHELL
alias ls='ls --color'

# We are being invoked from a non-interactive shell.  If this
# is an SSH session (as in \"ssh host command\"), source
# /etc/profile so we get PATH and other essential variables.
if [[ $- != *i* ]]
then
[[ -n \"$SSH_CLIENT\" ]] && source \"$GUIX_PROFILE/etc/profile\"

# Don't do anything else.
return
fi
# System wide configuration
source /etc/bashrc
# oh-my-BASH!
export OSH=$HOME/Resources/code/oh-my-bash
source $OSH/oh-my-bash.sh")))))

;; Generates home-files-services for each dotfile defined
;; throughout configuration inheritance
(dl/generate-dotfiles-services
  (append '(".Xmodmap") %dl-dotfiles)))))

*Source of (home-environment (services)): %dl-dotfiles:*

(define %dl-packages
  (append %dl-packages-workstation %dl-packages-desktop))

(define %dl-dotfiles
  (append %dl-dotfiles-workstation %dl-dotfiles-desktop))

(define %dl-packages-desktop
  (list
    "openbox""rofi"
  ))

(define %dl-dotfiles-desktop
  (list
    "openbox/autostart"
    "openbox/rc.xml""rofi/launcher.sh"
    "rofi/theme.rasi"
  ))

(define %dl-packages-workstation
  (list
  "picom""font-hack"
  "font-awesome"
  "font-google-roboto"
  "font-google-material-design-icons""polybar""thunar""dunst""brlaser"
  "system-config-printer""alacritty""emacs"
  ))

(define %dl-dotfiles-workstation
  (list
  "picom/picom.conf"".Xresources""polybar/colors.ini"
  "polybar/bars.ini"
  "polybar/modules.ini"

"polybar/config.ini""Thunar/uca.xml""dunst/dunstrc""printers/printers.conf""alacritty/alacritty.yml""emacs/zeroed-theme.el"
  ))


*Dropping home-bash-service-type, result is no configuration other than
fontconfig built with guix home:*

guix home --load-path=./build reconfigure ./build/felix-home.scm
error: channel: unbound variable
hint: Did you forget `(use-modules (guix channels))'?

error: desktop-operating-system: unbound variable
hint: Did you forget a `use-modules' form?

felix-home.scm:25:13: warning: resolving 'build/.Xmodmap' relative to
current directory
felix-home.scm:25:13: warning: resolving 'build/picom/picom.conf' relative
to current directory
felix-home.scm:25:13: warning: resolving 'build/.Xresources' relative to
current directory
felix-home.scm:25:13: warning: resolving 'build/polybar/colors.ini'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/polybar/bars.ini' relative
to current directory
felix-home.scm:25:13: warning: resolving 'build/polybar/modules.ini'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/polybar/config.ini'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/Thunar/uca.xml' relative to
current directory
felix-home.scm:25:13: warning: resolving 'build/dunst/dunstrc' relative to
current directory
felix-home.scm:25:13: warning: resolving 'build/printers/printers.conf'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/alacritty/alacritty.yml'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/emacs/zeroed-theme.el'
relative to current directory
felix-home.scm:25:13: warning: resolving 'build/openbox/autostart' relative
to current directory
felix-home.scm:25:13: warning: resolving 'build/openbox/rc.xml' relative to
current directory
felix-home.scm:25:13: warning: resolving 'build/rofi/launcher.sh' relative
to current directory
felix-home.scm:25:13: warning: resolving 'build/rofi/theme.rasi' relative
to current directory
/gnu/store/2frj2r4kin54v6xm27c02z3why9qpvbz-home
Cleaning up symlinks from previous home-environment.

Removing /home/dustin/.config/fontconfig/fonts.conf... done
Removing /home/dustin/.config/fontconfig... done
Skipping /home/dustin/.config (not an empty directory)... done
Removing /home/dustin/.profile... done
Cleanup finished.

New symlinks to home-environment will be created soon.
All conflicting files will go to
/home/dustin/1634038573-guix-home-legacy-configs-backup.

Skipping   /home/dustin/.config (directory already exists)... done
Creating   /home/dustin/.config/fontconfig... done
Symlinking /home/dustin/.config/fontconfig/fonts.conf ->
/gnu/store/phj2z2iiqdhryfy7mqral0b9qz3hlva6-fonts.conf... done
Symlinking /home/dustin/.profile ->
/gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5jzq5-shell-profile... done
 done
Finished updating symlinks.

Comparing
/gnu/store/2frj2r4kin54v6xm27c02z3why9qpvbz-home/profile/share/fonts and

/gnu/store/2frj2r4kin54v6xm27c02z3why9qpvbz-home/profile/share/fonts...
done (same)
Evaling on-change gexps.

On-change gexps evaluation finished

Thank you,
Dustin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: guix home: no target of type 'home-profile' for service 'home-bash'
  2021-10-12 11:46 guix home: no target of type 'home-profile' for service 'home-bash' Dustin Lyons
@ 2021-10-12 13:09 ` Oleg Pykhalov
  2021-10-12 14:05   ` Zach Oglesby
  2021-10-13  7:15   ` Daniel Meißner
  0 siblings, 2 replies; 6+ messages in thread
From: Oleg Pykhalov @ 2021-10-12 13:09 UTC (permalink / raw)
  To: Dustin Lyons; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

Hello,

Dustin Lyons <me@dustinlyons.co> writes:

> I had a working guix home configuration, happily importing all of my
> dotfiles into the guix store, but a most recent guix pull broke it. […]

home-bash-configuration and other service configurations accept only
file-like objects (no strings), so to make it work you could use:

(plain-file "bashrc" "# configuration string
# another configuration string")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: guix home: no target of type 'home-profile' for service 'home-bash'
  2021-10-12 13:09 ` Oleg Pykhalov
@ 2021-10-12 14:05   ` Zach Oglesby
  2021-10-12 19:45     ` Dustin Lyons
  2021-10-13  7:15   ` Daniel Meißner
  1 sibling, 1 reply; 6+ messages in thread
From: Zach Oglesby @ 2021-10-12 14:05 UTC (permalink / raw)
  To: help-guix


Oleg Pykhalov <go.wigust@gmail.com> writes:

> Hello,
>
> Dustin Lyons <me@dustinlyons.co> writes:
>
>> I had a working guix home configuration, happily importing all of my
>> dotfiles into the guix store, but a most recent guix pull broke it. […]
>
> home-bash-configuration and other service configurations accept only
> file-like objects (no strings), so to make it work you could use:
>
> (plain-file "bashrc" "# configuration string
> # another configuration string")

You also need to change (guix home-service) and (guix home-service
shells) to (guix home service) and (guix home service shells)

That was change in https://git.savannah.gnu.org/cgit/guix.git/commit/?id=0e8d2df0f1a4ab25c482e1c427c54e19903e62f3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: guix home: no target of type 'home-profile' for service 'home-bash'
  2021-10-12 14:05   ` Zach Oglesby
@ 2021-10-12 19:45     ` Dustin Lyons
  0 siblings, 0 replies; 6+ messages in thread
From: Dustin Lyons @ 2021-10-12 19:45 UTC (permalink / raw)
  To: Zach Oglesby; +Cc: help-guix

Thank you, everyone, this pointed me in the right direction.

On Tue, Oct 12, 2021 at 10:41 AM Zach Oglesby <zach@ghostcorp.net> wrote:

>
> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
> > Hello,
> >
> > Dustin Lyons <me@dustinlyons.co> writes:
> >
> >> I had a working guix home configuration, happily importing all of my
> >> dotfiles into the guix store, but a most recent guix pull broke it. […]
> >
> > home-bash-configuration and other service configurations accept only
> > file-like objects (no strings), so to make it work you could use:
> >
> > (plain-file "bashrc" "# configuration string
> > # another configuration string")
>
> You also need to change (guix home-service) and (guix home-service
> shells) to (guix home service) and (guix home service shells)
>
> That was change in
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=0e8d2df0f1a4ab25c482e1c427c54e19903e62f3
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: guix home: no target of type 'home-profile' for service 'home-bash'
  2021-10-12 13:09 ` Oleg Pykhalov
  2021-10-12 14:05   ` Zach Oglesby
@ 2021-10-13  7:15   ` Daniel Meißner
  2021-10-13  8:45     ` Oleg Pykhalov
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Meißner @ 2021-10-13  7:15 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: help-guix

Hi there,

Oleg Pykhalov writes:
> Dustin Lyons <me@dustinlyons.co> writes:
>
>> I had a working guix home configuration, happily importing all of my
>> dotfiles into the guix store, but a most recent guix pull broke
>> it. […]
>
> home-bash-configuration and other service configurations accept only
> file-like objects (no strings), so to make it work you could use:
> (plain-file "bashrc" "# configuration string # another configuration
> string")

I've had a similar problem.  I expected bashrc to also accept a list of
strings which will be added to bashrc since in the manual [1] it says:

> ‘bashrc’ (default: ‘()’) (type: text-config)
>     List of strings or gexps, which will be added to ‘.bashrc’.
>     Used for executing user’s commands at start of interactive
>     shell (The shell for interactive usage started by typing
>     ‘bash’ or by terminal app or any other program).

Was this behaviour somehow changed to only accept file-like objects?  I
quite liked the string options because for simple aliases there is no
need for a file-like object. WDYT?

Best
Daniel


1: See info "(guix) Shells Home Services" under "Bash home service"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: guix home: no target of type 'home-profile' for service 'home-bash'
  2021-10-13  7:15   ` Daniel Meißner
@ 2021-10-13  8:45     ` Oleg Pykhalov
  0 siblings, 0 replies; 6+ messages in thread
From: Oleg Pykhalov @ 2021-10-13  8:45 UTC (permalink / raw)
  To: Daniel Meißner; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> writes:

[…]

> Was this behaviour somehow changed to only accept file-like objects?

Yes, no strings anymore.  Sorry about breaking your configuration, but
guix home still under development as the manual says.  I do not think
similar breaking will happen in the future.

> I quite liked the string options because for simple aliases there is
> no need for a file-like object. WDYT?

It's already discussed at https://issues.guix.gnu.org/50967 (shortly in
https://issues.guix.gnu.org/50967#42 ) and guix-devel mailing list.

> 1: See info "(guix) Shells Home Services" under "Bash home service"

Ouch, it should be changed accordingly to the current behaviour.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-16 10:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 11:46 guix home: no target of type 'home-profile' for service 'home-bash' Dustin Lyons
2021-10-12 13:09 ` Oleg Pykhalov
2021-10-12 14:05   ` Zach Oglesby
2021-10-12 19:45     ` Dustin Lyons
2021-10-13  7:15   ` Daniel Meißner
2021-10-13  8:45     ` Oleg Pykhalov

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).