sybil.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 networking)) |
| 22 | (use-modules (gnu services virtualization)) |
| 23 | (use-modules (config os)) |
| 24 | |
| 25 | (let ((system (tyreunom-desktop-os "sybil"))) |
| 26 | (operating-system |
| 27 | (inherit system) |
| 28 | (keyboard-layout (keyboard-layout "fr" "bepo")) |
| 29 | (bootloader |
| 30 | (bootloader-configuration |
| 31 | (target "/boot/efi") |
| 32 | (bootloader grub-efi-bootloader) |
| 33 | (keyboard-layout keyboard-layout))) |
| 34 | (mapped-devices |
| 35 | (list (mapped-device |
| 36 | (source |
| 37 | (uuid "7f0ef292-5d1f-4cde-8a59-074178c6903d")) |
| 38 | (target "cryptroot") |
| 39 | (type luks-device-mapping)))) |
| 40 | (file-systems |
| 41 | (cons* (file-system |
| 42 | (mount-point "/boot/efi") |
| 43 | (device (uuid "C62C-8291" 'fat32)) |
| 44 | (type "vfat")) |
| 45 | (file-system |
| 46 | (mount-point "/") |
| 47 | (device "/dev/mapper/cryptroot") |
| 48 | (type "ext4") |
| 49 | (dependencies mapped-devices)) |
| 50 | %base-file-systems)) |
| 51 | (users (map |
| 52 | (lambda (user) |
| 53 | (if (equal? (user-account-name user) "tyreunom") |
| 54 | (user-account |
| 55 | (inherit user) |
| 56 | (supplementary-groups |
| 57 | (cons* "libvirt" "kvm" |
| 58 | (user-account-supplementary-groups user)))) |
| 59 | user)) |
| 60 | (operating-system-users system))) |
| 61 | (services |
| 62 | (cons* |
| 63 | (service libvirt-service-type |
| 64 | (libvirt-configuration |
| 65 | (unix-sock-group "libvirt"))) |
| 66 | (service virtlog-service-type |
| 67 | (virtlog-configuration |
| 68 | (max-clients 1000))) |
| 69 | desktop-services)))) |
| 70 |