;; This is an operating system configuration template ;; for a "desktop" setup without full-blown desktop ;; environments. ;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. ;(use-modules (gnu)) (use-modules (gnu) (gnu system nss)) (use-service-modules ssh) (use-service-modules base desktop xorg) (use-package-modules certs linux suckless wm) ;(use-package-modules admin) (define cyborg-quirk "Section \"InputClass\" Identifier \"Saitek Cyborg R.A.T.5 Mouse\" MatchIsPointer \"on\" MatchProduct \"Saitek Cyborg R.A.T.5 Mouse\" MatchVendor \"Saitek|SAITEK\" MatchDevicePath \"/dev/input/event*\" Option \"ButtonMapping\" \"1 2 3 4 5 6 7 2 9 4 5 12 0 0 0\" Option \"ZAxisMapping\" \"10 11\" # Option \"AutoReleaseButtons\" \"12 13 14 15\" EndSection ") (define xneo "Section \"InputClass\" Identifier \"keyboard-all\" Option \"XkbLayout\" \"neo\" MatchIsKeyboard \"on\" EndSection ") (define %my-xorg-conf (xorg-configuration-file #:extra-config (list cyborg-quirk xneo))) (define %my-startx (xorg-start-command #:configuration-file %my-xorg-conf)) (define %my-services ;; My very own list of services. (modify-services %desktop-services (guix-service-type config => (guix-configuration (inherit config) (extra-options '("-M4")) (substitute-urls (cons* "https://berlin.guixsd.org" "https://hydra.gnu.org" (guix-configuration-substitute-urls config))))) (openssh-service-type config => (openssh-configuration (inherit config) (x11-forwarding? (openssh-configuration-x11-forwarding? config)))) (slim-service-type config => (slim-configuration (inherit config) (startx %my-startx) (default-user "mcd"))))) (operating-system (host-name "komputilo") (timezone "Europe/Berlin") (locale "de_DE.UTF-8") (hosts-file (plain-file "hosts" "127.0.0.1 localhost komputilo ::1 localhost komputilo 192.168.178.20 pi.fritz.box pi")) ;; Assuming /dev/sdX is the target hard disk, and "my-root" is ;; the label of the target root file system. (bootloader (bootloader-configuration (bootloader (bootloader (inherit grub-bootloader) (installer #~(const #t)))))) ; (bootloader (bootloader-configuration (bootloader grub-bootloader) ; (target "/dev/sda3") ;(menu-entries '((menu-entry ; (label "Grub Nixos") ; (multiboot "(hd0)") ; still unsupported ; ))) ; )) (file-systems (cons (file-system (device (file-system-label "guix-root")) (mount-point "/") (type "ext4")) %base-file-systems)) ;; This is where user accounts are specified. The "root" ;; account is implicit, and is initially created with the ;; empty password. (users (cons (user-account (name "mcd") (comment "Martin Castillo") (group "users") ;; Adding the account to the "wheel" group ;; makes it a sudoer. Adding it to "audio" ;; and "video" allows the user to play sound ;; and access the webcam. (supplementary-groups '("wheel" ; "plugdev" ? für mtp? ist aber undefiniert "audio" "video" "netdev")) ;workmanager")) (home-directory "/home/mcd")) %base-user-accounts)) ;; Globally-installed packages. ;(packages (cons tcpdump %base-packages)) ;; Add a bunch of window managers; we can choose one at ;; the log-in screen with F1. (packages (cons* dmenu ;window managers nss-certs ;for HTTPS access kbd-neo %base-packages)) ;; Add services to the baseline: a DHCP client and ;; an SSH server. (services (cons* ;(dhcp-client-service) ; (gpm-service) ;mouse in vt (console-keymap-service (file-append kbd-neo "/share/keymaps/neo.map"));; (service openssh-service-type (openssh-configuration (x11-forwarding? #t) (accepted-environment '("COLORTERM" "Foo")) (port-number 22))) (simple-service 'store-my-config etc-service-type `(("config.scm" ,(local-file (assoc-ref (current-source-location) 'filename))))) (xfce-desktop-service) %my-services)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with Wicd, and more. ;(services %desktop-services) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))