diff options
author | bd <bdunahu@colostate.edu> | 2024-01-10 19:44:21 -0700 |
---|---|---|
committer | bd <bdunahu@colostate.edu> | 2024-01-10 19:44:21 -0700 |
commit | 1ced565816120bfcc351daf9fc3a4e851162e3b7 (patch) | |
tree | 93e9c23660cd07f4dba861f334b23c03d322f48c /.config/guix/modules | |
parent | da5922a476cebdbbf338f0192165dbbbcd3f7b6f (diff) |
Initial commit of new repository structure
Diffstat (limited to '.config/guix/modules')
-rw-r--r-- | .config/guix/modules/base.scm | 53 | ||||
-rw-r--r-- | .config/guix/modules/bat.scm | 12 | ||||
-rw-r--r-- | .config/guix/modules/emacs.scm | 24 | ||||
-rw-r--r-- | .config/guix/modules/gpg.scm | 14 | ||||
-rw-r--r-- | .config/guix/modules/shell.scm | 22 | ||||
-rw-r--r-- | .config/guix/modules/ssh.scm | 19 | ||||
-rw-r--r-- | .config/guix/modules/xdg.scm | 17 | ||||
-rw-r--r-- | .config/guix/modules/xmodmap.scm | 17 | ||||
-rw-r--r-- | .config/guix/modules/ymir.scm | 87 |
9 files changed, 265 insertions, 0 deletions
diff --git a/.config/guix/modules/base.scm b/.config/guix/modules/base.scm new file mode 100644 index 0000000..74ef5e4 --- /dev/null +++ b/.config/guix/modules/base.scm @@ -0,0 +1,53 @@ +(define-module (base) + #:use-module (gnu packages) + #:use-module (gnu packages gnupg) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu home services dict) + #:use-module (gnu home services ssh) + #:use-module (gnu home services gnupg)) + + +;; List of packages that will show up +;; under ~/.guix-home/profile. +(define-public desktop-packages + (map specification->package + (list + "aspell" + "aspell-dict-en" + "flameshot" + "libnotify" + "pass-otp" + "password-store" + "pavucontrol" + "recutils" + "rsync" + "stow" + "xset"))) + +(define-public program-packages + (map specification->package + (list + "feh" + "ffmpeg" + "gimp" + "gnupg" + "icecat" + "mpv" + "pinentry-emacs" + "sbcl" + "texlive" + "ungoogled-chromium" + "yt-dlp" + "zathura" + "zathura-pdf-poppler"))) + + +;; Below is a list of Home services. To search for available +;; services, run 'guix home search KEYWORD' in a terminal. +(define-public base-services + (list + (service home-shepherd-service-type) + (service home-dicod-service-type))) diff --git a/.config/guix/modules/bat.scm b/.config/guix/modules/bat.scm new file mode 100644 index 0000000..1a56ee5 --- /dev/null +++ b/.config/guix/modules/bat.scm @@ -0,0 +1,12 @@ +(define-module (bat) + #:use-module (gnu home services) + #:use-module (gnu home services pm)) + + +(define-public bat-service + (list (service home-batsignal-service-type + (home-batsignal-configuration + (warning-level 35) + (critical-level 15) + (danger-level 5) + (notification-command "notify-send"))))) diff --git a/.config/guix/modules/emacs.scm b/.config/guix/modules/emacs.scm new file mode 100644 index 0000000..bb08e7e --- /dev/null +++ b/.config/guix/modules/emacs.scm @@ -0,0 +1,24 @@ +(define-module (emacs) + #:use-module (gnu packages)) + + +;; List of packages that will show up +;; under ~/.guix-home/profile. +(define-public emacs-packages + (map specification->package + (list + "emacs-all-the-icons" + "emacs-auctex" + "emacs-company" + "emacs-ednc" + "emacs-emms" + "emacs-exwm" + "emacs-guix" + "emacs-magit" + "emacs-marginalia" + "emacs-orderless" + "emacs-org-roam" + "emacs-password-store" + "emacs-pinentry" + "emacs-slime" + "emacs-vertico"))) diff --git a/.config/guix/modules/gpg.scm b/.config/guix/modules/gpg.scm new file mode 100644 index 0000000..19862f0 --- /dev/null +++ b/.config/guix/modules/gpg.scm @@ -0,0 +1,14 @@ +(define-module (gpg) + #:use-module (guix gexp) + #:use-module (gnu packages gnupg) + #:use-module (gnu home services) + #:use-module (gnu home services gnupg)) + + +(define-public gpg-service + (list + (service home-gpg-agent-service-type + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-emacs "/bin/pinentry-emacs")) + (ssh-support? #t))))) diff --git a/.config/guix/modules/shell.scm b/.config/guix/modules/shell.scm new file mode 100644 index 0000000..b7bb619 --- /dev/null +++ b/.config/guix/modules/shell.scm @@ -0,0 +1,22 @@ +(define-module (shell) + #:use-module (gnu home services) + #:use-module (gnu home services shells)) + + +(define-public shell-service + (list + (service home-bash-service-type + (home-bash-configuration + (aliases '(("suspend" . "sudo bash -c 'echo mem > /sys/power/state'") + ("guix-home" . "RUNNING_GUIX_HOME=1 guix home -L ${HOME}/.config/guix/modules/ reconfigure ${HOME}/.config/guix/${HOSTNAME}.scm") + ("guix-system" . "RUNNING_GUIX_HOME=0 sudo guix system -L ${HOME}/.config/guix/modules/ reconfigure ${HOME}/.config/guix/${HOSTNAME}.scm") + ("cp" . "cp -i") + ("grep" . "grep --color=auto") + ("ll" . "ls -l") + ("ls" . "ls -p --color=auto") + ("mkd" . "mkdir -pv") + ("mv" . "mv -i") + ("rm" . "rm -i") + ("vi" . "vim") + ("ytta" . "yt-dlp --extract-audio --format bestaudio/best") + ("yttv" . "yt-dlp -f b"))))))) diff --git a/.config/guix/modules/ssh.scm b/.config/guix/modules/ssh.scm new file mode 100644 index 0000000..0e80c25 --- /dev/null +++ b/.config/guix/modules/ssh.scm @@ -0,0 +1,19 @@ +(define-module (ssh) + #:use-module (gnu home services) + #:use-module (gnu home services ssh)) + + +(define-public ssh-service + (list + (service home-openssh-service-type + (home-openssh-configuration + (hosts + (list (openssh-host (name "hati") + (host-name "192.168.1.76") + (user "bdunahu")) + (openssh-host (name "vali") + (host-name "192.168.1.64") + (user "bdunahu")) + (openssh-host (name "perch") + (host-name "perch.cs.colostate.edu") + (user "bdunahu")))))))) diff --git a/.config/guix/modules/xdg.scm b/.config/guix/modules/xdg.scm new file mode 100644 index 0000000..76106e9 --- /dev/null +++ b/.config/guix/modules/xdg.scm @@ -0,0 +1,17 @@ +(define-module (xdg) + #:use-module (gnu home services) + #:use-module (gnu home services xdg)) + + +(define-public xdg-service + (list + (service home-xdg-user-directories-service-type + (home-xdg-user-directories-configuration + (desktop "$HOME") + (documents "$HOME") + (download "$HOME/dl") + (music "$HOME/media") + (pictures "$HOME/media") + (publicshare "$HOME") + (templates "$HOME") + (videos "$HOME/media"))))) diff --git a/.config/guix/modules/xmodmap.scm b/.config/guix/modules/xmodmap.scm new file mode 100644 index 0000000..3cf8be1 --- /dev/null +++ b/.config/guix/modules/xmodmap.scm @@ -0,0 +1,17 @@ +(define-module (xmodmap) + #:use-module (gnu home services) + #:use-module (gnu home services desktop)) + + +;; Below is a list of Home services. To search for available +;; services, run 'guix home search KEYWORD' in a terminal. +(define-public xmodmap-service + (list + (service home-xmodmap-service-type + (home-xmodmap-configuration + (key-map '(("remove Lock" . "Caps_Lock") + ("remove Control" . "Control_L") + ("keysym Control_L" ."Caps_Lock") + ("keysym Caps_Lock" . "Control_L") + ("add Lock" . "Caps_Lock") + ("add Control" . "Control_L"))))))) diff --git a/.config/guix/modules/ymir.scm b/.config/guix/modules/ymir.scm new file mode 100644 index 0000000..e3a9921 --- /dev/null +++ b/.config/guix/modules/ymir.scm @@ -0,0 +1,87 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This configuration defines the base-level ;; +;; services for both of my machines. ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-module (ymir) + #:use-module (gnu)) +(use-service-modules audio desktop networking ssh xorg) + +;;;; user +(define-public username "bdunahu") +(define user (user-account + (name username) + (comment username) + (group "users") + (home-directory (string-append "/home/" username)) + (supplementary-groups '("audio" + "netdev" + "video" + "wheel")))) + + +;;;; base os +(define-public ymir + (operating-system + (host-name "ymir") + (locale "en_US.utf8") + (timezone "America/Denver") + (keyboard-layout (keyboard-layout "us")) + (kernel-arguments + (list + "quiet")) + + ;; 'root' is implicit + (users (cons* user + %base-user-accounts)) + + ;; grub (uefi) + (bootloader (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets (list "/boot/efi")) + (keyboard-layout keyboard-layout))) + + ;; packages installed system-wide. + (packages (append (map specification->package + '("cryptsetup" + "curl" + "emacs" + "emacs-desktop-environment" + "emacs-exwm" + "git" + "imagemagick" + "mpd" + "mpd-mpc" + "nss-certs" + "picom" + "pulseaudio" + "vim" + "xmodmap")) + %base-packages)) + + ;; base system services. + (services + (append (list + (service openssh-service-type) + (service tor-service-type) + (service mpd-service-type + (mpd-configuration + (user user) + (music-directory "~/Personal/mpd/music") + (playlist-directory "~/Personal/mpd/playlist") + (default-port 6600))) + (set-xorg-configuration + (xorg-configuration (keyboard-layout keyboard-layout)))) + + ;; This is the default list of services we + ;; are appending to. + %desktop-services)) + + ;; OVERRIDE ME + (file-systems (cons* + (file-system + (mount-point "/") + (device "none") + (type "tmpfs") + (check? #f)) + %base-file-systems)))) |