Latest issue trying to organize my Guix configuration files -> error: Unknown command: hostname

Still following this tutorial, I run into yet another issue:

$ test-home
fish: Unknown command: hostname
~/.config/fish/config.fish (line 1): 
hostname
^~~~~~~^
in command substitution
	called on line 33 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
	called during startup
~/.config/fish/config.fish (line 33): Unknown command
alias test-home "sudo guix home -L ~/dotfiles container ~/dotfiles/config/home/folaht/$(hostname).scm"
                                                                                       ^~~~~~~~~^

try in your shell first

hostname

You mean like guix shell? hostname exists in there.

He means just running the hostname command in your shell. The error seems to indicate that it can’t find the hostname command on path.

It can not find hostname in the newly created guix home container if that’s what you mean.

$ hostname

What’s the output?

It seems your shell is fish but you are making config for bash?

In normal shell it’s the name of my machine.

One still needs both.

Not sure if hostname works in your container command. You can use a defined name to test in the container first.