From 55edbf585bba878eabd779d3e275c99ce1babd4b Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sun, 2 Oct 2022 13:24:25 +0200 Subject: Init guix config files --- Guix.org | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 Guix.org (limited to 'Guix.org') diff --git a/Guix.org b/Guix.org new file mode 100644 index 0000000..738fb98 --- /dev/null +++ b/Guix.org @@ -0,0 +1,191 @@ +#+TITLE: Guix Configuration file + +* Channels +#+begin_src scheme :tangle .config/guix/channels.scm + (list + (channel + (name 'guix) + (url "https://git.savannah.gnu.org/git/guix.git") + ;; (url "file:///home/daviwil/Projects/Code/guix")) + (introduction + (make-channel-introduction + "9edb3f66fd807b096b48283debdcddccfea34bad" + (openpgp-fingerprint + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) + (channel + (name 'nonguix) + (url "https://gitlab.com/nonguix/nonguix") + ;; Enable signature verification: + (introduction + (make-channel-introduction + "897c1a470da759236cc11798f4e0a5f7d4d59fbc" + (openpgp-fingerprint + "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) +#+end_src + +* Machines +** Base + +#+begin_src scheme :tangle .config/guix/machines/base-system.scm + + (define-module (base-system) + #:use-module (gnu) + #:use-module (gnu system nss) + #:use-module (gnu services pm) + #:use-module (gnu services desktop) + #:use-module (gnu services docker) + #:use-module (gnu services networking) + #:use-module (gnu services virtualization) + #:use-module (gnu packages wm) + #:use-module (gnu packages vim) + #:use-module (gnu packages gtk) + #:use-module (gnu packages xorg) + #:use-module (gnu packages emacs) + #:use-module (gnu packages file-systems) + #:use-module (gnu packages linux) + #:use-module (gnu packages audio) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages web-browsers) + #:use-module (gnu packages version-control) + #:use-module (gnu packages package-management)) + ; #:use-module (nongnu packages linux) + ; #:use-module (nongnu system linux-initrd)) + + (use-service-modules ssh) + (use-package-modules certs) + (use-service-modules desktop xorg) +#+end_src + +*Packages* + #+begin_src scheme :noweb-ref packages :noweb yes + + ;; Packages + (packages (append (list + git + exfat-utils + fuse-exfat + stow + vim + emacs + bluez + bluez-alsa + pulseaudio + tlp + xf86-input-libinput + nss-certs) ;; For https connection + %base-packages)) + + #+end_src + + *Services* + #+begin_src scheme :noweb-ref services :noweb yes + + ;; Services + (services + (append + (list + (service elogind-service-type) + (service openssh-service-type) + (service network-manager-service-type) + (service slim-service-type) + (service tlp-service-type) + (bluetooth-service #:auto-enable? #t) + (service docker-service-type) + (service wpa-supplicant-service-type)) + %base-services)) + + #+end_src + + *Users Accounts* + #+begin_src scheme :noweb-ref users :noweb yes + + ;; Users + (users (cons (user-account + (name "jakub") + (comment "Jakub Dlugosz") + (group "users") + (home-directory "/home/jakub") + (supplementary-groups '( + "wheel" + "netdev" + "kvm" + "tty" + "input" + "docker" + "lp" + "audio" + "video"))) + %base-user-accounts)) + +#+end_src + +*Base operating system* +#+begin_src scheme :tangle .config/guix/machines/base-system.scm :noweb yes + + (define-public base-operating-system + (operating-system + (host-name "base") + (timezone "Europe/Warsaw") + (locale "en_US.utf8") + + ;; Use non-free Linux and firmware + ;; (kernel linux) + ;; (firmware (list linux-firmware)) + ;; (initrd microcode-initrd) + + (bootloader (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets "/boot/efi"))) + ;; (keyboard-layout keyboard-layout))) + + ;; Guix doesn't like it when there isn't a file-systems + ;; entry, so add one that is meant to be overridden + (file-systems (cons* + (file-system + (mount-point "/tmp") + (device "none") + (type "tmpfs") + (check? #f)) + %base-file-systems)) + <> + <> + <> + ;; Allow resolution of '.local' host names with mDNS + (name-service-switch %mdns-host-lookup-nss))) + +#+end_src + + +** Viking + +#+begin_src scheme :tangle .config/guix/machines/viking.scm + (define-module (viking) + #:use-module (base-system) + #:use-module (gnu)) + (use-modules (base-system)) + (operating-system + (inherit base-operating-system) + (host-name "viking") + + (keyboard-layout (keyboard-layout "pl")) + + (bootloader + (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sda"))) + + (mapped-devices + (list (mapped-device + (source + (uuid "75a1ebd7-13c2-442f-80ff-1b5e59522e29")) + (target "cryptroot") + (type luks-device-mapping)))) + + (file-systems + (cons* (file-system + (mount-point "/") + (device "/dev/mapper/cryptroot") + (type "ext4") + (dependencies mapped-devices)) + %base-file-systems))) +#+end_src -- cgit v1.2.3