blob: 010490f8f8d9dc4f4a87e124ec1dfd33f7cc4ca0 (
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
(use-modules (gnu)
(guix transformations)
(gnu home)
(guix gexp)
(nongnu packages linux)
(nongnu system linux-initrd)
(gnu home services shells))
(use-service-modules guix cups desktop networking ssh xorg docker nix admin vnc lightdm syncthing virtualization databases linux web backup telephony file-sharing)
(use-package-modules gnome xdisorg vnc databases)
(load "/home/w96k/projects/dotfiles/guix/.dotfiles/home-configuration.scm")
(define wkz-transform
;; The package transformation procedure.
(options->transformation
'((tune . "skylake"))))
(operating-system
(locale "en_US.utf8")
(timezone "Asia/Tbilisi")
(kernel linux)
(kernel-arguments '("video=HDMI-A-1:1920x1080@240"))
(initrd microcode-initrd)
(firmware (list linux-firmware))
(keyboard-layout (keyboard-layout "us,ru"
#:options '("grp:shifts_toggle" "ctrl:nocaps")))
(host-name "wkz-guix")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "w96k")
(comment "W96K")
(group "users")
(home-directory "/home/w96k")
(supplementary-groups '("wheel" "netdev" "audio" "video" "kvm")))
%base-user-accounts))
;; (packages %base-packages)
(packages
(append
(map
specification->package
'(
"font-gnu-freefont" "font-gnu-unifont"
))
%base-packages))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list
(service guix-home-service-type `(("w96k" ,wkz-home)))
(service block-facebook-hosts-service-type)
(service zram-device-service-type
(zram-device-configuration
(compression-algorithm 'zlib)
(priority 100)))
(service tor-service-type
(tor-configuration
(config-file (plain-file "tor-config"
"HTTPTunnelPort 127.0.0.1:9250"))))
(service openssh-service-type)
(service transmission-daemon-service-type)
;; (service containerd-service-type)
;; (service docker-service-type)
;; (service restic-backup-service-type)
;; (service hurd-vm-service-type
;; (hurd-vm-configuration
;; (disk-size (* 5000 (expt 2 20))) ;5G
;; (memory-size 1024)))
;; (service nix-service-type)
;; (service xvnc-service-type (xvnc-configuration
;; (display-number 10)
;; (localhost? #f)
;; (geometry "1280x800")))
;; (service syncthing-service-type
;; (syncthing-configuration
;; (user "w96k")))
;; (service postgresql-service-type
;; (postgresql-configuration
;; (postgresql postgresql-15)))
(service dhcp-client-service-type)
(service httpd-service-type
(httpd-configuration
(config
(httpd-config-file
(modules (cons*
(httpd-module
(name "proxy_module")
(file "modules/mod_proxy.so"))
(httpd-module
(name "proxy_fcgi_module")
(file "modules/mod_proxy_fcgi.so"))
%default-httpd-modules))
(extra-config (list "\
<FilesMatch \\.php$>
SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
</FilesMatch>"))))))
(service php-fpm-service-type
(php-fpm-configuration
(socket "/var/run/php-fpm.sock")
(socket-group "httpd")))
;; (service screen-locker-service-type
;; (screen-locker-configuration
;; (name "xlock")
;; (program (file-append xlockmore "/bin/xlock"))))
)
(modify-services %desktop-services
(delete screen-locker-service-type)
(delete modem-manager-service-type)
;; (delete udisks-service-type)
(delete upower-service-type)
(delete network-manager-service-type)
(delete wpa-supplicant-service-type)
;; (delete usb-modeswitch-service-type)
(delete geoclue-service-type)
;;(delete elogind-service-type)
(delete colord-service-type)
(delete ntp-service-type)
(guix-service-type config => (guix-configuration
(inherit config)
;; Rely on btrfs compression.
(log-compression 'none)
(extra-options '("--max-jobs=10"))
(substitute-urls
(list
"https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion"
"https://substitutes.nonguix.org"))
(http-proxy "http://localhost:9250")
(authorized-keys
(append (list (plain-file "non-guix.pub"
"
(public-key
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
)
"))
%default-authorized-guix-keys))))
(delete gdm-service-type))))
(mapped-devices (list (mapped-device
(source (uuid
"03db8d78-051b-4a11-a7e5-b62ae0f530d4"))
(target "cryptroot")
(type luks-device-mapping))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "btrfs")
(options "compress=zlib:9,autodefrag")
(dependencies mapped-devices))
(file-system
(mount-point "/home/w96k/")
(device "/dev/mapper/cryptroot")
(type "btrfs")
(options "compress=zlib:7,autodefrag,subvol=/home/w96k/")
(dependencies mapped-devices))
(file-system
(mount-point "/home/w96k/Snapshots/")
(device "/dev/mapper/cryptroot")
(type "btrfs")
(options "compress=zlib:9,autodefrag,subvol=/home/w96k/Snapshots")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "6ECD-551F"
'fat32))
(type "vfat")) %base-file-systems))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout))))
|