Paste number 333840: config.scm

Paste number 333840: config.scm
Pasted by: jmi2k
When:3 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+75LC
Channel:None
Paste contents:
Raw Source | XML | Display As
(use-modules (gnu))
(use-modules (ice-9 popen))
(use-modules (ice-9 rdelim))
(use-service-modules networking ssh)
(use-package-modules admin)

(define root-luksuuid
  "8ba4fa5b-a7eb-4c09-ae11-f91b7eb54dd8")

(define root-partuuid
  "5953317d-c01f-45a6-8daf-34cd6281abb3")

(define data-partuuid
  "b3da6cbf-2d03-4372-8f25-3548e18c5a06")

(define (partuuid str)
  (string-append "/dev/disk/by-partuuid/" str))

(define disk-path
  (let* ((command (string-append "lsblk -no pkname " (partuuid root-partuuid)))
         (port (open-input-pipe command))
         (str (read-line port)))
    (close-pipe port)
    (string-append "/dev/" str)))

(operating-system
  (host-name "tardis")
  (timezone "Europe/Madrid")
  (locale "en_US.UTF-8")

  (bootloader (grub-configuration (device disk-path)))
  (mapped-devices (list (mapped-device
                          (source (uuid root-luksuuid))
                          (target "root")
                          (type luks-device-mapping))))
  (file-systems (cons* (file-system
                         (device (partuuid data-partuuid))
                         (title 'device)
                         (mount-point "/data")
                         (type "ext4"))
                       (file-system
                         (device "/dev/mapper/root")
                         (title 'device)
                         (mount-point "/")
                         (type "ext4"))
                       %base-file-systems))

  (users (cons (user-account
                 (name "jmi2k")
                 (comment "System administrator <jmi2k@openmailbox.org>")
                 (group "users")

                 ;; Adding the account to the "wheel" group
                 ;; makes it a sudoer.  Adding it to "audio"
                 ;; and "video" allows the user to play sound
                 ;; and access the webcam.
                 (supplementary-groups '("wheel"
                                         "audio" "video"))
                 (home-directory "/home/jmi2k"))
               %base-user-accounts))

  ;; Globally-installed packages.
  (packages (cons tcpdump %base-packages))

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 2222)
                   %base-services)))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.