summaryrefslogtreecommitdiff
path: root/system-configuration.scm
blob: 379e0e26e67c0cb20a2a143ea88c0f1baa6749e3 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
(define-module (aisaka-system-configuration)
  #:use-module (gnu)
  #:use-module (gnu packages cups)
  #:use-module (gnu services cups)
  #:use-module (gnu services desktop)
  #:use-module (gnu services networking)
  #:use-module (gnu services ssh)
  #:use-module (gnu services xorg))

(define locale
  "pl_PL.utf8")

(define timezone
  "Europe/Warsaw")

(define keyboard-layout
  (keyboard-layout "pl"))

(define host-name
  "aisaka")

(define marek-name
  "marek")

(define marek-comment
  "Marek Paśnikowski")

(define marek-group
  "users")

(define marek-home
  "/home/marek")

(define marek-groups
  '("wheel"
    "netdev"
    "audio"
    "video"))

(define marek-record
  (user-account (name marek-name)
		(comment marek-comment)
		(group marek-group)
		(home-directory marek-home)
		(supplementary-groups marek-groups)))

(define users
  (cons* marek-record
	 %base-user-accounts))

(define list-to-package-output
  (compose list
	   specification->package+output))

(define system-packages
  '("guile-spec"
    "netcat-openbsd"
    "nss-certs"
    "trezord"
    "trezord-udev-rules"))

(define system-packages'
  (map list-to-package-output
       system-packages))

(define packages
  (append system-packages'
	  %base-packages))

(define cups-extensions
  `(,cups-filters
    ,epson-inkjet-printer-escpr))

(define cups-configuration-pattern
  (cups-configuration (extensions cups-extensions)
		      (web-interface? #t)))

(define cups-service
  (service cups-service-type
	   cups-configuration-pattern))

(define openssh-service
  (service openssh-service-type))

(define gnome-desktop-service
  (service gnome-desktop-service-type))

(define tor-service
  (service tor-service-type))

(define xorg-configuration-record
  (xorg-configuration (keyboard-layout keyboard-layout)))

(define xorg-configuration-service
  (set-xorg-configuration xorg-configuration-record))

(define system-services
  `(,cups-service
    ,openssh-service
    ,gnome-desktop-service
    ,tor-service
    ,xorg-configuration-service))

(define services
  (append system-services
	  %desktop-services))

(define bootloader-targets
  '("/dev/sda"))

(define bootloader-record
  (bootloader-configuration (bootloader grub-bootloader)
			    (targets bootloader-targets)
			    (keyboard-layout keyboard-layout)))

(define swap-devices
  `(,(swap-space (target (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d")))))

(operating-system (locale locale)
		  (timezone timezone)
		  (keyboard-layout keyboard-layout)
		  (host-name host-name)
		  (users users)
		  (packages packages)
		  (services services)
		  (bootloader bootloader-record)
		  (swap-devices swap-devices)
		  (mapped-devices `(,(mapped-device (source (uuid "887ac37f-2919-41a0-a62a-e1ff5ea2d6cc"))
						    (target "aisaka-root")
						    (type luks-device-mapping))))
		  (file-systems (cons* (file-system (mount-point "/")
						    (device "/dev/mapper/aisaka-root")
						    (type "btrfs")
						    (dependencies mapped-devices))
				       (file-system (mount-point "/boot")
						    (device (uuid "4f77b5fc-56ad-43ae-b6ec-e5adc8c48587"
								  'ext4))
						    (type "ext4"))
				       %base-file-systems)))