Paste number 333840: config.scm

Paste number 333840: config.scm
Pasted by: jmi2k
When:4 years, 11 months ago
Share:Tweet this! |
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

(define root-partuuid

(define data-partuuid

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

  (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"))
                         (device "/dev/mapper/root")
                         (title 'device)
                         (mount-point "/")
                         (type "ext4"))

  (users (cons (user-account
                 (name "jmi2k")
                 (comment "System administrator <>")
                 (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"))

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

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.