aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix2
-rw-r--r--home.nix2
-rw-r--r--hosts/olive/configuration.nix13
-rw-r--r--hosts/olive/qmk.rules74
-rw-r--r--programs/bash.nix1
-rw-r--r--programs/git.nix55
-rw-r--r--programs/tmux.nix23
-rw-r--r--theme.nix39
-rw-r--r--theme/day.nix18
-rw-r--r--theme/default.nix6
-rw-r--r--theme/gruvbox.nix18
-rw-r--r--theme/night.nix18
12 files changed, 183 insertions, 86 deletions
diff --git a/flake.nix b/flake.nix
index dec2ba2..350fcf2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -58,7 +58,7 @@
58 imports = [ ./home.nix ]; 58 imports = [ ./home.nix ];
59 _module.args.self = self; 59 _module.args.self = self;
60 _module.args.inputs = inputs; 60 _module.args.inputs = inputs;
61 _module.args.theme = import ./theme.nix; 61 _module.args.theme = import ./theme;
62 }; 62 };
63 } 63 }
64 ]; 64 ];
diff --git a/home.nix b/home.nix
index 77484ec..c113997 100644
--- a/home.nix
+++ b/home.nix
@@ -44,7 +44,6 @@
44 neomutt 44 neomutt
45 mpv 45 mpv
46 nodePackages.bash-language-server 46 nodePackages.bash-language-server
47 gitAndTools.delta
48 w3m 47 w3m
49 noto-fonts-emoji 48 noto-fonts-emoji
50 ripgrep-all 49 ripgrep-all
@@ -85,7 +84,6 @@
85 initExtra = '' 84 initExtra = ''
86 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}" 85 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}"
87 xrdb -load $HOME/.Xresources 86 xrdb -load $HOME/.Xresources
88 setxkbmap -option 'caps:swapescape'
89 ''; 87 '';
90 }; 88 };
91 89
diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix
index 66b5bdc..5ecce25 100644
--- a/hosts/olive/configuration.nix
+++ b/hosts/olive/configuration.nix
@@ -18,12 +18,12 @@
18 interfaces = [ 18 interfaces = [
19 "wlp2s0" 19 "wlp2s0"
20 ]; 20 ];
21 environmentFile = "/run/secrets/wireless.env"; 21 environmentFile = "/home/np/.wireless.env";
22 networks = { 22 networks = {
23 Sanic.pskRaw = "@PSK_SANI@"; 23 Sanic.psk = "@PSK_SANI@";
24 Gopalan.pskRaw = "@PSK_GOPA@"; 24 Gopalan.psk = "@PSK_GOPA@";
25 Srividhya.pskRaw = "@PSK_SRIV@"; 25 Srividhya.psk = "@PSK_SRIV@";
26 sage.pskRaw = "@PSK_SAGE@"; 26 sage.psk = "@PSK_SAGE@";
27 }; 27 };
28 extraConfig = '' 28 extraConfig = ''
29 ctrl_interface=/run/wpa_supplicant 29 ctrl_interface=/run/wpa_supplicant
@@ -103,7 +103,6 @@
103 services.xserver = { 103 services.xserver = {
104 enable = true; 104 enable = true;
105 layout = "us"; 105 layout = "us";
106 xkbOptions = "caps:swapescape";
107 displayManager.startx.enable = true; 106 displayManager.startx.enable = true;
108 libinput.enable = true; 107 libinput.enable = true;
109 }; 108 };
@@ -114,6 +113,8 @@
114 suspendCapacity = 10; 113 suspendCapacity = 10;
115 }; 114 };
116 115
116 services.udev.extraRules = builtins.readFile ./qmk.rules;
117
117 users.users.np = { 118 users.users.np = {
118 isNormalUser = true; 119 isNormalUser = true;
119 home = "/home/np"; 120 home = "/home/np";
diff --git a/hosts/olive/qmk.rules b/hosts/olive/qmk.rules
new file mode 100644
index 0000000..57806f9
--- /dev/null
+++ b/hosts/olive/qmk.rules
@@ -0,0 +1,74 @@
1# Atmel DFU
2### ATmega16U2
3SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
4### ATmega32U2
5SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
6### ATmega16U4
7SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
8### ATmega32U4
9SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
10### AT90USB64
11SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
12### AT90USB162
13SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
14### AT90USB128
15SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
16
17# Input Club
18SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
19
20# STM32duino
21SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
22# STM32 DFU
23SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
24
25# BootloadHID
26SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
27
28# USBAspLoader
29SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
30
31# ModemManager should ignore the following devices
32# Atmel SAM-BA (Massdrop)
33SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
34
35# Caterina (Pro Micro)
36## pid.codes shared PID
37### Keyboardio Atreus 2 Bootloader
38SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
39## Spark Fun Electronics
40### Pro Micro 3V3/8MHz
41SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
42### Pro Micro 5V/16MHz
43SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
44### LilyPad 3V3/8MHz (and some Pro Micro clones)
45SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
46## Pololu Electronics
47### A-Star 32U4
48SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
49## Arduino SA
50### Leonardo
51SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
52### Micro
53SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
54## Adafruit Industries LLC
55### Feather 32U4
56SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
57### ItsyBitsy 32U4 3V3/8MHz
58SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
59### ItsyBitsy 32U4 5V/16MHz
60SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
61## dog hunter AG
62### Leonardo
63SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
64### Micro
65SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
66
67# hid_listen
68KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
69
70# hid bootloaders
71## QMK HID
72SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess"
73## PJRC's HalfKay
74SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess"
diff --git a/programs/bash.nix b/programs/bash.nix
index 66546c2..9ad3217 100644
--- a/programs/bash.nix
+++ b/programs/bash.nix
@@ -25,6 +25,7 @@
25 tree = "tree -C"; 25 tree = "tree -C";
26 vim = "nvim"; 26 vim = "nvim";
27 tb = "nc termbin.com 9999"; 27 tb = "nc termbin.com 9999";
28 n = "j";
28 29
29 # git aliases 30 # git aliases
30 gb = "git branch -v"; 31 gb = "git branch -v";
diff --git a/programs/git.nix b/programs/git.nix
index 1a2bc72..dc842ce 100644
--- a/programs/git.nix
+++ b/programs/git.nix
@@ -9,35 +9,9 @@ with theme;
9 programs.git = { 9 programs.git = {
10 enable = true; 10 enable = true;
11 ignores = [ ".envrc" ]; 11 ignores = [ ".envrc" ];
12 delta.enable = true;
12 userEmail = "[email protected]"; 13 userEmail = "[email protected]";
13 userName = "Akshay"; 14 userName = "Akshay";
14 delta = {
15 enable = true;
16 options = {
17 features = "decorations labels";
18 syntax-theme = "none";
19 zero-style = "8";
20 navigate = "true";
21 keep-plus-minus-markers = "true";
22 decorations = {
23 file-decoration-style = "none";
24 whitespace-error-style = "22 reverse";
25 minus-style = "${base08}";
26 minus-emph-style = "${base08} bold";
27 plus-style = "${base0B}";
28 plus-emph-style = "${base0B} bold";
29 file-style = "7 italic";
30 hunk-header-style = "7";
31 hunk-header-decoration-style = "8 ul";
32 };
33 labels = {
34 file-modified-label = " MODIFIED ";
35 file-removed-label = " REMOVED ";
36 file-added-label = " ADDED ";
37 file-renamed-label = " RENAMED ";
38 };
39 };
40 };
41 extraConfig = { 15 extraConfig = {
42 commit.verbose = true; 16 commit.verbose = true;
43 core = { 17 core = {
@@ -46,3 +20,30 @@ with theme;
46 }; 20 };
47 }; 21 };
48} 22}
23# delta = {
24# enable = true;
25# options = {
26# features = "decorations labels";
27# syntax-theme = "none";
28# zero-style = "8";
29# navigate = "true";
30# keep-plus-minus-markers = "true";
31# decorations = {
32# file-decoration-style = "none";
33# whitespace-error-style = "22 reverse";
34# minus-style = "${base08}";
35# minus-emph-style = "${base08} bold";
36# plus-style = "${base0B}";
37# plus-emph-style = "${base0B} bold";
38# file-style = "7 italic";
39# hunk-header-style = "7";
40# hunk-header-decoration-style = "8 ul";
41# };
42# labels = {
43# file-modified-label = " MODIFIED ";
44# file-removed-label = " REMOVED ";
45# file-added-label = " ADDED ";
46# file-renamed-label = " RENAMED ";
47# };
48# };
49# };
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 5f58108..8679222 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -10,10 +10,10 @@
10 tmuxPlugins.fingers 10 tmuxPlugins.fingers
11 ]; 11 ];
12 extraConfig = '' 12 extraConfig = ''
13 set -g prefix C-a 13 set -g prefix C-t
14 setw -g mode-keys vi 14 setw -g mode-keys vi
15 unbind-key C-b 15 unbind-key C-b
16 bind-key C-a send-prefix 16 bind-key C-t send-prefix
17 17
18 bind r source-file ~/.config/tmux/tmux.conf 18 bind r source-file ~/.config/tmux/tmux.conf
19 19
@@ -27,19 +27,19 @@
27 27
28 # pane binds 28 # pane binds
29 bind-key h select-pane -L 29 bind-key h select-pane -L
30 bind-key j select-pane -D 30 bind-key n select-pane -D
31 bind-key k select-pane -U 31 bind-key e select-pane -U
32 bind-key l select-pane -R 32 bind-key i select-pane -R
33 bind-key -r H resize-pane -L 5 33 bind-key -r H resize-pane -L 5
34 bind-key -r J resize-pane -D 5 34 bind-key -r N resize-pane -D 5
35 bind-key -r K resize-pane -U 5 35 bind-key -r E resize-pane -U 5
36 bind-key -r L resize-pane -R 5 36 bind-key -r I resize-pane -R 5
37 37
38 # window binds 38 # window binds
39 bind -n M-h previous-window 39 bind -n M-h previous-window
40 bind -n M-l next-window 40 bind -n M-i next-window
41 bind-key "|" split-window -h -c "#{pane_current_path}" 41 bind-key "{" split-window -h -c "#{pane_current_path}"
42 bind-key "-" split-window -v -c "#{pane_current_path}" 42 bind-key "}" split-window -v -c "#{pane_current_path}"
43 bind-key s choose-session 43 bind-key s choose-session
44 bind-key c new-window -c "#{pane_current_path}" 44 bind-key c new-window -c "#{pane_current_path}"
45 bind-key ) swap-window -t +1 45 bind-key ) swap-window -t +1
@@ -84,6 +84,7 @@
84 # status left 84 # status left
85 set -g status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt cwd '#{pane_current_path}') " 85 set -g status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt cwd '#{pane_current_path}') "
86 set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt vcs '#{pane_current_path}')" 86 set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt vcs '#{pane_current_path}')"
87 set status-left-length 50
87 ''; 88 '';
88 }; 89 };
89} 90}
diff --git a/theme.nix b/theme.nix
deleted file mode 100644
index 24a8dac..0000000
--- a/theme.nix
+++ /dev/null
@@ -1,39 +0,0 @@
1let
2 day = {
3 base00 = "#fafafa";
4 base01 = "#f0f0f1";
5 base02 = "#e5e5e6";
6 base03 = "#a0a1a7";
7 base04 = "#696c77";
8 base05 = "#383a42";
9 base06 = "#202227";
10 base07 = "#090a0b";
11 base08 = "#ca1243";
12 base09 = "#d75f00";
13 base0A = "#c18401";
14 base0B = "#50a14f";
15 base0C = "#29BC9B";
16 base0D = "#4078f2";
17 base0E = "#EB367F";
18 base0F = "#986801";
19 };
20 night = {
21 base00 = "#000000";
22 base01 = "#303030";
23 base02 = "#353535";
24 base03 = "#4A4A4A";
25 base04 = "#787878";
26 base05 = "#EEFFFF";
27 base06 = "#EEFFFF";
28 base07 = "#FFFFFF";
29 base08 = "#F07178";
30 base09 = "#F78C6C";
31 base0A = "#FDF200";
32 base0B = "#13CA91";
33 base0C = "#79ffe1";
34 base0D = "#7898FB";
35 base0E = "#ff3299";
36 base0F = "#FF5370";
37 };
38in
39night
diff --git a/theme/day.nix b/theme/day.nix
new file mode 100644
index 0000000..f394287
--- /dev/null
+++ b/theme/day.nix
@@ -0,0 +1,18 @@
1{
2 base00 = "#fafafa";
3 base01 = "#f0f0f1";
4 base02 = "#e5e5e6";
5 base03 = "#a0a1a7";
6 base04 = "#696c77";
7 base05 = "#383a42";
8 base06 = "#202227";
9 base07 = "#090a0b";
10 base08 = "#ca1243";
11 base09 = "#d75f00";
12 base0A = "#c18401";
13 base0B = "#50a14f";
14 base0C = "#29BC9B";
15 base0D = "#4078f2";
16 base0E = "#EB367F";
17 base0F = "#986801";
18}
diff --git a/theme/default.nix b/theme/default.nix
new file mode 100644
index 0000000..b3af086
--- /dev/null
+++ b/theme/default.nix
@@ -0,0 +1,6 @@
1let
2 day = import ./day.nix;
3 night = import ./night.nix;
4 gruvbox = import ./gruvbox.nix;
5in
6night
diff --git a/theme/gruvbox.nix b/theme/gruvbox.nix
new file mode 100644
index 0000000..cda6834
--- /dev/null
+++ b/theme/gruvbox.nix
@@ -0,0 +1,18 @@
1{
2 base00 = "#282828";
3 base01 = "#3c3836";
4 base02 = "#504945";
5 base03 = "#665c54";
6 base04 = "#bdae93";
7 base05 = "#d5c4a1";
8 base06 = "#ebdbb2";
9 base07 = "#fbf1c7";
10 base08 = "#fb4934";
11 base09 = "#fe8019";
12 base0A = "#fabd2f";
13 base0B = "#b8bb26";
14 base0C = "#8ec07c";
15 base0D = "#83a598";
16 base0E = "#d3869b";
17 base0F = "#d65d0e";
18}
diff --git a/theme/night.nix b/theme/night.nix
new file mode 100644
index 0000000..b838b3a
--- /dev/null
+++ b/theme/night.nix
@@ -0,0 +1,18 @@
1{
2 base00 = "#000000";
3 base01 = "#303030";
4 base02 = "#353535";
5 base03 = "#4A4A4A";
6 base04 = "#787878";
7 base05 = "#EEFFFF";
8 base06 = "#EEFFFF";
9 base07 = "#FFFFFF";
10 base08 = "#F07178";
11 base09 = "#F78C6C";
12 base0A = "#FDF200";
13 base0B = "#13CA91";
14 base0C = "#79ffe1";
15 base0D = "#7898FB";
16 base0E = "#ff3299";
17 base0F = "#FF5370";
18}