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 virtualization)) |
| 22 | (use-modules (config os)) |
| 23 | |
| 24 | (let ((system (tyreunom-desktop-os "tachikoma"))) |
| 25 | (operating-system |
| 26 | (inherit system) |
| 27 | (bootloader |
| 28 | (bootloader-configuration |
| 29 | (target "/dev/sda") |
| 30 | (bootloader grub-bootloader))) |
| 31 | (mapped-devices |
| 32 | (list (mapped-device |
| 33 | (source (uuid "c61efb54-dd82-4f94-ba30-344ed71d0783")) |
| 34 | (target "cryptroot") |
| 35 | (type luks-device-mapping)))) |
| 36 | (file-systems (cons (file-system |
| 37 | (device "/dev/mapper/cryptroot") |
| 38 | (mount-point "/") |
| 39 | (type "ext4") |
| 40 | (dependencies mapped-devices)) |
| 41 | %base-file-systems)) |
| 42 | (users (map |
| 43 | (lambda (user) |
| 44 | (if (equal? (user-account-name user) "tyreunom") |
| 45 | (user-account |
| 46 | (inherit user) |
| 47 | (supplementary-groups |
| 48 | (cons "libvirt" (user-account-supplementary-groups user)))) |
| 49 | user)) |
| 50 | (operating-system-users system))) |
| 51 | (services |
| 52 | (cons* |
| 53 | (service libvirt-service-type |
| 54 | (libvirt-configuration |
| 55 | (unix-sock-group "libvirt"))) |
| 56 | (service virtlog-service-type |
| 57 | (virtlog-configuration |
| 58 | (max-clients 1000))) |
| 59 | desktop-services)))) |
| 60 |