a decent working guix config

This commit is contained in:
Chris Cochrun 2023-06-23 10:02:12 -05:00
parent ae77d05e2f
commit 0ebbec7644
22 changed files with 2302 additions and 279 deletions

View file

@ -4,34 +4,136 @@
;; need to capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.
(use-modules (gnu home)
(gnu home services)
(gnu packages)
(gnu packages vim)
(gnu packages rust-apps)
(gnu packages video)
(gnu services)
(guix gexp)
(gnu home services shells))
(define-module (home)
#:use-module (home-services pipewire)
#:use-module (gnu home)
#:use-module (gnu home services)
#:use-module (gnu home services desktop)
#:use-module (gnu home services shells)
#:use-module (gnu home services xdg)
#:use-module (gnu home services gnupg)
#:use-module (gnu packages)
#:use-module (gnu packages vim)
#:use-module (gnu packages rust-apps)
#:use-module (gnu packages video)
#:use-module (gnu packages gnupg)
#:use-module (gnu services)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system emacs)
#:use-module ((guix licenses) #:prefix license:))
;; (define home-scripts
;; (package
;; (name "home-scripts")
;; (version "0.1")
;; (source (local-file "../scripts" #:recursive #t))
;; (build-system copy-build-system)
;; (arguments
;; `(#:install-plan
;; '(())))))
(define emacs-dired-rsync
(let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a")
(revision "0"))
(package
(name "emacs-dired-rsync")
(version (git-version "0.0.1" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/stsquad/dired-rsync.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0000000000000000000000000000000000000000000000000000"))))
(build-system emacs-build-system)
(arguments (list #:emacs emacs-next-pgtk))
(license license:gpl3+)
(home-page "https://github.com/stsquad/dired-rsync.git")
(synopsis "dired-rsync asynchronous rsync from dired")
(description "\
This package adds the command dired-rsync which allows the user to copy
marked files in a dired buffer via rsync."))))
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages (list "vim"
"exa"
"unzip"
"rsync"
"openssh"
"gcc-toolchain"
"make"
"curl"
"mpv"
"mpv-mpris"
"yt-dlp"
"tmux"
"direnv"
"dutree"
"btop"
"htop"
"ripgrep"
"alacritty"
"libnotify"
"nextcloud-client"
"rofi-wayland"
"waybar"
"qt5ct"
"fd"
"bc"
"sysstat"
"ffmpeg"
"dolphin"
"pandoc"
"grim"
"slurp"
"imv"
"openjdk"
;; "dolphin"
"kwallet"
"kwallet-pam"
"breeze"
"breeze-icons"
"kdeconnect"
"pinentry"
"pinentry-qt"
"pinentry-gnome3"
"pinentry-rofi"
"pulsemixer"
"python-pulsectl"
"dunst"
"rbw"
"aspell"
"aspell-dict-en"
"alsa-utils"
"lightly"
"swaylock-effects"
"swayidle"
"wtype"
"brightnessctl"
"flatpak"
"flatpak-xdg-utils"
"xdg-utils"
"xdg-desktop-portal"
"xdg-desktop-portal-kde"
"papirus-icon-theme"
"font-google-noto"
"font-google-noto-emoji"
"enchant"
"blesh"
"ncurses"
"emacs-next-pgtk"
"emacs-dired-rsync"
"emacs-all-the-icons"
"emacs-org-roam"
"emacs-paredit"
"emacs-evil-paredit"
"emacs-doom-modeline"
"emacs-doom-themes"
"emacs-org"
@ -52,6 +154,7 @@
"emacs-evil-surround"
"emacs-websocket"
"emacs-org-modern"
"emacs-org-web-tools"
"emacs-org-re-reveal"
"emacs-emojify"
"emacs-pulsar"
@ -97,13 +200,84 @@
(home-bash-configuration
(guix-defaults? #t)
(aliases '(("grep" . "grep --color=auto")
("ll" . "ls -l")
("ls" . "exa -l")
("la" . "exa -la")))))
("gh" . "guix home reconfigure ~/dotfiles/guix/home.scm")
("gs" . "guix system reconfigure ~/dotfiles/guix/system.scm")))
(environment-variables
'(("QT_QPA_PLATFORM" . "wayland")
("QT_QPA_PLATFORMTHEME" . "qt5ct")))
(bashrc (list (plain-file "blesh" "source .guix-home/profile/share/blesh/ble.sh")
(plain-file "home-manager" "source .nix-profile/etc/profile.d/hm-session-vars.sh")
;;These need to be here so they are at the bottom and therefore after guix-defaults
(plain-file "exal" "alias ls=\"exa -l\"")
(plain-file "exala" "alias la=\"exa -la\"")
(plain-file "less-color" "export LESS=\"--RAW-CONTROL-CHARS\"")
(plain-file "man-colors" "[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP")
(plain-file "starship" "source .config/starship/init.sh")))))
(simple-service 'extra-env-vars
home-environment-variables-service-type
`(("PATH" . "$PATH:/home/chris/bin:/home/chris/.nix-profile/bin")
("QT_QPA_PLATFORM" . "wayland")
("QT_QPA_PLATFORMTHEME" . "qt5ct")
("LITERAL_VALUE" . ,(literal-string "${abc}"))))
(service home-fish-service-type
(home-fish-configuration
(aliases '(("ls" . "exa -l")
("gh" . "guix home reconfigure ~/.files/guix/home.scm")))))
(service home-xdg-configuration-files-service-type
`(("hypr/hyprland.conf" ,(local-file "../.config/hypr/hyprland.conf"))
("alacritty/alacritty.yml" ,(local-file "../.config/alacritty/alacritty.yml")))))))
("gh" . "guix home reconfigure ~/dotfiles/guix/home.scm")
("gs" . "guix system reconfigure ~/dotfiles/guix/system.scm")))))
(simple-service 'config
home-xdg-configuration-files-service-type
`(("hypr" ,(local-file "../.config/hypr" #:recursive? #t))
("tridactyl" ,(local-file "../.config/tridactyl" #:recursive? #t))
("eww" ,(local-file "../.config/eww" #:recursive? #t))
("waybar" ,(local-file "../.config/waybar" #:recursive? #t))
("rofi" ,(local-file "../.config/rofi" #:recursive? #t))
("dunst" ,(local-file "../.config/dunst" #:recursive? #t))
("btop" ,(local-file "../.config/bpytop" #:recursive? #t))
("mpv" ,(local-file "../.config/mpv" #:recursive? #t))
("blesh" ,(local-file "../.config/blesh" #:recursive? #t))
("starship" ,(local-file "../.config/starship" #:recursive? #t))
("starship.toml" ,(local-file "../.config/starship.toml"))
("guix/channels.scm" ,(local-file "channels.scm"))
("home-manager/home.nix" ,(local-file "home.nix"))
("qt5ct/colors/snazzy.conf" ,(local-file "../.config/qt5ct/snazzy.conf"))
("alacritty/alacritty.yml" ,(local-file "../.config/alacritty/alacritty.yml"))))
(simple-service 'scripts
home-files-service-type
`(("bin" ,(local-file "../scripts" #:recursive? #t))
(".mozilla/firefox/chris.default/chrome" ,(local-file "../.config/firefox/chrome" #:recursive? #t))))
(service home-gpg-agent-service-type
(home-gpg-agent-configuration
(pinentry-program
(file-append pinentry-rofi "/bin/pinentry-rofi"))
(ssh-support? #t)
(default-cache-ttl 28800)
(max-cache-ttl 28800)
(default-cache-ttl-ssh 28800)
(max-cache-ttl-ssh 28800)))
(service home-xdg-user-directories-service-type
(home-xdg-user-directories-configuration
(videos "$HOME/vids")
(pictures "$HOME/pics")
(download "$HOME/dls")
(documents "$HOME/docs")
(music "$HOME/music")
(templates "$HOME")
(desktop "$HOME")
(publicshare "$HOME")))
(service home-xdg-mime-applications-service-type
(home-xdg-mime-applications-configuration
(default '(("video/mp4" . "mpv.desktop")
("video/webm" . "mpv.desktop")
("video/x-matroska" . "mpv.destop")
("audio/opus" . "mpv-slow.desktop")))
(desktop-entries
(list (xdg-desktop-entry
(file "mpv-slow")
(name "MPV for Audio and Streams")
(type 'application)
(config
'((exec . "mpv --profile=slow %U"))))))))
(service home-pipewire-service-type)
(service home-dbus-service-type))))