summaryrefslogtreecommitdiff
path: root/desktop.scm
blob: bcd12bc40004523e8d28b95c0ae75b278879f819 (plain)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
;; This is an operating system configuration generated
;; by the graphical installer.
(use-modules (gnu)
             (qemu) ; TODO we need this but ugh => hope we could remove it
             (srfi srfi-1)
             ((gnu packages linux) #:prefix gnu-linux:)
             (gnu packages admin)
             (gnu packages certs)
             (gnu packages ssh)
             (gnu packages vim)
             (gnu packages wm)
             (gnu packages wget)
             (gnu packages xdisorg)
             (gnu packages xorg)
             (gnu packages video)
             (gnu services virtualization)
             (gnu services pm)
             (tuxedo-keyboard)
             (nongnu packages linux)
             (nongnu system linux-initrd))

(use-service-modules desktop networking ssh xorg)

(operating-system
  (kernel linux)
  (kernel-loadable-modules `(,tuxedo-keyboard))
  (initrd microcode-initrd)
  (firmware (list linux-firmware))
  (locale "en_US.utf8")
  (timezone "Europe/Madrid")
  (keyboard-layout
    (keyboard-layout "es"))
  (bootloader
    (bootloader-configuration
      (bootloader grub-efi-bootloader)
      (targets (list "/boot/efi"))
      (keyboard-layout keyboard-layout)))
  (swap-devices
    (list (swap-space (target "/dev/sda3"))))
  (file-systems
    (cons* (file-system
             (mount-point "/boot/efi")
             (device (uuid "6BB8-3AFE" 'fat32))
             (type "vfat"))
           (file-system
             (mount-point "/")
             (device
               (uuid "eee511d3-b473-4bc0-ba63-bf3971341576"
                     'ext4))
             (type "ext4"))
           (file-system
             (mount-point "/home")
             (device
               (uuid "49ebc09e-6021-4730-a467-b8818c2128f1"
                     'ext4))
             (type "ext4"))
           %base-file-systems))

  (host-name "tuxedo")

  (users (cons* (user-account
                  (name "Ekaitz")
                  (comment "Ekaitz")
                  (group "users")
                  (home-directory "/home/Ekaitz")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video" "lp" "dialout" "kvm")))
                %base-user-accounts))
  (packages
    (cons*
      htop
      gnu-linux:light
      i3-wm
      neovim
      nss-certs
      tree
      wget
      tcpdump
      openssh
      thermald
      intel-vaapi-driver
      xf86-input-wacom
      gnu-linux:ntfs-3g
      %base-packages))

  (services (cons* (udev-rules-service 'light gnu-linux:light)
                   (service gnome-desktop-service-type)
                   (service thermald-service-type)
                   (simple-service 'adwaita-dark-theme session-environment-service-type
                                   '(("GTK_THEME" . "Adwaita:dark")))
                   (service bluetooth-service-type
                            (bluetooth-configuration (auto-enable? #t)))
                   (set-xorg-configuration
                     (xorg-configuration
                       (keyboard-layout keyboard-layout)
                       (modules (append %default-xorg-modules
                                        (list xf86-input-wacom)))
                       (extra-config
                         '("\n"
                           "\n"
                           "Section \"InputClass\"\n"
                           "  Identifier \"libinput touchpad catchall\"\n"
                           "  Driver \"libinput\"\n"
                           "  MatchIsTouchpad \"on\"\n"
                           "  MatchDevicePath \"/dev/input/event*\"\n"
                           "  Option \"Tapping\" \"on\"\n"
                           "  Option \"TappingDrag\" \"on\"\n"
                           "  Option \"DisableWhileTyping\" \"on\"\n"
                           "EndSection\n"
                           "\n"
                           "Section \"InputClass\""
                           "  Identifier \"keyboard defaults\""
                           "  MatchIsKeyboard \"on\""
                           "  Option \"XkbLayout\" \"es,us,ru\""
                           "  Option \"XkbOptions\" \"grp:alt_space_toggle\""
                           "EndSection\n"
                           "\n"
                           ; https://wiki.archlinux.org/title/Libinput#Via_xinput
                           "Section \"InputClass\"\n"
                           "  Identifier \"USB Mouse Pad USB Mouse Pad Mouse\"\n"
                           "  Driver \"libinput\"\n"
                           "  MatchDevicePath \"/dev/input/event*\"\n"
                           "  MatchUSBID \"062a:8255\"\n"
                           "  Option \"Middle Emulation\" \"on\"\n"
                           "  Option \"AccelSpeed\"  \"-0.9\""
                           "EndSection\n"
                           "\n"
                           "\n"
                           "Section \"Device\"\n"
                           "  Identifier \"modesetting\"\n"
                           "  Driver \"modesetting\"\n"
                           "  Option \"TearFree\" \"True\"\n"
                           "EndSection"
                           "\n"
                           ))))
                   (service qemu-binfmt-service-type
                     (qemu-binfmt-configuration
                       (platforms (lookup-qemu-platforms "riscv64" "aarch64"))
                       (qemu qemu)))
                   ; Removes ModemManager because it interferes with USB
                   ; development. If using a 3/4G modem or something we have
                   ; to activate it.
                   (remove (lambda (x) (eqv? (service-type-name
                                               (service-kind x))
                                             'modem-manager))

                     ; Configure nonguix substitutes
                     (modify-services %desktop-services
                       (guix-service-type config =>
                         (guix-configuration
                           (inherit config)
                           (substitute-urls
                             (append (list "https://substitutes.nonguix.org")
                                     %default-substitute-urls))
                           (authorized-keys
                             (append (list (local-file "./non-guix-signing-key.pub"))
                                     %default-authorized-guix-keys)))))))))