summaryrefslogtreecommitdiff
path: root/systems/ayase/system-configuration.scm
blob: c88c2e2900cdb4cb0511aadb4bbe5964b1b7b051 (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
(define-module (systems ayase system-configuration)
  #:use-module (gnu)
  #:use-module (gnu services cups)
  #:use-module (gnu services networking)
  #:use-module (gnu services ssh)
  #:use-module (gnu services xorg)
  #:use-module (services distribution))

;; DATA

(define bootloader-targets
  (list "/boot/efi"))

(define package-specifications
  (list "emacs"
	"emacs-exwm"
	"emacs-desktop-environment"))

(define root-mount-point
  "/")

(define root-filesystem
  "ext4")

(define root-uuid
  "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c")

(define swap-uuid
  "cc6bbf7c-e42a-4ac3-a9ae-3b14d3b4b841")

;; ABSTRACTION 2

(define efi-partition
  (file-system (mount-point "/boot/efi")
               (device (uuid "B4FB-CBD9" 'fat32))
               (type "vfat")))

(define marek-account
  (user-account (name "marek")
                (comment "Marek Paśnikowski")
                (group "users")
                (home-directory "/home/marek")
                (supplementary-groups (list "wheel"
                                            "netdev"
                                            "audio"
                                            "video"))))

(define root-partition
  (file-system (mount-point root-mount-point)
               (device (uuid root-uuid 'ext4))
               (type root-filesystem)))

;; ABSTRACTION 1

(define ayase-file-systems
  (list root-partition
        efi-partition))

(define ayase-user-accounts
  (list marek-account))

(define main-swap
  (swap-space (target (uuid swap-uuid))))

(define system-packages
  (map specification->package
       package-specifications))

(define system-services
  (list (service openssh-service-type)
        (service tor-service-type)
        (service cups-service-type)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

(define file-systems
  (append %base-file-systems
          ;; %distribution-file-systems
          ayase-file-systems))

(define packages
  (append %base-packages
          ;; %distribution-packages
          system-packages))

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

(define swap-devices
  (list main-swap))

(define users
  (append %base-user-accounts
          ayase-user-accounts))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(operating-system (bootloader bootloader)
                  (keyboard-layout keyboard-layout)
                  (host-name "ayase")
                  (file-systems file-systems)
                  (swap-devices swap-devices)
                  (users users)
                  (packages packages)
                  (timezone "Europe/Warsaw")
                  (locale "pl_PL.utf8")
                  (services services))