From 30d5eb8334a5ef7bf49e521e86446282d41af99d Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Fri, 20 Jul 2018 14:48:22 +0200 Subject: [PATCH] guix-config: Add CUPS, remove deprecated file-system 'title --- .guix-config/config.scm | 60 ++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/.guix-config/config.scm b/.guix-config/config.scm index fce1e5f4..af2f4154 100644 --- a/.guix-config/config.scm +++ b/.guix-config/config.scm @@ -11,8 +11,16 @@ (guix git-download) (gnu services xorg) (gnu services networking) + (gnu services cups) (gnu packages admin) (gnu packages xorg) + (guix build-system gnu) + (gnu packages pkg-config) + (gnu packages libusb) + (gnu packages gnupg) + (gnu packages cups) + (gnu packages emacs) + (gnu packages version-control) ((guix licenses) #:prefix license:) (guix packages) (srfi srfi-1)) @@ -84,6 +92,25 @@ "ACTION==\"add\", SUBSYSTEM==\"backlight\", " "RUN+=\"/run/current-system/profile/bin/chmod g+w /sys/class/backlight/%k/brightness\""))) +;; Mount Nitrokey +;; TODO: Check if plugdev works instead of users. If not, report to Nitrokey. +;; https://www.nitrokey.com/sites/default/files/41-nitrokey.rules +;; (define %nitrokey-udev-rule +;; (udev-rule +;; "41-nitrokey.rules" +;; (string-append "ACTION==\"add\", SUBSYSTEM==\"usb\", " +;; "ATTR{idVendor}==\"20a0\", ATTR{idProduct}==\"4211\", " +;; "ENV{ID_SMARTCARD_READER}=\"1\", ENV{ID_SMARTCARD_READER_DRIVER}=\"gnupg\", GROUP+=\"users\", MODE=\"0666\""))) +;; (define %nitrokey-udev-rule +;; (file->udev-rule +;; "41-nitrokey.rules" +;; (let ((version "20170910")) +;; (origin +;; (method url-fetch) +;; (uri "https://www.nitrokey.com/sites/default/files/41-nitrokey.rules") +;; (sha256 +;; (base32 "127nghkfd4dl5mkf5xl1mij2ylxhkgg08nlh912xwrrjyjv4y9sa")))))) + (define my-xorg-modules ;; Everything but Nouveau. (delete xf86-video-nouveau %default-xorg-modules)) @@ -97,7 +124,8 @@ (udev-configuration (inherit config) (rules (append (udev-configuration-rules config) - (list %backlight-udev-rule))))) + (list ;; %nitrokey-udev-rule + %backlight-udev-rule))))) (slim-service-type config => (slim-configuration (inherit config) @@ -113,11 +141,14 @@ ;; Use the UEFI variant of GRUB with the EFI System ;; Partition mounted on /boot/efi. - ;; If generating an image to a USB stick, use -bios- instead. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (timeout 1) (target "/boot/efi"))) + ;; If generating an image to a USB stick, use -bios- instead. + ;; (bootloader (bootloader-configuration + ;; (bootloader grub-bootloader) + ;; (target "/dev/sda"))) (kernel linux-nonfree) ;; (kernel-arguments '("modprobe.blacklist=pcspkr")) @@ -131,32 +162,33 @@ ;; Assume the target root file system is labelled "guixsd", ;; and the EFI System Partition is specified by its UUID. (file-systems (cons* (file-system - (device "guixsd") - (title 'label) ; TODO: Deprecated? - (mount-point "/") + (device (file-system-label "guixsd")) + (mount-point "/") (type "ext4")) (file-system - (device "home") - (title 'label) - (mount-point "/home") + (device (file-system-label "home")) + (mount-point "/home") (type "ext4")) (file-system (device (uuid "8AC2-4252" 'fat)) - (title 'uuid) (mount-point "/boot/efi") (type "vfat")) (file-system (mount-point "/tmp") (device "none") - (title 'device) (type "tmpfs") (check? #f)) %base-file-systems)) + ;; (groups (cons* (user-group + ;; (name "plugdev") + ;; (system? #t)) + ;; %base-groups)) (users (cons* (user-account (name "ambrevar") (group "users") (supplementary-groups '("wheel" "netdev" ; netdev is needed for networking. + ;; "plugdev" ; nitrokey? ;; "audio" "lp" ; for bluetooth "video")) @@ -165,6 +197,9 @@ (packages (cons* nss-certs ;for HTTPS access ntfs-3g + ;; emacs + ;; git + ;; gnupg %base-packages)) (services (cons* @@ -181,6 +216,11 @@ ;; ;; >> echo 'auto' > '/sys/bus/pci/devices/0000:02:00.0/power/control'; ;; ) (bluetooth-service) + (service cups-service-type + (cups-configuration + (web-interface? #t) + (extensions + (list cups-filters foomatic escpr hplip)))) %my-services)) ;; Allow resolution of '.local' host names with mDNS.