97 lines
3.8 KiB
Scheme
97 lines
3.8 KiB
Scheme
(define-module (oms systems)
|
|
#:use-module (gnu)
|
|
#:use-module (gnu packages cups)
|
|
#:use-module (gnu services base)
|
|
#:use-module (gnu services cups)
|
|
#:use-module (gnu services desktop)
|
|
#:use-module (gnu services guix)
|
|
#:use-module (gnu services ssh)
|
|
#:use-module (gnu services xorg)
|
|
#:use-module (guix gexp)
|
|
#:use-module (nongnu packages linux)
|
|
#:use-module (nongnu system linux-initrd)
|
|
#:use-module (oms channel-file)
|
|
#:export (base-operating-system))
|
|
|
|
(define* (base-operating-system host-name #:key (firmware (list linux-firmware)))
|
|
(operating-system
|
|
(kernel linux)
|
|
(kernel-arguments
|
|
(append '("resume=oms-guix-swap") %default-kernel-arguments))
|
|
(initrd microcode-initrd)
|
|
(firmware firmware)
|
|
(locale "fi_FI.utf8")
|
|
(timezone "Europe/Helsinki")
|
|
(keyboard-layout (keyboard-layout "fi"))
|
|
(host-name host-name)
|
|
(users (cons* (user-account
|
|
(name "oms")
|
|
(comment "Olarinmäen samoojat")
|
|
(group "users")
|
|
(home-directory "/home/oms")
|
|
(supplementary-groups '("wheel" "netdev" "audio" "video")))
|
|
%base-user-accounts))
|
|
(services
|
|
(append
|
|
(list (service gnome-desktop-service-type)
|
|
(service openssh-service-type
|
|
(openssh-configuration
|
|
(permit-root-login 'prohibit-password)
|
|
(authorized-keys
|
|
`(("root" ,(channel-file "keys/ssh/saku-laesvuori-x-kone.pub"))))))
|
|
(service guix-publish-service-type
|
|
(guix-publish-configuration
|
|
(port 8001)
|
|
(host "0.0.0.0")
|
|
(advertise? #t)))
|
|
(service cups-service-type
|
|
(cups-configuration
|
|
(web-interface? #t)
|
|
(extensions (list cups-filters epson-inkjet-printer-escpr))))
|
|
(set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))))
|
|
(modify-services %desktop-services
|
|
(guix-service-type config =>
|
|
(guix-configuration
|
|
(inherit config)
|
|
(discover? #t)
|
|
(substitute-urls
|
|
(append %default-substitute-urls ; more often used servers first
|
|
(list "https://substitutes.nonguix.org")))
|
|
(authorized-keys
|
|
(append (list (channel-file "keys/guix/nonguix.pub")
|
|
(channel-file "keys/guix/saku-laesvuori-x-kone.pub"))
|
|
%default-authorized-guix-keys))))
|
|
(gdm-service-type config =>
|
|
(gdm-configuration
|
|
(inherit config)
|
|
(auto-login? #t)
|
|
(default-user "oms"))))))
|
|
(bootloader (bootloader-configuration
|
|
(bootloader grub-efi-bootloader)
|
|
(targets (list "/boot/efi"))
|
|
(keyboard-layout keyboard-layout)))
|
|
(swap-devices
|
|
(list (swap-space
|
|
(target (file-system-label "oms-guix-swap"))
|
|
(discard? #t))))
|
|
(file-systems
|
|
(append (list (file-system
|
|
(mount-point "/")
|
|
(device (file-system-label "oms-btrfs-root"))
|
|
(flags '(no-atime))
|
|
(options "compress-force=zstd")
|
|
(type "btrfs"))
|
|
(file-system
|
|
(mount-point "/boot/efi")
|
|
(device (file-system-label "OMS-F32-EFI"))
|
|
(type "vfat"))
|
|
(file-system
|
|
(mount-point "/tmp")
|
|
(device "tmpfs")
|
|
(type "tmpfs")
|
|
(check? #f)
|
|
(flags '(no-dev no-suid))
|
|
(options "size=70%")
|
|
(create-mount-point? #t)))
|
|
%base-file-systems))))
|