diff options
author | EuAndreh <eu@euandre.org> | 2022-05-12 12:01:54 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-12 12:01:54 -0300 |
commit | 90eaebabcaaea74237f34cf05709625345f276cc (patch) | |
tree | 349e7609d20ecfb6567652a7e28595cec9647eb0 /etc/guix | |
parent | .usr/etc/i3/config: WIP setup extra bindings (diff) | |
download | dotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.gz dotfiles-90eaebabcaaea74237f34cf05709625345f276cc.tar.xz |
Move Git repository into ~/.usr/.git/
Diffstat (limited to 'etc/guix')
-rw-r--r-- | etc/guix/channels.scm | 20 | ||||
-rw-r--r-- | etc/guix/home.scm | 152 | ||||
-rw-r--r-- | etc/guix/system.scm | 102 |
3 files changed, 274 insertions, 0 deletions
diff --git a/etc/guix/channels.scm b/etc/guix/channels.scm new file mode 100644 index 0000000..304db35 --- /dev/null +++ b/etc/guix/channels.scm @@ -0,0 +1,20 @@ +(append + (list + (channel + (name 'xyz-euandreh) + (url "git://euandreh.xyz/package-repository.git/") + (branch "main") + (introduction + (make-channel-introduction + "d749e053e6db365069cb9b2ef47a78b06f9e7361" + (openpgp-fingerprint + "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060")))) + (channel + (name 'nonguix) + (url "https://gitlab.com/nonguix/nonguix") + (introduction + (make-channel-introduction + "897c1a470da759236cc11798f4e0a5f7d4d59fbc" + (openpgp-fingerprint + "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) + %default-channels) diff --git a/etc/guix/home.scm b/etc/guix/home.scm new file mode 100644 index 0000000..607a059 --- /dev/null +++ b/etc/guix/home.scm @@ -0,0 +1,152 @@ +(use-modules + (curth0) + (gnu home services) + (gnu home services shells) + (gnu packages) + (gnu packages mail) + (gnu packages gnupg) + (gnu services) + (guix gexp) + (guix packages) + (guix utils)) + +(define msmtp-non-hardcoded + (package + (inherit msmtp) + (name "msmtp-non-hardcoded") + (arguments + (substitute-keyword-arguments (package-arguments msmtp) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install-additional-files 'patch-hardcoded-paths + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/bin/msmtpq") + (("^LOG=.*$") "LOG=${XDG_LOG_HOME:-$HOME/.local/var/log}/msmtpq.log\n") + (("^Q=.*$") "Q=${XDG_DATA_HOME:-$HOME/.local/share}/msmtp/queue\n") + (("mkdir -m 0700 \"\\$Q\"") "mkdir -p -m 0700 \"$Q\""))))))))))) + +(define (xdg-config-home s) + (string-append (getenv "XDG_CONFIG_HOME") "/" s)) + +(define gitconfig (mixed-text-file "gitconfig" #"- + [user] + email = eu@euandre.org + name = EuAndreh + signingkey = 81F90EC3CD356060 + [transfer] + fsckobjects = true + [push] + default = current + [commit] + gpgsign = true + verbose = true + [init] + defaultBranch = main + [sendemail] + assume8bitEncoding = UTF-8 + smtpserveroption = -a + smtpserveroption = euandreh + annotate = yes + confirm = never + smtpserver = "# msmtp-non-hardcoded "/bin/msmtpq\n")) + +(define gpg-agent.conf (mixed-text-file "gpg-agent.conf" #"- + default-cache-ttl 172800 + default-cache-ttl-ssh 172800 + max-cache-ttl 604800 + max-cache-ttl-ssh 604800 + enable-ssh-support + pinentry-program "# pinentry-gtk2 "/bin/pinentry-gtk-2\n")) + +(define config-files + `(("gnupg/gpg-agent.conf" ,gpg-agent.conf) + ("git/config" ,gitconfig))) + +(define (dot-config) + (define (prefix-with-config s) + (string-append (substring (getenv "XDG_CONFIG_HOME") + (+ 1 (string-length (getenv "HOME")))) + "/" + s)) + (map (lambda (t) + (list (prefix-with-config (first t)) + (second t))) + config-files)) + +(home-environment + (packages + (append + (map (compose list specification->package+output symbol->string) + '(man-pages + posix-man-pages + + tree + openssh + mailutils + entr + git + git:send-email + tmux + rsync + gnupg + pulseaudio + password-store + playerctl + pinentry-gtk2 + bmake + fzf + ranger + blueman + ledger + curl + xclip + cloc + strace + file + urlscan + rlwrap + direnv + borg + khal + khard + libfaketime + qrencode + feh + sox + xset + graphviz + moreutils + shellcheck + gettext + groff + + clojure + openjdk + sbcl + perl + perl-mojolicious + + st + i3status + dmenu + + weechat + alot + notmuch + isync + w3m + afew + + zathura + zathura-djvu + zathura-pdf-poppler + zathura-ps + firefox)) + (list msmtp-non-hardcoded))) + (services + (list (service home-bash-service-type + (home-bash-configuration + (bashrc + (list (plain-file "bashrc.sh" ". $XDG_CONFIG_HOME/bash/rc"))))) + (simple-service 'config-files home-files-service-type (dot-config))))) diff --git a/etc/guix/system.scm b/etc/guix/system.scm new file mode 100644 index 0000000..3bd7235 --- /dev/null +++ b/etc/guix/system.scm @@ -0,0 +1,102 @@ +(use-modules + (curth0) + (gnu bootloader) + (gnu bootloader grub) + (gnu packages) + (gnu services base) + (gnu services desktop) + (gnu services security-token) + (gnu services xorg) + (gnu system keyboard) + (gnu system file-systems) + (gnu system mapped-devices) + (guix gexp) + (nongnu packages linux) + (nongnu system linux-initrd)) + +(operating-system + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) + (locale "fr_FR.UTF-8") + (timezone "America/Sao_Paulo") + (keyboard-layout + (keyboard-layout "br" #:options '("caps:swapescape" "esperanto:qwerty"))) + (host-name "velhinho") + (users + (append + (let ((user-groups '("wheel" "netdev" "audio" "video"))) + (list + (user-account + (name "andreh") + (comment "EuAndreh") + (group "users") + (supplementary-groups user-groups)) + (user-account + (name "other") + (comment "Other Self") + (group "users") + (supplementary-groups user-groups)))) + %base-user-accounts)) + (packages + (append + (map (compose list specification->package+output symbol->string) + '(nss-certs + i3-wm)) + %base-packages)) + (services + (append + (list + (service bluetooth-service-type) + (service pcscd-service-type) + (service gnome-desktop-service-type) + (set-xorg-configuration + (xorg-configuration + (keyboard-layout keyboard-layout) + (extra-config (list #"- + Section "InputClass" + Identifier "touchpad" + Driver "libinput" + MatchIsTouchpad "on" + Option "Tapping" "on" + EndSection + "#))))) + (modify-services %desktop-services + (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 (list "/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))) |