diff --git a/dotfiles/.emacs.d/config.org b/dotfiles/.emacs.d/config.org index 8b185bb..8edeb5c 100644 --- a/dotfiles/.emacs.d/config.org +++ b/dotfiles/.emacs.d/config.org @@ -426,7 +426,7 @@ The Emacs dashboard package provides a nice dashboard when first starting up ema (recents . 5) (agenda . 5))) :config - (set-face-attribute 'dashboard-items-face nil :font "Fira Code Retina" :weight 'regular :height 140) + (set-face-attribute 'dashboard-items-face nil :font "Fira Code" :weight 'regular :height 140) (dashboard-setup-startup-hook)) #+end_src diff --git a/dotfiles/.emacs.d/email.org b/dotfiles/.emacs.d/email.org index a11286d..91a7c81 100644 --- a/dotfiles/.emacs.d/email.org +++ b/dotfiles/.emacs.d/email.org @@ -59,17 +59,8 @@ mu index From here, I can continue onto configuring the ~mu4e~ emacs package. #+begin_src emacs-lisp -;; Check which load-path exists for multi-platform support. -(setq jm/mu4e-load-path - (let ((linux-path "/usr/share/emacs/site-lisp/mu4e") - (macos-path "/opt/homebrew/share/emacs/site-lisp/mu/mu4e")) - (cond ((file-exists-p linux-path) linux-path) - ((file-exists-p macos-path) macos-path) - (t (error "No mu4e load-path present. Is mu4e installed?"))))) - (use-package mu4e :ensure nil - :load-path jm/mu4e-load-path :bind ("C-x m" . mu4e) :config (setq mu4e-mu-binary (executable-find "mu")) @@ -97,6 +88,7 @@ From here, I can continue onto configuring the ~mu4e~ emacs package. mu4e-refile-folder (lambda (msg) (cond + ((member (car (mu4e-string-to-flags "T")) (mu4e-message-field msg :flags)) "/Trash") ((mu4e-message-contact-field-matches msg :from "no-reply@piazza.com") "/UCSC") ((mu4e-message-contact-field-matches msg :from "notifications@instructure.com") "/UCSC") ((mu4e-message-contact-field-matches msg :from "no-reply@gradescope.com") "/UCSC") diff --git a/dotfiles/.functions.zsh b/dotfiles/.functions.zsh new file mode 100644 index 0000000..591cc1b --- /dev/null +++ b/dotfiles/.functions.zsh @@ -0,0 +1,10 @@ +bw-init() { + bw login --check &>/dev/null || return 0 + bw sync &>/dev/null || return 0 + + bw unlock --raw > $HOME/.bw_session +} + +bw-load() { + export BW_SESSION=$(cat $HOME/.bw_session) +} diff --git a/dotfiles/.mbsyncrc b/dotfiles/.mbsyncrc index 587f788..13d5962 100644 --- a/dotfiles/.mbsyncrc +++ b/dotfiles/.mbsyncrc @@ -1,12 +1,12 @@ IMAPAccount gmail Host imap.gmail.com User jadenprovost@gmail.com -PassCmd "pass emacs/gmail" +PassCmd "bw-load && bw get password 'Emacs Gmail'" SSLType IMAPS SSLVersions TLSv1.2 AuthMechs PLAIN SystemCertificates no -CertificateFile ~/.mail/certificates/ca-certificates.pem +CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore gmail-remote Account gmail diff --git a/home-manager/home.nix b/home-manager/home.nix index 6bafc9b..8365747 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -4,7 +4,16 @@ homeDirectory = "/home/random"; }; + gtk = { + enable = true; + theme = { + name = "Materia-dark"; + package = pkgs.materia-theme; + }; + }; + nixpkgs.config.allowUnfree = true; + fonts.fontconfig.enable = true; home.packages = with pkgs; [ feh clang @@ -15,13 +24,82 @@ bitwarden-cli bitwarden discord - meslo-lgs-nf + + # Emacs + cmake + isync + ispell + mu + + # fonts fira-code + fira-code-symbols + meslo-lgs-nf ]; + programs = { + home-manager.enable = true; + command-not-found.enable = true; + zoxide.enable = true; + eza.enable = true; + fzf.enable = true; + + emacs = { + enable = true; + extraPackages = epkgs: with epkgs; [ + mu4e + vterm + all-the-icons + nerd-icons + ]; + }; + + git = { + enable = true; + userName = "Random936"; + userEmail = "randomdude936@gmail.com"; + }; + + zsh = { + enable = true; + enableCompletion = true; + enableAutosuggestions = true; + syntaxHighlighting.enable = true; + history.size = 100000000; + + shellAliases = { + update-system = "sudo nixos-rebuild switch --flake ~/dotfiles"; + update-user = "home-manager switch --flake ~/dotfiles"; + update-all = "update-system && update-user"; + }; + + plugins = [ + { + name = "custom-functions"; + src = ../dotfiles; + file = ".functions.zsh"; + } + { + name = "powerlevel10k-config"; + src = ../dotfiles; + file = ".p10k.zsh"; + } + ]; + + zplug = { + enable = true; + plugins = [ + { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } + ]; + }; + + }; + }; + home.file = { ".mbsyncrc".source = ../dotfiles/.mbsyncrc; ".Xresources".source = ../dotfiles/.Xresources; + ".functions.zsh".source = ../dotfiles/.functions.zsh; ".scripts/brightness.sh".source = ../dotfiles/.scripts/brightness.sh; ".scripts/autostart_desktop.sh".source = ../dotfiles/.scripts/autostart_desktop.sh; ".screenlayout/launch.sh".source = ../dotfiles/.screenlayout/launch.sh; @@ -40,48 +118,6 @@ ".emacs.d/lsp.org".source = ../dotfiles/.emacs.d/lsp.org; }; - programs = { - home-manager.enable = true; - command-not-found.enable = true; - zoxide.enable = true; - eza.enable = true; - fzf.enable = true; - - git = { - enable = true; - userName = "Random936"; - userEmail = "randomdude936@gmail.com"; - }; - - zsh = { - enable = true; - enableCompletion = true; - enableAutosuggestions = true; - syntaxHighlighting.enable = true; - - shellAliases = { - update-system = "sudo nixos-rebuild switch --flake ~/dotfiles"; - update-user = "home-manager switch --flake ~/dotfiles"; - update-all = "update-system && update-user"; - }; - - plugins = [ - { - name = "powerlevel10k-config"; - src = ../dotfiles; - file = ".p10k.zsh"; - } - ]; - - zplug = { - enable = true; - plugins = [ - { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } - ]; - }; - - }; - }; home.stateVersion = "23.05"; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 77b0a9e..f390d00 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -112,16 +112,15 @@ vim git picom - emacs - mu - cmake - isync - ispell - emacsPackages.mu4e - emacsPackages.vterm - emacsPackages.all-the-icons - emacsPackages.nerd-icons ]; + fonts.packages = with pkgs; [ + fira-code + fira-code-symbols + meslo-lgs-nf + ]; + + services.emacs.enable = true; + system.stateVersion = "23.11"; }