Skip to content

Commit

Permalink
Actually include SSH server in default configuration.
Browse files Browse the repository at this point in the history
* configure.ac (AC_INIT): Bump version.
* examples/dynamic.scm (services): Add OPENSSH-SERVICE-TYPE.
  • Loading branch information
mbakke committed May 31, 2019
1 parent ef6c540 commit c55e0da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(ganeti-instance-guix, 0.3)
AC_INIT(ganeti-instance-guix, 0.3.1)

AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_SRCDIR(configure)
Expand Down
22 changes: 14 additions & 8 deletions examples/dynamic.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(srfi srfi-60)
(rnrs io ports))
(use-package-modules certs)
(use-service-modules networking)
(use-service-modules networking ssh)

(define (cidr->netmask address)
"Convert a CIDR specification such as 10.0.0.0/24 to 255.255.255.0."
Expand Down Expand Up @@ -35,10 +35,16 @@
(packages (append (list nss-certs)
%base-packages))

(services (cons (static-networking-service
"eth0"
(getenv "NIC_0_IP")
#:netmask (cidr->netmask (getenv "NIC_0_NETWORK_SUBNET"))
#:gateway (getenv "NIC_0_NETWORK_GATEWAY")
#:name-servers (list (getenv "NIC_0_NETWORK_GATEWAY")))
%base-services)))
(services (cons*
(static-networking-service
"eth0"
(getenv "NIC_0_IP")
#:netmask (cidr->netmask (getenv "NIC_0_NETWORK_SUBNET"))
#:gateway (getenv "NIC_0_NETWORK_GATEWAY")
#:name-servers (list (getenv "NIC_0_NETWORK_GATEWAY")))
(service openssh-service-type
(openssh-configuration
(permit-root-login 'without-password)
(authorized-keys
`(("root" ,(local-file "/root/.ssh/authorized_keys"))))))
%base-services)))

0 comments on commit c55e0da

Please sign in to comment.