dotfiles/guix-config/system/base-system.scm

92 lines
3.3 KiB
Scheme

; installed guix: 1761913702
(define-module (guix-config system base-system)
#:use-module (gnu)
#:use-module (gnu services dbus)
#:use-module (gnu packages cups)
#:use-module (gnu packages video)
#:use-module (guix)
#:export (base-system))
(use-service-modules cups desktop networking ssh xorg pm nix)
(define %my-desktop-services
(modify-services %desktop-services
(delete gdm-service-type)
(elogind-service-type config =>
(elogind-configuration
(inherit config)
(suspend-state '("mem"))
(suspend-mode '("s2idle"))))
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls
(append (list "https://guix.kylekrein.com")
%default-substitute-urls))
(authorized-keys
(append (list (local-file "./keys/kylekrein.pub"))
%default-authorized-guix-keys))))))
(define my-polkit-wheel
(file-union
"my-polkit-wheel"
`(("share/polkit-1/rules.d/00-my-wheel.rules"
,(plain-file
"00-my-wheel.rules"
"polkit.addRule(function(action, subject) {
if (subject.isInGroup(\"wheel\")) {
return polkit.Result.YES
}
});
")))))
(define base-system
(operating-system
(locale "ru_RU.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "eu,ru"
#:options '("grp:alt_shift_toggle")))
(host-name "base-system")
(users (cons* (user-account
(name "kylekrein")
(comment "Aleksandr Lebedev")
(group "users")
(home-directory "/home/kylekrein")
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Globally-installed packages.
(packages (cons intel-vaapi-driver %base-packages))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list
;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type)
(service cups-service-type
(cups-configuration
(web-interface? #t)
(extensions
(list cups-filters epson-inkjet-printer-escpr hplip-minimal))))
(service bluetooth-service-type)
(service power-profiles-daemon-service-type)
(service powertop-service-type)
(service thermald-service-type)
(service nix-service-type
(nix-configuration
(extra-config (list "experimental-features = nix-command flakes"))))
(simple-service 'my-polkit-wheel polkit-service-type (list my-polkit-wheel)))
%my-desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/vda"))
(keyboard-layout keyboard-layout)))
(file-systems (cons (file-system
(mount-point "/")
(device "/dev/vda1")
(type "ext4"))
%base-file-systems))))