Browse Source

update dotfiles

master
Yorick van Pelt 1 year ago
parent
commit
ddd8511539

+ 5
- 0
emacs/emacs.org View File

@@ -165,6 +165,11 @@
165 165
 (put 'sfp-page-up 'isearch-scroll t)
166 166
 (put 'sfp-page-up 'CUA 'move)
167 167
 (setq scroll-error-top-bottom t)
168
+#+END_SRC
169
+** fix c-z
170
+#+BEGIN_SRC emacs-lisp
171
+(global-unset-key (kbd "C-z"))
172
+
168 173
 #+END_SRC
169 174
 ** Ivy
170 175
 #+BEGIN_SRC emacs-lisp

+ 2
- 0
git/.gitconfig View File

@@ -23,3 +23,5 @@
23 23
 	signingkey = A36E70F9DC014A15
24 24
 [help]
25 25
 	autocorrect = 5
26
+[includeIf "gitdir:~/serokell/"]
27
+path=~/serokell/.gitconfig

+ 1
- 0
gpg/.gnupg/gpg-agent.conf View File

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

+ 2
- 2
i3/i3.nix View File

@@ -1,7 +1,7 @@
1 1
 {writeTextDir, writeScript, lib,
2 2
 rofi, xss-lock, nitrogen, compton-git, i3status, i3-gaps
3 3
 ,i3lock-color, xset, alsaUtils, light, screenshot_public, xorg, libinput-gestures,
4
-haskellPackages, polybar, procps,
4
+haskellPackages, polybar, procps, rofi-pass,
5 5
 with_lock ? true, compton_name ? "default"}:
6 6
 
7 7
 let
@@ -185,7 +185,7 @@ bindsym XF86AudioRaiseVolume exec ${alsaUtils}/bin/amixer set Master 1%+
185 185
 bindsym XF86AudioMute exec ${alsaUtils}/bin/amixer set Master toggle
186 186
 bindsym $mod+Shift+s exec --no-startup-id ${screenshot_public}/bin/screenshot_public
187 187
 bindsym Print exec --no-startup-id ${screenshot_public}/bin/screenshot_public
188
-bindsym $mod+p exec --no-startup-id passmenu
188
+bindsym $mod+p exec --no-startup-id ${rofi-pass}/bin/rofi-pass
189 189
 workspace_auto_back_and_forth yes
190 190
 
191 191
 hide_edge_borders smart

+ 1
- 1
install.sh View File

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

+ 10
- 0
misc/.ssh/config View File

@@ -39,3 +39,13 @@ Host asc_wh
39 39
     hostname 192.168.1.4
40 40
     ProxyJump yorick@woodhouse.onion
41 41
 
42
+Host skl_deployer
43
+    hostname deployer.serokell.team
44
+    RemoteForward /home/yorick/.aws/pass-socket /home/yorick/.aws/pass-socket
45
+    RemoteForward /home/yorick/.gnupg/S.gpg-agent /home/yorick/.gnupg/S.gpg-agent.extra
46
+   ForwardAgent yes
47
+Host skl_deployer_vbox
48
+    hostname 192.168.56.101
49
+    ForwardAgent yes
50
+    RemoteForward /home/yorick/.aws/pass-socket /home/yorick/.aws/pass-socket
51
+    RemoteForward /home/yorick/.gnupg/S.gpg-agent /home/yorick/.gnupg/S.gpg-agent.extra

+ 3
- 8
nix/.config/nixpkgs/overlays/02-extrapkgs.nix View File

@@ -21,18 +21,13 @@ self: super: {
21 21
     '';
22 22
   };
23 23
 
24
-  weiightminder = super.callPackage (super.fetchgit {
24
+
25
+  weiightminder = super.callPackage (builtins.fetchGit {
25 26
     url = https://gist.github.com/yorickvP/229d21a7da13c9c514dbd26147822641;
26 27
     rev = "9749ef4d83c0078bc0248215ee882d7124827cf3";
27
-    sha256 = "0kxi20ss2k22sv3ndplnklc6r7ja0lcgklw6mz43qcj7vmgxxllf";
28
+    #sha256 = "0kxi20ss2k22sv3ndplnklc6r7ja0lcgklw6mz43qcj7vmgxxllf";
28 29
   }) {};
29 30
 
30
-  node2nix_git = (super.callPackage (super.fetchFromGitHub {
31
-    owner = "svanderburg";
32
-    repo = "node2nix";
33
-    rev = "b6545937592e7e54a14a2df315598570480fee9f";
34
-    sha256 = "1y50gs5mk2sdzqx68lr3qb71lh7jp4c38ynybf8ikx7kfkzxvasb";
35
-  }) {}).package;
36 31
 
37 32
     yscripts = super.callPackage /home/yorick/dotfiles/bin {};
38 33
 }

+ 10
- 11
nix/.config/nixpkgs/overlays/05-envs.nix View File

@@ -16,8 +16,7 @@ in {
16 16
       xorg.xrandr
17 17
       pavucontrol
18 18
       light nitrogen
19
-      dropbox # really?
20
-      # wpa_supplicant_gui
19
+      # dropbox # really?
21 20
       xclip siji fira-mono playerctl font-awesome-ttf
22 21
     ];
23 22
     scripts = mkEnv "y-scripts" [
@@ -26,6 +25,7 @@ in {
26 25
     ];
27 26
     
28 27
     apps = mkEnv "y-apps" [
28
+      wpa_supplicant_gui
29 29
       gajim
30 30
       neomutt
31 31
       torbrowser
@@ -35,14 +35,13 @@ in {
35 35
       tdesktop
36 36
       #hexchat
37 37
       #inkscape
38
-      keepassx
38
+      #keepassx
39 39
       # libreoffice
40 40
       # skype
41 41
 	    spotify
42 42
       quasselClient
43 43
       leafpad
44 44
       calibre
45
-      wpa_supplicant_gui
46 45
       #py2.plover
47 46
       wireshark meld
48 47
       discord
@@ -64,7 +63,7 @@ in {
64 63
     ];
65 64
 
66 65
     nix = mkEnv "y-nix" [
67
-      patchelf nix nix-prefetch-git nix-repl nixopsUnstable nox
66
+      patchelf nixUnstable nix-prefetch-git nixopsUnstable nox
68 67
     ];
69 68
 
70 69
     c = mkEnv "y-cdev" [
@@ -83,9 +82,9 @@ in {
83 82
       jq jo
84 83
     ];
85 84
 
86
-    code = mkEnv "y-code" [
87
-      python gitAndTools.hub gnumake cloc silver-searcher gitFire gti
88
-    ];
85
+    code = mkEnv "y-code" (with gitAndTools; [
86
+      python3 git-crypt hub gnumake cloc silver-searcher gitFire gti gcc
87
+    ]);
89 88
     java = openjdk;
90 89
 
91 90
     games = mkEnv "y-games" [
@@ -94,7 +93,7 @@ in {
94 93
     ];
95 94
 
96 95
     js = mkEnv "y-jsdev" [
97
-      js.jshint nodejs-6_x electron node2nix_git
96
+      js.jshint nodejs electron js.node2nix
98 97
     ];
99 98
 
100 99
     pdf = mkEnv "y-pdf" [
@@ -109,8 +108,8 @@ in {
109 108
   # will remove all your previously installed nix-env stuff
110 109
   # so check with nix-env -q first
111 110
   hosts = with self; with self.envs; {
112
-    ascanius = [apps code de games envs.js pdf nix media gcc misc scripts coins];
113
-    jarvis = [apps code de games envs.js pdf nix media gcc misc scripts myEmacs];
111
+    ascanius = [apps code de games envs.js pdf nix media misc scripts coins myEmacs];
112
+    jarvis = [apps code de games envs.js pdf nix media misc scripts myEmacs];
114 113
     woodhouse = [de media misc kodi chromium spotify];
115 114
     pennyworth = [];
116 115
     frumar = [bup gitAndTools.git-annex rtorrent pyroscope];

+ 2
- 2
nix/.config/nixpkgs/pkgs/ftb.nix View File

@@ -9,7 +9,7 @@ in
9 9
     name = "ftb-1.4.14";
10 10
     src = fetchurl {
11 11
         url = "http://ftb.cursecdn.com/FTB2/launcher/FTB_Launcher.jar";
12
-        sha256 = "1m2kyvq4fknr3ric5wwg55qzjqhpkjaq9zragsvippibg78w9hy4";
12
+        sha256 = "10ga4jgyfsj5dy4rj2rla0fpnfpnxv8r3bmxpqpwn7fsry4il79v";
13 13
     };
14 14
 
15 15
   phases = "installPhase";
@@ -32,4 +32,4 @@ in
32 32
       homepage = http://www.feed-the-beast.com;
33 33
       license = stdenv.lib.licenses.unfreeRedistributable;
34 34
   };
35
-}
35
+}

+ 136
- 0
rofi/.config/rofi/config.rasi View File

@@ -0,0 +1,136 @@
1
+configuration {
2
+	modi: "window,run,ssh,drun";
3
+/*	width: 50;*/
4
+/*	lines: 15;*/
5
+/*	columns: 1;*/
6
+	font: "Source Code Pro 12";
7
+/*	bw: 1;*/
8
+/*	location: 0;*/
9
+/*	padding: 5;*/
10
+/*	yoffset: 0;*/
11
+/*	xoffset: 0;*/
12
+/*	fixed-num-lines: true;*/
13
+/*	show-icons: false;*/
14
+/*	terminal: "rofi-sensible-terminal";*/
15
+/*	ssh-client: "ssh";*/
16
+/*	ssh-command: "{terminal} -e {ssh-client} {host}";*/
17
+/*	run-command: "{cmd}";*/
18
+/*	run-list-command: "";*/
19
+/*	run-shell-command: "{terminal} -e {cmd}";*/
20
+/*	window-command: "xkill -id {window}";*/
21
+/*	drun-icon-theme: ;*/
22
+/*	disable-history: false;*/
23
+/*	sort: false;*/
24
+/*	levenshtein-sort: false;*/
25
+/*	case-sensitive: false;*/
26
+/*	cycle: true;*/
27
+/*	sidebar-mode: false;*/
28
+/*	eh: 1;*/
29
+/*	auto-select: false;*/
30
+/*	parse-hosts: false;*/
31
+/*	parse-known-hosts: true;*/
32
+/*	combi-modi: "window,run";*/
33
+/*	matching: "normal";*/
34
+/*	tokenize: true;*/
35
+/*	m: "-5";*/
36
+/*	line-margin: 2;*/
37
+/*	line-padding: 1;*/
38
+/*	filter: ;*/
39
+/*	separator-style: "dash";*/
40
+/*	hide-scrollbar: false;*/
41
+/*	fullscreen: false;*/
42
+/*	fake-transparency: false;*/
43
+	dpi: 109;
44
+/*	threads: 0;*/
45
+/*	scrollbar-width: 8;*/
46
+/*	scroll-method: 0;*/
47
+/*	fake-background: "screenshot";*/
48
+/*	window-format: "{w}    {i}{c}   {t}";*/
49
+/*	click-to-exit: true;*/
50
+/*	show-match: true;*/
51
+	theme: "solarized_alternate";
52
+/*	color-normal: ;*/
53
+/*	color-urgent: ;*/
54
+/*	color-active: ;*/
55
+/*	color-window: ;*/
56
+/*	plugin-path: "/nix/store/21jzqk1r0ni4dwjr6icq5w7kginmg61y-rofi-1.4.2/lib/rofi";*/
57
+/*	pid: "/run/user/1000/rofi.pid";*/
58
+/*	display-window: ;*/
59
+/*	display-windowcd: ;*/
60
+/*	display-run: ;*/
61
+/*	display-ssh: ;*/
62
+/*	display-drun: ;*/
63
+/*	display-combi: ;*/
64
+/*	display-keys: ;*/
65
+/*	kb-primary-paste: "Control+V,Shift+Insert";*/
66
+/*	kb-secondary-paste: "Control+v,Insert";*/
67
+/*	kb-clear-line: "Control+w";*/
68
+/*	kb-move-front: "Control+a";*/
69
+/*	kb-move-end: "Control+e";*/
70
+/*	kb-move-word-back: "Alt+b";*/
71
+/*	kb-move-word-forward: "Alt+f";*/
72
+/*	kb-move-char-back: "Left,Control+b";*/
73
+/*	kb-move-char-forward: "Right,Control+f";*/
74
+/*	kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
75
+/*	kb-remove-word-forward: "Control+Alt+d";*/
76
+/*	kb-remove-char-forward: "Delete,Control+d";*/
77
+/*	kb-remove-char-back: "BackSpace,Control+h";*/
78
+/*	kb-remove-to-eol: "Control+k";*/
79
+/*	kb-remove-to-sol: "Control+u";*/
80
+/*	kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
81
+/*	kb-accept-custom: "Control+Return";*/
82
+/*	kb-accept-alt: "Shift+Return";*/
83
+/*	kb-delete-entry: "Shift+Delete";*/
84
+/*	kb-mode-next: "Shift+Right,Control+Tab";*/
85
+/*	kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
86
+/*	kb-row-left: "Control+Page_Up";*/
87
+/*	kb-row-right: "Control+Page_Down";*/
88
+/*	kb-row-up: "Up,Control+p,ISO_Left_Tab";*/
89
+/*	kb-row-down: "Down,Control+n";*/
90
+/*	kb-row-tab: "Tab";*/
91
+/*	kb-page-prev: "Page_Up";*/
92
+/*	kb-page-next: "Page_Down";*/
93
+/*	kb-row-first: "Home,KP_Home";*/
94
+/*	kb-row-last: "End,KP_End";*/
95
+/*	kb-row-select: "Control+space";*/
96
+/*	kb-screenshot: "Alt+S";*/
97
+/*	kb-toggle-case-sensitivity: "grave,dead_grave";*/
98
+/*	kb-toggle-sort: "Alt+grave";*/
99
+/*	kb-cancel: "Escape,Control+g,Control+bracketleft";*/
100
+/*	kb-custom-1: "Alt+1";*/
101
+/*	kb-custom-2: "Alt+2";*/
102
+/*	kb-custom-3: "Alt+3";*/
103
+/*	kb-custom-4: "Alt+4";*/
104
+/*	kb-custom-5: "Alt+5";*/
105
+/*	kb-custom-6: "Alt+6";*/
106
+/*	kb-custom-7: "Alt+7";*/
107
+/*	kb-custom-8: "Alt+8";*/
108
+/*	kb-custom-9: "Alt+9";*/
109
+/*	kb-custom-10: "Alt+0";*/
110
+/*	kb-custom-11: "Alt+exclam";*/
111
+/*	kb-custom-12: "Alt+at";*/
112
+/*	kb-custom-13: "Alt+numbersign";*/
113
+/*	kb-custom-14: "Alt+dollar";*/
114
+/*	kb-custom-15: "Alt+percent";*/
115
+/*	kb-custom-16: "Alt+dead_circumflex";*/
116
+/*	kb-custom-17: "Alt+ampersand";*/
117
+/*	kb-custom-18: "Alt+asterisk";*/
118
+/*	kb-custom-19: "Alt+parenleft";*/
119
+/*	kb-select-1: "Super+1";*/
120
+/*	kb-select-2: "Super+2";*/
121
+/*	kb-select-3: "Super+3";*/
122
+/*	kb-select-4: "Super+4";*/
123
+/*	kb-select-5: "Super+5";*/
124
+/*	kb-select-6: "Super+6";*/
125
+/*	kb-select-7: "Super+7";*/
126
+/*	kb-select-8: "Super+8";*/
127
+/*	kb-select-9: "Super+9";*/
128
+/*	kb-select-10: "Super+0";*/
129
+/*	ml-row-left: "Mouse6";*/
130
+/*	ml-row-right: "Mouse7";*/
131
+/*	ml-row-up: "Mouse4";*/
132
+/*	ml-row-down: "Mouse5";*/
133
+/*	me-select-entry: "Mouse1";*/
134
+/*	me-accept-entry: "MouseD1";*/
135
+/*	me-accept-custom: "Control+MouseD1";*/
136
+}

+ 92
- 0
rofi/.config/rofi/rofi-pass View File

@@ -0,0 +1,92 @@
1
+#!/usr/bin/env bash
2
+set -e
3
+set -o pipefail
4
+
5
+print-passwords() {
6
+    prefix=${PASSWORD_STORE_DIR-~/.password-store}
7
+    password_files=( "$prefix"/**/*.gpg )
8
+    password_files=( "${password_files[@]#"$prefix"/}" )
9
+    password_files=( "${password_files[@]%.gpg}" )
10
+    printf '%s\n' "${password_files[@]}"
11
+}
12
+
13
+copy-account-field() {
14
+  lpass show --clip "--${2}" "$1" >/dev/null 2>/dev/null
15
+}
16
+
17
+open-account-url() {
18
+  local url=$(lpass show --url "$1")
19
+  if [[ -n $url ]]; then
20
+    xdg-open "$url" >/dev/null 2>/dev/null
21
+  else
22
+    exit 2
23
+  fi
24
+}
25
+
26
+is-actual-url() {
27
+  local url="$1"
28
+  if [[ -n $url && "$url" != " " && "$url" != "http://" && "$url" != "https://" ]]; then
29
+    return 0
30
+  else
31
+    return 1
32
+  fi
33
+}
34
+
35
+show-account-options() {
36
+  local id="$1"
37
+
38
+  echo ">> Copy password [$id]"
39
+  echo ">> Copy username [$id]"
40
+
41
+  url=$(lpass show --url "$id")
42
+  if is-actual-url "$url"; then
43
+    echo ">> Open $url [$id]"
44
+    echo ">> Copy URL [$id]"
45
+  fi
46
+
47
+  echo ">> Copy ID [$id]"
48
+}
49
+
50
+is-entry-selected() {
51
+  if [[ -n $@ ]]; then
52
+    return 0
53
+  else
54
+    return 1
55
+  fi
56
+}
57
+
58
+id-in-selection() {
59
+  echo "$1" | grep -oE '\[[0-9]+\]$' | tr -d '[]'
60
+}
61
+
62
+debug() {
63
+  echo "$@" > /dev/stderr
64
+}
65
+
66
+if is-entry-selected "$1"; then
67
+  selected="$1"
68
+
69
+  id="$(id-in-selection "$selected")"
70
+
71
+  if [[ -n $id ]]; then
72
+    case "$selected" in
73
+      '>> Copy password'*)
74
+        copy-account-field "$id" password ;;
75
+      '>> Copy username'*)
76
+        copy-account-field "$id" username ;;
77
+      '>> Copy URL'*)
78
+        copy-account-field "$id" url ;;
79
+      '>> Copy ID'*)
80
+        copy-account-field "$id" id ;;
81
+      '>> Open'*)
82
+        open-account-url "$id" ;;
83
+      *)
84
+        show-account-options "$id" ;;
85
+    esac
86
+  else
87
+    echo "Could not detect the entry ID of \"${selection}\""
88
+    exit 1
89
+  fi
90
+else
91
+  print-passwords
92
+fi

Loading…
Cancel
Save