2021-10-06 19:01:32 +02:00
|
|
|
|
(define-module (hosts kirsty system)
|
|
|
|
|
#:use-module (gnu)
|
|
|
|
|
#:use-module (gnu packages bash)
|
|
|
|
|
#:use-module (gnu packages certs)
|
|
|
|
|
#:use-module (gnu packages linux)
|
|
|
|
|
#:use-module (gnu packages ncurses)
|
|
|
|
|
#:use-module (gnu packages rsync)
|
2022-06-22 21:03:54 +02:00
|
|
|
|
#:use-module (gnu packages wm)
|
2021-10-06 19:01:32 +02:00
|
|
|
|
#:use-module (gnu services desktop)
|
|
|
|
|
#:use-module (gnu services networking)
|
|
|
|
|
#:use-module (gnu services security-token)
|
|
|
|
|
#:use-module (gnu services sound)
|
|
|
|
|
#:use-module (gnu services virtualization)
|
|
|
|
|
#:use-module (gnu system locale)
|
|
|
|
|
#:use-module (gnu system setuid)
|
|
|
|
|
#:use-module (nongnu packages linux)
|
2022-12-27 13:23:14 +01:00
|
|
|
|
#:use-module (nongnu system linux-initrd))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
|
2022-08-12 12:16:47 +02:00
|
|
|
|
(define host-dir (dirname (module-filename (current-module))))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
|
|
|
|
|
(operating-system
|
2022-08-12 12:16:47 +02:00
|
|
|
|
(host-name "kirsty")
|
2021-10-06 19:01:32 +02:00
|
|
|
|
(timezone "Europe/Ljubljana")
|
|
|
|
|
|
|
|
|
|
(locale-definitions
|
|
|
|
|
(cons*
|
|
|
|
|
(locale-definition (name "sl_SI.utf8") (source "sl_SI"))
|
|
|
|
|
%default-locale-definitions))
|
|
|
|
|
(locale "en_US.utf8")
|
|
|
|
|
|
2022-12-27 13:23:14 +01:00
|
|
|
|
(kernel (customize-linux #:linux linux #:defconfig (local-file (string-append host-dir "/kernel.config"))))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
(kernel-arguments '("mitigations=auto"))
|
|
|
|
|
|
|
|
|
|
(firmware
|
|
|
|
|
(cons* intel-microcode linux-firmware wireless-regdb %base-firmware))
|
|
|
|
|
|
|
|
|
|
(initrd microcode-initrd)
|
|
|
|
|
(initrd-modules '("dm-crypt"))
|
|
|
|
|
|
|
|
|
|
(bootloader
|
|
|
|
|
(bootloader-configuration
|
|
|
|
|
(bootloader grub-bootloader)
|
|
|
|
|
(targets '("/dev/nvme0n1"))))
|
|
|
|
|
|
|
|
|
|
(mapped-devices
|
|
|
|
|
(list
|
|
|
|
|
(mapped-device
|
2022-06-22 21:04:56 +02:00
|
|
|
|
(source (uuid "c725b7b7-b4d9-49e0-8c2c-3624b3cde7e3"))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
(target "root")
|
|
|
|
|
(type luks-device-mapping))))
|
|
|
|
|
|
|
|
|
|
(file-systems
|
|
|
|
|
(cons*
|
|
|
|
|
(file-system
|
|
|
|
|
(device "/dev/mapper/root")
|
|
|
|
|
(mount-point "/")
|
|
|
|
|
(type "ext4"))
|
|
|
|
|
%base-file-systems))
|
|
|
|
|
|
2022-06-22 21:04:56 +02:00
|
|
|
|
(swap-devices (list (swap-space (target "/swap"))))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
|
|
|
|
|
(users
|
|
|
|
|
(cons*
|
|
|
|
|
(user-account
|
|
|
|
|
(name "timotej")
|
|
|
|
|
(comment "Timotej Lazar")
|
|
|
|
|
(group "users")
|
2022-06-22 21:03:54 +02:00
|
|
|
|
(supplementary-groups '("cdrom" "kvm" "netdev" "wheel"))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
(home-directory "/home/timotej"))
|
|
|
|
|
%base-user-accounts))
|
|
|
|
|
|
|
|
|
|
(packages
|
2022-06-22 21:03:54 +02:00
|
|
|
|
(cons* ncurses nss-certs rsync %base-packages))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
|
|
|
|
|
(setuid-programs
|
|
|
|
|
(cons*
|
|
|
|
|
(setuid-program
|
2022-06-22 21:03:54 +02:00
|
|
|
|
(program (file-append swaylock "/bin/swaylock")))
|
2021-10-06 19:01:32 +02:00
|
|
|
|
%setuid-programs))
|
|
|
|
|
|
|
|
|
|
(services
|
|
|
|
|
(cons*
|
|
|
|
|
(extra-special-file "/usr/bin/env" (file-append coreutils "/bin/env"))
|
|
|
|
|
(extra-special-file "/bin/bash" (file-append bash "/bin/bash"))
|
|
|
|
|
|
|
|
|
|
;; Networking.
|
|
|
|
|
(service network-manager-service-type)
|
|
|
|
|
(service wpa-supplicant-service-type)
|
|
|
|
|
(service modem-manager-service-type)
|
|
|
|
|
(service usb-modeswitch-service-type)
|
|
|
|
|
(service openntpd-service-type
|
|
|
|
|
(openntpd-configuration (servers '("pool.ntp.org"))))
|
|
|
|
|
(service tor-service-type)
|
|
|
|
|
|
|
|
|
|
;; Desktop.
|
|
|
|
|
(elogind-service)
|
|
|
|
|
(udisks-service)
|
|
|
|
|
(service upower-service-type)
|
|
|
|
|
(service alsa-service-type)
|
|
|
|
|
(service pcscd-service-type)
|
|
|
|
|
|
|
|
|
|
(service qemu-binfmt-service-type
|
|
|
|
|
(qemu-binfmt-configuration
|
|
|
|
|
(platforms (lookup-qemu-platforms "arm" "aarch64" "mips64el" "x86"))))
|
|
|
|
|
|
|
|
|
|
(modify-services %base-services
|
|
|
|
|
;; Don’t use up all CPU (and RAM) when compiling.
|
|
|
|
|
(guix-service-type config =>
|
|
|
|
|
(guix-configuration
|
|
|
|
|
(inherit config)
|
|
|
|
|
(extra-options '("--cores=2"))))))))
|