summaryrefslogtreecommitdiffstats
path: root/guix/jd/desktops
diff options
context:
space:
mode:
Diffstat (limited to 'guix/jd/desktops')
-rw-r--r--guix/jd/desktops/base.scm144
1 files changed, 82 insertions, 62 deletions
diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm
index fb85c56..db95939 100644
--- a/guix/jd/desktops/base.scm
+++ b/guix/jd/desktops/base.scm
@@ -15,14 +15,15 @@
15 #:use-module (nongnu system linux-initrd)) 15 #:use-module (nongnu system linux-initrd))
16 16
17(use-package-modules wm gnome gnupg networking virtualization 17(use-package-modules wm gnome gnupg networking virtualization
18 lisp lisp-xyz) 18 lisp lisp-xyz cups)
19(use-service-modules cups desktop networking ssh xorg
20 docker virtualization pm sound dbus)
21 19
20(use-service-modules cups desktop networking ssh xorg
21 docker virtualization pm sound dbus
22 nix)
22 23
23(define-public %jd-base-home-services 24(define-public %jd-base-home-services
24 (list 25 (list
25 (service home-xdg-mime-applications-service-type 26 (service home-xdg-mime-applications-service-type
26 (home-xdg-mime-applications-configuration 27 (home-xdg-mime-applications-configuration
27 (default '((inode/directory . emacs-desktop.desktop) 28 (default '((inode/directory . emacs-desktop.desktop)
28 (application/pdf . emacs-desktop.desktop))) 29 (application/pdf . emacs-desktop.desktop)))
@@ -40,48 +41,53 @@
40 (latitude 51.919438) 41 (latitude 51.919438)
41 (longitude 19.145136))) ;; Poland 42 (longitude 19.145136))) ;; Poland
42 43
43 (simple-service 'some-useful-env-vars-service 44 (simple-service 'some-useful-env-vars-service
44 home-environment-variables-service-type 45 home-environment-variables-service-type
45 `(("GTK_THEME" . "Adwaita:dark") 46 `(("GTK_THEME" . "Adwaita:dark")
46 ("VISUAL" . "emacsclient") 47 ("VISUAL" . "emacsclient")
47 ("EDITOR" . "emacsclient") 48 ("EDITOR" . "emacsclient")
48 ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH") 49 ("PATH" . "$HOME/.bin:$HOME/.npm-global/bin:$PATH")
49 ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share") 50 ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")
50 ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/"))) 51 ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/")))
51 52
52 (service home-gpg-agent-service-type 53 (service home-gpg-agent-service-type
53 (home-gpg-agent-configuration 54 (home-gpg-agent-configuration
54 (pinentry-program 55 (pinentry-program
55 (file-append pinentry "/bin/pinentry")) 56 (file-append pinentry "/bin/pinentry"))
56 (ssh-support? #t) 57 (ssh-support? #t)
57 (default-cache-ttl 28800) 58 (default-cache-ttl 28800)
58 (max-cache-ttl 28800) 59 (max-cache-ttl 28800)
59 (default-cache-ttl-ssh 28800) 60 (default-cache-ttl-ssh 28800)
60 (max-cache-ttl-ssh 28800))) 61 (max-cache-ttl-ssh 28800)))
61 62
62 (service home-dbus-service-type) 63 (service home-dbus-service-type)
63 64
64 (service home-desktop-service-type) 65 (service home-desktop-service-type)
65 (service home-polkit-gnome-service-type))) 66 (service home-polkit-gnome-service-type)))
67
68
69(define-public %jakub-user
70 (user-account
71 (name "jakub")
72 (comment "Jakub Dlugosz")
73 (group "users")
74 (home-directory "/home/jakub")
75 (supplementary-groups '("wheel" ;; sudo
76 "netdev" ;; network devices
77 "kvm"
78 "libvirt"
79 "tty"
80 "input"
81 "docker"
82 "audio" ;; control audio devices
83 "video" ;; access to webcam
84 "dialout" ;; access to /dev/ttyUSBX devices
85 "adbusers"
86 ))))
66 87
67(define-public %jd-base-user-accounts 88(define-public %jd-base-user-accounts
68 (cons* 89 (cons*
69 (user-account 90 %jakub-user
70 (name "jakub")
71 (comment "Jakub Dlugosz")
72 (group "users")
73 (home-directory "/home/jakub")
74 (supplementary-groups '("wheel" ;; sudo
75 "netdev" ;; network devices
76 "kvm"
77 "libvirt"
78 "tty"
79 "input"
80 "docker"
81 "audio" ;; control audio devices
82 "video" ;; access to webcam
83 "dialout" ;; access to /dev/ttyUSBX devices
84 )))
85 %base-user-accounts)) 91 %base-user-accounts))
86 92
87(define-public %stumpwm-packages 93(define-public %stumpwm-packages
@@ -104,22 +110,24 @@
104 110
105 (list stumpwm "lib"))) 111 (list stumpwm "lib")))
106 112
107(define-public %jd-base-packages 113(define-public %root-packages
108 (append 114 (specifications->packages '("emacs"
109 (specifications->packages '("emacs" 115 "emacs-exwm"
110 "emacs-exwm" 116 "stow"
111 "stow" 117 "bluez"
112 "bluez" 118 "bluez-alsa"
113 "bluez-alsa" 119 "exfat-utils"
114 "exfat-utils" 120 "git"
115 "git" 121 "xf86-input-libinput"
116 "xf86-input-libinput" 122 "intel-vaapi-driver"
117 "intel-vaapi-driver" 123 "libva-utils" ;; vainfo
118 "libva-utils" ;; vainfo 124 "nss-certs"
119 "nss-certs")) 125 "nix")))
120 %stumpwm-packages
121 %base-packages))
122 126
127(define-public %jd-base-packages
128 (append %root-packages
129 %stumpwm-packages
130 %base-packages))
123 131
124(define-public %jd-base-services 132(define-public %jd-base-services
125 (cons* 133 (cons*
@@ -131,9 +139,7 @@
131 139
132 (service network-manager-service-type 140 (service network-manager-service-type
133 (network-manager-configuration 141 (network-manager-configuration
134 (vpn-plugins (list 142 (vpn-plugins (list network-manager-openvpn))))
135 network-manager-pptp
136 network-manager-openvpn))))
137 143
138 (simple-service 'dbus-packages dbus-root-service-type (list blueman 144 (simple-service 'dbus-packages dbus-root-service-type (list blueman
139 virt-manager)) 145 virt-manager))
@@ -149,17 +155,31 @@
149 155
150 (service cups-service-type 156 (service cups-service-type
151 (cups-configuration 157 (cups-configuration
152 (web-interface? #t))) 158 (web-interface? #t)
159 (extensions
160 (list cups-filters))))
153 161
154 (service thermald-service-type) 162 (service thermald-service-type)
155 (service tlp-service-type 163 (service tlp-service-type
156 (tlp-configuration 164 (tlp-configuration
157 (cpu-boost-on-ac? #t) 165 (cpu-boost-on-ac? #t)
158 (wifi-pwr-on-bat? #t))) 166 (wifi-pwr-on-bat? #t)))
167
168 (service nix-service-type)
159 169
160 polkit-network-manager-service 170 polkit-network-manager-service
161 171
172 ;; %desktop-services
162 (modify-services %desktop-services 173 (modify-services %desktop-services
174 (guix-service-type config => (guix-configuration
175 (inherit config)
176 (substitute-urls
177 (append (list "https://substitutes.nonguix.org")
178 %default-substitute-urls))
179 (authorized-keys
180 (append (list (plain-file "non-guix.pub"
181 "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
182 %default-authorized-guix-keys))))
163 (delete network-manager-service-type)))) 183 (delete network-manager-service-type))))
164 184
165;; Odin is a base for my operating systems 185;; Odin is a base for my operating systems