diff options
Diffstat (limited to 'etc/guix/system.scm')
-rw-r--r-- | etc/guix/system.scm | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/etc/guix/system.scm b/etc/guix/system.scm new file mode 100644 index 0000000..fddadca --- /dev/null +++ b/etc/guix/system.scm @@ -0,0 +1,209 @@ +(use-modules + ((xyz euandreh heredoc) #:prefix heredoc:) + (gnu bootloader) + (gnu bootloader grub) + (gnu packages) + (gnu services base) + (gnu services cups) + (gnu services desktop) + (gnu services docker) + (gnu services pm) + (gnu services security-token) + (gnu services sound) + (gnu services ssh) + (gnu services virtualization) + (gnu services vpn) + (gnu services xorg) + (gnu system keyboard) + (gnu system file-systems) + (gnu system locale) + (gnu system mapped-devices) + (guix gexp) + (guix packages) + (nongnu packages linux) + (nongnu system linux-initrd) + (srfi srfi-1) + (xyz euandreh queue)) +(heredoc:enable-syntax) + +(operating-system + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) + (locale "fr_FR.UTF-8") + (locale-definitions + (append + (list + (locale-definition + (name "pt_BR.UTF-8") + (source "pt_BR"))) + %default-locale-definitions)) + (timezone "America/Sao_Paulo") + (keyboard-layout + (keyboard-layout "br" #:options '("caps:swapescape" "esperanto:qwerty"))) + (host-name "velhinho") + (hosts-file + (plain-file + "hosts" + (format #f + #"- + 127.0.0.1 localhost ~a + ::1 localhost ~a + + 10.0.2.1 kuvira.wg + 10.0.2.2 velhinho.wg + "# + host-name + host-name))) + (users + (append + (list + (user-account + (name "andreh") + (comment "EuAndreh") + (group "users") + (supplementary-groups '("netdev" "audio" "video" "wheel" "kvm" "docker")))) + %base-user-accounts)) + (packages + (append + (map (compose list specification->package+output symbol->string) + '(nss-certs + i3-wm + guile + guile-heredoc-latest)) + (list) + (remove (lambda (package) + (equal? "wget" (package-name package))) + %base-packages))) + (services + (append + (list + (service bluetooth-service-type) + (service tlp-service-type) + (service thermald-service-type) + (service pcscd-service-type) + (service docker-service-type) + (service libvirt-service-type) + (service virtlog-service-type) + (service xfce-desktop-service-type) + (service mate-desktop-service-type) + (service lxqt-desktop-service-type) + (service enlightenment-desktop-service-type) + (service gnome-desktop-service-type) + (service gnome-keyring-service-type) + (service wireguard-service-type + (wireguard-configuration + (addresses '("10.0.2.2/24")) + (peers + (list + (wireguard-peer + (name "kuvira") + (endpoint "euandreh.xyz:51820") + (public-key "FwXqY9wXO8jK/D7lyprI+cslVeb9AqOQBAbxKG6S5lE=") + (allowed-ips '("10.0.2.1/32")) + (keep-alive 25)))))) + (service qemu-binfmt-service-type + (qemu-binfmt-configuration + (platforms + (lookup-qemu-platforms "arm" "aarch64")))) + (service cups-service-type + (cups-configuration + (web-interface? #t) + (extensions + (list epson-L365)))) + (service openssh-service-type + (openssh-configuration + (password-authentication? #f) + (authorized-keys + `(("andreh" ,(local-file + (string-append (or (getenv "XDG_CONFIG_HOME") + (string-append (getenv "HOME") "/.ssh")) + "/ssh/id_rsa.pub"))))) + (extra-content #"- + ClientAliveInterval 30 + ClientAliveCountMax 20 + MaxSessions 20 + "#))) + #; + (udev-rules-service + 'backlight + (udev-rule + "backlight.rule" + (string-replace + #"- + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="@DEVICE@", GROUP="video", MODE="0664" + "# + "@DEVICE@" + (getenv "BACKLIGHT_DEVICE")))) + (set-xorg-configuration + (xorg-configuration + (keyboard-layout keyboard-layout) + (extra-config + (list + #"- + Section "InputClass" + Identifier "touchpad" + Driver "libinput" + MatchIsTouchpad "on" + Option "Tapping" "on" + EndSection + Section "Device" + Identifier "Intel Graphics" + Driver "intel" + Option "Backlight" "intel_backlight" + EndSection + "#))))) + (modify-services %desktop-services + (pulseaudio-service-type config => + (pulseaudio-configuration + (inherit config) + (extra-script-files + (list + (plain-file + "noise-cancelling.pa" + #"- + load-module module-echo-cancel + "#))))) + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + (append + '("https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append + (list + (plain-file + "non-guix.pub" + #"- + (public-key + (ecc + (curve Ed25519) + (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) + "#)) + %default-authorized-guix-keys))))))) + (bootloader + (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets '("/boot/efi")) + (keyboard-layout keyboard-layout))) + (mapped-devices + (list + (mapped-device + (source (uuid "6b0d38a6-d93e-4f8e-a59a-7729f5adf892")) + (target "cryptroot") + (type luks-device-mapping)))) + (file-systems + (append + (list + (file-system + (mount-point "/boot/efi") + (device (uuid "1B26-9F4E" 'fat32)) + (type "vfat")) + (file-system + (mount-point "/") + (device "/dev/mapper/cryptroot") + (type "ext4") + (dependencies mapped-devices))) + %base-file-systems))) |