* Starting ssh service
@ 2016-04-08 10:24 Dick Middleton
2016-04-08 15:16 ` 宋文武
2016-04-11 18:48 ` myglc2
0 siblings, 2 replies; 6+ messages in thread
From: Dick Middleton @ 2016-04-08 10:24 UTC (permalink / raw)
To: help-guix
Hello,
Just started playing with Guix and am trying to get ssh to start as a service.
My system is configured using the standard desktop example config.scm given
with the installation.
I'm trying to add the relevant bits from the simple example in reference guide
"7.2.1 Using the Configuration System".
i.e I've added:
(use-service-modules networking ssh)
...
(services (cons* (lsh-service) %base-services))
guix reconfigure complains with this error: ssh-daemon requires 'networking'
which is undefined.
Do I have to install something (why is it not already installed?) or am I
doing something wrong?
Thanks
Dick
--
Dick Middleton
dick@fouter.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Starting ssh service
2016-04-08 10:24 Starting ssh service Dick Middleton
@ 2016-04-08 15:16 ` 宋文武
2016-04-11 9:48 ` Dick Middleton
2016-04-11 18:48 ` myglc2
1 sibling, 1 reply; 6+ messages in thread
From: 宋文武 @ 2016-04-08 15:16 UTC (permalink / raw)
To: Dick Middleton; +Cc: help-guix
Dick Middleton <dick@fouter.net> writes:
> Hello,
Hi!
>
> Just started playing with Guix and am trying to get ssh to start as a service.
>
> My system is configured using the standard desktop example config.scm given
> with the installation.
>
> I'm trying to add the relevant bits from the simple example in reference guide
> "7.2.1 Using the Configuration System".
>
> i.e I've added:
>
> (use-service-modules networking ssh)
> ...
> (services (cons* (lsh-service) %base-services))
The desktop example use '%desktop-services' (in gnu/services/desktop.scm).
It contain services like dbus, slim, and wicd, etc.
wicd-service is provide the 'networking'.
>
> guix reconfigure complains with this error: ssh-daemon requires 'networking'
> which is undefined.
>
> Do I have to install something (why is it not already installed?) or am I
> doing something wrong?
You can use '%desktop-services' (or add 'wicd-service' or others.
see the 7.2.7.2 Networking Services section of the manual).
Hope it helps!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Starting ssh service
2016-04-08 15:16 ` 宋文武
@ 2016-04-11 9:48 ` Dick Middleton
2016-04-11 17:15 ` Alex Kost
0 siblings, 1 reply; 6+ messages in thread
From: Dick Middleton @ 2016-04-11 9:48 UTC (permalink / raw)
To: help-guix
On 04/08/16 16:16, 宋文武 wrote:
> Dick Middleton <dick@fouter.net> writes:
>>
>> Just started playing with Guix and am trying to get ssh to start as a
>> service.
> wicd-service is provide the 'networking'.
>>
> You can use '%desktop-services' (or add 'wicd-service' or others. see the
> 7.2.7.2 Networking Services section of the manual).
Placing lsh-service in %desktop-services allows guix to complete reconfigure
but it doesn't start the service.
If instead I order assigning %base-services and %desktop-services so
%base-services comes first (that was perhaps my mistake) then the build
proceeds. However now lshd starts at boot time but the desktop GUI doesn't.
How should I configure a server with a GUI?
Dick
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce.
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop ssh)
(use-package-modules certs)
(operating-system
(host-name "antelope")
(timezone "Europe/London")
(locale "en_US.UTF-8")
;; Assuming /dev/sdX is the target hard disk, and "my-root"
;; is the label of the target root file system.
(bootloader (grub-configuration (device "/dev/sda")))
(file-systems (cons (file-system
(device "GUIX")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons (user-account
(name "dick")
(comment "Alice's brother")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/dick"))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (cons* nss-certs ;for HTTPS access
%base-packages))
(services (cons* (lsh-service #:port-number 22
#:daemonic? #t
#:root-login? #t)
%base-services))
;; Add GNOME and/or Xfce---we can choose at the log-in
;; screen with F1. Use the "desktop" services, which
;; include the X11 log-in service, networking with Wicd,
;; and more.
(services (cons*
(xfce-desktop-service)
;; (gnome-desktop-service)
%desktop-services))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Starting ssh service
2016-04-11 9:48 ` Dick Middleton
@ 2016-04-11 17:15 ` Alex Kost
2016-04-12 13:50 ` Dick Middleton
0 siblings, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-04-11 17:15 UTC (permalink / raw)
To: Dick Middleton; +Cc: help-guix
Dick Middleton (2016-04-11 12:48 +0300) wrote:
> Placing lsh-service in %desktop-services allows guix to complete reconfigure
> but it doesn't start the service.
Do you mean that when you use:
(services (cons* (lsh-service #:port-number 22
#:daemonic? #t
#:root-login? #t)
%base-services))
the server is started, but with:
(services (cons*
(xfce-desktop-service)
(lsh-service #:port-number 22
#:daemonic? #t
#:root-login? #t)
%desktop-services))
it is not, right?
If so, I have no idea how this could happen.
> If instead I order assigning %base-services and %desktop-services so
> %base-services comes first (that was perhaps my mistake) then the build
> proceeds. However now lshd starts at boot time but the desktop GUI doesn't.
[...]
> (services (cons* (lsh-service #:port-number 22
> #:daemonic? #t
> #:root-login? #t)
> %base-services))
>
> ;; Add GNOME and/or Xfce---we can choose at the log-in
> ;; screen with F1. Use the "desktop" services, which
> ;; include the X11 log-in service, networking with Wicd,
> ;; and more.
> (services (cons*
> (xfce-desktop-service)
> ;; (gnome-desktop-service)
> %desktop-services))
'services' (and any other field) should be specified only once.
Apparently the first one (with %base-services) has a preference, so ssh
server is started and desktop services are not.
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Starting ssh service
2016-04-11 17:15 ` Alex Kost
@ 2016-04-12 13:50 ` Dick Middleton
0 siblings, 0 replies; 6+ messages in thread
From: Dick Middleton @ 2016-04-12 13:50 UTC (permalink / raw)
To: help-guix
On 04/11/16 18:15, Alex Kost wrote:
> Dick Middleton (2016-04-11 12:48 +0300) wrote:
>
>> Placing lsh-service in %desktop-services allows guix to complete reconfigure
>> but it doesn't start the service.
> If so, I have no idea how this could happen.
Ah, but I think you do ...
> 'services' (and any other field) should be specified only once.
That explains a lot.
I'll try again. Many thanks
Dick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Starting ssh service
2016-04-08 10:24 Starting ssh service Dick Middleton
2016-04-08 15:16 ` 宋文武
@ 2016-04-11 18:48 ` myglc2
1 sibling, 0 replies; 6+ messages in thread
From: myglc2 @ 2016-04-11 18:48 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
Dick Middleton <dick@fouter.net> writes:
> Hello,
>
> Just started playing with Guix and am trying to get ssh to start as a service.
>
> My system is configured using the standard desktop example config.scm given
> with the installation.
>
> I'm trying to add the relevant bits from the simple example in reference guide
> "7.2.1 Using the Configuration System".
>
> i.e I've added:
>
> (use-service-modules networking ssh)
> ...
> (services (cons* (lsh-service) %base-services))
>
> guix reconfigure complains with this error: ssh-daemon requires 'networking'
> which is undefined.
>
> Do I have to install something (why is it not already installed?) or am I
> doing something wrong?
>
> Thanks
>
> Dick
This sounds similar to issues I ran into with a headless server running
GuixSD a month or so ago (have since switched to Guix/Debian).
I ended up with lsh-service providing sshd (the ssh server) and openssh
providing ssh (the ssh client).
The config is split with sshd in the system config and ssh in the
per-user config.
There may be a more sane approach, but this did work and, FWIW, I have
attached the actual configs.
HTH, - George
[-- Attachment #2: c06glc.scm --]
[-- Type: application/octet-stream, Size: 593 bytes --]
(use-package-modules
aspell
gettext
ghostscript ;; gs-fonts
fonts ;; font-dejavu font-gnu-freefont-ttf
base
ssh rsync wget screen
version-control
emacs
;; so we can make guix w/o guix environment
autotools ;; automake
texlive ;; texlive-minimal
curl
xorg certs
graphviz
)
(packages->manifest
(list
;; gnu-gettext
gs-fonts font-dejavu font-gnu-freefont-ttf
gnu-make
openssh nss-certs xauth rsync wget git git-manpages
emacs magit screen aspell aspell-dict-en
;; so we can make guix w/o guix environment
texlive-minimal automake
curl ;; lpaste
graphviz
))
[-- Attachment #3: c06system.scm --]
[-- Type: application/octet-stream, Size: 1466 bytes --]
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin
disk
)
(operating-system
(host-name "g1")
(timezone "America/New_York")
(locale "en_US.utf8")
(bootloader (grub-configuration (device "/dev/sda")))
(file-systems (cons (file-system
(device "g1sd")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users (cons* (user-account
(name "glc")
(comment "g l c")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc"))
(user-account
(name "glc2")
(comment "glc2")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc2"))
(user-account
(name "glc3")
(comment "glc3")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc3"))
(user-account
(name "glc4")
(comment "glc4")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc4"))
(user-account
(name "glc5")
(comment "glc5")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc5"))
(user-account
(name "glc6")
(comment "glc6")
(group "users")
(supplementary-groups '("wheel"))
(home-directory "/home/glc6"))
%base-user-accounts))
(packages
(cons*
glibc-utf8-locales
parted
%base-packages))
(services (cons* (dhcp-client-service)
(lsh-service #:port-number 22)
%base-services)))
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-12 13:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08 10:24 Starting ssh service Dick Middleton
2016-04-08 15:16 ` 宋文武
2016-04-11 9:48 ` Dick Middleton
2016-04-11 17:15 ` Alex Kost
2016-04-12 13:50 ` Dick Middleton
2016-04-11 18:48 ` myglc2
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.