system-configuration/systems/tachikoma.scm

tachikoma.scm

1
;;; Tyreunom's system administration and configuration tools.
2
;;;
3
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
4
;;;
5
;;; This program is free software: you can redistribute it and/or modify
6
;;; it under the terms of the GNU General Public License as published by
7
;;; the Free Software Foundation, either version 3 of the License, or
8
;;; (at your option) any later version.
9
;;;
10
;;; This program is distributed in the hope that it will be useful,
11
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
;;; GNU General Public License for more details.
14
;;;
15
;;; You should have received a copy of the GNU General Public License
16
;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
(use-modules (gnu))
19
(use-modules (gnu system))
20
(use-modules (gnu bootloader) (gnu bootloader grub))
21
(use-modules (gnu services dns))
22
(use-modules (gnu services web))
23
(use-modules (config os))
24
25
(let ((system (tyreunom-desktop-os "tachikoma")))
26
  (operating-system
27
    (inherit system)
28
    (bootloader
29
      (bootloader-configuration
30
        (target "/dev/sda")
31
        (bootloader grub-bootloader)))
32
    (mapped-devices
33
      (list (mapped-device
34
	      (source (uuid "858ad8c7-beea-4bd7-97f2-097456e18722"))
35
	      (target "my-root")
36
	      (type luks-device-mapping))))
37
    (file-systems (cons (file-system
38
			  (device (file-system-label "my-root"))
39
                          (mount-point "/")
40
                          (type "ext4")
41
			  (dependencies mapped-devices))
42
                        %base-file-systems))
43
    (users (map
44
	     (lambda (user)
45
	       (if (equal? (user-account-name user) "tyreunom")
46
		 (user-account
47
		   (inherit user)
48
		   (supplementary-groups
49
		     (cons "libvirt" (user-account-supplementary-groups user))))
50
		 user))
51
	     (operating-system-users system)))
52
    (services
53
      (cons*
54
	(service libvirt-service-type
55
		 (libvirt-configuration
56
		   (unix-sock-group "libvirt")))
57
	(service virtlog-service-type
58
		 (virtlog-configuration
59
		   (max-clients 1000)))
60
        desktop-services))))
61