# system.scm -rw-r--r-- 3.6 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
(use-modules
  (gnu)
  (gnu packages libusb)
  (gnu packages wm)
  (gnu services desktop)
  (gnu services dbus)
  (gnu services networking)
  (gnu services pm)
  (gnu services sound)
  (gnu services ssh)
  (gnu services virtualization)
  (gnu system setuid)
  (guix channels)
  (srfi srfi-1))

(define %conf-dir
  (dirname (current-filename)))

(define* (path-join #:rest args)
  (string-join args "/"))

(define (config-file file)
  (local-file (path-join %conf-dir file)))

(operating-system
  (kernel-arguments (cons* ;; iwlwifi/pcspkr/btusb: needs proprietary drivers
                           ;; nouveau: doesn't seem to work on my laptop; i get
                           ;; `nouveau: sec2 ctor failed (-30)` at boot
                           "modprobe.blacklist=iwlwifi,pcspkr,nouveau,bluetooth,btusb,btrtl,btbcm,btintel"
                           "console=tty2" ; remove annoying logs
                           "quiet"        ; remove annoying logs
			   "spectre_v2=eibrs,retpoline" ; mitigate spectre v2 eBPF vulnerability
                           "nmi_watchdog=0" ; save power by reducing interrupts
                           %default-kernel-arguments))
  (locale "en_GB.utf8")
  (timezone "Europe/London")
  (keyboard-layout (keyboard-layout "gb" "dvorak"))
  (host-name "guix-aspire")
  (hosts-file (config-file "hosts"))
  (users (cons* (user-account
                  (name "paren")
                  (comment "Parenthesis")
                  (group "users")
                  (home-directory "/home/paren")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
    (cons*
     swaylock-effects
     (specification->package "nss-certs")
      %base-packages))
  (setuid-programs (cons* (setuid-program 
                           (program (file-append swaylock-effects "/bin/swaylock")))
                          %setuid-programs))
  (services
   (cons* (service alsa-service-type)
          (dbus-service)
          fontconfig-file-system-service 
          (simple-service 'mtp udev-service-type
                          (list libmtp))
          (service ntp-service-type) 
          (service pulseaudio-service-type)
          (service seatd-service-type)
          (service upower-service-type
            (upower-configuration
             (use-percentage-for-policy? #t)
             (percentage-low 12)
             (percentage-critical 8)
             (percentage-action 5)
             (critical-power-action 'power-off)))
          (service wpa-supplicant-service-type)
          (service thermald-service-type)
          (service tlp-service-type)
          (service qemu-binfmt-service-type
                   (qemu-binfmt-configuration
                     (platforms (lookup-qemu-platforms "aarch64" "riscv64"))))
          %base-services))
  (bootloader
    (bootloader-configuration
      (bootloader grub-efi-bootloader)
      (targets (list "/boot/efi"))
      (keyboard-layout keyboard-layout)))
  (swap-devices (list 
    (swap-space (target (uuid "9e5a4ef1-6d5d-48b7-bbff-d26ec59dbc0b")))))
  (file-systems
    (cons* (file-system
             (mount-point "/boot/efi")
             (device (uuid "B602-2AF2" 'fat32))
             (type "vfat"))
           (file-system
             (mount-point "/")
             (device
               (uuid "debe78a2-1db2-40d2-a122-99a095ef67da"
                     'ext4))
             (type "ext4"))
           (file-system
             (mount-point "/home")
             (device
               (uuid "f92f48ef-6ebe-4a53-936a-803a1f62f7cc"
                     'ext4))
             (type "ext4"))
           %base-file-systems)))