Paste number 153266: config.scm

Paste number 153266: config.scm
Pasted by: DusXMT
When:6 years, 3 months ago
Share:Tweet this! | http://paste.lisp.org/+3A9E
Channel:None
Paste contents:
Raw Source | XML | Display As
(use-modules (gnu)
             (guix gexp)                 ;; For G-Expressions.
             (gnu system   linux-initrd) ;; For `expression->initrd'.
             (gnu packages linux-custom) ;; For `linux-libre-custom'.
             (gnu packages linux)        ;; For `e2fsck/static'.
             (gnu packages xfce)         ;; For `xfce'.
             (gnu packages zile)         ;; For the removal of `zile'.
             (gnu packages nano)         ;; For the removal of `nano'.
	     (gnu services networking)   ;; For `static-networking-service'.
	     (gnu services xorg)         ;; For `slim-service'.
             (gnu services ssh)          ;; For `lsh-service'.
             (ice-9 match))              ;; For `match'.

(define (file-system->spec fs)
  "Return a list corresponding to file-system FS that can be passed to the
initrd code."
  (match fs
    (($ <file-system> device title mount-point type flags options _ check?)
     (list device title mount-point type flags options check?))))

(operating-system
  (host-name "QemuGuixSDBox")
  (timezone "Europe/Bratislava")
  (locale "en_US.UTF-8")
  (kernel linux-libre-custom)
  (initrd
    (lambda (file-systems . rest)
      (expression->initrd
         #~(begin
            (use-modules (gnu build linux-boot)
                         (guix build utils)
                         (srfi srfi-26))
            (with-output-to-port (%make-void-port "w")
              (lambda ()
                (set-path-environment-variable "PATH" '("bin" "sbin")
                                               (list #$e2fsck/static))))
            (boot-system #:mounts '#$(map file-system->spec file-systems)))

      #:name "bareboned-initrd"
      #:modules '((guix build utils)
                  (gnu build linux-boot)
                  (gnu build linux-modules)
                  (gnu build file-systems)
                  (guix elf)))))

  (bootloader
    (grub-configuration
      (device "/dev/sda")))

  (file-systems
    (append
      %base-file-systems
      (list
        ;; Root file system.
        (file-system
          (device "Guixotic-root")
          (mount-point "/")
          (type "ext4")
          (needed-for-boot? #t)
          (check? #t)))))
  (swap-devices
    '("/dev/sda2"))
  (users
    (list
      ;; Me!
      (user-account
        (name "dusan")
        (uid 1000)
        (group "users")       ;; I can hear you now.
        (supplementary-groups '("audio"))
        (comment "Dusan Xmetov")
        (home-directory "/home/dusan"))))

  (packages
    (append
      (delete zile
        (delete nano
          %base-packages))))

  (services
    (append
      %base-services
      (list 
        ;; X.                           Doesn't work anymore for some reason :(
;        (slim-service #:allow-empty-passwords? #f #:auto-login? #f
;                      #:startx (xorg-start-command #:drivers '("cirrus" "vesa")
;                                                   #:resolutions
;                                                     '((1024 768) (640 480))))

        ;; Ethernet.
        (static-networking-service "enp0s3"  "10.0.2.15"
                                   #:gateway "10.0.2.2"
                                   #:name-servers '("10.0.2.3"))
        ;; SSH Server.
        (lsh-service #:port-number 22 #:root-login? #f
                     #:allow-empty-passwords? #f)))))

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.