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