1 | (use-modules (gnu)
|
---|
2 | (guix transformations)
|
---|
3 | (gnu home)
|
---|
4 | (guix gexp)
|
---|
5 | (nongnu packages linux)
|
---|
6 | (nongnu system linux-initrd)
|
---|
7 | (gnu home services shells))
|
---|
8 |
|
---|
9 | (use-service-modules guix cups desktop networking ssh xorg docker nix admin vnc lightdm syncthing virtualization databases linux web backup telephony file-sharing)
|
---|
10 | (use-package-modules gnome xdisorg vnc databases)
|
---|
11 |
|
---|
12 | (load "/home/w96k/projects/dotfiles/guix/.dotfiles/home-configuration.scm")
|
---|
13 |
|
---|
14 | (define wkz-transform
|
---|
15 | ;; The package transformation procedure.
|
---|
16 | (options->transformation
|
---|
17 | '((tune . "skylake"))))
|
---|
18 |
|
---|
19 | (operating-system
|
---|
20 | (locale "en_US.utf8")
|
---|
21 | (timezone "Asia/Tbilisi")
|
---|
22 | (kernel linux)
|
---|
23 | (kernel-arguments '("video=HDMI-A-1:1920x1080@240"))
|
---|
24 | (initrd microcode-initrd)
|
---|
25 | (firmware (list linux-firmware))
|
---|
26 | (keyboard-layout (keyboard-layout "us,ru"
|
---|
27 | #:options '("grp:shifts_toggle" "ctrl:nocaps")))
|
---|
28 | (host-name "wkz-guix")
|
---|
29 |
|
---|
30 | ;; The list of user accounts ('root' is implicit).
|
---|
31 | (users (cons* (user-account
|
---|
32 | (name "w96k")
|
---|
33 | (comment "W96K")
|
---|
34 | (group "users")
|
---|
35 | (home-directory "/home/w96k")
|
---|
36 | (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm")))
|
---|
37 | %base-user-accounts))
|
---|
38 |
|
---|
39 | ;; (packages %base-packages)
|
---|
40 | (packages
|
---|
41 | (append
|
---|
42 | (map
|
---|
43 | specification->package
|
---|
44 | '(
|
---|
45 | "font-gnu-freefont" "font-gnu-unifont"
|
---|
46 | ))
|
---|
47 | %base-packages))
|
---|
48 |
|
---|
49 | ;; Below is the list of system services. To search for available
|
---|
50 | ;; services, run 'guix system search KEYWORD' in a terminal.
|
---|
51 | (services
|
---|
52 | (append (list
|
---|
53 | (service guix-home-service-type `(("w96k" ,wkz-home)))
|
---|
54 | (service block-facebook-hosts-service-type)
|
---|
55 |
|
---|
56 | (service zram-device-service-type
|
---|
57 | (zram-device-configuration
|
---|
58 | (compression-algorithm 'zlib)
|
---|
59 | (priority 100)))
|
---|
60 |
|
---|
61 | (service tor-service-type
|
---|
62 | (tor-configuration
|
---|
63 | (config-file (plain-file "tor-config"
|
---|
64 | "HTTPTunnelPort 127.0.0.1:9250"))))
|
---|
65 | (service openssh-service-type)
|
---|
66 |
|
---|
67 | (service transmission-daemon-service-type)
|
---|
68 |
|
---|
69 | ;; (service containerd-service-type)
|
---|
70 | ;; (service docker-service-type)
|
---|
71 | ;; (service restic-backup-service-type)
|
---|
72 |
|
---|
73 | ;; (service hurd-vm-service-type
|
---|
74 | ;; (hurd-vm-configuration
|
---|
75 | ;; (disk-size (* 5000 (expt 2 20))) ;5G
|
---|
76 | ;; (memory-size 1024)))
|
---|
77 |
|
---|
78 | ;; (service nix-service-type)
|
---|
79 |
|
---|
80 | ;; (service xvnc-service-type (xvnc-configuration
|
---|
81 | ;; (display-number 10)
|
---|
82 | ;; (localhost? #f)
|
---|
83 | ;; (geometry "1280x800")))
|
---|
84 |
|
---|
85 | ;; (service syncthing-service-type
|
---|
86 | ;; (syncthing-configuration
|
---|
87 | ;; (user "w96k")))
|
---|
88 |
|
---|
89 | ;; (service postgresql-service-type
|
---|
90 | ;; (postgresql-configuration
|
---|
91 | ;; (postgresql postgresql-15)))
|
---|
92 |
|
---|
93 | (service dhcp-client-service-type)
|
---|
94 |
|
---|
95 | (service httpd-service-type
|
---|
96 | (httpd-configuration
|
---|
97 | (config
|
---|
98 | (httpd-config-file
|
---|
99 | (modules (cons*
|
---|
100 | (httpd-module
|
---|
101 | (name "proxy_module")
|
---|
102 | (file "modules/mod_proxy.so"))
|
---|
103 | (httpd-module
|
---|
104 | (name "proxy_fcgi_module")
|
---|
105 | (file "modules/mod_proxy_fcgi.so"))
|
---|
106 | %default-httpd-modules))
|
---|
107 | (extra-config (list "\
|
---|
108 | <FilesMatch \\.php$>
|
---|
109 | SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
|
---|
110 | </FilesMatch>"))))))
|
---|
111 | (service php-fpm-service-type
|
---|
112 | (php-fpm-configuration
|
---|
113 | (socket "/var/run/php-fpm.sock")
|
---|
114 | (socket-group "httpd")))
|
---|
115 |
|
---|
116 | ;; (service screen-locker-service-type
|
---|
117 | ;; (screen-locker-configuration
|
---|
118 | ;; (name "xlock")
|
---|
119 | ;; (program (file-append xlockmore "/bin/xlock"))))
|
---|
120 | )
|
---|
121 |
|
---|
122 | (modify-services %desktop-services
|
---|
123 | (delete screen-locker-service-type)
|
---|
124 | (delete modem-manager-service-type)
|
---|
125 | ;; (delete udisks-service-type)
|
---|
126 | (delete upower-service-type)
|
---|
127 | (delete network-manager-service-type)
|
---|
128 | (delete wpa-supplicant-service-type)
|
---|
129 | ;; (delete usb-modeswitch-service-type)
|
---|
130 | (delete geoclue-service-type)
|
---|
131 | ;;(delete elogind-service-type)
|
---|
132 | (delete colord-service-type)
|
---|
133 | (delete ntp-service-type)
|
---|
134 |
|
---|
135 |
|
---|
136 | (guix-service-type config => (guix-configuration
|
---|
137 | (inherit config)
|
---|
138 | ;; Rely on btrfs compression.
|
---|
139 | (log-compression 'none)
|
---|
140 | (extra-options '("--max-jobs=10"))
|
---|
141 | (substitute-urls
|
---|
142 | (list
|
---|
143 | "https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion"
|
---|
144 | "https://substitutes.nonguix.org"))
|
---|
145 | (http-proxy "http://localhost:9250")
|
---|
146 | (authorized-keys
|
---|
147 | (append (list (plain-file "non-guix.pub"
|
---|
148 | "
|
---|
149 | (public-key
|
---|
150 | (ecc
|
---|
151 | (curve Ed25519)
|
---|
152 | (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
|
---|
153 | )
|
---|
154 | )
|
---|
155 | "))
|
---|
156 | %default-authorized-guix-keys))))
|
---|
157 |
|
---|
158 | (delete gdm-service-type))))
|
---|
159 |
|
---|
160 | (mapped-devices (list (mapped-device
|
---|
161 | (source (uuid
|
---|
162 | "03db8d78-051b-4a11-a7e5-b62ae0f530d4"))
|
---|
163 | (target "cryptroot")
|
---|
164 | (type luks-device-mapping))))
|
---|
165 |
|
---|
166 | ;; The list of file systems that get "mounted". The unique
|
---|
167 | ;; file system identifiers there ("UUIDs") can be obtained
|
---|
168 | ;; by running 'blkid' in a terminal.
|
---|
169 | (file-systems (cons* (file-system
|
---|
170 | (mount-point "/")
|
---|
171 | (device "/dev/mapper/cryptroot")
|
---|
172 | (type "btrfs")
|
---|
173 | (options "compress=zlib:9,autodefrag")
|
---|
174 | (dependencies mapped-devices))
|
---|
175 | (file-system
|
---|
176 | (mount-point "/home/w96k/")
|
---|
177 | (device "/dev/mapper/cryptroot")
|
---|
178 | (type "btrfs")
|
---|
179 | (options "compress=zlib:7,autodefrag,subvol=/home/w96k/")
|
---|
180 | (dependencies mapped-devices))
|
---|
181 | (file-system
|
---|
182 | (mount-point "/home/w96k/Snapshots/")
|
---|
183 | (device "/dev/mapper/cryptroot")
|
---|
184 | (type "btrfs")
|
---|
185 | (options "compress=zlib:9,autodefrag,subvol=/home/w96k/Snapshots")
|
---|
186 | (dependencies mapped-devices))
|
---|
187 | (file-system
|
---|
188 | (mount-point "/boot/efi")
|
---|
189 | (device (uuid "6ECD-551F"
|
---|
190 | 'fat32))
|
---|
191 | (type "vfat")) %base-file-systems))
|
---|
192 |
|
---|
193 | (bootloader (bootloader-configuration
|
---|
194 | (bootloader grub-efi-bootloader)
|
---|
195 | (targets (list "/boot/efi"))
|
---|
196 | (keyboard-layout keyboard-layout))))
|
---|