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 linux)) |
23 | (use-modules (gnu services sound)) |
24 | (use-modules (gnu services virtualization)) |
25 | (use-modules (config os)) |
26 | |
27 | (let ((system (tyreunom-desktop-os "tachikoma"))) |
28 | (operating-system |
29 | (inherit system) |
30 | (bootloader |
31 | (bootloader-configuration |
32 | (target "/dev/sda") |
33 | (bootloader grub-bootloader))) |
34 | (mapped-devices |
35 | (list (mapped-device |
36 | (source (uuid "c61efb54-dd82-4f94-ba30-344ed71d0783")) |
37 | (target "cryptroot") |
38 | (type luks-device-mapping)))) |
39 | (file-systems (cons (file-system |
40 | (device "/dev/mapper/cryptroot") |
41 | (mount-point "/") |
42 | (type "ext4") |
43 | (dependencies mapped-devices)) |
44 | %base-file-systems)) |
45 | (users (map |
46 | (lambda (user) |
47 | (if (equal? (user-account-name user) "tyreunom") |
48 | (user-account |
49 | (inherit user) |
50 | (supplementary-groups |
51 | (cons "libvirt" (user-account-supplementary-groups user)))) |
52 | user)) |
53 | (operating-system-users system))) |
54 | (services |
55 | (cons* |
56 | (service zram-device-service-type |
57 | (zram-device-configuration |
58 | (size "2G") |
59 | (compression-algorithm 'zstd))) |
60 | (service libvirt-service-type |
61 | (libvirt-configuration |
62 | (unix-sock-group "libvirt"))) |
63 | (service virtlog-service-type |
64 | (virtlog-configuration |
65 | (max-clients 1000))) |
66 | (service dnsmasq-service-type |
67 | (dnsmasq-configuration |
68 | (no-resolv? #t) |
69 | (servers '("80.67.169.12" |
70 | "80.67.169.40" |
71 | "2001:910:800::12" |
72 | "2001:910:800::40")))) |
73 | (modify-services desktop-services |
74 | (guix-service-type config => |
75 | (guix-configuration |
76 | (inherit config) |
77 | (authorized-keys |
78 | (cons* |
79 | (local-file "../keys/ene.pub") |
80 | (local-file "../keys/xana.pub") |
81 | (local-file "../keys/cs-pc.pub") |
82 | %default-authorized-guix-keys)))) |
83 | (pulseaudio-service-type config => |
84 | (pulseaudio-configuration |
85 | (inherit config) |
86 | (script-file |
87 | (local-file "../files/pulse-default.pa"))))))))) |
88 |