diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-02 13:24:25 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-02 13:24:25 +0200 |
commit | 55edbf585bba878eabd779d3e275c99ce1babd4b (patch) | |
tree | 02cc23c76da97177c8e49f08da39c5e4c20b9772 /Guix.org | |
parent | f343690367dc97bde5abdb86767ea63e306d9bb6 (diff) | |
download | dotfiles-55edbf585bba878eabd779d3e275c99ce1babd4b.tar.gz dotfiles-55edbf585bba878eabd779d3e275c99ce1babd4b.zip |
Init guix config files
Diffstat (limited to 'Guix.org')
-rw-r--r-- | Guix.org | 191 |
1 files changed, 191 insertions, 0 deletions
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 | ||