diff --git a/bin/decrypt_password.sh b/bin/decrypt_password.sh index 68a8861..64b0921 100755 --- a/bin/decrypt_password.sh +++ b/bin/decrypt_password.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/bin/sh gpg --batch --no-tty -d ~/.$1-password.gpg diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..b710039 --- /dev/null +++ b/home.nix @@ -0,0 +1,168 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ bat beets wget clipit keychain ncmpcpp pandoc silver-searcher tmux tree unzip wirelesstools xcape xclip anki pavucontrol ranger blueman gifsicle networkmanager paprefs steam mpv nnn nodejs pinentry vlc gnupg nitrogen alacritty wine tldr yarn spotify signal-desktop mu mosh ispell google-chrome emacs-all-the-icons-fonts gnupg python3 veracrypt bashmount exfat exfat-utils neofetch toot rtv newsboat neomutt i3lock-pixeled nmap p4v killall calc cargo cava diceware magic-wormhole msmtp xorg.xmodmap zip youtube-dl cacert dropbox-cli keepassx2 w3m wireshark-qt khard khal vdirsyncer slack riot-web retroarch ipfs gimp blender + ]; + + home.sessionVariables = { + P4USER = "dswan"; + P4PORT = "humu.iocom.com:1666"; + P4CONFIG = "p4.cfg"; + P4EDITOR = "nvim"; + P4IGNORE = ".ignore"; + }; + + services.mpd = { + enable = true; + musicDirectory = "/home/dustinswan/Music"; + playlistDirectory = "/home/dustinswan/Music/Playlists"; + }; + + services.syncthing = { + enable = true; + tray = true; + }; + + services.compton = { + enable = true; + inactiveOpacity = "0.90"; + }; + + services.gpg-agent = { + enable = true; + enableSshSupport = true; + defaultCacheTtl = 86400; + maxCacheTtl = 86400; + defaultCacheTtlSsh = 86400; + maxCacheTtlSsh = 86400; + }; + + services.polybar = { + enable = true; + package = pkgs.polybar.override { + i3GapsSupport = true; + mpdSupport = true; + alsaSupport = true; + }; + config = ~/dotfiles/polybar; + script = "PATH=$PATH:${pkgs.i3-gaps}/bin polybar top &"; + }; + + services.screen-locker = { + enable = true; + lockCmd = "${pkgs.i3lock-pixeled}/bin/i3lock-pixeled"; + }; + + services.dunst = { + enable = true; + iconTheme = { + package = pkgs.numix-icon-theme; + name = "Numix"; + size = "32"; + }; + settings = { + global = { + geometry = "300x5-30+50"; + padding = 12; + horizontal_padding = 12; + transparency = 10; + frame_color = "#66aaff"; + frame_width = 2; + font = "Iosevka Nerd Font Regular 9"; + markup = "full"; + word_wrap = true; + format = "%s \n %b"; + icon_position = "left"; + + background = "#000000"; + foreground = "#dddddd"; + }; + + urgency_low = { + background = "#000000"; + foreground = "#dddddd"; + }; + + urgency_normal = { + background = "#000000"; + foreground = "#dddddd"; + }; + + urgency_critical = { + foreground = "#eceff1"; + background = "#bd2c40"; + frame_color = "#9b0a20"; + }; + }; + }; + # services.udiskie.enable = true; + services.unclutter.enable = true; + # services.keepassx.enable = true; + services.flameshot.enable = true; + services.keybase.enable = true; + services.pasystray.enable = true; + services.network-manager-applet.enable = true; + services.blueman-applet.enable = true; + services.emacs.enable = true; + + programs.home-manager.enable = true; + programs.htop.enable = true; + programs.jq.enable = true; + programs.vscode.enable = true; + programs.fish = { + enable = true; + # interactiveShellInit = builtins.readFile ~/dotfiles/config.fish; + shellAliases = { + l = "ls -la"; + ta = "tmux attach -d"; + e = "emacsclient -a \"\" -t -nw"; + weather = "curl http://wttr.in"; + }; + }; + programs.firefox.enable = true; + programs.fzf.enable = true; + programs.feh.enable = true; + programs.git = { + enable = true; + userName = "Dustin Swan"; + userEmail = "dustin@dustinswan.com"; + }; + programs.emacs.enable = true; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + withNodeJs = true; + withPython3 = true; + configure = { + customRC = builtins.readFile ~/dotfiles/vimrc; + }; + }; + programs.keychain = { + enable = true; + inheritType = "any"; + agents = ["gpg" "ssh"]; + keys = ["id_rsa" "2B3A6377"]; + }; + programs.rofi = { + enable = true; + }; + + xsession = { + enable = true; + profileExtra = builtins.readFile ~/dotfiles/xprofile; + windowManager.i3 = { + enable = true; + package = pkgs.i3-gaps; + config = { + bars = []; + startup = [{ + command = "systemctl --user restart polybar"; + always = true; + notification = false; + }]; + }; + extraConfig = builtins.readFile ~/dotfiles/i3; + }; + }; +} diff --git a/i3 b/i3 index 3ee2eb0..40d77bf 100644 --- a/i3 +++ b/i3 @@ -20,18 +20,18 @@ font pango:Iosevka Nerd Font Regular 8 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod -# start a terminal -# bindsym $mod+Return exec i3-sensible-terminal -bindsym $mod+Return exec alacritty - # kill focused window bindsym $mod+Shift+q kill -# start dmenu (a program launcher) +# bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec alacritty bindsym $mod+e exec dmenu_run bindsym $mod+space exec "rofi -show combi" bindsym $mod+Shift+e exec "emacsclient -c" bindsym $mod+Shift+b exec "firefox" +bindsym XF86AudioRaiseVolume exec "amixer -q sset Master,0 1+ unmute" +bindsym XF86AudioLowerVolume exec "amixer -q sset Master,0 1- unmute" +bindsym XF86AudioMute exec "amixer -q sset Master,0 toggle" # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # change focus @@ -196,5 +196,4 @@ mode "$mode_gaps_outer" { bindsym Escape mode "default" } -exec "polybar top" -exec --no-startup-id xautolock -time 10 -locker 'i3lock-pixeled' +# exec --no-startup-id xautolock -time 10 -locker 'i3lock-pixeled' diff --git a/logitech_linux_mouse.sh b/logitech_linux_mouse.sh index 2b64f5d..867c004 100755 --- a/logitech_linux_mouse.sh +++ b/logitech_linux_mouse.sh @@ -3,6 +3,6 @@ for id in `xinput --list|grep 'MX Master 2S'|perl -ne 'while (m/id=(\d+)/g){print "$1\n";}'`; do xinput set-prop $id "Device Accel Velocity Scaling" 1 xinput set-prop $id "Device Accel Constant Deceleration" 0.8 - # xinput set-prop $id "Evdev Scrolling Distance" -1 -1 -1 - xinput set-button-map $id 1 2 3 5 4 # "natural" scrolling + xinput set-prop $id "Evdev Scrolling Distance" -1 -1 -1 + # xinput set-button-map $id 1 2 3 5 4 # "natural" scrolling done diff --git a/msmtprc b/msmtprc index 981e037..1a313b6 100644 --- a/msmtprc +++ b/msmtprc @@ -12,7 +12,7 @@ passwordeval "gpg --no-tty -q -d ~/.dustinswan@fastmail.com-password.gpg" auth on tls on tls_starttls off -tls_trust_file "/usr/local/etc/openssl/cert.pem" +# tls_trust_file "/usr/local/etc/openssl/cert.pem" account IOCOM host secure.emailsrvr.com @@ -22,8 +22,8 @@ port 587 from dswan@iocom.com tls on tls_starttls on -tls_trust_file "/usr/local/etc/openssl/cert.pem" -user dswan@insors.com +# tls_trust_file "/usr/local/etc/openssl/cert.pem" +user dswan@iocom.com passwordeval "gpg --no-tty -q -d ~/.iocom-password.gpg" account default : FastMail diff --git a/muttrc b/muttrc index 839920e..9049460 100644 --- a/muttrc +++ b/muttrc @@ -12,6 +12,7 @@ set edit_headers=yes # set record=+sent # set postponed=+drafts # set mbox_type=Maildir +set sidebar_visible mailboxes +inbox diff --git a/offlineimaprc b/offlineimaprc index ce94b7f..878e833 100644 --- a/offlineimaprc +++ b/offlineimaprc @@ -19,7 +19,8 @@ remotepasseval = decrypt_password(".iocom-password.gpg") realdelete = no ssl = yes # sslcacertfile = ~/.nix-profile/etc/ssl/certs/ca-bundle.crt -sslcacertfile = /usr/local/etc/openssl/cert.pem +# sslcacertfile = /usr/local/etc/openssl/cert.pem +sslcacertfile = /etc/ssl/certs/ca-bundle.crt [Account FastMail] localrepository = FastMailLocal @@ -36,5 +37,6 @@ remoteuser = dustinswan@fastmail.com remotepasseval = decrypt_password(".dustinswan@fastmail.com-password.gpg") realdelete = no # sslcacertfile = ~/.nix-profile/etc/ssl/certs/ca-bundle.crt -sslcacertfile = /usr/local/etc/openssl/cert.pem +# sslcacertfile = /usr/local/etc/openssl/cert.pem +sslcacertfile = /etc/ssl/certs/ca-bundle.crt ssl = yes diff --git a/vimrc b/vimrc index 38bc41d..542f62a 100644 --- a/vimrc +++ b/vimrc @@ -61,6 +61,7 @@ Plug 'bitc/vim-hdevtools' "Plug 'enomsg/vim-haskellConcealPlus' Plug 'ryanoasis/vim-devicons' Plug 'dart-lang/dart-vim-plugin' +Plug 'TaDaa/vimade' " Themes "Plug 'w0ng/vim-hybrid' diff --git a/xprofile b/xprofile index a7083c1..7b83b58 100644 --- a/xprofile +++ b/xprofile @@ -2,7 +2,7 @@ setxkbmap -option ctrl:nocaps -option compose:ralt xcape -e 'Control_L=Escape' xmodmap -e "keycode 96 = dead_greek dead_greek dead_greek dead_greek" -compton -b --inactive-opacity 0.90 +# compton -b --inactive-opacity 0.90 sh ~/dotfiles/logitech_linux_mouse.sh xsetroot -solid black -cursor_name left_ptr nitrogen --restore &