guix-config

Configuration files for Guix

git clone https://git.8pit.net/guix-config.git

  1;; This Guix Home configuration is intentionally very simple and
  2;; essentially limited to the installation of packages and the
  3;; configuration of user services. Configuration files are managed
  4;; without Guix Home.
  5
  6(define-module (guix-home-config)
  7  #:use-module (guix records)
  8  #:use-module (gnu home)
  9  #:use-module (gnu home services)
 10  #:use-module (gnu home services desktop)
 11  #:use-module (gnu home services shells)
 12  #:use-module (gnu home services sound)
 13  #:use-module (gnu packages)
 14  #:use-module (gnu packages linux)
 15  #:use-module (gnu services)
 16  #:use-module (gnu system shadow))
 17
 18(define packages-desktop
 19  '("adwaita-icon-theme"
 20    "alacritty"
 21    "bemenu"
 22    "creek"
 23    "firefox"
 24    "river"
 25    "waylock"
 26    "wl-clipboard"
 27    "wlr-randr"
 28    "wlsunset"))
 29
 30(define packages-documents
 31  '("mandoc-zstd"))
 32
 33(define packages-font
 34  '("fontconfig"
 35    "font-terminus-patched"
 36    "font-terminus-patched:otb"
 37    "font-google-noto"
 38    "font-google-noto-emoji"
 39    "font-dejavu"))
 40
 41(define packages-networking
 42  '("bind:utils"
 43    "iproute2"
 44    "mosh"
 45    "mtr"
 46    "whois"))
 47
 48(define packages-multimedia
 49  '("ncmpc"
 50    "mpv"
 51    "pipewire"
 52    "yt-dlp"))
 53
 54(define packages-programming
 55  '("curl"
 56    "clang"
 57    "gcc-toolchain"
 58    "git"
 59    "make"
 60    "neovim"
 61    "python"
 62    "universal-ctags"))
 63
 64(define packages-tools
 65  '("chimerautils"
 66    "file"
 67    "fzf"
 68    "htop"
 69    "ripgrep"
 70    "strace"
 71    "tmux"
 72    "tree"))
 73
 74(define my-packages
 75  (append
 76    packages-desktop
 77    packages-documents
 78    packages-font
 79    packages-networking
 80    packages-multimedia
 81    packages-programming
 82    packages-tools))
 83
 84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 85
 86(define (my-essential-services he)
 87  ;; I don't want Guix home to overwrite my ~/.profile.
 88  ;; Therefore, I remove the services responsible for that.
 89  (filter
 90    (lambda (s)
 91      ;; The home-shell-profile creates the ~/.profile file.
 92      (not (eqv? (service-type-name (service-kind s)) 'home-shell-profile)))
 93    (home-environment-essential-services he)))
 94
 95(define home-config
 96  (let ((home-environment-base
 97          ;; Need to set packages here, otherwise the essential services
 98          ;; operate on an empty package set and no package is installed.
 99          (home-environment
100            (packages (specifications->packages my-packages)))))
101    (home-environment
102      ;; Awful hack to change the default essential services.
103      (inherit home-environment-base)
104      (essential-services
105        (my-essential-services home-environment-base))
106
107      (services
108        (append
109          (list
110            (service home-dbus-service-type)
111            (service home-pipewire-service-type
112                     (home-pipewire-configuration
113                       (enable-pulseaudio? #t))))
114          %base-home-services)))))
115
116home-config