Browse Source

I don't know

master
Yorick van Pelt 7 months ago
parent
commit
4fc466d13b
Signed by: yorick GPG Key ID: D8D3CC6D951384DE
  1. 33
      bin/backup.sh
  2. 5
      bin/borgbackup.sh
  3. 14
      bin/fzf-pass-inner.sh
  4. 30
      bin/glitchlock.sh
  5. 11
      bin/invert.sh
  6. 5
      bin/setbg.sh
  7. 3
      bin/spotify_meta.sh
  8. 2
      bin/sunplate.sh
  9. 20
      default.nix
  10. 88
      emacs/.emacs.d/init.el
  11. 331
      emacs/emacs.org
  12. 1
      gpg/.gnupg/.gitignore
  13. 2
      gpg/.gnupg/gpg-agent.conf
  14. 11
      gpg/.gnupg/gpg.conf
  15. 6
      gpg/.gnupg/sshcontrol
  16. 3
      install.sh
  17. 14
      misc/.borgignore
  18. 11
      mutt/.mutt/creds
  19. 39
      nix/.config/nixpkgs/arbtt.nix
  20. 8
      nix/.config/nixpkgs/config.nix
  21. 464
      nix/.config/nixpkgs/home.nix
  22. 39
      nix/.config/nixpkgs/libinput-gestures.nix
  23. 19
      nix/.config/nixpkgs/overlays/01-backports.nix
  24. 5
      nix/.config/nixpkgs/overlays/02-extrapkgs.nix
  25. 39
      nix/.config/nixpkgs/overlays/03-customizations.nix
  26. 51
      nix/.config/nixpkgs/overlays/05-envs.nix
  27. 2
      nix/.config/nixpkgs/overlays/06-moz.nix
  28. 108
      nix/.config/nixpkgs/pkgs/alacritty.nix
  29. 4
      nix/.config/nixpkgs/pkgs/ftb.nix
  30. 45
      nix/.config/nixpkgs/pkgs/mailpile.nix
  31. 45
      nix/.config/nixpkgs/pkgs/nottetris2.nix
  32. 23
      nix/.config/nixpkgs/pkgs/peageprint.nix
  33. 28
      nix/.config/nixpkgs/pkgs/playerctl.nix
  34. 106
      quassel/jussi01-darktheme.qss
  35. 65
      quassel/quasselclient.conf
  36. 9
      quassel/settings.qss
  37. 1
      stow/.emacs.d

33
bin/backup.sh

@ -1,32 +1,3 @@
#!/bin/sh
function is_locked() {
# check for lockfile
if [[ -f /tmp/rbs.lock ]]; then
# process already running?
if [[ "$(ps -p $(cat /tmp/rbs.lock) | wc -l)" -gt 1 ]]; then
echo "locked"
return
fi
fi
echo "unlocked"
}
if [[ $(is_locked) == "locked" ]]; then
echo "process already running, aborting..."
exit 1
fi
# create lockfile
rm -f /tmp/rbs.lock
echo $$ > /tmp/rbs.lock
ionice -c3 duplicity /home/yorick \
webdavs://yorickvp@yorickvp.stackstorage.com/remote.php/webdav//$(hostname | head -c3)_bak \
--ssl-cacert-file /etc/ssl/certs/ca-bundle.crt \
--encrypt-key yorick \
--include-filelist ~/dotfiles/misc/dupignore --allow-source-mismatch\
--asynchronous-upload \
--volsize 100
# remove lockfile
rm -f /tmp/rbs.lock
~/dotfiles/bin/borgbackup.sh create "::home-{hostname}-{user}-{now}" $HOME --exclude-from ~/dotfiles/misc/.borgignore -x --compression=zstd -v
~/dotfiles/bin/borgbackup.sh prune --prefix "home-{hostname}-{user}" --keep-daily=4 --keep-weekly=4 --keep-monthly=6 --keep-yearly=2 --list --stats

5
bin/borgbackup.sh

@ -0,0 +1,5 @@
#!/usr/bin/env bash
export BORG_REPO='14337@ch-s012.rsync.net:jarvis'
export BORG_REMOTE_PATH=borg1
export BORG_PASSCOMMAND="pass sysadmin/jarvis-borg"
exec borg "$@"

14
bin/fzf-pass-inner.sh

@ -0,0 +1,14 @@
set -euo pipefail
ENTRY=$(find ~/.password-store/ -name "*.gpg" -printf "%P\n" | sed -e 's/\.gpg$//' | fzf)
if [ -z "$ENTRY" ]; then
exit 1
fi
PASSENTRY=$(pass "$ENTRY")
# todo: kill after 30s
builtin echo "$PASSENTRY" | head -n1 | nohup wl-copy -f &
disown
NOTIFICATION=$(builtin echo "$PASSENTRY" | sed 1d)
notify-send -t 6000 "$NOTIFICATION"
builtin echo "$NOTIFICATION"

30
bin/glitchlock.sh

@ -0,0 +1,30 @@
#!/bin/sh
set -euo pipefail
pngfile="/tmp/sclock.png"
bmpfile="/tmp/sclock.bmp"
glitchedfile="/tmp/sclock_g.bmp"
grim -t ppm $pngfile
# convert to bmp and pixelate
convert -scale 10% -scale 1000% $pngfile $bmpfile
rm $pngfile
# Glitch it with sox FROM: https://maryknize.com/blog/glitch_art_with_sox_imagemagick_and_vim/
sox -t ul -c 1 -r 48k $bmpfile -t ul $glitchedfile trim 0 100s : echo 0.9 0.9 15 0.9
# Rotate it by 90 degrees
convert -rotate 90 $glitchedfile $bmpfile
#Glitch it again and rotate it back
sox -t ul -c 1 -r 48k $bmpfile -t ul $glitchedfile trim 0 90s : echo 0.9 0.9 15 1
convert -rotate -90 $glitchedfile $glitchedfile
rm $bmpfile
# Add lock icon, pixelate and convert back to png
# convert -gravity center -font "Hack-Bold-Nerd-Font-Complete-Mono" \
# -pointsize 200 -draw "text 0,240 ''" -channel RGBA -fill '#bf616a' \
# $glitchedfile $pngfile
# convert $glitchedfile $pngfile
swaylock -i $glitchedfile
#feh $pngfile
rm $glitchedfile

11
bin/invert.sh

@ -0,0 +1,11 @@
#!/usr/bin/env bash
sed -i 's/colors:/colors-alt:/;t;s/colors-alt:/colors:/' ~/.config/alacritty/alacritty.yml
(grep -B1 '^colors:$' ~/.config/alacritty/alacritty.yml | head -n1 | grep -qi light && echo "light" || echo dark) | tee ~/dotfiles/color-scheme
#emacsclient -e "(set-solarized-theme nil '$(cat ~/dotfiles/color-scheme))" > /dev/null || true
if [ "$(cat ~/dotfiles/color-scheme)" = "dark" ]; then
dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita-dark'"
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
else
dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'"
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
fi

5
bin/setbg.sh

@ -0,0 +1,5 @@
NO_OUTPUTS=$(swaymsg -t get_outputs | jq 'length')
IFS=' '
paste <(find ~/wp/ -type f | shuf | head -n$NO_OUTPUTS) <(swaymsg -t get_outputs | jq -r 'map(.name)|.[]') | while read file output; do
swaymsg output $output bg "$file" stretch
done

3
bin/spotify_meta.sh

@ -0,0 +1,3 @@
#!/bin/sh
#Spotify
exec playerctl metadata -f '{{emoji(status)}} {{xesam:artist}} - {{xesam:title}}' -F

2
bin/sunplate.sh

@ -0,0 +1,2 @@
#!/bin/sh
mosquitto_pub -h frumar.local -u iot -P asdf -t "yorick/home/office/sunplate" -m $1

20
default.nix

@ -1,20 +0,0 @@
{pkgs ? import <nixpkgs> {}, ...}:
let
inherit (pkgs) lib;
bin = pkgs.callPackage ./bin/default.nix {};
i3 = with_lock: compton_name: pkgs.callPackage ./i3/i3.nix {
inherit (bin) screenshot_public;
inherit with_lock;
inherit compton_name;
};
xres = dpi: pkgs.callPackage ./x/default.nix { inherit dpi; };
in lib.mapAttrs (k: paths:
pkgs.symlinkJoin { inherit paths; name = "dotfiles-${k}"; }
) {
ascanius = [(i3 true "default") (xres 109)];
woodhouse = [(i3 false "default") (xres 44)];
pennyworth = [];
frumar = [];
jarvis = [(i3 true "intel") (xres 192)];
}

88
emacs/.emacs.d/init.el

@ -20,10 +20,92 @@
;; If there is more than one, they won't work right.
'(custom-safe-themes
(quote
("d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
)
("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" default)))
'(notmuch-saved-searches
(quote
((:name "unread" :query "tag:unread" :key "u")
(:name "flagged" :query "tag:flagged" :key "f")
(:name "sent" :query "tag:sent" :key "t")
(:name "drafts" :query "tag:draft" :key "d")
(:name "all mail" :query "*" :key "a")
(:name "inbox" :query "tag:inbox"))))
'(safe-local-variable-values
(quote
((eval c-set-offset
(quote inlambda)
0)
(eval c-set-offset
(quote arglist-cont-nonempty)
(quote
(c-lineup-gcc-asm-reg c-lineup-arglist)))
(eval c-set-offset
(quote arglist-close)
0)
(eval c-set-offset
(quote arglist-intro)
(quote ++))
(eval c-set-offset
(quote case-label)
0)
(eval c-set-offset
(quote statement-case-open)
0)
(eval c-set-offset
(quote access-label)
(quote -))
(eval c-set-offset
(quote substatement-open)
0)
(eval c-set-offset
(quote arglist-cont-nonempty)
(quote +))
(eval c-set-offset
(quote arglist-cont)
0)
(eval c-set-offset
(quote arglist-intro)
(quote +))
(eval c-set-offset
(quote inline-open)
0)
(eval c-set-offset
(quote defun-open)
0)
(eval c-set-offset
(quote innamespace)
0)
(indicate-empty-lines . t)))))
(setq org-modules '(org-bbdb org-bibtex org-docview org-gnus org-habit
org-info org-irc org-mhe org-rmail org-w3m))
org-info org-irc org-mhe org-rmail org-w3m))
(setq max-lisp-eval-depth 10000)
(setq max-specpdl-size 13000)
(org-babel-load-file "~/dotfiles/emacs/emacs.org")
;(add-to-list 'custom-theme-load-path "~/tmp/emacs-color-theme-solarized")
;; (defun set-solarized-theme (frame theme)
;; (set-frame-parameter frame 'background-mode theme)
;; (set-terminal-parameter frame 'background-mode theme)
;; (load-theme 'solarized)
;; ;; transparent background
;; (when (not (display-graphic-p)) (set-face-background 'default "unspecified-bg" frame)))
;; (add-hook 'after-make-frame-functions
;; (lambda (frame)
;; (let ((mode (if (display-graphic-p frame) 'light 'dark)))
;; (set-solarized-theme frame mode)
;; )))
(xterm-mouse-mode 1)
(define-key local-function-key-map "\033[73;5~" [(control return)])
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(evil-goggles-change-face ((t (:inherit diff-removed))))
'(evil-goggles-delete-face ((t (:inherit diff-removed))))
'(evil-goggles-paste-face ((t (:inherit diff-added))))
'(evil-goggles-undo-redo-add-face ((t (:inherit diff-added))))
'(evil-goggles-undo-redo-change-face ((t (:inherit diff-changed))))
'(evil-goggles-undo-redo-remove-face ((t (:inherit diff-removed))))
'(evil-goggles-yank-face ((t (:inherit diff-changed)))))

331
emacs/emacs.org

@ -9,9 +9,14 @@
** use-package compile-time
#+BEGIN_SRC emacs-lisp
(eval-when-compile (require 'use-package))
(require 'diminish)
;(require 'diminish)
(require 'bind-key)
#+END_SRC
** Custom file
#+BEGIN_SRC emacs-lisp
(setq custom-file "~/dotfiles/emacs/emacs-custom.el")
(load custom-file)
#+END_SRC
* Org stuff
** modules
#+BEGIN_SRC emacs-lisp
@ -38,7 +43,10 @@
(setq org-agenda-files (list "~/org/life.org"
"~/org/ru.org"
"~/org/symfo.org"
"~/org/fiction.org"))
"~/org/fiction.org"
"~/serokell/serok.el/2019.org"
"~/engineering/lumi.org"
"~/serokell/serok.el/tasks.org"))
(setq org-use-fast-todo-selection t)
(setq org-directory "~/org")
@ -72,9 +80,16 @@
entry
(file+headline org-index-file "todo")
"* TODO %?\n")))
#+END_SRC
#+RESULTS:
| l | Today I learned | entry | (file+datetree (org-file-path til.org)) | * %? |
| u | link | entry | (file+headline org-index-file check links) | * %^L |
| w | Week review | entry | (file+datetree (org-file-path weeklog.org)) | * %? |
| t | todo item | entry | (file+headline org-index-file todo) | * TODO %? |
** add templates
#+BEGIN_SRC emacs-lisp
(add-to-list 'org-structure-template-alist
@ -84,7 +99,7 @@
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)
(sh . t)
))
#+END_SRC
@ -105,24 +120,45 @@
(setq org-ref-completion-library 'org-ref-ivy-cite))
#+END_SRC
* Look
** Fonts
#+BEGIN_SRC emacs-lisp
(set-face-attribute 'default nil
:family "monospace"
:height 120
:weight 'normal
:width 'normal)
#+END_SRC
** Solarized
#+BEGIN_SRC emacs-lisp
(use-package solarized
:if window-system
:init
(setq-default frame-background-mode 'dark)
(set-frame-parameter nil 'background-mode 'dark)
(add-hook 'after-make-frame-functions (lambda (frame)
"Reenable solarized"
(enable-theme 'solarized-dark)))
:config
(load-theme 'solarized-dark t)
(enable-theme 'solarized-dark))
;; (use-package solarized
;; :if window-system
;; :init
;; (setq-default frame-background-mode 'dark)
;; (set-frame-parameter nil 'background-mode 'dark)
;; (add-hook 'after-make-frame-functions (lambda (frame)
;; "Reenable solarized"
;; (enable-theme 'solarized-dark)))
;; :config
;; (load-theme 'solarized-dark t)
;; (enable-theme 'solarized-dark))
(setq solarized-distinct-fringe-background t)
(setq solarized-scale-org-headlines nil)
(defun reload-solarized (event)
(let ((theme (intern (concat "solarized-" (with-temp-buffer
(insert-file-contents "~/dotfiles/color-scheme")
(string-trim (buffer-string))
)))))
(load-theme theme t)))
(reload-solarized nil)
;; auto-reload
(require 'filenotify)
(file-notify-add-watch "~/dotfiles/color-scheme" '(change) 'reload-solarized)
#+END_SRC
** Transparency
#+BEGIN_SRC emacs-lisp
(set-frame-parameter (selected-frame) 'alpha '(90 . 85))
(add-to-list 'default-frame-alist '(alpha . (90 . 85)))
(set-frame-parameter (selected-frame) 'alpha '(95 . 95))
(add-to-list 'default-frame-alist '(alpha . (95 . 95)))
#+END_SRC
** Cleaner frames
#+BEGIN_SRC emacs-lisp
@ -135,6 +171,31 @@
(when window-system (global-hl-line-mode))
(show-paren-mode t)
#+END_SRC
** live hex color previews
from https://vickychijwani.me/nuggets-from-my-emacs-part-i/
#+BEGIN_SRC emacs-lisp
;; CSS color values colored by themselves
;; http://news.ycombinator.com/item?id=873541
(defvar hexcolor-keywords
'(("#[abcdef[:digit:]]+"
(0 (put-text-property
(match-beginning 0)
(match-end 0)
'face (list :background
(match-string-no-properties 0)))))))
(defun hexcolor-add-to-font-lock ()
(font-lock-add-keywords nil hexcolor-keywords))
(add-hook 'css-mode-hook 'hexcolor-add-to-font-lock)
#+END_SRC
** diminish
#+BEGIN_SRC emacs-lisp
;(diminish 'undo-tree-mode)
;(diminish 'auto-revert-mode)
;(diminish 'org-indent-mode)
#+END_SRC
* Feel
#+BEGIN_SRC emacs-lisp
(defalias 'yes-or-no-p 'y-or-n-p)
@ -184,18 +245,19 @@
(setq enable-recursive-minibuffers t)
:config
(ivy-mode t)
:diminish
:bind (("C-s" . swiper)
("C-c C-r" . ivy-resume)
("<f6>" . ivy-resume)))
#+END_SRC
** Counsel
#+BEGIN_SRC emacs-lisp
(use-package counsel
:bind (("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)))
(use-package counsel
:bind (("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("C-h f" . counsel-describe-function)
("C-h v" . counsel-describe-variable)))
#+END_SRC
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
(global-set-key (kbd "<f1> l") 'counsel-find-library)
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
@ -208,17 +270,71 @@
** projectile
#+BEGIN_SRC emacs-lisp
(use-package projectile
:config
(projectile-global-mode t)
(use-package counsel-projectile))
:init
(setq projectile-mode-line "Projectile")
:config
(projectile-global-mode t)
)
;(use-package counsel-projectile))
#+END_SRC
** ggtags
#+BEGIN_SRC emacs-lisp
(use-package ggtags
:demand
:bind ("M-." . ggtags-find-tag-dwim))
#+END_SRC
** intuitive window resize
#+BEGIN_SRC emacs-lisp
;; intuitive window resizing
(defun xor (b1 b2)
(or (and b1 b2)
(and (not b1) (not b2))))
(defun move-border-left-or-right (arg dir)
"General function covering move-border-left and move-border-right. If DIR is
t, then move left, otherwise move right."
(interactive)
(if (null arg) (setq arg 3))
(let ((left-edge (nth 0 (window-edges))))
(if (xor (= left-edge 0) dir)
(shrink-window arg t)
(enlarge-window arg t))))
(defun move-border-up-or-down (arg dir)
"General function covering move-border-up and move-border-down. If DIR is
t, then move up, otherwise move down."
(interactive)
(if (null arg) (setq arg 3))
(let ((top-edge (nth 1 (window-edges))))
(if (xor (= top-edge 0) dir)
(shrink-window arg nil)
(enlarge-window arg nil))))
(defun move-border-left (arg)
(interactive "P")
(move-border-left-or-right arg t))
(defun move-border-right (arg)
(interactive "P")
(move-border-left-or-right arg nil))
(defun move-border-up (arg)
(interactive "P")
(move-border-up-or-down arg t))
(defun move-border-down (arg)
(interactive "P")
(move-border-up-or-down arg nil))
;; keybindings for window resizing
(global-set-key (kbd "C-S-<left>") 'move-border-left)
(global-set-key (kbd "C-S-<right>") 'move-border-right)
(global-set-key (kbd "C-s-<up>") 'move-border-up)
(global-set-key (kbd "C-s-<down>") 'move-border-down)
#+END_SRC
#+RESULTS:
: move-border-down
** TODO i3-emacs
* editing
@ -232,17 +348,45 @@
#+BEGIN_SRC emacs-lisp
(global-linum-mode t)
#+END_SRC
** direnv
#+BEGIN_SRC emacs-lisp
(use-package direnv
:config
(direnv-mode))
#+END_SRC
** autocomplete
#+BEGIN_SRC emacs-lisp
(use-package company
:hook (after-init . global-company-mode))
#+END_SRC
** Indentation
#+BEGIN_SRC emacs-lisp
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2) ; or any other preferred value
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2) ; or any other preferred value
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)
(define-key prog-mode-map (kbd "<tab>") #'company-indent-or-complete-common)
#+END_SRC
** smart home key
#+BEGIN_SRC emacs-lisp
;; "smart" home, i.e., home toggles b/w 1st non-blank character and 1st column
(defun smart-beginning-of-line ()
"Move point to first non-whitespace character or beginning-of-line."
(interactive "^") ; Use (interactive "^") in Emacs 23 to make shift-select work
(let ((oldpos (point)))
(back-to-indentation)
(and (= oldpos (point))
(beginning-of-line))))
(global-set-key [home] 'smart-beginning-of-line)
(global-set-key (kbd "C-a") 'smart-beginning-of-line)
#+END_SRC
** git-gutter-fringe
#+BEGIN_SRC emacs-lisp
(use-package git-gutter-fringe
:config (global-git-gutter-mode t))
;; (use-package git-gutter-fringe
;; :config (global-git-gutter-mode t))
#+END_SRC
** all-the-icons
#+BEGIN_SRC emacs-lisp
@ -265,40 +409,94 @@ from [[https://www.emacswiki.org/emacs/BackupDirectory][emacs wiki]]
#+END_SRC
** Evil
#+BEGIN_SRC emacs-lisp
(use-package evil
:config (evil-mode t))
(use-package which-key
:init
(setq which-key-allow-evil-operators t)
(setq which-key-show-operator-state-maps t)
:config
(which-key-mode 1)
(which-key-setup-minibuffer)) ; do I need this?
(global-undo-tree-mode)
(setq evil-want-C-i-jump nil)
(use-package evil
:config
(evil-mode t)
(evil-set-undo-system 'undo-tree)
; change cursor based on mode
(add-hook 'evil-insert-state-entry-hook (lambda () (when (not (display-graphic-p)) (send-string-to-terminal "\033[5 q"))))
(add-hook 'evil-normal-state-entry-hook (lambda () (when (not (display-graphic-p)) (send-string-to-terminal "\033[0 q"))))
)
(use-package which-key
:diminish
:init
(setq which-key-allow-evil-operators t)
(setq which-key-show-operator-state-maps t)
:config
(which-key-mode 1)
(which-key-setup-minibuffer)) ; do I need this?
#+END_SRC
#+RESULTS:
: t
*** evil-goggles
#+BEGIN_SRC emacs-lisp
(use-package evil-goggles
:config (evil-goggles-mode)
(evil-goggles-use-diff-faces))
(use-package evil-goggles
:diminish
:config (evil-goggles-mode)
(evil-goggles-use-diff-faces))
#+END_SRC
*** TODO [[https://github.com/emacs-evil/evil-surround][evil-surround]]
*** TODO more evil bindings
**** https://github.com/Somelauw/evil-org-mode/blob/master/doc/keythemes.org
**** follow link with ret
** TODO multiple-cursors
** DONE fix clipboard on wayland
#+BEGIN_SRC emacs-lisp
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (let ((default-directory "~"))
(make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:noquery t
:connection-type 'pipe)))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
nil
(let ((default-directory "~"))
(shell-command-to-string "wl-paste -n | tr -d '\r'"))))
(setq interprogram-cut-function 'wl-copy)
(setq interprogram-paste-function 'wl-paste)
#+END_SRC
#+RESULTS:
: wl-paste
* Tools
** Magit
#+BEGIN_SRC emacs-lisp
(use-package magit
:bind (("C-c g" . magit-status)
("C-c C-g l" . magit-log-all)))
(use-package magit
:bind (("C-c g" . magit-status)
("C-c C-g l" . magit-log-all)))
(use-package forge
:init
(setq forge-topic-list-limit '(60 . 0))
:after magit)
#+END_SRC
** weechat
#+BEGIN_SRC emacs-lisp
(use-package weechat
:commands weechat-connect
:init
(setq weechat-more-lines-amount 100)
(setq weechat-host-default "pennyworth.yori.cc")
(setq weechat-mode-default "ssh -W localhost:%p %h")
(setq weechat-modules '(weechat-button weechat-complete weechat-notifications))
)
#+END_SRC
** Pass
** notmuch
#+BEGIN_SRC emacs-lisp
(use-package pass
:commands pass)
(use-package notmuch
:bind (("C-c n" . notmuch)))
#+END_SRC
*** TODO helm-pass or password-store or fix keybindings for pass
** TODO https://github.com/mbork/beeminder.el
* language-specific
** markdown
@ -322,12 +520,37 @@ from [[https://www.emacswiki.org/emacs/BackupDirectory][emacs wiki]]
#+END_SRC
** haskell
#+BEGIN_SRC emacs-lisp
(load-library "haskell-mode-autoloads")
(use-package intero
:config (add-hook 'haskell-mode-hook 'intero-mode)
)
(load-library "haskell-mode-autoloads")
;; (use-package intero
;; :config (add-hook 'haskell-mode-hook 'intero-mode)
;; )
#+END_SRC
*** TODO intero / haskell mode [[https://wiki.haskell.org/Emacs]]
** rust
#+BEGIN_SRC emacs-lisp
(use-package rust-mode
:commands (rust-mode)
:mode (("\\.rs\\'" . rust-mode)))
#+END_SRC
** terraform-mode
#+BEGIN_SRC emacs-lisp
(use-package terraform-mode
:commands (terraform-mode)
:mode (("\\.tf\\'" . terraform-mode)))
#+END_SRC
** vue
#+BEGIN_SRC emacs-lisp
(use-package vue-mode
:commands (vue-mode)
:mode (("\\.vue\\'" . vue-mode)))
#+END_SRC
** reason
#+BEGIN_SRC emacs-lisp
(use-package reason-mode
:commands (reason-mode)
:mode (("\\.re\\'" . reason-mode)))
#+END_SRC
** TODO proof-general
* Inspiration
** [[https://github.com/hrs/dotfiles/blob/master/emacs/.emacs.d/configuration.org][hrs]]

1
gpg/.gnupg/.gitignore

@ -1 +0,0 @@
private-keys-v1.d/

2
gpg/.gnupg/gpg-agent.conf

@ -1,2 +0,0 @@
enable-ssh-support
extra-socket /home/yorick/.gnupg/S.gpg-agent.extra

11
gpg/.gnupg/gpg.conf

@ -1,11 +0,0 @@
no-greeting
require-cross-certification
charset utf-8
keyserver hkp://pool.sks-keyservers.net
#keyserver pgp.mit.edu
keyserver-options auto-key-retrieve

6
gpg/.gnupg/sshcontrol

@ -1,6 +0,0 @@
# fmt: keygrip ttl extra
# prepend ! to disable
6652F84A3ED1A644D71B1D9013E75922536031F8 60
# RSA key added on: 2016-09-21 15:02:18
# MD5 Fingerprint: c4:f3:3f:dd:37:b2:f6:41:61:83:34:4f:cf:2f:a9:cf
395DF89665BCB7086EF2B1BE9E349BAD641F6E82 60

3
install.sh

@ -1,5 +1,4 @@
#!/usr/bin/env bash
#!nix-shell -i bash -p stow
set -e
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix x gpg mutt stow rofi
nix build -f. $(hostname -s)
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix mutt

14
misc/.borgignore

@ -0,0 +1,14 @@
/home/*/.cache/*
*/cache2/*
/home/*/.local/share/Trash
*/.npm/
*/annex/
*/Cache/*
/home/*/.local/share/Steam
*/.stack
*/.stack-work
*/CacheStorage
*/*Cache
/home/*/.wine/drive_c/users/*/Temp
*/up_queue/*
/home/yorick/Lumiguide-Generic

11
mutt/.mutt/creds

@ -1,8 +1,9 @@
set my_pass = "`pass sysadmin/yori.ccMail | head -n1`"
set spoolfile = "imaps://yorick:$my_pass@pennyworth.yori.cc/INBOX"
set imap_user=yorick@yori.cc
set imap_pass = "`pass sysadmin/yori.ccMail | head -n1`"
set folder = "imaps://yorick@yori.cc@pennyworth.yori.cc/"
set spoolfile = "=INBOX"
set realname = "Yorick van Pelt"
set from = "Yorick van Pelt <yorick@yorickvanpelt.nl>"
set folder = "imaps://pennyworth.yori.cc/"
set smtp_url = "smtp://yorick@pennyworth.yori.cc:587/"
set smtp_pass = "$my_pass"
set smtp_url = "smtp://yorick@yori.cc@pennyworth.yori.cc:587/"
set smtp_pass = "$imap_pass"

39
nix/.config/nixpkgs/arbtt.nix

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.arbtt;
in {
options.services.arbtt = {
enable = mkEnableOption "arbtt";
package = mkOption { type = types.package; default = pkgs.haskellPackages.arbtt; };
};
config = mkIf cfg.enable {
systemd.user.services.arbtt = {
Unit = {
Description = "arbtt";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''
${cfg.package}/bin/arbtt-capture
'';
};
};
};
}

8
nix/.config/nixpkgs/config.nix

@ -1,14 +1,10 @@
{
allowUnfree = true;
chromium = {
vaapiSupport = true;
};
# chromium = {
# enablePepperFlash = true;
# enablePepperPDF = true;
# vaapiSupport = true;
# };
android_sdk.accept_license = true;
}

464
nix/.config/nixpkgs/home.nix

@ -1,17 +1,91 @@
{ pkgs, ... }: {
{ lib, config, options, ... }:
let
bin = pkgs.callPackage /home/yorick/dotfiles/bin {};
dpi = 109;
font = {
__toString = self: "${self.name} ${self.size}";
name = "DejaVu Sans Mono";
size = "11";
};
sources = import /home/yorick/nixos/nix/sources.nix;
nixpkgs-loc = /home/yorick/nixpkgs; #sources.nixpkgs;
pkgs = import nixpkgs-loc {
overlays = [
(import sources.nixpkgs-wayland)
(import sources.nixpkgs-mozilla)
(import sources.emacs-overlay)
(import ./overlays/01-backports.nix)
(import ./overlays/02-extrapkgs.nix)
(import ./overlays/03-customizations.nix)
(import ./overlays/04-combine.nix)
(import ./overlays/05-envs.nix)
];
};
y-firefox = pkgs.wrapFirefox pkgs.latest.firefox-beta-bin.unwrapped {
forceWayland = true;
browserName = "firefox";
};
in
{
imports = [ ./arbtt.nix ./libinput-gestures.nix ];
programs = {
gh = {
enable = true;
aliases.co = "pr checkout";
};
direnv.enable = true;
home-manager = {
enable = true;
path = https://github.com/rycee/home-manager/archive/master.tar.gz;
path = toString /home/yorick/dotfiles/nix/home-manager;
};
emacs = {
enable = true;
package = pkgs.emacsPgtkGcc;
extraPackages = _: let
epkgs = pkgs.emacsPackagesFor pkgs.emacsPgtkGcc;
in (with epkgs.melpaPackages; [ reason-mode evil counsel ivy ivy-hydra swiper magit forge avy ]) ++ (with epkgs.melpaPackages; [
epkgs.undo-tree
epkgs.notmuch epkgs.rust-mode
company
projectile counsel-projectile
ggtags use-package org-bullets solarized-theme
evil-leader evil-surround #evil-magit
epkgs.evil-goggles epkgs.ox-mediawiki
nix-buffer which-key git-gutter-fringe
all-the-icons epkgs.org-cliplink
pandoc-mode markdown-mode interleave
org-ref haskell-mode request #intero
weechat s elixir-mode htmlize
linum-relative terraform-mode
direnv vue-mode solarized-theme
wlrctl
(epkgs.melpaBuild {
pname = "nix-mode";
version = "1.4.0";
packageRequires = [ json-mode epkgs.mmm-mode company ];
recipe = pkgs.writeText "recipe" ''
(nix-mode
:repo "nixos/nix-mode" :fetcher github
:files ("nix*.el"))
'';
src = pkgs.fetchFromGitHub {
owner = "nixos";
repo = "nix-mode";
rev = "ddf091708b9069f1fe0979a7be4e719445eed918";
sha256 = "0s8ljr4d7kys2xqrhkvj75l7babvk60kxgy4vmyqfwj6xmcxi3ad";
};
})
]);
};
git = {
enable = true;
userName = "Yorick van Pelt";
userEmail = "yorick@yorickvanpelt.nl";
signing.key = "A36E70F9DC014A15";
# signing.signByDefault = true;
signing.signByDefault = true;
extraConfig.help.autocorrect = 5;
extraConfig.push.default = "simple";
extraConfig.pull.ff = "only";
extraConfig."includeIf \"gitdir:~/serokell/\"".path = "~/serokell/.gitconfig";
aliases = {
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
@ -33,16 +107,85 @@
compression = true;
serverAliveInterval = 120;
controlMaster = "auto";
matchBlocks = {
matchBlocks = rec {
"pub.yori.cc" = {
user = "public";
identityFile = "~/.ssh/id_rsa_pub";
identitiesOnly = true;
};
oxygen.hostname = "oxygen.obfusk.ch";
nyamsas = { hostname = "nyamsas.quezacotl.nl"; port = 1337; };
phassa = { hostname = "karpenoktem.nl"; port = 33933; };
"jupiter.serokell.io" = jupiter;
jupiter = { hostname = "jupiter.serokell.io"; port = 17788; };
athena = { hostname = "athena.lumi.guide"; user = "yorick.van.pelt"; };
rpibuild3 = { hostname = "10.110.0.3"; user = "yorick.van.pelt"; port = 4222; };
styx = { hostname = "10.110.0.1"; user = "yorick.van.pelt"; port = 2233; };
"*.lumi.guide" = {
user = "yorick.van.pelt";
};
nyx = { hostname = "nyx.lumi.guide"; user = "yorick.van.pelt"; port = 2233; };
zeus = { hostname = "zeus.lumi.guide"; user = "yorick.van.pelt"; port = 2233; };
ponos = { hostname = "ponos.lumi.guide"; user = "yorick.van.pelt"; port = 2233; };
medusa = { hostname = "lumi.guide"; user = "yorick.van.pelt"; port = 2233; };
# signs
"10.108.0.*" = {
user = "yorick.van.pelt";
port = 4222;
# verified by wireguard key
extraOptions.StrictHostKeyChecking = "no";
};
"10.109.0.*" = {
user = "yorick.van.pelt";
# verified by wireguard key
extraOptions.StrictHostKeyChecking = "no";
};
"10.110.0.*" = {
port = 2233;
user = "yorick.van.pelt";
# verified by wireguard key
extraOptions.StrictHostKeyChecking = "no";
};
"10.111.0.*" = {
user = "yorick.van.pelt";
# verified by wireguard key
extraOptions.StrictHostKeyChecking = "no";
};
"192.168.42.*" = {
user = "yorick.van.pelt";
#proxyJump = "athena";
};
# "192.168.178.*" = {
# extraOptions.Compression = "no";
# };
};
extraConfig = ''
Match host "192.168.*.*" exec "ip route get %h | grep -v -q via"
Compression no
Match host "192.168.42.*" exec "ip route get %h | grep -q via"
ProxyJump athena
'';
};
fish = {
enable = true;
shellAliases = {
l = "ls";
ls = "exa";
nr = "nix repl \"<nixpkgs>\"";
nsp = "nix-shell -p";
};
interactiveShellInit = ''
function fuck -d "Correct your previous console command"
set -l fucked_up_command $history[1]
env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command
if [ "$unfucked_command" != "" ]
eval $unfucked_command
builtin history delete --exact --case-sensitive -- $fucked_up_command
builtin history merge ^ /dev/null
end
end
starship init fish | source
source ~/dotfiles/nr.fish
'';
promptInit = "set fish_greeting";
};
bash = {
enable = true;
@ -51,64 +194,283 @@
nr = "nix repl \"<nixpkgs>\"";
nsp = "nix-shell -p";
};
initExtra = "eval $(thefuck --alias)";
initExtra = ''
#eval $(thefuck --alias)
function fuck () {
TF_PYTHONIOENCODING=$PYTHONIOENCODING;
export TF_SHELL=bash;
export TF_ALIAS=fuck;
export TF_SHELL_ALIASES=$(alias);
export TF_HISTORY=$(fc -ln -10);
export PYTHONIOENCODING=utf-8;
TF_CMD=$(
thefuck THEFUCK_ARGUMENT_PLACEHOLDER $@
) && eval $TF_CMD;
unset TF_HISTORY;
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
history -s $TF_CMD;
}
# This script was automatically generated by the broot function
# More information can be found in https://github.com/Canop/broot
# This function starts broot and executes the command
# it produces, if any.
# It's needed because some shell commands, like `cd`,
# have no useful effect if executed in a subshell.
function br {
f=$(mktemp)
(
set +e
broot --outcmd "$f" "$@"
code=$?
if [ "$code" != 0 ]; then
rm -f "$f"
exit "$code"
fi
)
code=$?
if [ "$code" != 0 ]; then
return "$code"
fi
d=$(<"$f")
rm -f "$f"
eval "$d"
}
eval "$(starship init bash)"
'';
};
};
xresources.properties =
let font = "DejaVu Sans Mono";
fsize = 11;
dpi = 192; in
{
"URxvt.scrollstyle" = "plain";
"URxvt.scrollBar_right" = "true";
"URxvt.perl-ext-common" = "default,matcher,font-size,vtwheel";
"URxvt.url-launcher" = "xdg-open";
"URxvt.matcher.button" = "1";
"URxvt.urgentOnBell" = "True";
"URxvt.depth" = "32";
"URxvt.borderColor" = "S_base03";
# "! URxvt.background" = "[95]#202020";
"*font" = "xft:${font}:size=${toString fsize}:antialias=true:hinting=true";
"polybar.font" = "${font}:size=${toString fsize}:antialias=true:hinting=true;2";
"URxvt.geometry" = "100x30";
"URxvt.scrollColor" = "S_base0";
"rofi.font" = "${font} ${toString fsize}";
"Emacs.font" = "${font}-${toString fsize}";
"URxvt.font-size.step" = "4";
"URxvt.keysym.C-equal" = "perl:font-size:increase";
"URxvt.keysym.C-minus" = "perl:font-size:decrease";
xresources.properties = {
"*font" = "xft:${font.name}:size=${font.size}:antialias=true:hinting=true";
"rofi.font" = toString font;
"Emacs.font" = "${font.name}-${font.size}";
"Xft.dpi" = dpi;
"*dpi" = dpi;
};
xresources.extraConfig = builtins.readFile (
pkgs.fetchFromGitHub {
owner = "solarized";
repo = "xresources";
rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
} + "/Xresources.light");
# xresources.extraConfig = builtins.readFile (
# pkgs.fetchFromGitHub {
# owner = "solarized";
# repo = "xresources";
# rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
# sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
# } + "/Xresources.dark");
home.file.".emacs.d/init.el" = { source = (toString /home/yorick/dotfiles/emacs/.emacs.d/init.el); };
xdg.configFile."streamlink/config".text = ''
player = mpv --cache 2048
default-stream = best
'';
xdg.configFile."waybar" = { source = ./waybar; recursive = true; onChange = "systemctl --user restart waybar"; };
programs.mako.enable = true;
services = {
compton = {
lorri.enable = true;
#arbtt.enable = true;
libinput-gestures.enable = false;
gpg-agent = {
enable = true;
backend = "glx";
extraOptions = ''
glx-no-stencil = true;
unredir-if-possible = true;
enableSshSupport = true;
extraConfig = ''
pinentry-program ${pkgs.pinentry_gnome}/bin/pinentry-gnome3
'';
};
# redshift = {
# enable = false;
# latitude = "51.8";
# longitude = "5.8";
# temperature = {
# day = 6500;
# night = 5500;
# };
# };
};
wayland.windowManager.sway = {
enable = true;
#package = pkgs.i3-gaps;
config = {
bars = [
#{ position = "top"; command = "swaybar"; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs /home/yorick/dotfiles/i3/status.toml"; }
];
gaps.inner = 5;
modifier = "Mod4";
window.hideEdgeBorders = "smart";
fonts = [ (toString font) ];
window.border = 2;
floating.modifier = "Mod4";
keybindings = with pkgs; (builtins.head (builtins.head options.wayland.windowManager.sway.config.type.getSubModules).imports).options.keybindings.default //
(let exec = pkg: cmd: "exec --no-startup-id ${pkg}/bin/${cmd}"; mod = "Mod4"; in
{
"${mod}+Shift+c" = "kill";
"${mod}+j" = "focus left";
"${mod}+k" = "focus right";
"${mod}+d" = "layout toggle split";
"${mod}+i" = "exec --no-startup-id bash /home/yorick/dotfiles/bin/invert.sh";
#"${mod}+ctrl+l" = "exec --no-startup-id loginctl lock-session";
"${mod}+ctrl+l" = "exec --no-startup-id sleep 1s && pkill -USR1 swayidle";
"${mod}+Return" = "exec alacritty";
"${mod}+Escape" = "workspace back_and_forth";
"${mod}+0" = "workspace 10";
"${mod}+Shift+0" = "move container to workspace 10";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Right" = "move right";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Down" = "move down";
"${mod}+Ctrl+Right" = "move workspace to output right";
"${mod}+Ctrl+Left" = "move workspace to output left";
"${mod}+Ctrl+Up" = "move workspace to output up";
"${mod}+Ctrl+Down" = "move workspace to output down";
"XF86MonBrightnessUp" = exec light "light -A 5";
"XF86MonBrightnessDown" = exec light "light -U 5";
"ctrl+XF86MonBrightnessUp" = exec light "light -A 1";
"ctrl+XF86MonBrightnessDown" = exec light "light -U 1";
"XF86AudioLowerVolume" = exec alsaUtils "amixer set Master 1%-";
"XF86AudioRaiseVolume" = exec alsaUtils "amixer set Master 1%+";
"XF86AudioMute" = exec alsaUtils "amixer set Master toggle";
"${mod}+Shift+s" = exec bin.screenshot_public "screenshot_public";
"Print" = exec bin.screenshot_public "screenshot_public";
"${mod}+Shift+t" = "exec --no-startup-id /home/yorick/dotfiles/bin/toggle_solarized.sh";
"--locked ${mod}+x" = "exec /home/yorick/dotfiles/bin/docked.sh";
"${mod}+p" = "exec /home/yorick/dotfiles/bin/ala-fzf-pass.sh";
#"${mod}+p" = exec rofi-pass "rofi-pass";
"${mod}+e" = exec pkgs.wldash "wldash start-or-kill";
"--locked ${mod}+bracketleft" = "exec --no-startup-id /home/yorick/dotfiles/bin/sunplate.sh 0";
"--locked ${mod}+bracketright" = "exec --no-startup-id /home/yorick/dotfiles/bin/sunplate.sh 1";
});
};
systemdIntegration = true;
extraConfig = ''
workspace_auto_back_and_forth yes
input "1267:8400:ELAN_Touchscreen" {
map_to_output eDP-1
}
output "Unknown 0x00000000" {
position 0 0
bg "/home/yorick/Downloads/wallpapers/beyond-4k-2560×1440.jpg" fill
}
output "BenQ Corporation BenQ GW2765 36H03689019" {
position 2560 0
bg "/home/yorick/Downloads/wallpapers/beyond-4k-2560×1440.jpg" fill
}
output "eDP-1" {
# disable
}
input "1739:30383:DLL075B:01_06CB:76AF_Touchpad" {
natural_scroll enabled
tap enabled
dwt enabled
# middle_emulation enabled
}
input "1:1:AT_Translated_Set_2_keyboard" {
xkb_options caps:escape
}
for_window [title="TelegramDesktop"] fullscreen enable
for_window [app_id="ala-fzf"] floating enable
exec mako
exec swayidle timeout 300 'swaymsg "output * dpms off"; swaylock' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock'
'';
};
xsession.initExtra = "xrandr --dpi ${toString dpi}";
home.sessionVariables = {
MOZ_USE_XINPUT2 = "1";
MOZ_ENABLE_WAYLAND = "1";
EDITOR = "emacsclient";
#GDK_BACKEND = "wayland";
TERMINAL = "alacritty";
QT_WAYLAND_DISABLE_WINDOWDECORATION="1";
QT_QPA_PLATFORM = "wayland";
_JAVA_AWT_WM_NONREPARENTING = "1";
XCURSOR_THEME = "Adwaita";
XCURSOR_PATH = "${pkgs.gnome3.adwaita-icon-theme}/share/icons";
XDG_CURRENT_DESKTOP = "sway";
};
home.packages = with pkgs.envs; [
apps code de games pdf media misc scripts coins js
] ++ (with pkgs; [
github-cli libreoffice nix-tree virt-manager watchman
gnome3.gcr.out #alacritty
waybar slurp grim wl-clipboard
wldash gebaar-libinput
notmuch gmailieer afew
swaybg swayidle
swaylock broot starship
fd htop kcachegrind lm_sensors niv
nixfmt linuxPackages.perf pssh slack smartmontools vim waypipe xdg_utils
nix-top nix-diff
ltrace asciinema cargo minecraft
unzip
exa obs-studio-dmabuf obs-wlrobs
zoom-us
cachix eagle
y-firefox
]); # qtwayland
# programs.firefox = {
# enable = true;
# package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
# forceWayland = true;
# };
# };
systemd.user.services.waybar = {
Unit = {
Description = "waybar";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''
${pkgs.waybar}/bin/waybar
'';
};
};
# systemd.user.services.gmi = {
# Unit = {
# Description = "gmi";
# };
# Service = {
# CPUSchedulingPolicy = "idle";
# IOSchedulingClass = "idle";
# WorkingDirectory = "/home/yorick/mail/account.gmail";
# ExecStart = "${pkgs.writeScript "gmi-pull" ''
# #!/usr/bin/env bash
# gmi pull
# notmuch new
# ''}";
# };
# };
# systemd.user.timers.gmi = {
# Timer = {
# OnCalendar = "*:0/5";
# Unit = "gmi.service";
# };
# Install.WantedBy = [ "timers.target" ];
# };
systemd.user.services.gebaard = {
Unit = {
Description = "gebaard";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''
${pkgs.gebaar-libinput}/bin/gebaard
'';
# nvidia = ''
# paint-on-overlay = true;
# glx-no-rebind-pixmap = true;
# glx-swap-method = -1;
# xrender-sync-fence = true;
# ''; vsync = "opengl-oml";
};
};
home.file.".gnupg/gpg.conf".text = ''
no-greeting
require-cross-certification
charset utf-8
keyserver hkps://keys.openpgp.org
#keyserver-options auto-key-retrieve
'';
manual.manpages.enable = false;
}

39
nix/.config/nixpkgs/libinput-gestures.nix

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.libinput-gestures;
in {
options.services.libinput-gestures = {
enable = mkEnableOption "libinput-gestures";
package = mkOption { type = types.package; default = pkgs.libinput-gestures; };
};
config = mkIf cfg.enable {
systemd.user.services.libinput-gestures = {
Unit = {
Description = "libinput-gestures";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''
${pkgs.libinput-gestures}/bin/libinput-gestures
'';
};
};
};
}

19
nix/.config/nixpkgs/overlays/01-backports.nix

@ -6,20 +6,11 @@ let
in if (versionOlder oldpkgver newpkgver) then original.overrideDerivation override else original;
in
{
# spotify = overrideOlder pkgs.spotify (attrs: rec {
# version = "1.0.48.103.g15edf1ec-94";
# name = "spotify-${version}";
# src = fetchurl {
# url = "http://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb";
# sha256 = "0rpwxgxv2ihfhlri98k4n87ynlcp569gm9q6hd8jg0vd2jgji8b3";
# };
#});
haskellPackages = with super.haskell.lib; super.haskellPackages.extend (hself: hsuper:{
X11 = overrideCabal hsuper.X11 (drv: {
librarySystemDepends = drv.librarySystemDepends ++ [ self.xorg.libXScrnSaver ];
});
});
factorio = super.factorio.override {
releaseType = "alpha";
username = "yorickvp";
token = "dd8dca57e4f1891117d351b25cf56f";
};
# numix-solarized-gtk-theme = super.numix-solarized-gtk-theme.overrideDerivation (attrs: rec {
# version = "20180204";
# name = "numix-solarized-gtk-theme-${version}";

5
nix/.config/nixpkgs/overlays/02-extrapkgs.nix

@ -2,11 +2,8 @@ self: super: {
ftb = self.callPackage ../pkgs/ftb.nix {};
pyroscope = self.callPackage ../pkgs/pyroscope {};
peageprint = self.callPackage ../pkgs/peageprint.nix {};
nottetris2 = self.callPackage ../pkgs/nottetris2.nix {};
mailpile = self.callPackage ../pkgs/mailpile.nix {};
lejos = self.callPackage ../pkgs/lejos.nix {};
playerctl = self.callPackage ../pkgs/playerctl.nix {};
#lejos = self.callPackage ../pkgs/lejos.nix {};
libinput-gestures = super.libinput-gestures.override { extraUtilsPath = [
self.xdotool self.python3
];};

39
nix/.config/nixpkgs/overlays/03-customizations.nix

@ -1,21 +1,34 @@
self: super: {
spotify = super.spotify.overrideDerivation (attrs: rec {
installPhase = builtins.replaceStrings
["wrapProgram $out/share/spotify/spotify"]
["wrapProgram $out/share/spotify/spotify --add-flags --force-device-scale-factor=\\$SPOTIFY_DEVICE_SCALE_FACTOR"]
attrs.installPhase;
});
mpv = super.mpv.override { vaapiSupport = true; };
polybar = super.polybar.override { i3GapsSupport = true; };
#mpv = super.mpv.override { vaapiSupport = true; };
python36Packages = super.python36Packages.override { overrides = (self: super: {
# pycrypto runs slow tests by default
pycrypto = super.pycrypto.overrideDerivation (attrs: {
installCheckPhase = ''
${self.python.interpreter} nix_run_setup.py test --skip-slow-tests
'';
pycryptodome = super.pycryptodome.overrideDerivation (attrs: {
doCheck = false;
doInstallCheck = false;
setuptoolsCheckPhase = "true";
# installCheckPhase = ''
# ${self.python.interpreter} nix_run_setup.py test --skip-slow-tests
# '';
});
}); };
# emacs-pgtk = with self; emacs26.overrideAttrs (
# { configureFlags ? [], postPatch ? "", nativeBuildInputs ? [], ... }:
# {
# src = fetchFromGitHub {
# owner = "masm11";
# repo = "emacs";
# rev = "d56f600d1ca2e996bedc6a59a85abc983bb3f23d";
# sha256 = "06wycfmr1w3lgpg10ffad1i2sr9ryac54w8qsavhn3h0rlvivjd3";
# };
# patches = [];
# nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook texinfo ];
# configureFlags = configureFlags ++ [ "--without-x" "--with-cairo" "--with-modules" ];
# }
# );
# wine = pkgs.wine.override { wineRelease = "staging"; wineBuild = "wineWow"; };
}

51
nix/.config/nixpkgs/overlays/05-envs.nix