diff options
-rw-r--r-- | .config/guix/channels.scm | 19 | ||||
-rw-r--r-- | .config/guix/machines/base-system.scm | 105 | ||||
-rw-r--r-- | .config/guix/machines/base.scm | 27 | ||||
-rw-r--r-- | .config/guix/machines/viking.scm | 29 | ||||
-rw-r--r-- | Guix.org | 191 |
5 files changed, 371 insertions, 0 deletions
diff --git a/.config/guix/channels.scm b/.config/guix/channels.scm new file mode 100644 index 0000000..ab15010 --- /dev/null +++ b/.config/guix/channels.scm | |||
@@ -0,0 +1,19 @@ | |||
1 | (list | ||
2 | (channel | ||
3 | (name 'guix) | ||
4 | (url "https://git.savannah.gnu.org/git/guix.git") | ||
5 | ;; (url "file:///home/daviwil/Projects/Code/guix")) | ||
6 | (introduction | ||
7 | (make-channel-introduction | ||
8 | "9edb3f66fd807b096b48283debdcddccfea34bad" | ||
9 | (openpgp-fingerprint | ||
10 | "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) | ||
11 | (channel | ||
12 | (name 'nonguix) | ||
13 | (url "https://gitlab.com/nonguix/nonguix") | ||
14 | ;; Enable signature verification: | ||
15 | (introduction | ||
16 | (make-channel-introduction | ||
17 | "897c1a470da759236cc11798f4e0a5f7d4d59fbc" | ||
18 | (openpgp-fingerprint | ||
19 | "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) | ||
diff --git a/.config/guix/machines/base-system.scm b/.config/guix/machines/base-system.scm new file mode 100644 index 0000000..a294aca --- /dev/null +++ b/.config/guix/machines/base-system.scm | |||
@@ -0,0 +1,105 @@ | |||
1 | (define-module (base-system) | ||
2 | #:use-module (gnu) | ||
3 | #:use-module (gnu system nss) | ||
4 | #:use-module (gnu services pm) | ||
5 | #:use-module (gnu services desktop) | ||
6 | #:use-module (gnu services docker) | ||
7 | #:use-module (gnu services networking) | ||
8 | #:use-module (gnu services virtualization) | ||
9 | #:use-module (gnu packages wm) | ||
10 | #:use-module (gnu packages vim) | ||
11 | #:use-module (gnu packages gtk) | ||
12 | #:use-module (gnu packages xorg) | ||
13 | #:use-module (gnu packages emacs) | ||
14 | #:use-module (gnu packages file-systems) | ||
15 | #:use-module (gnu packages linux) | ||
16 | #:use-module (gnu packages audio) | ||
17 | #:use-module (gnu packages pulseaudio) | ||
18 | #:use-module (gnu packages web-browsers) | ||
19 | #:use-module (gnu packages version-control) | ||
20 | #:use-module (gnu packages package-management)) | ||
21 | ; #:use-module (nongnu packages linux) | ||
22 | ; #:use-module (nongnu system linux-initrd)) | ||
23 | |||
24 | (use-service-modules ssh) | ||
25 | (use-package-modules certs) | ||
26 | (use-service-modules desktop xorg) | ||
27 | |||
28 | (define-public base-operating-system | ||
29 | (operating-system | ||
30 | (host-name "base") | ||
31 | (timezone "Europe/Warsaw") | ||
32 | (locale "en_US.utf8") | ||
33 | |||
34 | ;; Use non-free Linux and firmware | ||
35 | ;; (kernel linux) | ||
36 | ;; (firmware (list linux-firmware)) | ||
37 | ;; (initrd microcode-initrd) | ||
38 | |||
39 | (bootloader (bootloader-configuration | ||
40 | (bootloader grub-efi-bootloader) | ||
41 | (targets "/boot/efi"))) | ||
42 | ;; (keyboard-layout keyboard-layout))) | ||
43 | |||
44 | ;; Guix doesn't like it when there isn't a file-systems | ||
45 | ;; entry, so add one that is meant to be overridden | ||
46 | (file-systems (cons* | ||
47 | (file-system | ||
48 | (mount-point "/tmp") | ||
49 | (device "none") | ||
50 | (type "tmpfs") | ||
51 | (check? #f)) | ||
52 | %base-file-systems)) | ||
53 | |||
54 | ;; Users | ||
55 | (users (cons (user-account | ||
56 | (name "jakub") | ||
57 | (comment "Jakub Dlugosz") | ||
58 | (group "users") | ||
59 | (home-directory "/home/jakub") | ||
60 | (supplementary-groups '( | ||
61 | "wheel" | ||
62 | "netdev" | ||
63 | "kvm" | ||
64 | "tty" | ||
65 | "input" | ||
66 | "docker" | ||
67 | "lp" | ||
68 | "audio" | ||
69 | "video"))) | ||
70 | %base-user-accounts)) | ||
71 | |||
72 | |||
73 | ;; Packages | ||
74 | (packages (append (list | ||
75 | git | ||
76 | exfat-utils | ||
77 | fuse-exfat | ||
78 | stow | ||
79 | vim | ||
80 | emacs | ||
81 | bluez | ||
82 | bluez-alsa | ||
83 | pulseaudio | ||
84 | tlp | ||
85 | xf86-input-libinput | ||
86 | nss-certs) ;; For https connection | ||
87 | %base-packages)) | ||
88 | |||
89 | |||
90 | ;; Services | ||
91 | (services | ||
92 | (append | ||
93 | (list | ||
94 | (service elogind-service-type) | ||
95 | (service openssh-service-type) | ||
96 | (service network-manager-service-type) | ||
97 | (service slim-service-type) | ||
98 | (service tlp-service-type) | ||
99 | (bluetooth-service #:auto-enable? #t) | ||
100 | (service docker-service-type) | ||
101 | (service wpa-supplicant-service-type)) | ||
102 | %base-services)) | ||
103 | |||
104 | ;; Allow resolution of '.local' host names with mDNS | ||
105 | (name-service-switch %mdns-host-lookup-nss))) | ||
diff --git a/.config/guix/machines/base.scm b/.config/guix/machines/base.scm new file mode 100644 index 0000000..20c49f4 --- /dev/null +++ b/.config/guix/machines/base.scm | |||
@@ -0,0 +1,27 @@ | |||
1 | (define-module (base) | ||
2 | #:use-module (gnu) | ||
3 | #:use-module (gnu system nss) | ||
4 | #:use-module (gnu services pm) | ||
5 | #:use-module (gnu services desktop) | ||
6 | #:use-module (gnu services docker) | ||
7 | #:use-module (gnu services networking) | ||
8 | #:use-module (gnu services virtualization) | ||
9 | #:use-module (gnu packages wm) | ||
10 | #:use-module (gnu packages vim) | ||
11 | #:use-module (gnu packages gtk) | ||
12 | #:use-module (gnu packages xorg) | ||
13 | #:use-module (gnu packages emacs) | ||
14 | #:use-module (gnu packages file-systems) | ||
15 | #:use-module (gnu packages linux) | ||
16 | #:use-module (gnu packages audio) | ||
17 | #:use-module (gnu packages pulseaudio) | ||
18 | #:use-module (gnu packages web-browsers) | ||
19 | #:use-module (gnu packages version-control) | ||
20 | #:use-module (gnu packages package-management) | ||
21 | #:use-module (nongnu packages linux) | ||
22 | #:use-module (nongnu system linux-initrd)) | ||
23 | |||
24 | |||
25 | (use-service-modules desktop xorg) | ||
26 | (use-package-modules certs) | ||
27 | (use-package-modules shells) | ||
diff --git a/.config/guix/machines/viking.scm b/.config/guix/machines/viking.scm new file mode 100644 index 0000000..0e1d4a9 --- /dev/null +++ b/.config/guix/machines/viking.scm | |||
@@ -0,0 +1,29 @@ | |||
1 | (define-module (viking) | ||
2 | #:use-module (base-system) | ||
3 | #:use-module (gnu)) | ||
4 | (use-modules (base-system)) | ||
5 | (operating-system | ||
6 | (inherit base-operating-system) | ||
7 | (host-name "viking") | ||
8 | |||
9 | (keyboard-layout (keyboard-layout "pl")) | ||
10 | |||
11 | (bootloader | ||
12 | (bootloader-configuration | ||
13 | (bootloader grub-bootloader) | ||
14 | (target "/dev/sda"))) | ||
15 | |||
16 | (mapped-devices | ||
17 | (list (mapped-device | ||
18 | (source | ||
19 | (uuid "75a1ebd7-13c2-442f-80ff-1b5e59522e29")) | ||
20 | (target "cryptroot") | ||
21 | (type luks-device-mapping)))) | ||
22 | |||
23 | (file-systems | ||
24 | (cons* (file-system | ||
25 | (mount-point "/") | ||
26 | (device "/dev/mapper/cryptroot") | ||
27 | (type "ext4") | ||
28 | (dependencies mapped-devices)) | ||
29 | %base-file-systems))) | ||
diff --git a/Guix.org b/Guix.org new file mode 100644 index 0000000..738fb98 --- /dev/null +++ b/Guix.org | |||
@@ -0,0 +1,191 @@ | |||
1 | #+TITLE: Guix Configuration file | ||
2 | |||
3 | * Channels | ||
4 | #+begin_src scheme :tangle .config/guix/channels.scm | ||
5 | (list | ||
6 | (channel | ||
7 | (name 'guix) | ||
8 | (url "https://git.savannah.gnu.org/git/guix.git") | ||
9 | ;; (url "file:///home/daviwil/Projects/Code/guix")) | ||
10 | (introduction | ||
11 | (make-channel-introduction | ||
12 | "9edb3f66fd807b096b48283debdcddccfea34bad" | ||
13 | (openpgp-fingerprint | ||
14 | "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) | ||
15 | (channel | ||
16 | (name 'nonguix) | ||
17 | (url "https://gitlab.com/nonguix/nonguix") | ||
18 | ;; Enable signature verification: | ||
19 | (introduction | ||
20 | (make-channel-introduction | ||
21 | "897c1a470da759236cc11798f4e0a5f7d4d59fbc" | ||
22 | (openpgp-fingerprint | ||
23 | "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) | ||
24 | #+end_src | ||
25 | |||
26 | * Machines | ||
27 | ** Base | ||
28 | |||
29 | #+begin_src scheme :tangle .config/guix/machines/base-system.scm | ||
30 | |||
31 | (define-module (base-system) | ||
32 | #:use-module (gnu) | ||
33 | #:use-module (gnu system nss) | ||
34 | #:use-module (gnu services pm) | ||
35 | #:use-module (gnu services desktop) | ||
36 | #:use-module (gnu services docker) | ||
37 | #:use-module (gnu services networking) | ||
38 | #:use-module (gnu services virtualization) | ||
39 | #:use-module (gnu packages wm) | ||
40 | #:use-module (gnu packages vim) | ||
41 | #:use-module (gnu packages gtk) | ||
42 | #:use-module (gnu packages xorg) | ||
43 | #:use-module (gnu packages emacs) | ||
44 | #:use-module (gnu packages file-systems) | ||
45 | #:use-module (gnu packages linux) | ||
46 | #:use-module (gnu packages audio) | ||
47 | #:use-module (gnu packages pulseaudio) | ||
48 | #:use-module (gnu packages web-browsers) | ||
49 | #:use-module (gnu packages version-control) | ||
50 | #:use-module (gnu packages package-management)) | ||
51 | ; #:use-module (nongnu packages linux) | ||
52 | ; #:use-module (nongnu system linux-initrd)) | ||
53 | |||
54 | (use-service-modules ssh) | ||
55 | (use-package-modules certs) | ||
56 | (use-service-modules desktop xorg) | ||
57 | #+end_src | ||
58 | |||
59 | *Packages* | ||
60 | #+begin_src scheme :noweb-ref packages :noweb yes | ||
61 | |||
62 | ;; Packages | ||
63 | (packages (append (list | ||
64 | git | ||
65 | exfat-utils | ||
66 | fuse-exfat | ||
67 | stow | ||
68 | vim | ||
69 | emacs | ||
70 | bluez | ||
71 | bluez-alsa | ||
72 | pulseaudio | ||
73 | tlp | ||
74 | xf86-input-libinput | ||
75 | nss-certs) ;; For https connection | ||
76 | %base-packages)) | ||
77 | |||
78 | #+end_src | ||
79 | |||
80 | *Services* | ||
81 | #+begin_src scheme :noweb-ref services :noweb yes | ||
82 | |||
83 | ;; Services | ||
84 | (services | ||
85 | (append | ||
86 | (list | ||
87 | (service elogind-service-type) | ||
88 | (service openssh-service-type) | ||
89 | (service network-manager-service-type) | ||
90 | (service slim-service-type) | ||
91 | (service tlp-service-type) | ||
92 | (bluetooth-service #:auto-enable? #t) | ||
93 | (service docker-service-type) | ||
94 | (service wpa-supplicant-service-type)) | ||
95 | %base-services)) | ||
96 | |||
97 | #+end_src | ||
98 | |||
99 | *Users Accounts* | ||
100 | #+begin_src scheme :noweb-ref users :noweb yes | ||
101 | |||
102 | ;; Users | ||
103 | (users (cons (user-account | ||
104 | (name "jakub") | ||
105 | (comment "Jakub Dlugosz") | ||
106 | (group "users") | ||
107 | (home-directory "/home/jakub") | ||
108 | (supplementary-groups '( | ||
109 | "wheel" | ||
110 | "netdev" | ||
111 | "kvm" | ||
112 | "tty" | ||
113 | "input" | ||
114 | "docker" | ||
115 | "lp" | ||
116 | "audio" | ||
117 | "video"))) | ||
118 | %base-user-accounts)) | ||
119 | |||
120 | #+end_src | ||
121 | |||
122 | *Base operating system* | ||
123 | #+begin_src scheme :tangle .config/guix/machines/base-system.scm :noweb yes | ||
124 | |||
125 | (define-public base-operating-system | ||
126 | (operating-system | ||
127 | (host-name "base") | ||
128 | (timezone "Europe/Warsaw") | ||
129 | (locale "en_US.utf8") | ||
130 | |||
131 | ;; Use non-free Linux and firmware | ||
132 | ;; (kernel linux) | ||
133 | ;; (firmware (list linux-firmware)) | ||
134 | ;; (initrd microcode-initrd) | ||
135 | |||
136 | (bootloader (bootloader-configuration | ||
137 | (bootloader grub-efi-bootloader) | ||
138 | (targets "/boot/efi"))) | ||
139 | ;; (keyboard-layout keyboard-layout))) | ||
140 | |||
141 | ;; Guix doesn't like it when there isn't a file-systems | ||
142 | ;; entry, so add one that is meant to be overridden | ||
143 | (file-systems (cons* | ||
144 | (file-system | ||
145 | (mount-point "/tmp") | ||
146 | (device "none") | ||
147 | (type "tmpfs") | ||
148 | (check? #f)) | ||
149 | %base-file-systems)) | ||
150 | <<users>> | ||
151 | <<packages>> | ||
152 | <<services>> | ||
153 | ;; Allow resolution of '.local' host names with mDNS | ||
154 | (name-service-switch %mdns-host-lookup-nss))) | ||
155 | |||
156 | #+end_src | ||
157 | |||
158 | |||
159 | ** Viking | ||
160 | |||
161 | #+begin_src scheme :tangle .config/guix/machines/viking.scm | ||
162 | (define-module (viking) | ||
163 | #:use-module (base-system) | ||
164 | #:use-module (gnu)) | ||
165 | (use-modules (base-system)) | ||
166 | (operating-system | ||
167 | (inherit base-operating-system) | ||
168 | (host-name "viking") | ||
169 | |||
170 | (keyboard-layout (keyboard-layout "pl")) | ||
171 | |||
172 | (bootloader | ||
173 | (bootloader-configuration | ||
174 | (bootloader grub-bootloader) | ||
175 | (target "/dev/sda"))) | ||
176 | |||
177 | (mapped-devices | ||
178 | (list (mapped-device | ||
179 | (source | ||
180 | (uuid "75a1ebd7-13c2-442f-80ff-1b5e59522e29")) | ||
181 | (target "cryptroot") | ||
182 | (type luks-device-mapping)))) | ||
183 | |||
184 | (file-systems | ||
185 | (cons* (file-system | ||
186 | (mount-point "/") | ||
187 | (device "/dev/mapper/cryptroot") | ||
188 | (type "ext4") | ||
189 | (dependencies mapped-devices)) | ||
190 | %base-file-systems))) | ||
191 | #+end_src | ||