+2
-1
dns/dnsconfig.js
+2
-1
dns/dnsconfig.js
···
40
A('bin', '69.61.2.203', TTL(300)),
41
A('ci', '69.61.2.203', TTL(300)),
42
A('write', '69.61.2.203', TTL(300)),
43
+
A('photos', '69.61.2.203', TTL(300)),
44
+
// vultr: lituus
45
A('@', '45.77.48.108', TTL(300)),
46
A('jitsi', '45.77.48.108', TTL(300)),
47
A('chat', '45.77.48.108', TTL(300)),
+15
-15
flake.lock
+15
-15
flake.lock
···
270
]
271
},
272
"locked": {
273
-
"lastModified": 1720042825,
274
-
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
275
"owner": "nix-community",
276
"repo": "home-manager",
277
-
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
278
"type": "github"
279
},
280
"original": {
281
"owner": "nix-community",
282
-
"ref": "release-24.05",
283
"repo": "home-manager",
284
"type": "github"
285
}
···
354
},
355
"nixpkgs_2": {
356
"locked": {
357
-
"lastModified": 1723938990,
358
-
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
359
"owner": "nixos",
360
"repo": "nixpkgs",
361
-
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
362
"type": "github"
363
},
364
"original": {
365
"owner": "nixos",
366
-
"ref": "nixos-24.05",
367
"repo": "nixpkgs",
368
"type": "github"
369
}
···
390
]
391
},
392
"locked": {
393
-
"lastModified": 1724050814,
394
-
"narHash": "sha256-THf50ZcBPY6r7/cyvE8bxYDvrctHrWbYaMx4udr4OUM=",
395
"ref": "main",
396
-
"rev": "7628c26fd92f684ab5c7572c63de4af8b4b3a7b4",
397
-
"revCount": 1464,
398
"type": "git",
399
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
400
},
···
534
},
535
"unstable": {
536
"locked": {
537
-
"lastModified": 1723637854,
538
-
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
539
"owner": "nixos",
540
"repo": "nixpkgs",
541
-
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
542
"type": "github"
543
},
544
"original": {
···
270
]
271
},
272
"locked": {
273
+
"lastModified": 1751810233,
274
+
"narHash": "sha256-kllkNbIqQi3VplgTMeGzuh1t8Gk8TauvkTRt93Km+tQ=",
275
"owner": "nix-community",
276
"repo": "home-manager",
277
+
"rev": "9b0873b46c9f9e4b7aa01eb634952c206af53068",
278
"type": "github"
279
},
280
"original": {
281
"owner": "nix-community",
282
+
"ref": "release-25.05",
283
"repo": "home-manager",
284
"type": "github"
285
}
···
354
},
355
"nixpkgs_2": {
356
"locked": {
357
+
"lastModified": 1755274400,
358
+
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
359
"owner": "nixos",
360
"repo": "nixpkgs",
361
+
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
362
"type": "github"
363
},
364
"original": {
365
"owner": "nixos",
366
+
"ref": "nixos-25.05",
367
"repo": "nixpkgs",
368
"type": "github"
369
}
···
390
]
391
},
392
"locked": {
393
+
"lastModified": 1756350023,
394
+
"narHash": "sha256-4S6EUvEFvOnwjSo/LqAVVuX2/JjAJ8gQFmQQ0DS4oXU=",
395
"ref": "main",
396
+
"rev": "a807111f9b20c501183516baf8082c4359aaaaa1",
397
+
"revCount": 1594,
398
"type": "git",
399
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
400
},
···
534
},
535
"unstable": {
536
"locked": {
537
+
"lastModified": 1752687322,
538
+
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
539
"owner": "nixos",
540
"repo": "nixpkgs",
541
+
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
542
"type": "github"
543
},
544
"original": {
+64
-75
flake.nix
+64
-75
flake.nix
···
3
4
inputs = {
5
# Nixpkgs
6
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
7
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
8
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
9
···
11
# ngipkgs-local.url = "path:/home/anish/usr/ngipkgs";
12
13
# Home manager
14
-
home-manager.url = "github:nix-community/home-manager/release-24.05";
15
home-manager.inputs.nixpkgs.follows = "nixpkgs";
16
hardware.url = "github:nixos/nixos-hardware";
17
···
27
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
28
poonam.inputs.nixpkgs.follows = "nixpkgs";
29
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
30
-
vimwikicli.url = "git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
31
basant.inputs.nixpkgs.follows = "nixpkgs";
32
basant.inputs.poonam.follows = "poonam";
33
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
···
54
# muneem.inputs.nixpkgs.follows = "nixpkgs";
55
};
56
57
-
outputs =
58
-
{ self
59
-
, nixpkgs
60
-
, unstable
61
-
, nixos-hardware
62
-
, home-manager
63
-
, deploy-rs
64
-
, agenix
65
-
, disko
66
-
, basant
67
-
, grasp
68
-
, nix-matrix-appservices
69
-
, nur
70
-
, tidalcycles
71
-
, rust-overlay
72
-
, vimwikicli
73
-
, ...
74
-
}@inputs:
75
let
76
forAllSystems = nixpkgs.lib.genAttrs [
77
"aarch64-linux"
···
89
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
90
};
91
92
-
nixpkgsFor = forAllSystems (system: import nixpkgs {
93
-
inherit system;
94
-
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
95
-
"ripcord"
96
-
"vcv-rack"
97
-
"SunVox"
98
-
"renoise"
99
-
];
100
-
# config.permittedInsecurePackages = [
101
-
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
102
-
# # Check when archive box updates it's dependeny
103
-
# ];
104
-
overlays = [
105
-
rust-overlay.overlays.default
106
-
tidalcycles.overlays.default
107
-
agenix.overlays.default
108
-
nur.overlay
109
-
nix-matrix-appservices.overlay
110
-
unstableOverlay
111
-
vimwikiOverlay
112
-
self.overlays.additions
113
-
self.overlays.modifications
114
-
];
115
-
});
116
117
# for when space matters
118
-
litePkgsFor = forAllSystems (system: import nixpkgs {
119
-
inherit system;
120
-
# config.permittedInsecurePackages = [
121
-
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
122
-
# # Check when archive box updates it's dependeny
123
-
# ];
124
-
overlays = [
125
-
agenix.overlays.default
126
-
self.overlays.additions
127
-
self.overlays.modifications
128
-
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
129
-
];
130
-
});
131
-
in
132
-
{
133
# Your custom packages
134
# Acessible through 'nix build', 'nix shell', etc
135
packages = forAllSystems (system:
136
let pkgs = nixpkgsFor.${system};
137
-
in import ./pkgs { pkgs = pkgs; }
138
-
);
139
# Devshell for bootstrapping
140
# Acessible through 'nix develop' or 'nix-shell' (legacy)
141
devShells = forAllSystems (system:
142
let pkgs = nixpkgsFor.${system};
143
-
in import ./shell.nix { pkgs = pkgs; }
144
-
);
145
146
# Your custom packages and modifications, exported as overlays
147
overlays = import ./overlays;
···
233
nix.registry.nixpkgs.flake = nixpkgs;
234
home-manager.useGlobalPkgs = true;
235
home-manager.useUserPackages = true;
236
-
home-manager.users.anish = import ./home/core;
237
}
238
];
239
};
···
243
# Available through 'home-manager --flake .#your-username@your-hostname'
244
homeConfigurations = {
245
"anish@work" = home-manager.lib.homeManagerConfiguration {
246
-
pkgs = nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
247
extraSpecialArgs = { inherit inputs; };
248
-
modules = [
249
-
./home/core.nix
250
-
./home/profiles/firefox
251
-
];
252
};
253
};
254
···
260
remoteBuild = true;
261
profiles.system = {
262
user = "root";
263
-
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box;
264
};
265
};
266
lituus = {
267
hostname = "sealight.xyz";
268
-
# autoRollback = false;
269
profiles.system = {
270
user = "root";
271
-
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.lituus;
272
};
273
};
274
helix = {
···
277
magicRollback = false;
278
profiles.system = {
279
user = "root";
280
-
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix;
281
};
282
};
283
};
284
285
-
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
286
};
287
}
···
3
4
inputs = {
5
# Nixpkgs
6
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
7
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
8
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
9
···
11
# ngipkgs-local.url = "path:/home/anish/usr/ngipkgs";
12
13
# Home manager
14
+
home-manager.url = "github:nix-community/home-manager/release-25.05";
15
home-manager.inputs.nixpkgs.follows = "nixpkgs";
16
hardware.url = "github:nixos/nixos-hardware";
17
···
27
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
28
poonam.inputs.nixpkgs.follows = "nixpkgs";
29
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
30
+
vimwikicli.url =
31
+
"git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
32
basant.inputs.nixpkgs.follows = "nixpkgs";
33
basant.inputs.poonam.follows = "poonam";
34
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
···
55
# muneem.inputs.nixpkgs.follows = "nixpkgs";
56
};
57
58
+
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
59
+
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
60
+
, rust-overlay, vimwikicli, ... }@inputs:
61
let
62
forAllSystems = nixpkgs.lib.genAttrs [
63
"aarch64-linux"
···
75
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
76
};
77
78
+
nixpkgsFor = forAllSystems (system:
79
+
import nixpkgs {
80
+
inherit system;
81
+
config = {
82
+
permittedInsecurePackages = [
83
+
"olm-3.2.16"
84
+
];
85
+
allowUnfreePredicate = pkg:
86
+
builtins.elem (nixpkgs.lib.getName pkg) [
87
+
"ripcord"
88
+
"vcv-rack"
89
+
"SunVox"
90
+
"renoise"
91
+
];
92
+
};
93
+
overlays = [
94
+
rust-overlay.overlays.default
95
+
tidalcycles.overlays.default
96
+
agenix.overlays.default
97
+
nur.overlay
98
+
# nix-matrix-appservices.overlay # nixpkgs has these packages and newer ones at that
99
+
unstableOverlay
100
+
vimwikiOverlay
101
+
self.overlays.additions
102
+
self.overlays.modifications
103
+
];
104
+
});
105
106
# for when space matters
107
+
litePkgsFor = forAllSystems (system:
108
+
import nixpkgs {
109
+
inherit system;
110
+
# config.permittedInsecurePackages = [
111
+
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
112
+
# # Check when archive box updates it's dependeny
113
+
# ];
114
+
overlays = [
115
+
agenix.overlays.default
116
+
self.overlays.additions
117
+
self.overlays.modifications
118
+
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
119
+
];
120
+
});
121
+
in {
122
# Your custom packages
123
# Acessible through 'nix build', 'nix shell', etc
124
packages = forAllSystems (system:
125
let pkgs = nixpkgsFor.${system};
126
+
in import ./pkgs { pkgs = pkgs; });
127
# Devshell for bootstrapping
128
# Acessible through 'nix develop' or 'nix-shell' (legacy)
129
devShells = forAllSystems (system:
130
let pkgs = nixpkgsFor.${system};
131
+
in import ./shell.nix { pkgs = pkgs; });
132
133
# Your custom packages and modifications, exported as overlays
134
overlays = import ./overlays;
···
220
nix.registry.nixpkgs.flake = nixpkgs;
221
home-manager.useGlobalPkgs = true;
222
home-manager.useUserPackages = true;
223
+
home-manager.users.anish = import ./home/dev;
224
}
225
];
226
};
···
230
# Available through 'home-manager --flake .#your-username@your-hostname'
231
homeConfigurations = {
232
"anish@work" = home-manager.lib.homeManagerConfiguration {
233
+
pkgs =
234
+
nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
235
extraSpecialArgs = { inherit inputs; };
236
+
modules = [ ./home/core.nix ./home/profiles/firefox ];
237
};
238
};
239
···
245
remoteBuild = true;
246
profiles.system = {
247
user = "root";
248
+
path = deploy-rs.lib.x86_64-linux.activate.nixos
249
+
self.nixosConfigurations.box;
250
};
251
};
252
lituus = {
253
hostname = "sealight.xyz";
254
+
autoRollback = false;
255
profiles.system = {
256
user = "root";
257
+
path = deploy-rs.lib.x86_64-linux.activate.nixos
258
+
self.nixosConfigurations.lituus;
259
};
260
};
261
helix = {
···
264
magicRollback = false;
265
profiles.system = {
266
user = "root";
267
+
path = deploy-rs.lib.x86_64-linux.activate.nixos
268
+
self.nixosConfigurations.helix;
269
};
270
};
271
};
272
273
+
# checks = builtins.mapAttrs
274
+
# (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
275
};
276
}
+1
home/core/default.nix
+1
home/core/default.nix
+5
home/dev/default.nix
+5
home/dev/default.nix
+18
home/gui/default.nix
+18
home/gui/default.nix
···
11
../profiles/ssh
12
../profiles/task
13
];
14
+
15
+
# GPG configuration for user session
16
+
services.gpg-agent = {
17
+
enable = true;
18
+
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
19
+
enableSshSupport = true;
20
+
defaultCacheTtl = 28800; # 8 hours
21
+
maxCacheTtl = 86400; # 24 hours
22
+
extraConfig = ''
23
+
pinentry-program ${pkgs.writeShellScript "pinentry-rofi-themed" ''
24
+
exec ${pkgs.pinentry-rofi}/bin/pinentry-rofi -theme ~/.config/rofi/theme/passmenu.rasi "$@"
25
+
''}
26
+
'';
27
+
};
28
+
29
+
programs.gpg = {
30
+
enable = true;
31
+
};
32
}
+28
-5
home/profiles/cli/default.nix
+28
-5
home/profiles/cli/default.nix
···
53
less
54
gdb
55
xxd
56
-
taskwarrior
57
gnupg
58
syncthing
59
dijo
···
61
fontconfig
62
pandoc
63
taskwarrior-tui
64
-
python3Packages.howdoi
65
-
vimwiki-cli
66
67
(pkgs.writeScriptBin "jq-repl" ''
68
#!/usr/bin/env bash
···
92
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
93
'')
94
(pkgs.writeScriptBin "monitor" ''
95
-
# hotplug
96
connect() {
97
# Turn it on if it was off
98
xrandr --output HDMI-2 --auto
99
xrandr --output HDMI-2 --same-as eDP-1
100
}
101
102
disconnect() {
···
132
enableCompletion = true;
133
autosuggestion.enable = false;
134
135
-
initExtra = ''
136
autopair-init
137
'';
138
sessionVariables = {
···
53
less
54
gdb
55
xxd
56
+
taskwarrior2
57
gnupg
58
syncthing
59
dijo
···
61
fontconfig
62
pandoc
63
taskwarrior-tui
64
+
# vimwiki-cli
65
+
zk
66
67
(pkgs.writeScriptBin "jq-repl" ''
68
#!/usr/bin/env bash
···
92
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
93
'')
94
(pkgs.writeScriptBin "monitor" ''
95
connect() {
96
# Turn it on if it was off
97
xrandr --output HDMI-2 --auto
98
xrandr --output HDMI-2 --same-as eDP-1
99
+
xrandr --output eDP-1 --off
100
+
pkill -9 polybar
101
+
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
102
+
polybar mybar > $XDG_DATA_HOME/polybar.log 2>&1 &
103
+
}
104
+
105
+
disconnect() {
106
+
xrandr --output HDMI-2 --off
107
+
xrandr --output eDP-1 --auto
108
+
}
109
+
110
+
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
111
+
'')
112
+
(pkgs.writeScriptBin "big-monitor" ''
113
+
connect() {
114
+
# Turn it on if it was off
115
+
xrandr --output HDMI-2 --auto --primary
116
+
# Disable normal display
117
+
xrandr --output eDP-1 --off
118
+
# Use a nice background
119
+
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
120
+
# Reload Polybar
121
+
~/.config/bspwm/rc.d/polybar
122
}
123
124
disconnect() {
···
154
enableCompletion = true;
155
autosuggestion.enable = false;
156
157
+
initContent = ''
158
+
bindkey -v
159
autopair-init
160
'';
161
sessionVariables = {
+2
-2
home/profiles/desktop/bspwmrc
+2
-2
home/profiles/desktop/bspwmrc
+4
-3
home/profiles/desktop/default.nix
+4
-3
home/profiles/desktop/default.nix
···
22
paper-icon-theme
23
papirus-icon-theme
24
libsForQt5.qtstyleplugin-kvantum
25
-
qt5ct
26
gtk-engine-murrine
27
gtk_engines
28
maim
···
31
inotify-tools
32
offpunk
33
termpdfpy
34
-
libsForQt5.kontact
35
thunderbird
36
];
37
38
# GTK4 color scheme?
···
73
#gtk4 theme
74
".config/gtk-4.0/settings.ini".text = ''
75
[Settings]
76
-
gtk-application-prefer-dark-theme=1
77
'';
78
# gtk3 theme
79
".config/gtk-3.0/settings.ini".text = ''
···
22
paper-icon-theme
23
papirus-icon-theme
24
libsForQt5.qtstyleplugin-kvantum
25
+
libsForQt5.qt5ct
26
gtk-engine-murrine
27
gtk_engines
28
maim
···
31
inotify-tools
32
offpunk
33
termpdfpy
34
+
# libsForQt5.kontact
35
thunderbird
36
+
libsecret # For secret-tool to manage keyring
37
];
38
39
# GTK4 color scheme?
···
74
#gtk4 theme
75
".config/gtk-4.0/settings.ini".text = ''
76
[Settings]
77
+
gtk-application-prefer-dark-theme=true
78
'';
79
# gtk3 theme
80
".config/gtk-3.0/settings.ini".text = ''
+4
home/profiles/desktop/kitty.conf
+4
home/profiles/desktop/kitty.conf
···
8
mouse_map left click ungrabbed mouse_click_url_or_select
9
confirm_os_window_close 0
10
enable_audio_bell no
11
+
12
+
# Ctrl+V for paste
13
+
map ctrl+v paste_from_clipboard
14
+
15
-- Allows zen-mode.nvim to increase font size
16
-- allow_remote_control socket-only
17
-- listen_on unix:/tmp/kitty
+1
-1
home/profiles/firefox/default.nix
+1
-1
home/profiles/firefox/default.nix
···
18
isDefault = true;
19
name = "anish";
20
userChrome = (builtins.readFile ./userChrome.css);
21
-
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
22
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
23
ublock-origin
24
# wallabagger
···
18
isDefault = true;
19
name = "anish";
20
userChrome = (builtins.readFile ./userChrome.css);
21
+
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
22
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
23
ublock-origin
24
# wallabagger
+135
-38
home/profiles/firefox/userChrome.css
+135
-38
home/profiles/firefox/userChrome.css
···
8
/*** NAV BAR ***/
9
/* Hide urlbar */
10
#nav-bar {
11
-
position: relative !important;
12
-
z-index: 2 !important;
13
-
height: 2px !important;
14
-
min-height: 2px !important;
15
-
margin-bottom: -2px !important;
16
-
opacity: 0 !important;
17
-
border: none !important;
18
}
19
20
/* But unfocus it when we invoke it with ctrl+L */
···
37
height: 28px !important;
38
}
39
40
-
/* hides the sidebar header */
41
#sidebar-header {
42
display: none !important;
43
}
44
45
.tab[selected="true"] {
46
visibility: collapse;
···
53
.tabbrowser-tab[visuallyselected="true"] {
54
visibility: collapse;
55
}
56
-
57
-
/* Credits to https://github.com/MrOtherGuy for hthe following snippet*/
58
-
59
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
60
See the above repository for updates as well as full license text. */
61
62
-
/* Show sidebar only when the cursor is over it */
63
-
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
64
65
-
#sidebar-box{
66
-
--uc-sidebar-width: 44px; /* Only thing I (gale) changed */
67
--uc-sidebar-hover-width: 210px;
68
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
69
position: relative;
70
min-width: var(--uc-sidebar-width) !important;
71
width: var(--uc-sidebar-width) !important;
72
max-width: var(--uc-sidebar-width) !important;
73
-
z-index:1;
74
}
75
76
-
#sidebar-box[positionend]{ direction: rtl }
77
-
#sidebar-box[positionend] > *{ direction: ltr }
78
79
-
#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
80
-
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
81
82
-
#main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
83
84
-
#sidebar-splitter{ display: none }
85
-
86
-
#sidebar-header{ overflow: hidden; /*color: var(--chrome-color, inherit) !important*/}
87
-
88
#sidebar{
89
-
transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
90
min-width: var(--uc-sidebar-width) !important;
91
will-change: min-width;
92
}
93
94
-
#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important }
95
-
96
.sidebar-panel{
97
-
/*background-color: transparent !important;
98
-
color: var(--newtab-text-primary-color) !important;*/
99
}
100
101
.sidebar-panel #search-box{
102
-moz-appearance: none !important;
103
-
/*background-color: rgba(249,249,250,0.1) !important;
104
color: inherit !important;
105
-
*/
106
}
107
108
/* Add sidebar divider and give it background */
109
110
#sidebar,
111
#sidebar-header{
112
-
/*background-color: inherit !important;*/
113
border-inline: 1px solid rgb(80,80,80);
114
border-inline-width: 0px 1px;
115
}
116
117
-
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
118
-
#sidebar-box[positionend] > *{
119
border-inline-width: 1px 0px;
120
}
121
-
122
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
123
124
-
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ inset-inline: auto 0px !important; }
125
-
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ margin-inline: 0px !important; border-left-style: solid !important; }
···
8
/*** NAV BAR ***/
9
/* Hide urlbar */
10
#nav-bar {
11
+
/* customize this value. */
12
+
--navbar-margin: -55px;
13
+
14
+
margin-top: var(--navbar-margin);
15
+
margin-bottom: 0;
16
+
z-index: -100;
17
+
transition: all 0.3s ease !important;
18
+
opacity: 0;
19
+
}
20
+
21
+
#navigator-toolbox:focus-within > #nav-bar,
22
+
#navigator-toolbox:hover > #nav-bar
23
+
{
24
+
margin-top: 0;
25
+
margin-bottom: var(--navbar-margin);
26
+
z-index: 100;
27
+
opacity: 1;
28
+
}
29
+
30
+
#main-window[chromehidden*="toolbar"] {
31
+
visibility: collapse;
32
+
height: -55px !important;
33
+
min-height: -55px !important;
34
}
35
36
/* But unfocus it when we invoke it with ctrl+L */
···
53
height: 28px !important;
54
}
55
56
+
/* hides the sidebar header
57
#sidebar-header {
58
display: none !important;
59
}
60
+
*/
61
62
.tab[selected="true"] {
63
visibility: collapse;
···
70
.tabbrowser-tab[visuallyselected="true"] {
71
visibility: collapse;
72
}
73
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
74
See the above repository for updates as well as full license text. */
75
76
+
/* Show sidebar only when the cursor is over it.
77
+
The border controlling sidebar width will be removed so you'll need to modify
78
+
these values to change width.
79
+
By default the internal layout of sidebar changes when hovered, but this can
80
+
be changed by setting pref "userchrome.autohide-sidebar.static-layout.enabled" to true
81
+
*/
82
83
+
/* Note: If you want only *some* sidebar to be auto-hidden, then you can use [sidebarcommand] attribute selector.
84
+
For example, to only affect Sidebery's sidebar replace all instances of #sidebar-box with
85
+
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"].
86
+
To find the sidebarcommand value for any other sidebar, open that sidebar and use Browser Toolbox to inspect it.
87
+
See: https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html
88
+
*/
89
+
/* The whole thing
90
+
:where(#main-window) #browser{
91
+
--uc-sidebar-width: 240px;
92
--uc-sidebar-hover-width: 210px;
93
+
}
94
+
#main-window[sizemode="fullscreen"] #browser{
95
+
--uc-sidebar-width: 1px;
96
+
}
97
+
#sidebar-box{
98
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
99
+
--uc-autohide-transition-duration: 115ms;
100
+
--uc-autohide-transition-type: linear;
101
+
--browser-area-z-index-sidebar: 3;
102
position: relative;
103
min-width: var(--uc-sidebar-width) !important;
104
width: var(--uc-sidebar-width) !important;
105
max-width: var(--uc-sidebar-width) !important;
106
+
z-index: var(--browser-area-z-index-sidebar,3);
107
+
background-color: inherit;
108
+
/* This directionality flipper is played so that sidebar "grows" into the right direction */
109
+
direction: ltr;
110
+
&:is([positionend],[sidebar-positionend]):not(:-moz-locale-dir(rtl)){
111
+
direction: rtl;
112
+
}
113
+
}
114
+
.sidebar-browser-stack{
115
+
background: inherit;
116
}
117
+
#main-window[sizemode="fullscreen"] #browser{ --uc-sidebar-width: 1px; }
118
119
+
#sidebar-splitter{ display: none }
120
121
+
#sidebar-header{
122
+
overflow: hidden;
123
+
color: var(--chrome-color, inherit) !important;
124
+
padding-inline: 0 !important;
125
+
}
126
127
+
#sidebar-header::before,
128
+
#sidebar-header::after{
129
+
content: "";
130
+
display: flex;
131
+
padding-left: 8px;
132
+
}
133
134
+
#sidebar-header,
135
#sidebar{
136
+
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
137
min-width: var(--uc-sidebar-width) !important;
138
will-change: min-width;
139
+
direction: ltr;
140
+
&:-moz-locale-dir(rtl){
141
+
direction: rtl;
142
+
}
143
+
}
144
+
#sidebar-box:hover > #sidebar-header,
145
+
#sidebar-box:hover > #sidebar,
146
+
#sidebar-box:hover > .sidebar-browser-stack > #sidebar{
147
+
min-width: var(--uc-sidebar-hover-width) !important;
148
+
transition-delay: 0ms !important;
149
}
150
151
.sidebar-panel{
152
+
background-color: transparent !important;
153
+
color: var(--newtab-text-primary-color) !important;
154
}
155
156
.sidebar-panel #search-box{
157
-moz-appearance: none !important;
158
+
background-color: rgba(249,249,250,0.1) !important;
159
color: inherit !important;
160
}
161
162
/* Add sidebar divider and give it background */
163
164
#sidebar,
165
#sidebar-header{
166
+
background-color: inherit !important;
167
border-inline: 1px solid rgb(80,80,80);
168
border-inline-width: 0px 1px;
169
}
170
171
+
#sidebar-box:not([positionend],[sidebar-positionend]) > :-moz-locale-dir(rtl),
172
+
#sidebar-box:is([positionend],[sidebar-positionend]) > *{
173
border-inline-width: 1px 0px;
174
}
175
+
@media -moz-pref("sidebar.revamp") {
176
+
#sidebar, #sidebar-header{ border-style: none }
177
+
#sidebar-box{ padding: 0 !important; }
178
+
}
179
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
180
181
+
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel{
182
+
inset-inline: auto 0px !important;
183
+
}
184
+
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel-label{
185
+
margin-inline: 0px !important;
186
+
border-left-style: solid !important;
187
+
}
188
+
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
189
+
#sidebar-box{
190
+
min-width: var(--uc-sidebar-width) !important;
191
+
contain: size;
192
+
box-shadow: var(--content-area-shadow);
193
+
}
194
+
#sidebar{
195
+
min-width: var(--uc-sidebar-hover-width) !important;
196
+
}
197
+
.sidebar-browser-stack{
198
+
overflow: hidden;
199
+
width: 100%;
200
+
transition: width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay);
201
+
direction: ltr;
202
+
&:hover{
203
+
transition-delay: 0ms;
204
+
width: var(--uc-sidebar-hover-width);
205
+
}
206
+
&:-moz-locale-dir(rtl){
207
+
transition-property: transform,width !important;
208
+
}
209
+
}
210
+
#sidebar-box[sidebar-positionend]:hover :is(#sidebar-header,#sidebar):-moz-locale-dir(ltr){
211
+
transform: translateX(0);
212
+
transition-delay: 0ms !important;
213
+
}
214
+
#sidebar-box:not([sidebar-positionend]):hover .sidebar-browser-stack:-moz-locale-dir(rtl){
215
+
transform: translateX(calc(-1 * var(--uc-sidebar-hover-width) + var(--uc-sidebar-width)));
216
+
}
217
+
#sidebar-box[sidebar-positionend]:hover > .sidebar-browser-stack:-moz-locale-dir(rtl){
218
+
transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
219
+
transition-delay: 0ms !important;
220
+
}
221
+
}
222
+
*/
-4
home/profiles/nvim/config/after/syntax/vimwiki.vim
-4
home/profiles/nvim/config/after/syntax/vimwiki.vim
-11
home/profiles/nvim/config/fnl/conf/formatting.fnl
-11
home/profiles/nvim/config/fnl/conf/formatting.fnl
···
1
-
(import-macros {: do-req } :lib/macros)
2
-
3
-
(do-req :conform :setup
4
-
{:formatters_by_ft {:lua ["stylua"]
5
-
:nix ["nixfmt"]
6
-
; :go ["goimports" "gofmt"] ; Go handled in special case
7
-
:terraform ["terraform_fmt"]
8
-
:sh ["shfmt"]
9
-
:bazel ["buildifier"]}
10
-
:format_on_save {:lsp_format "fallback"
11
-
:timeout_ms 500}})
···
-47
home/profiles/nvim/config/fnl/conf/init.fnl
-47
home/profiles/nvim/config/fnl/conf/init.fnl
···
1
-
(local nvim (require :lib/nvim))
2
-
3
-
(nvim.g :mapleader " ")
4
-
5
-
; (nvim.opt :runtimepath (.. vim.opt.runtimepath "/home/anish/.config/nvim/,"))
6
-
(nvim.opt :tabstop 2)
7
-
(nvim.opt :showmatch true)
8
-
(nvim.opt :shiftwidth 2)
9
-
(nvim.opt :autoindent true)
10
-
(nvim.opt :undofile true)
11
-
(nvim.opt :signcolumn "auto:4")
12
-
(nvim.opt :title true)
13
-
(nvim.opt :number true)
14
-
; (nvim.opt :nocompatible)
15
-
(nvim.opt :relativenumber true)
16
-
(nvim.opt :showtabline 2)
17
-
(nvim.opt :expandtab true)
18
-
(nvim.opt :autowriteall true)
19
-
(nvim.opt :cmdheight 2)
20
-
(nvim.opt :spelllang "en_gb")
21
-
(nvim.opt :ignorecase true)
22
-
(nvim.opt :smartcase true)
23
-
(nvim.opt :incsearch true)
24
-
(nvim.opt :updatetime 300) ; Diagnostics response time
25
-
(nvim.opt :signcolumn "yes")
26
-
(nvim.opt :cursorline true)
27
-
28
-
(nvim.opt :lisp true) ; include - in word to move better in snake-case)
29
-
(nvim.g :sexp_filetypes "clojure,scheme,lisp,janet,fennel,yuck") ; include the lisps I use
30
-
31
-
(nvim.opt :termguicolors)
32
-
(nvim.colorscheme "ayu-mirage")
33
-
34
-
(require :conf.plugins)
35
-
(require :conf.mappings)
36
-
(require :conf.lsp)
37
-
(require :conf.plugins.cmp)
38
-
(require :conf.formatting)
39
-
; (require :conf.kitaab)
40
-
41
-
; Spelling
42
-
(vim.api.nvim_create_autocmd ["BufRead" "BufNewFile"]
43
-
{:pattern ["*.wiki" "*.txt" "*.md" "*.tex"]
44
-
:command "setlocal spell"})
45
-
(vim.api.nvim_create_autocmd ["FileType"]
46
-
{:pattern ["mail"]
47
-
:command "setlocal spell"})
···
-99
home/profiles/nvim/config/fnl/conf/lsp.fnl
-99
home/profiles/nvim/config/fnl/conf/lsp.fnl
···
1
-
(import-macros {: do-req } :lib/macros)
2
-
(local lspkind (require :lspkind))
3
-
(local lspconfig (require :lspconfig))
4
-
; (local lspsaga (require :lspsaga))
5
-
(local cmp (require :cmp))
6
-
(local nvim (require :lib/nvim))
7
-
; (local lspfuzzy (require :lspfuzzy)) ; Not available on Nix
8
-
; (local sg (require :sg))
9
-
; (local lsputil (require :lspconfig/util))
10
-
11
-
;(lspsaga.setup {:border_style "rounded"
12
-
; :code_action_icon ""
13
-
; :code_action_num_shortcut false
14
-
; :ui {:code_action ""}
15
-
; :show_outline {:enable false}))
16
-
;
17
-
;(nvim.opt :winbar nil)
18
-
19
-
(local signs {:Error "๎ช "
20
-
:Warn "๏ฑ "
21
-
:Hint "๏ "
22
-
:Info "๏ "})
23
-
(each [t icon (pairs signs)]
24
-
(let [hl (.. "DiagnosticSign" t)]
25
-
(vim.fn.sign_define hl {:text icon
26
-
:texthl hl
27
-
:numhl hl})))
28
-
29
-
(tset vim.lsp.handlers
30
-
:textDocument/hover
31
-
(vim.lsp.with vim.lsp.handlers.hover
32
-
{:focusable false :border "rounded"}))
33
-
(tset vim.lsp.handlers
34
-
:textDocument/signatureHelp
35
-
(vim.lsp.with vim.lsp.handlers.signature_help
36
-
{:focusable false :border "rounded"}))
37
-
38
-
(local capabilities (let [cmp_nvim_lsp (require :cmp_nvim_lsp)]
39
-
(cmp_nvim_lsp.default_capabilities)))
40
-
41
-
(local formatting-augroup (nvim.augroup :LspFormatting))
42
-
43
-
(fn goimports [wait-ms]
44
-
(let [params (vim.lsp.util.make_range_params)
45
-
result (do
46
-
(tset params :context {:only [:source.organizeImports]})
47
-
(vim.lsp.buf_request_sync 0 :textDocument/codeAction params wait-ms))]
48
-
(each [_ res (pairs (or result {}))]
49
-
(each [_ r (pairs (or res.result {}))]
50
-
(if r.edit
51
-
(vim.lsp.util.apply_workspace_edit r.edit "utf-16")
52
-
(vim.lsp.buf.execute_command r.command))))
53
-
(vim.lsp.buf.format)))
54
-
55
-
(fn on-attach [client bufnr]
56
-
(let [filetype (vim.api.nvim_buf_get_option 0 "filetype")]
57
-
(if (client.supports_method "textDocument/formatting")
58
-
(do (nvim.autocmd "BufWritePre"
59
-
{:group formatting-augroup
60
-
:buffer bufnr
61
-
:callback (fn [_] (if (= filetype "go")
62
-
(goimports 2000)
63
-
(vim.lsp.buf.format {:bufnr bufnr})))})))))
64
-
65
-
(lspconfig.gopls.setup
66
-
{:capabilities capabilities
67
-
:codelens {:generate true :gc_details true}
68
-
:semanticTokens true
69
-
:flags {:debounce_text_changes 200}
70
-
:analyses {:unusedparams true
71
-
:unusedvariables true
72
-
:unusedwrite true
73
-
:nilness true
74
-
:unusedwrite true
75
-
:useany true}
76
-
:completeUnimported true
77
-
:staticcheck true
78
-
:experimentalPostfixCompletions true
79
-
:hints {:constantValues true
80
-
:functionTypeParameters true
81
-
:assignVariablesTypes true
82
-
:compositeLiteralTypes true
83
-
:compositeLiteralFields true
84
-
:parameterNames true
85
-
:rangeVariableTypes true}
86
-
:on_attach on-attach})
87
-
88
-
(local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver :starbin])
89
-
(each [index lsp (ipairs lsps)]
90
-
((. (. lspconfig lsp) :setup) {}))
91
-
92
-
; null-ls
93
-
(let [null-ls (require :null-ls)]
94
-
(null-ls.setup {:sources [; TODO fix these
95
-
;null-ls.builtins.diagnostics.shellcheck
96
-
null-ls.builtins.diagnostics.commitlint]}))
97
-
;null-ls.builtins.diagnostics.jsonlint]}))
98
-
;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]}))
99
-
···
-135
home/profiles/nvim/config/fnl/conf/mappings.fnl
-135
home/profiles/nvim/config/fnl/conf/mappings.fnl
···
1
-
(local nvim (require :lib/nvim))
2
-
(import-macros {: do-req } :lib/macros)
3
-
4
-
(local wk (require :which-key))
5
-
6
-
;; Convenient way to indent stuff in visual mode
7
-
(nvim.keymap [:v] "<" "<gv" {:noremap true})
8
-
(nvim.keymap [:v] ">" ">gv" {:noremap true})
9
-
(nvim.keymap [:n] "<space>" "<NOP>" {:noremap true :silent true})
10
-
;; Convenient way to move stuff in visual mode
11
-
(nvim.keymap [:v] "J" ":m '>+1<CR>gv=gv" {:noremap true})
12
-
(nvim.keymap [:v] "K" ":m '>-2<CR>gv=gv" {:noremap true})
13
-
;; Convientent screen shifting
14
-
(nvim.keymap [:n] "n" "nzzzv" {:noremap true})
15
-
(nvim.keymap [:n] "N" "Nzzzv" {:noremap true})
16
-
(nvim.keymap [:n] "J" "mzJ'z" {:noremap true})
17
-
; Fix Y
18
-
(nvim.keymap [:n] "Y" "y$")
19
-
; Unmap Q
20
-
(nvim.keymap [] "Q" "<Nop>")
21
-
22
-
; FTerm
23
-
(vim.api.nvim_create_user_command "FTermToggle" (fn [_]
24
-
((-> (require :FTerm)
25
-
(. :toggle))))
26
-
{:bang true})
27
-
(nvim.keymap [:t] "<TAB>" "<cmd>:FTermToggle<CR>")
28
-
(nvim.keymap [:n] "<TAB>" "<cmd>:FTermToggle<CR>" {:noremap true})
29
-
30
-
; Buffer Movement
31
-
(nvim.keymap [:n] "gT" ":BufferPrevious<CR>" {:silent true :noremap true})
32
-
(nvim.keymap [:n] "gt" ":BufferNext<CR>" {:silent true :noremap true})
33
-
(nvim.keymap [:n] "gj" ":BufferPick<CR>" {:silent true :noremap true})
34
-
(nvim.keymap [:n] "gb" ":Telescope buffers<CR>" {:silent true :noremap true})
35
-
(nvim.keymap [:n] "gq" ":BufferClose<CR>" {:silent true :noremap true})
36
-
37
-
; Flash
38
-
(vim.api.nvim_create_user_command "Flash" (fn [_] (do-req :flash :jump)) {})
39
-
(vim.api.nvim_create_user_command "FlashTreesitter" (fn [] (do-req :flash :treesitter)) {})
40
-
(nvim.keymap [:n] "f" "<cmd>Flash<CR>")
41
-
(nvim.keymap [:n] "s" "<cmd>FlashTreesitter<CR>")
42
-
43
-
(local
44
-
normal-map-leader
45
-
{"t" [":Neotree toggle<CR>"
46
-
"Toggle neo-tree"]
47
-
"w" ["<cmd>:w<cr>"
48
-
"Write file"]
49
-
"q" ["<cmd>:q<cr>"
50
-
"Quit"]
51
-
"r" [":RainbowParenthesesToggleAll<CR>"
52
-
"Toggle Rainbow Parens"]
53
-
"u" [":UndotreeToggle<CR>"
54
-
"Toggle Undo Tree"]
55
-
; Telescope
56
-
"f" {:name "Files"
57
-
:f ["<cmd>Telescope find_files<cr>"
58
-
"Find Files (in Telescope)"]
59
-
:g ["<cmd>Telescope live_grep<cr>"
60
-
"Find Grep (in Telescope)"]
61
-
:b ["<cmd>Telescope buffers<cr>"
62
-
"Find Buffers"]
63
-
:h ["<cmd>Telescope help_tags<cr>"
64
-
"Find Help"]
65
-
:t ["<cmd>Telescope tags<cr>"
66
-
"Find Tags"]
67
-
:r ["<cmd>Telescope oldfiles<CR>"
68
-
"Recent files"]}
69
-
; Git
70
-
"g" {:name "Git"
71
-
"s" [":G<CR>"
72
-
"Git Status"]
73
-
"f" [":G fetch --all<cr>"
74
-
"Git Fetch"]
75
-
"b" [":GBranches<cr>"
76
-
"Git Branch"]
77
-
"p" [":Git! push<cr>"
78
-
"Git Push"]
79
-
"d" [":GDiff<cr>"
80
-
"Git Diff"]
81
-
"h" [""
82
-
"Commit Hunk under Cursor"]}
83
-
; For handling merges
84
-
; nmap <leader>gl :diffget //3<CR>
85
-
; nmap <leader>gh :diffget //2<CR>
86
-
; nnoremap <leader>gc :G commit -v -q %:p<CR>
87
-
; Buffers
88
-
"b" {:name "Buffer"
89
-
:b ["<cmd>:Telescope buffers<CR>"
90
-
"Buffer List"]
91
-
:q ["<cmd>:BufferClose<CR>"
92
-
"Buffer Quit"]
93
-
:n ["<cmd>:BufferNext<CR>"
94
-
"Buffer Next"]
95
-
:N ["<cmd>:tabp<CR>"
96
-
"Buffer Previous"]
97
-
:p ["<cmd>:tabp<CR>"
98
-
"Buffer Previous"]}
99
-
; Search
100
-
"s" {:name "Search"
101
-
:b ["<cmd>Telescope current_buffer_fuzzy_find<CR>"
102
-
"Search in current buffer"]
103
-
:s ["<cmd>Telescope live_grep<CR>"
104
-
"Search in project"]
105
-
:t ["<cmd>TodoTelescope<CR>"
106
-
"Search TODOs in project"]
107
-
:c ["<cmd>let @/ = \"\"<CR>:echo 'Search highlight cleared'<CR>"
108
-
"Clear search"]}
109
-
; Code
110
-
"c" {:name "Code"
111
-
:d [":lua vim.lsp.buf.definition()<CR>"
112
-
"Go to Definition"]
113
-
:i [":lua require('telescope.builtin').lsp_implementation()<CR>"
114
-
"Implementation"]
115
-
:s [":lua vim.lsp.buf.signature_help()<CR>"
116
-
"Signature Help"]
117
-
:r [":Lspsaga rename<CR>"
118
-
"Rename Symbol"]
119
-
:h [":Lspsaga hover_doc<CR>"
120
-
"Hover doc"]
121
-
:o ["<cmd>AerialToggle!<CR>"
122
-
"Outline"]
123
-
:t [":LspDiagnostics 0"
124
-
"Find Errors in Buffer"]}
125
-
; Kitaab
126
-
"z" {:name "Kitaab"
127
-
:n [":ZettelNew<CR>"
128
-
"Zettel New"]}
129
-
"v" {:name "Tabs"
130
-
:v [":vnew<CR>"
131
-
"Vertical Split"]
132
-
:h [":new<CR>"
133
-
"Horizontal Split"]}})
134
-
135
-
(wk.register normal-map-leader {:prefix "<leader>"})
···
-30
home/profiles/nvim/config/fnl/conf/music.fnl
-30
home/profiles/nvim/config/fnl/conf/music.fnl
···
1
-
(local nvim (require :lib/nvim))
2
-
3
-
(nvim.g :tidal_target "terminal")
4
-
(nvim.g :scnvim_snippet_format "luasnip")
5
-
6
-
; -- supercollider
7
-
; local scnvim = require 'scnvim'
8
-
; local map = scnvim.map
9
-
; local map_expr = scnvim.map_expr
10
-
; scnvim.setup {
11
-
; keymaps = {
12
-
; ['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
13
-
; ['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
14
-
; ['<localleader>t'] = {
15
-
; map('editor.send_block', {'i', 'n'}),
16
-
; map('editor.send_selection', 'x'),
17
-
; },
18
-
; ['<CR>'] = map('postwin.toggle'),
19
-
; ['<M-CR>'] = map('postwin.toggle', 'i'),
20
-
; ['<M-L>'] = map('postwin.clear', {'n', 'i'}),
21
-
; ['<C-k>'] = map('signature.show', {'n', 'i'}),
22
-
; ['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
23
-
; ['<leader>st'] = map('sclang.start'),
24
-
; ['<leader>sk'] = map('sclang.recompile'),
25
-
; ['<F1>'] = map_expr('s.boot'),
26
-
; ['<F2>'] = map_expr('s.meter'),
27
-
; }
28
-
; }
29
-
; -- You gotta run :SCNvimGenerateAssets for this first
30
-
; -- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
···
-35
home/profiles/nvim/config/fnl/conf/plugins/cmp.fnl
-35
home/profiles/nvim/config/fnl/conf/plugins/cmp.fnl
···
1
-
(local cmp (require :cmp))
2
-
3
-
(fn has-words-before []
4
-
(let [(line col) (unpack (vim.api.nvim_win_get_cursor 0))
5
-
cur-line (. (vim.api.nvim_buf_get_lines 0
6
-
(- line 1)
7
-
line
8
-
true
9
-
1))]
10
-
(and (not= col 0)
11
-
(= (: (: cur-line :sub col col) :match "%s")
12
-
nil))))
13
-
14
-
(let [lspkind (require :lspkind)]
15
-
(cmp.setup {:formatting {:format (lspkind.cmp_format {:mode "symbol_text"
16
-
:maxwidth 50})
17
-
:show_labelDetails true}
18
-
:snippet {:expand (fn [args] (vim.snippet.expand args.body))}
19
-
:sources [{:name "buffer"} {:name "nvim_lsp"}
20
-
{:name "look"} {:name "path"}
21
-
{:name "calc"} {:name "spell"}
22
-
{:name "tags"}]
23
-
:mapping {"<C-d>" (cmp.mapping.scroll_docs -4)
24
-
"<C-u>" (cmp.mapping.scroll_docs 4)
25
-
"<C-g>" (cmp.mapping.close)
26
-
"<CR>" (cmp.mapping.confirm {:select true})
27
-
"<Tab>" (cmp.mapping (fn [fallback]
28
-
(if (cmp.visible) (cmp.select_next_item)
29
-
(has-words-before) (cmp.complete)
30
-
(fallback)))
31
-
[:i :s])
32
-
"<S-Tab>" (cmp.mapping (fn [fallback]
33
-
(if (cmp.visible) (cmp.select_prev_item)
34
-
(fallback)))
35
-
[:i :s])}}))
···
-35
home/profiles/nvim/config/fnl/conf/plugins/kitaab.fnl
-35
home/profiles/nvim/config/fnl/conf/plugins/kitaab.fnl
···
1
-
; Kitaab is why I'm so tied to vim.
2
-
; If only I could find a nice notes editor...
3
-
4
-
(local nvim (require :lib/nvim))
5
-
6
-
(import-macros {: do-req } :lib/macros)
7
-
8
-
(nvim.g :vimwiki_list [{:path "~/kitaab/vimwiki"
9
-
:auto_tags 1
10
-
:auto_diary_index 1
11
-
:auto_generate_links 0
12
-
:nested_syntaxes {:python "python"
13
-
:c++ "cpp"
14
-
:nix "nix"
15
-
:bash "sh"}}])
16
-
(nvim.g :zettel_format "%y%m%d-%H%M")
17
-
18
-
; Custom functions
19
-
(fn update_date []
20
-
(var written false)
21
-
(let [time (os.date "%Y-%m-%d %H:%M")
22
-
message (.. "%update " time)
23
-
lines (vim.api.nvim_buf_get_lines 0 0 4 false)]
24
-
(each [index line (ipairs lines)]
25
-
(if (and (= (length line) 0) (not written))
26
-
(do
27
-
(vim.api.nvim_buf_set_lines 0 (- index 1) index false [message ""])
28
-
(set written true)))
29
-
(if (and (= index 4) (not written))
30
-
(vim.api.nvim_buf_set_lines 0 3 index false [message])))))
31
-
32
-
(vim.api.nvim_create_autocmd "BufWritePre" {:pattern ["*.wiki"]
33
-
:callback update_date})
34
-
35
-
(do-req :hologram :setup {:auto_display false})
···
-45
home/profiles/nvim/config/fnl/conf/plugins.fnl
-45
home/profiles/nvim/config/fnl/conf/plugins.fnl
···
1
-
(local nvim (require :lib/nvim))
2
-
(local navic (require :nvim-navic))
3
-
4
-
(import-macros {: do-req } :lib/macros)
5
-
6
-
(let [lualine (require :lualine)]
7
-
(lualine.setup {:options {:theme "ayu"}
8
-
:sections {; :lualine_c [:filename (fn []
9
-
; (let [lspsaga (require :lspsaga.symbol.winbar)]
10
-
; (lspsaga.get_bar))
11
-
:lualine_y [(fn []
12
-
(var msg "No Active LSP")
13
-
(let [buf_ft (vim.api.nvim_buf_get_option 0 "filetype")
14
-
clients (vim.lsp.get_active_clients)]
15
-
(each [_ client (ipairs clients)]
16
-
(let [filetypes (. client :config :filetypes)]
17
-
(if (and filetypes (vim.fn.index filetypes buf_ft)) (set msg client.name))))
18
-
msg))]
19
-
:lualine_x [:filetype]}}))
20
-
21
-
(require :neo-tree)
22
-
(do-req :gitsigns :setup)
23
-
(do-req :marks :setup)
24
-
; (do-req :mini.pairs :setup)
25
-
(do-req :mini.diff :setup)
26
-
(do-req :mini.ai :setup)
27
-
(do-req :mini.surround :setup {:mappings {:add "ys"
28
-
:delete "ds"
29
-
:replace "cs"}})
30
-
(do-req :todo-comments :setup)
31
-
(do-req :ibl :setup {:scope {:exclude {:language ["fennel" "clojure" "janet"]}}})
32
-
33
-
(do-req :nvim-treesitter.configs :setup {:highlight {:enable true}
34
-
:textobjects {:enable true}
35
-
:indent {:enable true}})
36
-
(do-req :treesitter-context :setup {:max_lines 5})
37
-
38
-
(do-req :auto-session :setup {:log_level "info"
39
-
:auto_session_suppress_dirs ["~/"]})
40
-
(nvim.opt :sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal")
41
-
42
-
(do-req :aerial :setup {}) ;{:on_attach (fn [bufnr]
43
-
; (do
44
-
; (vim.keymap.set "n" "{" "<cmd>AerialPrev<CR>" { :buffer bufnr})
45
-
; (vim.keymap.set "n" "}" "<cmd>AerialNext<CR>" { :buffer bufnr}))
···
-6
home/profiles/nvim/config/fnl/lib/macros.fnl
-6
home/profiles/nvim/config/fnl/lib/macros.fnl
-37
home/profiles/nvim/config/fnl/lib/nvim.fnl
-37
home/profiles/nvim/config/fnl/lib/nvim.fnl
···
1
-
(fn autocmd [events opts]
2
-
"Create autocommand"
3
-
(vim.api.nvim_create_autocmd events opts))
4
-
5
-
(fn clear-autocmds [opts]
6
-
"Clear autocommands"
7
-
(vim.api.nvim_clear_autocmds opts))
8
-
9
-
(fn augroup [name ?opts]
10
-
"Create autocommand group"
11
-
(vim.api.nvim_create_augroup name (or ?opts {})))
12
-
13
-
(fn keymap [mode lhs rhs ?opts]
14
-
"Sets a global mapping for the given mode.
15
-
Ex: `(keymap [:n :i] ...)`"
16
-
(let [string-mode (table.concat mode)]
17
-
(vim.api.nvim_set_keymap string-mode lhs rhs (or ?opts {}))))
18
-
19
-
(fn opt [key value]
20
-
"Set a vim option"
21
-
(tset vim.opt key value))
22
-
23
-
(fn g [key value]
24
-
"Set a vim global"
25
-
(tset vim.g key value))
26
-
27
-
(fn colorscheme [name]
28
-
"Set the current colorscheme"
29
-
(vim.cmd (.. "colorscheme " name)))
30
-
31
-
{: autocmd
32
-
: clear-autocmds
33
-
: augroup
34
-
: keymap
35
-
: opt
36
-
: g
37
-
: colorscheme}
···
-26
home/profiles/nvim/config/init.lua
-26
home/profiles/nvim/config/init.lua
···
1
-
if pcall(require, "hotpot") then
2
-
-- Setup hotpot.nvim
3
-
require("hotpot").setup({
4
-
provide_require_fennel = true,
5
-
-- show fennel compiler results in when editing fennel files
6
-
enable_hotpot_diagnostics = true,
7
-
compiler = {
8
-
-- options passed to fennel.compile for modules, defaults to {}
9
-
modules = {
10
-
-- not default but recommended, align lua lines with fnl source
11
-
-- for more debuggable errors, but less readable lua.
12
-
correlate = true
13
-
},
14
-
macros = {
15
-
-- allow macros to access vim global, needed for nyoom modules
16
-
env = "_COMPILER",
17
-
compilerEnv = _G,
18
-
allowGlobals = true,
19
-
},
20
-
}
21
-
})
22
-
-- Import neovim configuration
23
-
require("conf")
24
-
else
25
-
print("Unable to require hotpot")
26
-
end
···
+1070
-113
home/profiles/nvim/default.nix
+1070
-113
home/profiles/nvim/default.nix
···
1
{ pkgs, ... }:
2
-
# TODO Need to find a solution to have my own packages?
3
-
# Or at least update to recent versions of the packages I do use in nixpkgs
4
{
5
home.sessionVariables.EDITOR = "nvim";
6
home.shellAliases = {
7
-
vim = "nvim";
8
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
9
# kitaab zettel
10
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
11
# kitaab get by tagged
12
-
kt =
13
-
"cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
14
};
15
-
16
-
home.file.".config/nvim".source = ./config;
17
18
#environment.systemPackages = with customPlugins; [ tidal ];
19
programs.neovim = {
20
enable = true;
21
22
-
extraPackages = with pkgs; [
23
# used to compile tree-sitter grammar
24
-
# python-with-my-packages
25
-
# nodejs
26
-
# clojure-lsp
27
-
# clojure
28
-
# clj-kondo
29
terraform-lsp
30
-
nil
31
gopls
32
gcc
33
shellcheck
34
-
shfmt
35
proselint
36
-
nixfmt
37
-
# statix
38
-
# nodePackages.typescript
39
-
# nodePackages.typescript-language-server
40
-
# luajitPackages.lua-lsp
41
fennel-ls
42
-
unstable.starpls-bin
43
];
44
45
-
plugins = with pkgs.unstable.vimPlugins;
46
-
[
47
-
#hotpot
48
-
hotpot-nvim
49
-
nvim-navic
50
-
# ui
51
-
lualine-nvim
52
-
neo-tree-nvim
53
-
fzf-vim
54
-
vim-devicons
55
-
nvim-web-devicons
56
-
telescope-nvim
57
-
plenary-nvim
58
-
FTerm-nvim
59
-
barbar-nvim
60
-
neovim-ayu
61
-
rainbow_parentheses-vim
62
-
auto-session
63
-
which-key-nvim
64
-
aerial-nvim
65
-
todo-comments-nvim
66
-
indent-blankline-nvim
67
-
nvim-parinfer
68
69
-
# Tree sitter
70
-
(nvim-treesitter.withPlugins (p: [
71
-
p.nix
72
-
p.clojure
73
-
p.fennel
74
-
p.lua
75
-
p.html
76
-
p.css
77
-
p.regex
78
-
p.supercollider
79
-
p.beancount
80
-
p.markdown_inline
81
-
p.markdown
82
-
p.glsl
83
-
p.yaml
84
-
p.toml
85
-
p.dockerfile
86
-
p.json
87
-
p.go
88
-
p.starlark
89
-
]))
90
-
nvim-treesitter-context
91
-
nvim-treesitter-textobjects
92
93
-
# TODO
94
-
undotree
95
-
marks-nvim
96
97
-
# language
98
-
vim-nix
99
-
emmet-vim
100
-
csv-vim
101
-
direnv-vim
102
-
# conjure
103
104
-
# kitaab stuff
105
-
vimwiki
106
-
vim-zettel
107
-
hologram-nvim
108
109
-
# lsp stuff
110
-
nvim-lspconfig
111
-
nvim-cmp
112
-
cmp-nvim-lsp
113
-
cmp-treesitter
114
-
# cmp-conjure
115
-
cmp-buffer
116
-
cmp-path
117
-
cmp-spell
118
-
lspkind-nvim
119
-
conform-nvim
120
-
none-ls-nvim
121
-
mini-nvim
122
-
# nvim-lspfuzzy
123
124
-
# git stuff
125
-
vim-fugitive
126
-
gitsigns-nvim
127
-
fzf-checkout-vim
128
-
129
-
# Clojure stuff
130
-
# conjure
131
-
vim-sexp
132
-
vim-sexp-mappings-for-regular-people
133
-
fennel-vim
134
-
135
-
# nvim-luapad
136
-
scnvim
137
-
flash-nvim
138
-
vim-beancount
139
-
] ++ [ pkgs.vimPlugins.vim-tidal ];
140
-
# withPython3 = true;
141
-
# extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
142
-
# vimAlias = true;
143
};
144
}
145
···
1
{ pkgs, ... }:
2
+
let
3
+
customPlugins = {
4
+
vim-zettel = pkgs.vimUtils.buildVimPlugin {
5
+
name = "vim-zettel";
6
+
src = pkgs.fetchFromGitHub {
7
+
owner = "michal-h21";
8
+
repo = "vim-zettel";
9
+
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
10
+
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
11
+
};
12
+
};
13
+
14
+
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
15
+
name = "lspsaga.nvim";
16
+
src = pkgs.fetchFromGitHub {
17
+
owner = "glepnir";
18
+
repo = "lspsaga.nvim";
19
+
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
20
+
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
21
+
};
22
+
};
23
+
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
24
+
name = "nvim-luapad";
25
+
src = pkgs.fetchFromGitHub {
26
+
owner = "rafcamlet";
27
+
repo = "nvim-luapad";
28
+
rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea";
29
+
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
30
+
};
31
+
};
32
+
leap = pkgs.vimUtils.buildVimPlugin {
33
+
name = "leap";
34
+
src = pkgs.fetchFromGitHub {
35
+
owner = "ggandor";
36
+
repo = "leap.nvim";
37
+
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
38
+
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
39
+
};
40
+
};
41
+
nvim-navic = pkgs.vimUtils.buildVimPlugin {
42
+
name = "nvim-navic";
43
+
src = pkgs.fetchFromGitHub {
44
+
owner = "SmiteshP";
45
+
repo = "nvim-navic";
46
+
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
47
+
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
48
+
};
49
+
};
50
+
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
51
+
pname = "which-key.nvim";
52
+
version = "2022-05-04";
53
+
src = pkgs.fetchFromGitHub {
54
+
owner = "folke";
55
+
repo = "which-key.nvim";
56
+
rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71";
57
+
sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj";
58
+
};
59
+
meta.homepage = "https://github.com/folke/which-key.nvim/";
60
+
};
61
+
yuck-vim = pkgs.vimUtils.buildVimPlugin {
62
+
pname = "yuck.vim";
63
+
version = "2021-08-09";
64
+
src = pkgs.fetchFromGitHub {
65
+
owner = "elkowar";
66
+
repo = "yuck.vim";
67
+
rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08";
68
+
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
69
+
};
70
+
};
71
+
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
72
+
pname = "nvim-parinfer";
73
+
version = "v1.2.0";
74
+
src = pkgs.fetchFromGitHub {
75
+
owner = "gpanders";
76
+
repo = "nvim-parinfer";
77
+
rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
78
+
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
79
+
};
80
+
};
81
+
my-marks = pkgs.vimUtils.buildVimPlugin {
82
+
pname = "marks";
83
+
version = "2022-08-31";
84
+
src = pkgs.fetchFromGitHub {
85
+
owner = "chentoast";
86
+
repo = "marks.nvim";
87
+
rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0";
88
+
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
89
+
};
90
+
};
91
+
my-fterm = pkgs.vimUtils.buildVimPlugin {
92
+
pname = "fterm";
93
+
version = "2022-07-22";
94
+
src = pkgs.fetchFromGitHub {
95
+
owner = "numToStr";
96
+
repo = "FTerm.nvim";
97
+
rev = "efd10656724a269e21ba68d65e2b058a4e606424";
98
+
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
99
+
};
100
+
};
101
+
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
102
+
pname = "nvim-peekup";
103
+
version = "0.1.0";
104
+
src = pkgs.fetchFromGitHub {
105
+
owner = "gennaro-tedesco";
106
+
repo = "nvim-peekup";
107
+
rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3";
108
+
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
109
+
};
110
+
};
111
+
};
112
+
113
+
my-python-packages = python-packages: with python-packages; [
114
+
tasklib
115
+
pynvim
116
+
six
117
+
# other python packages you want
118
+
];
119
+
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
120
+
in
121
{
122
home.sessionVariables.EDITOR = "nvim";
123
home.shellAliases = {
124
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
125
# kitaab zettel
126
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
127
+
# kitaab recents
128
+
kr = "cd /home/anish/kitaab/vimwiki; eza --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
129
# kitaab get by tagged
130
+
kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
131
+
# List files that have no links in them
132
+
ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD";
133
};
134
+
# Add %update to the highlight clause for vimwiki files
135
+
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
136
+
" match with %update
137
+
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
138
+
" match with %link
139
+
syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
140
+
'';
141
142
#environment.systemPackages = with customPlugins; [ tidal ];
143
programs.neovim = {
144
enable = true;
145
146
+
extraConfig = ''
147
+
" so our custom files still get included
148
+
set runtimepath+=/home/anish/.config/nvim/
149
+
set tabstop=2
150
+
set showmatch
151
+
set shiftwidth=2
152
+
set noexpandtab
153
+
set autoindent
154
+
set undofile
155
+
set signcolumn=auto:4
156
+
set title
157
+
158
+
" set foldmethod=indent " fold based on indent
159
+
set number
160
+
set nocompatible
161
+
set relativenumber
162
+
set showtabline=2
163
+
set noexpandtab
164
+
set autowriteall
165
+
set list lcs=tab:\|\
166
+
filetype plugin on
167
+
168
+
" include - in word to move across easier in lisp / clojure
169
+
set iskeyword+=-
170
+
171
+
set termguicolors
172
+
colorscheme ayu-mirage
173
+
174
+
" set spell
175
+
set spelllang=en_gb
176
+
set ignorecase
177
+
set smartcase
178
+
set incsearch
179
+
" if hidden is not set, TextEdit might fail.
180
+
set hidden
181
+
" Some servers have issues with backup files, see #649
182
+
set nobackup
183
+
set nowritebackup
184
+
" Better display for messages
185
+
set cmdheight=0
186
+
" You will have bad experience for diagnostic messages when it's default 4000.
187
+
set updatetime=300
188
+
" don't give |ins-completion-menu| messages.
189
+
set shortmess+=c
190
+
" always show signcolumns
191
+
set signcolumn=yes
192
+
" highlight row
193
+
set cursorline
194
+
set autoread
195
+
196
+
let mapleader = "\<Space>"
197
+
let maplocalleader = ","
198
+
199
+
" window
200
+
nmap <leader>wh :topleft vnew<CR>
201
+
nmap <leader>wl :botright vnew<CR>
202
+
nmap <leader>wk :topleft new<CR>
203
+
nmap <leader>wj :botright new<CR>
204
+
205
+
" tabs
206
+
nmap <leader>rt :retab!<CR>
207
+
vmap <leader>rt :retab!<CR>
208
+
209
+
" Alt+hjkl navigation now handled by Navigator.nvim plugin
210
+
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
211
+
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
212
+
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
213
+
214
+
" tidal nvim terminal
215
+
let g:tidal_target = "terminal"
216
+
217
+
" latex
218
+
" let g:tex_flavor='latex'
219
+
" let g:vimtex_view_method='zathura'
220
+
" let g:vimtex_quickfix_mode=0
221
+
" set conceallevel=1
222
+
" let g:tex_conceal='abdmg'
223
+
224
+
" telescope
225
+
" Find files using Telescope command-line sugar.
226
+
nnoremap <leader>ff <cmd>Telescope find_files<cr>
227
+
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
228
+
nnoremap <leader>fb <cmd>Telescope buffers<cr>
229
+
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
230
+
nnoremap <leader>ft <cmd>Telescope tags<cr>
231
+
232
+
" exit normal mode in terminal
233
+
:tnoremap <C-n> <C-\><C-n>
234
+
235
+
" Sexp in Conjure (since it's fennel)
236
+
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
237
+
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
238
+
" we only use fennel with love; no we don't...
239
+
let g:conjure#client#fennel#stdio#command = "fennel"
240
+
" let g:conjure#extract#tree_sitter#enabled = true
241
+
map <localleader>lt :ConjureLogToggle<CR>
242
+
243
+
let g:rainbow_active = 0
244
+
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
245
+
246
+
" general commands
247
+
map <leader>e :Neotree toggle<CR>
248
+
map <leader>s :w<CR>
249
+
map <leader>q :q<CR>
250
+
map <leader>r :RainbowParenthesesToggleAll<CR>
251
+
nnoremap <Esc> :noh<CR>
252
+
map Q <Nop>
253
+
nnoremap Y y$
254
+
nnoremap <leader>n :vnew<CR>
255
+
" center moving
256
+
nnoremap n nzzzv
257
+
nnoremap N Nzzzv
258
+
nnoremap J mzJ'z
259
+
" undo points
260
+
inoremap , ,<c-g>u
261
+
inoremap . .<c-g>u
262
+
inoremap ? ?<c-g>u
263
+
inoremap ! !<c-g>u
264
+
inoremap ) )<c-g>u
265
+
inoremap [ [<c-g>u
266
+
inoremap ] ]<c-g>u
267
+
inoremap { {<c-g>u
268
+
inoremap ( (<c-g>u
269
+
inoremap } }<c-g>u
270
+
" moving text
271
+
vnoremap J :m '>+1<CR>gv=gv
272
+
vnoremap K :m '>-2<CR>gv=gv
273
+
inoremap <c-j> <esc>:m .+1<CR>==
274
+
inoremap <c-k> <esc>:m .-2<CR>==
275
+
nnoremap <leader>j <esc>:m .+1<CR>==
276
+
nnoremap <leader>k <esc>:m .-2<CR>==
277
+
" Pasting
278
+
:map <leader>sy :!xclip -i<CR><CR>
279
+
:vmap <leader>sy "*y
280
+
:map <leader>sp :r!xclip -o<CR>
281
+
282
+
" buffer navigation (using built-in commands)
283
+
nnoremap <silent> gT :bprevious<CR>
284
+
nnoremap <silent> gt :bnext<CR>
285
+
nnoremap <silent> gj :buffers<CR>
286
+
nnoremap <silent> gq :bdelete<CR>
287
+
288
+
" git
289
+
nnoremap <leader>ga :G fetch --all
290
+
nmap <leader>gs :G<CR>
291
+
nmap <leader>gl :diffget //3<CR>
292
+
nmap <leader>gh :diffget //2<CR>
293
+
nmap <leader>gb :GBranches<CR>
294
+
nnoremap <leader>gp :Git! push<CR>
295
+
nnoremap <leader>gd :Gdiff<CR>
296
+
nnoremap <leader>gc :G commit -v -q %:p<CR>
297
+
298
+
" kitaab
299
+
"map <leader>cz :VimwikiIndex<CR>:ZettelNew
300
+
"map <leader>zs :ZettelSearch<CR>
301
+
map <leader>zn :ZettelNew<CR>
302
+
"map <leader>zo :ZettelOpen<CR>
303
+
"map <leader>zf :Telescope oldfiles only_cwd=true<CR>
304
+
"map <leader>wt :VimwikiMakeTomorrowDiaryNote
305
+
"map <leader>wd :VimwikiMakeYesterdayDiaryNote
306
+
"map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
307
+
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
308
+
let g:sync_taskwarrior = 0
309
+
let g:zettel_format = "%y%m%d-%H%M"
310
+
let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}]
311
+
312
+
let g:mapleader="\<Space>"
313
+
314
+
" fzf
315
+
" not sure we even use this
316
+
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
317
+
318
+
" lsp commands
319
+
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
320
+
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
321
+
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
322
+
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
323
+
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
324
+
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
325
+
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
326
+
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
327
+
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
328
+
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
329
+
" lspsaga stuff doesn't work
330
+
nnoremap <leader>vd :Lspsaga peek_definition<CR>
331
+
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
332
+
nnoremap <leader>vh :Lspsaga hover_doc<CR>
333
+
nnoremap <leader>vca :Lspsaga code_action<CR>
334
+
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
335
+
nnoremap <leader>vs :Dasht<Space>
336
+
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
337
+
nnoremap <leader>co :Outline<CR>
338
+
" Trouble keybindings
339
+
nnoremap <leader>xx :Trouble diagnostics<CR>
340
+
nnoremap <leader>xw :Trouble workspace_diagnostics<CR>
341
+
nnoremap <leader>xd :Trouble document_diagnostics<CR>
342
+
nnoremap <leader>xl :Trouble loclist<CR>
343
+
nnoremap <leader>xq :Trouble quickfix<CR>
344
+
nnoremap <leader>xr :Trouble lsp_references<CR>
345
+
346
+
" Yank to system clipboard (y operations only, not d)
347
+
nnoremap y "+y
348
+
vnoremap y "+y
349
+
nnoremap Y "+Y
350
+
351
+
" Note-taking keybindings
352
+
nnoremap <leader>zz :ZkNew { title = vim.fn.input('Title: ') }<CR>
353
+
354
+
" dashboard
355
+
let g:dashboard_custom_header = [
356
+
\' ',
357
+
\' โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃคโฃฆโ โ โ โ โ โ โ โ โ โฃคโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
358
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โฃฟโ โ โ โ โ โ โ โ โข โฃฟโฃถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
359
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโฃงโ โ โ โ โ โ โ โ โขปโ โ โ โ โ โ โ โ โฃธโฃฟโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
360
+
\'โ โ โ โ โ โ โ โขดโฃทโ โ โ โ โ โ โ โ โ โ โขปโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โ โ โขโฃดโฃฟโกโ โ โ โ โ โ ',
361
+
\'โ โ โ โ โ โ โ โ โขฟโฃงโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃ โฃฟโ โ โ โ โ โ โ โ โ ',
362
+
\'โ โ โ โ โ โ โ โ โ โ ปโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโ ถโ โ โ โ โ โ โ โ โ โ โ ',
363
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
364
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
365
+
\'โ โ โ โ โ โ โ โขโฃโกคโ คโ คโ โฃโ โกโ ฒโกฆโฃคโฃโฃโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโฃ โฃคโฃคโฃคโฃคโฃคโฃโฃโ โ โ โ โ โ โ โ โ ',
366
+
\'โ โ โ โ โ โฃ โขถโ โ ฉโขโฃ โกคโ คโ ฏโ ฌโ ฅโฃผโฃ
โกโ ธโ โ โกทโฃฆโกโ โ โ โ โ โ โ โ โ โ โ โ โขโฃคโขถโขปโขปโขนโฃโฃจโฃงโฃคโฃดโฃนโฃโ โขถโฃโ โ โ โ โ โ ',
367
+
\'โ โ โ โฃฐโ โ โขโกคโ โ โ โ โ โฃโกโ โกโ โ โ โ ฒโขผโฃฐโขกโฃโขถโฃโ โ โ โ โ โ โ โขโฃ โ ถโกโฃโฃบโ พโ โ โ โ โ โ โ โ โ โ โ ณโขฟโฃทโฃโ โ โ โ ',
368
+
\'โ โขโกผโกโขธโฃฐโ โ โ โ โ โ โ โ โกโ โ โ โ โ โ โ โ โ ปโฃฟโกโกผโฃทโฃโ โ โ โฃ โฃพโ โ โฃทโ โ โ โ โ โ โ โ โ โขโฃโ โ โ โข โ โ โ ปโฃงโ โ โ ',
369
+
\'โ โกผโ โขโกผโ โ โ โ โฃโ คโ โ โ โ โ โ โ ฒโ คโฃโกโ โ โ โ โ ปโขทโฃฟโฃฟโฃทโฃคโฃพโ นโขโกทโ โ โ โ โ โ โฃโกคโ โ โ โ โ โ โ โ ฒโฃโฃโ โ โ โฃทโ โ ',
370
+
\'โขฐโ ทโฃโกโ โ โ โขโ โ โ โ โ โ โ โ โ โ โ โ โ โ ฒโฃคโกโขโกคโ โขปโฃฟโฃฟโขฃโขโกดโ โ โ โ โ โฃ โ โ โ โ โ โ โ โ โ โ โ โ โ โขปโกโ โ โ โฃโ ',
371
+
\'โฃพโฃโฃนโขโกโ โขโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขฟโฃทโฃพโฃโกโขนโกผโ โ โ โ โข โกดโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโ โ โ โขนโ ',
372
+
\'โขนโขโฃฟโ โกโ โขธโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโกดโขโขฑโขนโกพโ โ โ โ โฃ โฃพโฃฟโฃฆโฃโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขธโ โ โ โขธโก ',
373
+
\'โขธโฃ
โฃฏโ โฃโ โขธโกโ โ โ โ โ โ โ โ โ โ โ โ โ โขโกดโขปโฃนโขธโกผโ โ โ โ โขโกผโขปโฃปโฃฟโกฝโกนโ ณโขคโฃโ โ โ โ โ โ โ โ โ โ โ โขโกพโ โ โ โขธโ ',
374
+
\'โ โฃฟโฃฟโกโ โ โ โฃฟโฃคโฃโ โ โ โ โ โ โ โ โฃโฃคโขพโขปโขฟโฃฟโ โ โ โ โ โ โฃ โฃโ โฃฟโกโ โ ปโขฅโฃโกโฃฝโ ปโขฆโฃโฃโ โ โ โ โ โฃโกดโฃพโ โ โ โ โกผโ ',
375
+
\'โ โ โฃโฃงโ โ โ โ โขปโฃโ โ ฒโฃถโฃถโฃถโฃถโกโขโฃฟโฃโกงโ โ โ โ โ โ โขโฃคโ โ โ โ ปโฃทโฃงโ โกโ โ โ โขงโฃโขฐโขโ โขปโ โกโขฒโ โฃโกดโ โ โ โ โฃดโ โ ',
376
+
\'โ โ โ โขพโฃทโกโ โ โ โ โ โ โ พโ ฟโ พโ ฟโ ฟโ โ โ โ โ โ โ โ โฃ โกดโ โ โ โ โ โ โ โ โ ทโฃโ ฃโ โ โ โ โ โ โ ถโ พโ คโ งโ ผโ โ โ โ โ โขโกดโ โ โ ',
377
+
\'โ โ โ โ โ โ ฟโฃฆโฃโ โ โ โ โ โกโ โ โ โ โ โ โ โขโฃ โกดโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ถโฃโฃโ โ โ โ โ โ โ โ โ โ โ โขโกดโ โ โ โ โ ',
378
+
\'โ โ โ โ โ โ โ โ โ โ โ คโ คโฃโฃโฃโฃโฃ โ คโ คโ ถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ฆโ คโขคโฃโฃโฃ โกคโ คโ โ โ โ โ โ โ โ ',
379
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโ โ โ โ โ โ โ โ โ โ โ โ โ ',
380
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โขโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ธโฃโ โ โ โ โ โ โ โ โ โ โ โ ',
381
+
\'โ โ โ โ โ โ โ โ โ โ โ โฃ โกถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขทโกโ โ โ โ โ โ โ โ โ โ ',
382
+
\'โ โ โ โ โ โ โ โ โ โฃ โกพโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โกโ โ โ โ โ โ โ โ โ โ โ ปโฃฆโกโ โ โ โ โ โ โ โ ',
383
+
\'โ โ โ โ โ โ โขโฃดโกพโ โ โ โ โ โ โ โ โ โ โข โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโกโ โ โ โ โ โ โ โ โ โ โ โขฟโฃฆโฃโ โ โ โ โ โ ',
384
+
\'โ โ โ โ โ โ โ ปโ โ โ โ โ โ โ โ โ โ โ โฃดโ โ โ โ โ โ โ โ โ โ ฐโกโ โ โ โ โ โ โ โ โ นโฃฆโกโ โ โ โ โ โ โ โ โ โ โ ฝโ โ โ โ โ โ โ ',
385
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโฃผโ โ โ โ โ โ โ โ โ โ โ โฃฟโ โ โ โ โ โ โ โ โ โ โฃทโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
386
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โ โ โ ฟโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
387
+
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ นโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
388
+
\]
389
+
let g:dashboard_default_executive = 'telescope'
390
+
nmap <Leader>ss :<C-u>SessionSave<CR>
391
+
nmap <Leader>sl :<C-u>SessionLoad<CR>
392
+
" nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
393
+
" nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
394
+
" nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
395
+
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
396
+
let g:dashboard_custom_footer = ["Run wild"]
397
+
let g:dashboard_custom_section={
398
+
\ 'create_zettel': {
399
+
\ 'description': ['๏ค Create Zettel SPC c z'],
400
+
\ 'command': ':VimwikiIndex' },
401
+
\ 'load_session': {
402
+
\ 'description': ['๏
Load Session SPC s l'],
403
+
\ 'command': 'SessionLoad' }
404
+
\ }
405
+
406
+
let g:scnvim_snippet_format = "luasnip"
407
+
408
+
409
+
" lua config
410
+
lua <<EOF
411
+
local signs = { Error = "โฎพ ", Warn = "โ ", Hint = "๐ก", Info = "๏ " }
412
+
for type, icon in pairs(signs) do
413
+
local hl = "DiagnosticSign" .. type
414
+
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
415
+
end
416
+
vim.g.diagnostics_active = true
417
+
function _G.toggle_diagnostics()
418
+
if vim.g.diagnostics_active then
419
+
vim.g.diagnostics_active = false
420
+
vim.lsp.diagnostic.clear(0)
421
+
vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end
422
+
else
423
+
vim.g.diagnostics_active = true
424
+
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
425
+
vim.lsp.diagnostic.on_publish_diagnostics, {
426
+
virtual_text = true,
427
+
signs = true,
428
+
underline = true,
429
+
update_in_insert = false,
430
+
}
431
+
)
432
+
end
433
+
end
434
+
435
+
vim.diagnostic.config({
436
+
signs = true,
437
+
update_in_insert = false,
438
+
underline = false,
439
+
severity_sort = true,
440
+
float = {
441
+
focusable = false,
442
+
style = 'minimal',
443
+
border = 'rounded',
444
+
source = 'always',
445
+
},
446
+
})
447
+
448
+
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
449
+
vim.lsp.handlers.hover,
450
+
{
451
+
border = 'rounded',
452
+
}
453
+
)
454
+
455
+
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
456
+
vim.lsp.handlers.signature_help,
457
+
{
458
+
border = 'rounded',
459
+
}
460
+
)
461
+
462
+
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
463
+
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
464
+
opts = opts or {}
465
+
opts.border = opts.border or 'rounded'
466
+
return orig_util_open_floating_preview(contents, syntax, opts, ...)
467
+
end
468
+
469
+
470
+
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
471
+
472
+
-- autopairs
473
+
require('nvim-autopairs').setup{}
474
+
475
+
-- marks
476
+
require('marks').setup{}
477
+
478
+
-- Setup nvim-cmp.
479
+
local has_words_before = function()
480
+
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
481
+
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
482
+
end
483
+
484
+
local luasnip = require("luasnip")
485
+
local lspkind = require("lspkind")
486
+
local cmp = require('cmp')
487
+
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
488
+
local t = function(str)
489
+
return vim.api.nvim_replace_termcodes(str, true, true, true)
490
+
end
491
+
local check_back_space = function()
492
+
local col = vim.fn.col(".") - 1
493
+
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
494
+
end
495
+
cmp.setup {
496
+
formatting = {
497
+
format = lspkind.cmp_format({
498
+
mode = 'symbol_text',
499
+
maxwidth = 50,
500
+
})
501
+
},
502
+
mapping = {
503
+
['<C-p>'] = cmp.mapping.select_prev_item(),
504
+
['<C-n>'] = cmp.mapping.select_next_item(),
505
+
['<C-d>'] = cmp.mapping.scroll_docs(-4),
506
+
['<C-f>'] = cmp.mapping.scroll_docs(4),
507
+
['<C-Space>'] = cmp.mapping.complete(),
508
+
['<C-e>'] = cmp.mapping.close(),
509
+
['<CR>'] = cmp.mapping.confirm({
510
+
behavior = cmp.ConfirmBehavior.Insert,
511
+
select = true
512
+
}),
513
+
["<Tab>"] = cmp.mapping(function(fallback)
514
+
if cmp.visible() then
515
+
cmp.select_next_item()
516
+
elseif luasnip.expand_or_jumpable() then
517
+
luasnip.expand_or_jump()
518
+
elseif has_words_before() then
519
+
cmp.complete()
520
+
else
521
+
fallback()
522
+
end
523
+
end, {"i", "s"}),
524
+
["<S-Tab>"] = cmp.mapping(function(fallback)
525
+
if cmp.visible() then
526
+
cmp.select_prev_item()
527
+
elseif luasnip.jumpable(-1) then
528
+
luasnip.jump(-1)
529
+
else
530
+
fallback()
531
+
end
532
+
end, { "i", "s" }),
533
+
},
534
+
snippet = {
535
+
expand = function(args)
536
+
require'luasnip'.lsp_expand(args.body)
537
+
end
538
+
},
539
+
sources = {
540
+
{name = 'buffer'}, {name = 'nvim_lsp'},
541
+
{name = "look"}, {name = "path"},
542
+
{name = "calc"}, {name = "spell"},
543
+
{name = 'cmp-conjure'}, {name = "luasnip"},
544
+
{name = 'tags'}
545
+
},
546
+
completion = {completeopt = 'menu,menuone,noinsert'}
547
+
}
548
+
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
549
+
require("luasnip.loaders.from_vscode").lazy_load()
550
+
551
+
-- lsp-format removed, using conform.nvim instead
552
+
require("nvim-navic").setup {
553
+
icons = {
554
+
Constant = "ฯ ",
555
+
Function = "ฦ "
556
+
}
557
+
}
558
+
559
+
-- Setup neo-tree
560
+
require("neo-tree").setup {}
561
+
562
+
-- Setup outline
563
+
require("outline").setup {}
564
+
565
+
-- Setup trouble
566
+
require("trouble").setup {}
567
+
568
+
-- Setup noice for floating command palette and notifications
569
+
require("noice").setup({
570
+
cmdline = {
571
+
enabled = true,
572
+
view = "cmdline_popup",
573
+
},
574
+
messages = {
575
+
enabled = true,
576
+
},
577
+
popupmenu = {
578
+
enabled = true,
579
+
},
580
+
notify = {
581
+
enabled = true,
582
+
view = "notify",
583
+
},
584
+
lsp = {
585
+
progress = {
586
+
enabled = true,
587
+
format = "lsp_progress",
588
+
format_done = "lsp_progress_done",
589
+
throttle = 1000 / 30, -- frequency to update lsp progress message
590
+
view = "mini",
591
+
},
592
+
override = {
593
+
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
594
+
["vim.lsp.util.stylize_markdown"] = true,
595
+
["cmp.entry.get_documentation"] = true,
596
+
},
597
+
},
598
+
presets = {
599
+
command_palette = true,
600
+
long_message_to_split = true,
601
+
inc_rename = false,
602
+
lsp_doc_border = false,
603
+
},
604
+
views = {
605
+
cmdline_popup = {
606
+
border = {
607
+
style = "rounded",
608
+
padding = { 0, 1 },
609
+
},
610
+
filter_options = {},
611
+
win_options = {
612
+
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
613
+
},
614
+
},
615
+
},
616
+
})
617
+
618
+
-- Setup barbar (tabline with icons)
619
+
require'barbar'.setup {
620
+
icons = {
621
+
filetype = {
622
+
enabled = true,
623
+
},
624
+
},
625
+
}
626
+
local navic = require("nvim-navic")
627
+
628
+
-- Setup conform.nvim for formatting
629
+
require("conform").setup({
630
+
formatters_by_ft = {
631
+
javascript = { "prettier", "lsp" },
632
+
typescript = { "prettier", "lsp" },
633
+
javascriptreact = { "prettier", "lsp" },
634
+
typescriptreact = { "prettier", "lsp" },
635
+
json = { "prettier", "lsp" },
636
+
html = { "prettier", "lsp" },
637
+
css = { "prettier", "lsp" },
638
+
yaml = { "prettier", "lsp" },
639
+
rust = { "lsp" },
640
+
go = { "lsp" },
641
+
lua = { "lsp" },
642
+
nix = { "nixfmt-rfc-style" },
643
+
clojure = { "lsp" },
644
+
fennel = { "lsp" },
645
+
terraform = { "lsp" },
646
+
bash = { "shfmt" },
647
+
sh = { "shfmt" },
648
+
},
649
+
format_on_save = {
650
+
timeout_ms = 500,
651
+
lsp_fallback = true,
652
+
},
653
+
})
654
+
655
+
-- lspsaga, code_action lightbulb is annoying
656
+
local saga = require('lspsaga')
657
+
saga.init_lsp_saga({
658
+
border_style = "rounded",
659
+
code_action_icon = "",
660
+
code_action_num_shortcut = true,
661
+
code_action_lightbulb = {
662
+
enable = false,
663
+
enable_in_insert = false,
664
+
cache_code_action = true,
665
+
sign = true,
666
+
update_time = 150,
667
+
sign_priority = 20,
668
+
virtual_text = false,
669
+
},
670
+
code_action_keys = {
671
+
quit = 'q',
672
+
exec = '<CR>',
673
+
},
674
+
-- show outline
675
+
show_outline = {
676
+
win_position = 'right',
677
+
--set special filetype win that outline window split.like NvimTree neotree
678
+
-- defx, db_ui
679
+
auto_enter = true,
680
+
auto_preview = true,
681
+
virt_text = 'โ',
682
+
jump_key = 'o',
683
+
-- auto refresh when change buffer
684
+
auto_refresh = true,
685
+
},
686
+
})
687
+
688
+
capabilities = require('cmp_nvim_lsp').default_capabilities()
689
+
690
+
-- fennel-ls is bleeding edge
691
+
local lspconfig = require('lspconfig')
692
+
require("lspconfig.configs")["fennel-ls"] = {
693
+
default_config = {
694
+
cmd = {"fennel-ls"},
695
+
filetypes = {"fennel"},
696
+
root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
697
+
settings = {}
698
+
}
699
+
}
700
+
701
+
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'ts_ls', 'lua_ls', 'nil_ls', 'gopls', 'bashls'}
702
+
for _, lsp in ipairs(servers) do
703
+
lspconfig[lsp].setup {
704
+
on_attach = function(client, bufnr)
705
+
navic.attach(client, bufnr)
706
+
end,
707
+
capabilities = capabilities,
708
+
}
709
+
end
710
+
711
+
-- fennel-ls doesn't support navic
712
+
lspconfig['fennel-ls'].setup {
713
+
on_attach = function(client, bufnr)
714
+
-- fennel-ls setup without navic
715
+
end,
716
+
capabilities = capabilities,
717
+
}
718
+
719
+
-- deprecated pylsp
720
+
-- require('lspconfig').pylsp.setup {
721
+
-- on_attach = function(client, bufnr)
722
+
-- format.on_attach(client)
723
+
-- navic.attach(client, bufnr)
724
+
-- end,
725
+
-- capabilities = capabilities,
726
+
-- settings = {
727
+
-- pylsp = {
728
+
-- configurationSources = { "flake8", "mypy", "black" },
729
+
-- plugins = {
730
+
-- black = {enabled = true},
731
+
-- jedi_signature_help = {enabled = true},
732
+
-- jedi_completion = { include_params = true },
733
+
-- pylsp_mypy={ enabled = true },
734
+
-- pycodestyle={
735
+
-- enabled=true,
736
+
-- ignore={'E501', 'E231'},
737
+
-- maxLineLength=120,
738
+
-- },
739
+
-- },
740
+
-- },
741
+
-- },
742
+
-- }
743
+
744
+
require('gitsigns').setup { sign_priority=80 }
745
+
746
+
-- treesitter
747
+
require('nvim-treesitter.configs').setup {
748
+
-- parser_install_dir = "~/.local/share/nvim/site/parser/",
749
+
-- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'},
750
+
highlight = { enabled = true, additional_vim_regex_highting = true, },
751
+
textobjects = { enabled = true },
752
+
}
753
+
-- 'glsl' needs c++ compiler lol
754
+
755
+
-- lualine
756
+
local navic = require("nvim-navic")
757
+
require('lualine').setup {
758
+
options = { theme = 'ayu' },
759
+
sections = {
760
+
lualine_c = {
761
+
'filename', { navic.get_location, condition=navic.is_available },
762
+
},
763
+
lualine_y = {
764
+
function()
765
+
local msg = 'No Active Lsp'
766
+
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
767
+
local clients = vim.lsp.get_clients()
768
+
if next(clients) == nil then
769
+
return msg
770
+
end
771
+
for _, client in ipairs(clients) do
772
+
local filetypes = client.config.filetypes
773
+
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
774
+
return client.name
775
+
end
776
+
end
777
+
return msg
778
+
end
779
+
},
780
+
lualine_x = {'filetype'}
781
+
}
782
+
}
783
+
784
+
-- nvim-lint
785
+
-- require('lint').linters_by_ft = {
786
+
-- markdown = {'vale'},
787
+
-- }
788
+
789
+
-- f_term
790
+
local map = vim.api.nvim_set_keymap
791
+
local opts = { noremap = true, silent = true }
792
+
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
793
+
map('t', '<TAB>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
794
+
795
+
-- Custom functions
796
+
function update_date()
797
+
local time = os.date("%Y-%m-%d %H:%M")
798
+
local message = "%update " .. time
799
+
local lines = vim.api.nvim_buf_get_lines(0, 0,4,false)
800
+
for i=1,4,1 do
801
+
if (lines[i]:len() == 0) then
802
+
vim.api.nvim_buf_set_lines(0, i-1, i, false, {message, ""})
803
+
return
804
+
end
805
+
end
806
+
if (lines[4]:len() ~= 0) then
807
+
vim.api.nvim_buf_set_lines(0, 3, 4, false, {message})
808
+
end
809
+
return
810
+
end
811
+
812
+
vim.api.nvim_create_autocmd(
813
+
"BufWritePre",
814
+
{ pattern = { "*.wiki" }, callback = update_date}
815
+
)
816
+
817
+
-- set spelling for text files
818
+
vim.api.nvim_create_autocmd(
819
+
{ "BufRead", "BufNewFile" },
820
+
{ pattern = { "*.wiki", "*.txt", "*.md", "*.tex" },
821
+
command = "setlocal spell" }
822
+
)
823
+
vim.api.nvim_create_autocmd(
824
+
"FileType",
825
+
{ pattern = { "mail" },
826
+
command = "setlocal spell" }
827
+
)
828
+
829
+
-- auto session
830
+
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
831
+
require('auto-session').setup {
832
+
log_level = 'error',
833
+
auto_session_suppress_dirs = {'~/', '/tmp', '/'},
834
+
auto_session_enable_last_session = false,
835
+
auto_session_root_dir = vim.fn.stdpath('data').."/sessions/",
836
+
auto_session_enabled = true,
837
+
auto_save_enabled = nil,
838
+
auto_restore_enabled = nil,
839
+
auto_session_create_enabled = nil,
840
+
}
841
+
842
+
require("which-key").setup{}
843
+
require('leap').set_default_keymaps()
844
+
845
+
-- supercollider
846
+
local scnvim = require 'scnvim'
847
+
local map = scnvim.map
848
+
local map_expr = scnvim.map_expr
849
+
scnvim.setup {
850
+
keymaps = {
851
+
['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
852
+
['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
853
+
['<localleader>t'] = {
854
+
map('editor.send_block', {'i', 'n'}),
855
+
map('editor.send_selection', 'x'),
856
+
},
857
+
['<CR>'] = map('postwin.toggle'),
858
+
['<M-CR>'] = map('postwin.toggle', 'i'),
859
+
['<M-L>'] = map('postwin.clear', {'n', 'i'}),
860
+
['<C-k>'] = map('signature.show', {'n', 'i'}),
861
+
['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
862
+
['<leader>st'] = map('sclang.start'),
863
+
['<leader>sk'] = map('sclang.recompile'),
864
+
['<F1>'] = map_expr('s.boot'),
865
+
['<F2>'] = map_expr('s.meter'),
866
+
}
867
+
}
868
+
-- You gotta run :SCNvimGenerateAssets for this first
869
+
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
870
+
871
+
-- zk
872
+
require("zk").setup()
873
+
-- vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
874
+
875
+
-- Open notes.
876
+
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
877
+
-- Open notes associated with the selected tags.
878
+
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
879
+
880
+
local map = vim.api.nvim_set_keymap
881
+
-- Search for the notes matching a given query.
882
+
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
883
+
-- Search for the notes matching the current visual selection.
884
+
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
885
+
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
886
+
887
+
-- Create a new note after asking for its title.
888
+
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
889
+
-- map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
890
+
-- Create a new note in the same directory as the current buffer, using the current selection for title.
891
+
-- map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
892
+
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
893
+
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
894
+
895
+
-- Open notes linking to the current buffer.
896
+
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
897
+
-- Alternative for backlinks using pure LSP and showing the source context.
898
+
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
899
+
-- Open notes linked by the current buffer.
900
+
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
901
+
902
+
-- Preview a linked note.
903
+
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
904
+
-- Open the code actions for a visual selection.
905
+
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
906
+
907
+
-- zen mode
908
+
require('zen-mode').setup{
909
+
window = {
910
+
backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
911
+
-- height and width can be:
912
+
-- * an absolute number of cells when > 1
913
+
-- * a percentage of the width / height of the editor when <= 1
914
+
-- * a function that returns the width or the height
915
+
width = 120, -- width of the Zen window
916
+
height = 1, -- height of the Zen window
917
+
-- by default, no options are changed for the Zen window
918
+
-- uncomment any of the options below, or add other vim.wo options you want to apply
919
+
options = {
920
+
signcolumn = "no", -- disable signcolumn
921
+
number = false, -- disable number column
922
+
relativenumber = false, -- disable relative numbers
923
+
cursorline = false, -- disable cursorline
924
+
cursorcolumn = false, -- disable cursor column
925
+
foldcolumn = "0", -- disable fold column
926
+
list = false, -- disable whitespace characters
927
+
},
928
+
},
929
+
plugins = {
930
+
-- disable some global vim options (vim.o...)
931
+
-- comment the lines to not apply the options
932
+
options = {
933
+
enabled = true,
934
+
ruler = false, -- disables the ruler text in the cmd line area
935
+
showcmd = false, -- disables the command in the last line of the screen
936
+
},
937
+
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
938
+
gitsigns = { enabled = false }, -- disables git signs
939
+
tmux = { enabled = false }, -- disables the tmux statusline
940
+
-- this will change the font size on kitty when in zen mode
941
+
-- to make this work, you need to set the following kitty options:
942
+
-- - allow_remote_control socket-only
943
+
-- - listen_on unix:/tmp/kitty
944
+
kitty = {
945
+
enabled = true,
946
+
font = "+2", -- font size increment
947
+
},
948
+
},
949
+
}
950
+
require('twilight').setup{}
951
+
952
+
-- hologram
953
+
require('hologram').setup{
954
+
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
955
+
}
956
+
957
+
-- Setup Navigator.nvim
958
+
require('Navigator').setup {
959
+
disable_on_zoom = true,
960
+
mux = 'auto', -- auto-detect tmux
961
+
}
962
+
963
+
-- Set up Navigator.nvim keybindings
964
+
vim.keymap.set({'n', 't'}, '<M-h>', '<CMD>NavigatorLeft<CR>')
965
+
vim.keymap.set({'n', 't'}, '<M-j>', '<CMD>NavigatorDown<CR>')
966
+
vim.keymap.set({'n', 't'}, '<M-k>', '<CMD>NavigatorUp<CR>')
967
+
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
968
+
969
+
-- Disable Ctrl+V in nvim so Kitty can handle paste
970
+
vim.keymap.set({'n', 'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
971
+
972
+
-- Pane resizing with Alt+Shift+hjkl (to match tmux)
973
+
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})
974
+
vim.keymap.set('n', '<M-S-j>', '<Cmd>resize -2<CR>', {silent = true})
975
+
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
976
+
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
977
+
978
+
EOF
979
+
980
+
'';
981
+
extraPackages = with pkgs // customPlugins; [
982
# used to compile tree-sitter grammar
983
+
python-with-my-packages
984
+
nodejs
985
+
clojure-lsp
986
+
clojure
987
+
nil
988
terraform-lsp
989
+
rust-analyzer
990
+
clj-kondo
991
+
zls
992
gopls
993
gcc
994
+
pyright
995
shellcheck
996
proselint
997
+
statix
998
+
nodePackages.typescript
999
+
nodePackages.typescript-language-server
1000
+
nodePackages.bash-language-server
1001
+
luajitPackages.lua-lsp
1002
fennel-ls
1003
+
nixfmt-rfc-style
1004
+
shfmt
1005
+
zk
1006
];
1007
1008
+
plugins = with pkgs.vimPlugins // customPlugins; [
1009
+
# ui
1010
+
lualine-nvim
1011
+
fzf-vim
1012
+
neo-tree-nvim
1013
+
outline-nvim
1014
+
noice-nvim
1015
+
nui-nvim
1016
+
trouble-nvim
1017
+
neovim-ayu
1018
+
rainbow_parentheses-vim
1019
+
vim-surround
1020
+
vim-devicons
1021
+
nvim-web-devicons
1022
+
undotree
1023
+
telescope-nvim
1024
+
plenary-nvim
1025
+
nvim-navic
1026
+
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ]))
1027
+
nvim-treesitter-context
1028
+
my-fterm
1029
+
barbar-nvim
1030
+
auto-session
1031
+
my-marks
1032
+
which-key-nvim
1033
+
nvim-peekup
1034
+
zen-mode-nvim
1035
+
twilight-nvim
1036
+
my-lspsaga
1037
+
vim-dasht
1038
1039
+
# language
1040
+
vim-nix
1041
+
vim-elixir
1042
+
emmet-vim
1043
+
csv-vim
1044
+
direnv-vim
1045
+
zig-vim
1046
+
conjure
1047
1048
+
# kitaab stuff
1049
+
vimwiki
1050
+
taskwiki
1051
+
vim-zettel
1052
+
hologram-nvim
1053
+
zk-nvim
1054
1055
+
# lsp stuff
1056
+
# nvim-lint
1057
+
nvim-lspconfig
1058
+
nvim-cmp
1059
+
cmp-nvim-lsp
1060
+
cmp-treesitter
1061
+
nvim-lsp-ts-utils
1062
+
cmp-conjure
1063
+
cmp-buffer
1064
+
cmp-path
1065
+
cmp-spell
1066
+
nvim-autopairs
1067
+
cmp_luasnip
1068
+
luasnip
1069
+
conform-nvim
1070
+
friendly-snippets
1071
+
lspkind-nvim
1072
1073
+
# git stuff
1074
+
vim-fugitive
1075
+
gitsigns-nvim
1076
+
fzf-checkout-vim
1077
1078
+
# Clojure stuff
1079
+
# conjure
1080
+
vim-sexp
1081
+
vim-sexp-mappings-for-regular-people
1082
+
fennel-vim
1083
1084
+
vim-tidal
1085
+
# experimental
1086
+
nvim-luapad
1087
+
scnvim
1088
+
leap
1089
+
Navigator-nvim
1090
+
vim-beancount
1091
+
# vimtex
1092
+
# custom
1093
+
yuck-vim
1094
+
nvim-parinfer
1095
+
# vim-processing
1096
+
];
1097
+
withPython3 = true;
1098
+
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
1099
+
vimAlias = true;
1100
};
1101
}
1102
+3
home/profiles/tmux/default.nix
+3
home/profiles/tmux/default.nix
+85
home/profiles/tmux/tmux.conf
+85
home/profiles/tmux/tmux.conf
···
···
1
+
set -g base-index 1
2
+
setw -g pane-base-index 1
3
+
4
+
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
5
+
set -g default-terminal "xterm-256color"
6
+
set -ga terminal-overrides ",*256col*:Tc"
7
+
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
8
+
set-environment -g COLORTERM "truecolor"
9
+
10
+
# Mouse works as expected
11
+
set-option -g mouse on
12
+
# easy-to-remember split pane commands
13
+
bind | split-window -h -c "#{pane_current_path}"
14
+
bind - split-window -v -c "#{pane_current_path}"
15
+
16
+
# don't rename windows automatically
17
+
set-option -g allow-rename off
18
+
19
+
# DESIGN TWEAKS
20
+
21
+
# don't do anything when a 'bell' rings
22
+
set -g visual-activity off
23
+
set -g visual-bell off
24
+
set -g visual-silence off
25
+
setw -g monitor-activity off
26
+
set -g bell-action none
27
+
28
+
# clock mode
29
+
setw -g clock-mode-colour yellow
30
+
31
+
# copy mode
32
+
setw -g mode-style 'fg=black bg=green bold'
33
+
34
+
# panes
35
+
set -g pane-border-style 'fg=green'
36
+
set -g pane-active-border-style 'fg=yellow'
37
+
38
+
# statusbar
39
+
set -g status-position bottom
40
+
set -g status-justify left
41
+
set -g status-style 'fg=green'
42
+
43
+
set -g status-left ''
44
+
set -g status-left-length 10
45
+
46
+
set -g status-right-style 'fg=black bg=yellow'
47
+
set -g status-right '%Y-%m-%d %H:%M '
48
+
set -g status-right-length 50
49
+
50
+
setw -g window-status-current-style 'fg=black bg=green'
51
+
setw -g window-status-current-format ' #I #W #F '
52
+
53
+
setw -g window-status-style 'fg=green bg=black'
54
+
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
55
+
56
+
setw -g window-status-bell-style 'fg=yellow bg=green bold'
57
+
58
+
# messages
59
+
set -g message-style 'fg=yellow bg=green bold'
60
+
61
+
# Unbind Ctrl+V so it passes through to Kitty for paste
62
+
unbind C-v
63
+
64
+
# Vim-aware pane navigation with Alt+hjkl
65
+
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
66
+
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
67
+
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
68
+
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
69
+
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
70
+
71
+
# Window navigation with Alt+n/p
72
+
bind-key -n M-n next-window
73
+
bind-key -n M-p previous-window
74
+
75
+
# Pane resizing with Alt+Shift+hjkl
76
+
bind-key -n M-S-h resize-pane -L 2
77
+
bind-key -n M-S-j resize-pane -D 2
78
+
bind-key -n M-S-k resize-pane -U 2
79
+
bind-key -n M-S-l resize-pane -R 2
80
+
81
+
# Copy mode setup
82
+
bind v copy-mode
83
+
setw -g mode-keys vi
84
+
bind-key -T copy-mode-vi 'v' send -X begin-selection
85
+
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
+4
-1
hosts/box/configuration.nix
+4
-1
hosts/box/configuration.nix
···
66
address = "192.168.1.240";
67
prefixLength = 24;
68
}];
69
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
70
useDHCP = false;
71
};
···
88
# Enable the OpenSSH daemon.
89
services.openssh.enable = true;
90
networking.firewall.allowedTCPPorts = [ 22 ];
91
-
sound.enable = false;
92
93
programs.gnupg.agent.enable = true;
94
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
···
66
address = "192.168.1.240";
67
prefixLength = 24;
68
}];
69
+
ipv6.addresses = [{
70
+
address = "fd7d:587a:4300:1::240";
71
+
prefixLength = 64;
72
+
}];
73
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
74
useDHCP = false;
75
};
···
92
# Enable the OpenSSH daemon.
93
services.openssh.enable = true;
94
networking.firewall.allowedTCPPorts = [ 22 ];
95
96
programs.gnupg.agent.enable = true;
97
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
+14
-23
hosts/box/default.nix
+14
-23
hosts/box/default.nix
···
1
-
{ self, pkgs, ... }:
2
-
{
3
imports = [
4
./configuration.nix
5
../profiles/core
···
10
# ../profiles/monitoring
11
../profiles/nfs
12
../profiles/gonic
13
-
# ../profiles/headphones # TODO broken on 23.11, see: https://github.com/rembo10/headphones/issues/3320
14
../profiles/radicale
15
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
16
../profiles/syncthing
···
19
../profiles/wallabag
20
../profiles/finance
21
../profiles/sync/website
22
../profiles/grasp
23
# ../profiles/archivebox
24
# ../profiles/woodpecker-agent
25
# ../profiles/jellyfin
26
../profiles/ulogger-server
27
-
../profiles/photoprism # Replace with immich
28
../profiles/gpodder
29
#../profiles/postgres_upgrade_script
30
];
31
···
33
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
34
services.postgresqlBackup = {
35
enable = true;
36
-
databases = [ "wallabag" "photoprism" "ulogger" ];
37
location = "/var/backup/postgresql";
38
};
39
mossnet.backup = {
···
48
"/data/books" # calibre-web
49
# "/home/anish/usr/nonfiction" # syncthing
50
"/home/anish/usr/finance" # beancount
51
-
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
52
];
53
# seafile
54
};
55
56
-
services.transmission = {
57
-
enable = true;
58
-
settings = {
59
-
rpc.bind-address = "0.0.0.0";
60
-
download-dir = "/mnt/two/new-music";
61
-
};
62
-
};
63
-
services.nginx.virtualHosts."transmission.mossnet.lan" = {
64
-
enableACME = false;
65
-
forceSSL = false;
66
-
67
-
locations."/" = {
68
-
extraConfig = ''
69
-
proxy_pass http://localhost:9091/;
70
-
proxy_set_header X-Forwarded-Host $host;
71
-
'';
72
-
};
73
};
74
75
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
···
1
+
{ self, pkgs, ... }: {
2
imports = [
3
./configuration.nix
4
../profiles/core
···
9
# ../profiles/monitoring
10
../profiles/nfs
11
../profiles/gonic
12
+
../profiles/headphones
13
../profiles/radicale
14
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
15
../profiles/syncthing
···
18
../profiles/wallabag
19
../profiles/finance
20
../profiles/sync/website
21
+
../profiles/sync/music
22
../profiles/grasp
23
# ../profiles/archivebox
24
# ../profiles/woodpecker-agent
25
# ../profiles/jellyfin
26
../profiles/ulogger-server
27
+
../profiles/immich
28
+
../profiles/jacket
29
../profiles/gpodder
30
+
../profiles/transmission
31
#../profiles/postgres_upgrade_script
32
];
33
···
35
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
36
services.postgresqlBackup = {
37
enable = true;
38
+
databases = [ "wallabag" "immich" "ulogger" ];
39
location = "/var/backup/postgresql";
40
};
41
mossnet.backup = {
···
50
"/data/books" # calibre-web
51
# "/home/anish/usr/nonfiction" # syncthing
52
"/home/anish/usr/finance" # beancount
53
+
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
54
+
"/mnt/two/photos"
55
+
"/mnt/two/music"
56
];
57
# seafile
58
};
59
60
+
environment.systemPackages = with pkgs; [ lm_sensors ];
61
+
hardware.fancontrol = {
62
+
enable = false;
63
+
config = '''';
64
};
65
66
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
-2
hosts/curve/configuration.nix
-2
hosts/curve/configuration.nix
+26
-16
hosts/curve/default.nix
+26
-16
hosts/curve/default.nix
···
1
-
{ self, pkgs, ... }:
2
-
{
3
imports = [
4
./configuration.nix
5
../users/anish
···
17
# ../profiles/mount-mossnet
18
];
19
20
# import profiling tools
21
programs.systemtap.enable = true;
22
23
virtualisation.docker.enable = true;
24
virtualisation.docker.storageDriver = "btrfs";
25
-
environment.systemPackages = with pkgs; [
26
-
docker-compose
27
-
];
28
29
# Speed up boot by removing dependency on network
30
systemd = {
31
-
targets.network-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
32
-
services.NetworkManager-wait-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
33
};
34
35
-
programs.gnupg.agent.enable = true;
36
-
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
37
38
fileSystems."/mnt/ftp" = {
39
device = "192.168.1.240:/home/ftp";
···
64
65
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
66
networking.firewall = {
67
-
allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
68
-
allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
69
};
70
71
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
···
81
mossnet.backup = {
82
enable = true;
83
name = "curve";
84
-
paths = [
85
-
"/home/anish/usr"
86
-
"/home/anish/.ssh"
87
-
];
88
};
89
90
# enable adb
···
93
#virtualisation.docker.enable = true;
94
boot.blacklistedKernelModules = [ "qcserial" ];
95
# Used for packer Capsul
96
-
users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
97
virtualisation.libvirtd.enable = true;
98
hardware.keyboard.zsa.enable = true;
99
services.udev.extraRules = ''
···
1
+
{ self, pkgs, ... }: {
2
imports = [
3
./configuration.nix
4
../users/anish
···
16
# ../profiles/mount-mossnet
17
];
18
19
+
# temporarily allow ssh access for work, to be able to do deploy new services
20
+
services.openssh = {
21
+
enable = true;
22
+
settings.PasswordAuthentication = false;
23
+
settings.PermitRootLogin = "no";
24
+
};
25
+
26
# import profiling tools
27
programs.systemtap.enable = true;
28
29
virtualisation.docker.enable = true;
30
virtualisation.docker.storageDriver = "btrfs";
31
+
environment.systemPackages = with pkgs; [ docker-compose ];
32
33
# Speed up boot by removing dependency on network
34
systemd = {
35
+
targets.network-online.wantedBy =
36
+
pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
37
+
services.NetworkManager-wait-online.wantedBy =
38
+
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
39
};
40
41
+
42
43
fileSystems."/mnt/ftp" = {
44
device = "192.168.1.240:/home/ftp";
···
69
70
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
71
networking.firewall = {
72
+
allowedTCPPorts = [ 22 4173 ]; # allow ssh
73
+
allowedTCPPortRanges = [{
74
+
from = 1714;
75
+
to = 1764;
76
+
}];
77
+
allowedUDPPortRanges = [{
78
+
from = 1714;
79
+
to = 1764;
80
+
}];
81
};
82
83
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
···
93
mossnet.backup = {
94
enable = true;
95
name = "curve";
96
+
paths = [ "/home/anish/usr" "/home/anish/.ssh" "/home/anish/.password-store/" ];
97
};
98
99
# enable adb
···
102
#virtualisation.docker.enable = true;
103
boot.blacklistedKernelModules = [ "qcserial" ];
104
# Used for packer Capsul
105
+
users.users.anish.extraGroups =
106
+
[ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
107
virtualisation.libvirtd.enable = true;
108
hardware.keyboard.zsa.enable = true;
109
services.udev.extraRules = ''
-1
hosts/helix/configuration.nix
-1
hosts/helix/configuration.nix
+16
hosts/helix/default.nix
+16
hosts/helix/default.nix
···
30
privateKeyFile = "/run/agenix/helix-wg";
31
};
32
33
+
# Reverse proxy for immich
34
+
# services.nginx.virtualHosts."photos.sealight.xyz" = {
35
+
# enableACME = true;
36
+
# forceSSL = true;
37
+
38
+
# locations."/" = {
39
+
# extraConfig = ''
40
+
# proxy_pass http://10.0.69.4:8567;
41
+
# proxy_set_header Host $host;
42
+
# proxy_set_header X-Real-IP $remote_addr;
43
+
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44
+
# proxy_set_header X-Forwarded-Proto $scheme;
45
+
# '';
46
+
# };
47
+
# };
48
+
49
services.postgresql.package = pkgs.postgresql_15;
50
services.postgresqlBackup = {
51
# TODO needs working wireguard to box
-2
hosts/lituus/configuration.nix
-2
hosts/lituus/configuration.nix
···
19
# networking.proxy.default = "http://user:password@proxy:port/";
20
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
21
22
-
sound.enable = false;
23
-
24
# Define a user account. Don't forget to set a password with โpasswdโ.
25
# This value determines the NixOS release with which your system is to be
26
# compatible, in order to avoid breaking some software such as database
···
19
# networking.proxy.default = "http://user:password@proxy:port/";
20
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
21
22
# Define a user account. Don't forget to set a password with โpasswdโ.
23
# This value determines the NixOS release with which your system is to be
24
# compatible, in order to avoid breaking some software such as database
+2
hosts/profiles/core/default.nix
+2
hosts/profiles/core/default.nix
+18
-18
hosts/profiles/desktop/default.nix
+18
-18
hosts/profiles/desktop/default.nix
···
1
{ self, config, pkgs, lib, ... }:
2
let
3
tex = (pkgs.texlive.combine {
4
-
inherit (pkgs.texlive) scheme-basic
5
-
dvisvgm dvipng# for preview and export as html
6
wrapfig amsmath ulem hyperref capt-of;
7
#(setq org-latex-compiler "lualatex")
8
#(setq org-preview-latex-default-process 'dvisvgm)
···
13
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
14
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
15
};
16
-
in
17
-
{
18
# TODO modularize
19
-
imports = [
20
-
./battery-low-timer.nix
21
-
./cal-alarms.nix
22
-
];
23
24
# Secrets used by home-manager modules
25
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
···
29
age.secrets.mossnet.owner = "anish";
30
31
# Taskwarrior private key
32
-
age.secrets.taskwarrior-private.file = "${self}/secrets/taskwarrior-private.age";
33
age.secrets.taskwarrior-private.owner = "anish";
34
35
# We don't plug USBs into servers
···
41
42
dbus = {
43
enable = true;
44
-
packages = [ pkgs.dconf ];
45
};
46
};
47
programs.dconf.enable = true;
···
56
XDG_BIN_HOME = "\${HOME}/.local/bin";
57
XDG_DATA_HOME = "\${HOME}/.local/share";
58
59
-
PATH = [
60
-
"\${XDG_BIN_HOME}"
61
-
];
62
};
63
64
environment.systemPackages = with pkgs; [
65
#unstable.sublime-music
66
-
unstable.nheko
67
unstable.signal-desktop
68
unstable.tuba
69
unstable.newsflash
70
unstable.liferea
71
unstable.gh
72
unstable.flyctl
73
74
kooha
75
light
···
148
#define bwht #CBCCC6
149
#define bg blk
150
#define fg wht
151
-
152
*.foreground: fg
153
*.background: bg
154
*.cursorColor: mag
155
-
156
*.color0: blk
157
*.color8: bblk
158
*.color1: red
···
169
*.color14: bcyn
170
*.color7: wht
171
*.color15: bwht
172
-
173
! greys
174
*.color234: #1E2029
175
*.color235: #282a36
···
222
siji
223
font-awesome
224
proggyfonts
225
-
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; })
226
];
227
}
···
1
{ self, config, pkgs, lib, ... }:
2
let
3
tex = (pkgs.texlive.combine {
4
+
inherit (pkgs.texlive)
5
+
scheme-basic dvisvgm dvipng # for preview and export as html
6
wrapfig amsmath ulem hyperref capt-of;
7
#(setq org-latex-compiler "lualatex")
8
#(setq org-preview-latex-default-process 'dvisvgm)
···
13
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
14
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
15
};
16
+
in {
17
# TODO modularize
18
+
imports = [ ./battery-low-timer.nix ./cal-alarms.nix ];
19
20
# Secrets used by home-manager modules
21
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
···
25
age.secrets.mossnet.owner = "anish";
26
27
# Taskwarrior private key
28
+
age.secrets.taskwarrior-private.file =
29
+
"${self}/secrets/taskwarrior-private.age";
30
age.secrets.taskwarrior-private.owner = "anish";
31
32
# We don't plug USBs into servers
···
38
39
dbus = {
40
enable = true;
41
+
packages = [ pkgs.dconf pkgs.gcr ];
42
};
43
};
44
programs.dconf.enable = true;
···
53
XDG_BIN_HOME = "\${HOME}/.local/bin";
54
XDG_DATA_HOME = "\${HOME}/.local/share";
55
56
+
PATH = [ "\${XDG_BIN_HOME}" ];
57
};
58
59
environment.systemPackages = with pkgs; [
60
#unstable.sublime-music
61
+
# olm-3.2.16 is now insecure
62
+
# some reason I can't set insecure packages that will be respected
63
+
nheko
64
unstable.signal-desktop
65
unstable.tuba
66
unstable.newsflash
67
unstable.liferea
68
unstable.gh
69
unstable.flyctl
70
+
unstable.sublime-music
71
72
kooha
73
light
···
146
#define bwht #CBCCC6
147
#define bg blk
148
#define fg wht
149
+
150
*.foreground: fg
151
*.background: bg
152
*.cursorColor: mag
153
+
154
*.color0: blk
155
*.color8: bblk
156
*.color1: red
···
167
*.color14: bcyn
168
*.color7: wht
169
*.color15: bwht
170
+
171
! greys
172
*.color234: #1E2029
173
*.color235: #282a36
···
220
siji
221
font-awesome
222
proggyfonts
223
+
nerd-fonts.fira-code
224
+
nerd-fonts.droid-sans-mono
225
+
nerd-fonts.iosevka
226
];
227
}
+16
-13
hosts/profiles/dns/default.nix
+16
-13
hosts/profiles/dns/default.nix
···
3
adblockLocalZones = pkgs.stdenv.mkDerivation {
4
name = "unbound-zones-adblock";
5
6
-
src = (pkgs.fetchFromGitHub
7
-
{
8
-
owner = "StevenBlack";
9
-
repo = "hosts";
10
-
rev = "3.12.21";
11
-
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
12
-
} + "/hosts");
13
14
phases = [ "installPhase" ];
15
···
19
};
20
21
mossnet = "192.168.1.240"; # The local lan-ip for box
22
-
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
23
mossnet-hosts = [
24
"mossnet.lan"
25
"headphones.mossnet.lan"
···
40
"grasp.mossnet.lan"
41
"photos.mossnet.lan"
42
"pod.mossnet.lan"
43
];
44
45
-
in
46
-
{
47
services.unbound = {
48
enable = true;
49
settings = {
···
54
# private-address = "192.168.1.0/24";
55
cache-min-ttl = 0;
56
serve-expired = "yes";
57
-
interface = [ "0.0.0.0" ];
58
-
access-control = [ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" ];
59
access-control-view = "10.0.69.0/24 wireguard";
60
# so-reuseport = "yes";
61
tls-upstream = "yes";
···
65
};
66
forward-zone = [{
67
name = ".";
68
-
forward-addr = [ "45.90.28.0#6939b9.dns.nextdns.io" "1.1.1.1@853#cloudflare-dns.com" ];
69
# non-tls
70
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
71
}];
···
3
adblockLocalZones = pkgs.stdenv.mkDerivation {
4
name = "unbound-zones-adblock";
5
6
+
src = (pkgs.fetchFromGitHub {
7
+
owner = "StevenBlack";
8
+
repo = "hosts";
9
+
rev = "3.12.21";
10
+
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
11
+
} + "/hosts");
12
13
phases = [ "installPhase" ];
14
···
18
};
19
20
mossnet = "192.168.1.240"; # The local lan-ip for box
21
+
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
22
mossnet-hosts = [
23
"mossnet.lan"
24
"headphones.mossnet.lan"
···
39
"grasp.mossnet.lan"
40
"photos.mossnet.lan"
41
"pod.mossnet.lan"
42
+
"mast.mossnet.lan"
43
];
44
45
+
in {
46
services.unbound = {
47
enable = true;
48
settings = {
···
53
# private-address = "192.168.1.0/24";
54
cache-min-ttl = 0;
55
serve-expired = "yes";
56
+
interface = [ "0.0.0.0" "::" ];
57
+
access-control =
58
+
[ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" "::1 allow" "fd7d:587a:4300:1::/64 allow" ];
59
access-control-view = "10.0.69.0/24 wireguard";
60
# so-reuseport = "yes";
61
tls-upstream = "yes";
···
65
};
66
forward-zone = [{
67
name = ".";
68
+
forward-addr = [
69
+
"45.90.28.0#6939b9.dns.nextdns.io"
70
+
"1.1.1.1@853#cloudflare-dns.com"
71
+
];
72
# non-tls
73
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
74
}];
+3
hosts/profiles/gonic/default.nix
+3
hosts/profiles/gonic/default.nix
···
1
{ config, lib, pkgs, ... }:
2
{
3
+
environment.systemPackages = [ pkgs.ffmpeg ];
4
mossnet.gonic.enable = true;
5
mossnet.gonic.settings = ''
6
music-path /mnt/two/music/
7
podcast-path /data/podcasts
8
cache-path /data/cache
9
playlists-path /data/playlists
10
+
transcode-cache-size 1000
11
+
transcode-eject-interval 1440
12
'';
13
mossnet.gonic.user = "gonic";
14
mossnet.gonic.group = "audio";
-1
hosts/profiles/headphones/default.nix
-1
hosts/profiles/headphones/default.nix
+30
hosts/profiles/immich/default.nix
+30
hosts/profiles/immich/default.nix
···
···
1
+
{ pkgs, config, ... }:
2
+
{
3
+
services.immich = {
4
+
enable = true;
5
+
database = {
6
+
enable = true;
7
+
};
8
+
host = "0.0.0.0";
9
+
port = 8567;
10
+
mediaLocation = "/mnt/two/photos";
11
+
openFirewall = true;
12
+
settings.server.externalDomain = "https://photos.sealight.xyz";
13
+
};
14
+
services.nginx.virtualHosts."photos.mossnet.lan" = {
15
+
enableACME = false;
16
+
forceSSL = false;
17
+
18
+
locations."/" = {
19
+
proxyPass = "http://127.0.0.1:${toString config.services.immich.port}";
20
+
proxyWebsockets = true;
21
+
recommendedProxySettings = true;
22
+
extraConfig = ''
23
+
client_max_body_size 50000M;
24
+
proxy_read_timeout 600s;
25
+
proxy_send_timeout 600s;
26
+
send_timeout 600s;
27
+
'';
28
+
};
29
+
};
30
+
}
+35
hosts/profiles/jacket/default.nix
+35
hosts/profiles/jacket/default.nix
···
···
1
+
{ config, lib, pkgs, ... }:
2
+
{
3
+
services.jackett = {
4
+
enable = true;
5
+
port = 8011;
6
+
user = "jackett";
7
+
group = "transmission";
8
+
package = pkgs.unstable.jackett;
9
+
};
10
+
services.nginx.virtualHosts."jackett.mossnet.lan" = {
11
+
enableACME = false;
12
+
forceSSL = false;
13
+
14
+
locations."/" = {
15
+
extraConfig = ''
16
+
proxy_pass http://127.0.0.1:8011/;
17
+
'';
18
+
};
19
+
};
20
+
services.lidarr = {
21
+
enable = true;
22
+
user = "headphones";
23
+
group = "audio";
24
+
};
25
+
services.nginx.virtualHosts."lidarr.mossnet.lan" = {
26
+
enableACME = false;
27
+
forceSSL = false;
28
+
29
+
locations."/" = {
30
+
extraConfig = ''
31
+
proxy_pass http://127.0.0.1:8686/;
32
+
'';
33
+
};
34
+
};
35
+
}
+2
-2
hosts/profiles/matrix/default.nix
+2
-2
hosts/profiles/matrix/default.nix
···
47
# The registration file is automatically generated after starting the appservice for the first time.
48
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
49
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
50
-
"/var/lib/matrix-synapse/telegram-registration.yaml"
51
"/var/lib/matrix-synapse/signal-registration.yaml"
52
-
"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
53
"/var/lib/matrix-as-discord/discord-registration.yaml"
54
# "/var/lib/matrix-synapse/slack-registration.yaml"
55
# "/var/lib/matrix-synapse/discord-registration.yaml"
···
47
# The registration file is automatically generated after starting the appservice for the first time.
48
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
49
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
50
+
# "/var/lib/matrix-synapse/telegram-registration.yaml"
51
"/var/lib/matrix-synapse/signal-registration.yaml"
52
+
#"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
53
"/var/lib/matrix-as-discord/discord-registration.yaml"
54
# "/var/lib/matrix-synapse/slack-registration.yaml"
55
# "/var/lib/matrix-synapse/discord-registration.yaml"
+33
-33
hosts/profiles/matrix/mautrix-services.nix
+33
-33
hosts/profiles/matrix/mautrix-services.nix
···
2
3
{
4
# Mautrix-signal settings
5
-
services.signald.enable = true;
6
-
systemd.services.matrix-as-signal = {
7
-
requires = [ "signald.service" ];
8
-
after = [ "signald.service" ];
9
-
unitConfig = {
10
-
JoinsNamespaceOf = "signald.service";
11
-
};
12
-
path = [
13
-
pkgs.ffmpeg # voice messages need `ffmpeg`
14
-
];
15
-
};
16
17
services.matrix-appservices = {
18
addRegistrationFiles = false;
19
homeserverURL = "https://sealight.xyz/";
20
homeserverDomain = "sealight.xyz";
21
services = {
22
-
whatsapp = {
23
-
port = 29183;
24
-
format = "mautrix-go";
25
-
package = pkgs.mautrix-whatsapp;
26
-
};
27
28
discord = {
29
port = 29188;
30
format = "mautrix-go";
31
-
package = pkgs.my-mautrix-discord;
32
};
33
34
-
signal = {
35
-
port = 29184;
36
-
format = "mautrix-python";
37
-
package = pkgs.unstable.mautrix-signal;
38
-
serviceConfig = {
39
-
StateDirectory = [ "matrix-as-signal" "signald" ];
40
-
SupplementaryGroups = [ "signald" ];
41
-
TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
42
-
User = lib.mkForce config.services.signald.user;
43
-
Group = lib.mkForce config.services.signald.group;
44
-
};
45
-
settings.signal = {
46
-
socket_path = config.services.signald.socketPath;
47
-
outgoing_attachment_dir = "/var/lib/signald/tmp";
48
-
};
49
-
};
50
};
51
};
52
}
···
2
3
{
4
# Mautrix-signal settings
5
+
# services.signald.enable = true;
6
+
# systemd.services.matrix-as-signal = {
7
+
# requires = [ "signald.service" ];
8
+
# after = [ "signald.service" ];
9
+
# unitConfig = {
10
+
# JoinsNamespaceOf = "signald.service";
11
+
# };
12
+
# path = [
13
+
# pkgs.ffmpeg # voice messages need `ffmpeg`
14
+
# ];
15
+
# };
16
17
services.matrix-appservices = {
18
addRegistrationFiles = false;
19
homeserverURL = "https://sealight.xyz/";
20
homeserverDomain = "sealight.xyz";
21
services = {
22
+
# whatsapp = {
23
+
# port = 29183;
24
+
# format = "mautrix-go";
25
+
# package = pkgs.mautrix-whatsapp;
26
+
# };
27
28
discord = {
29
port = 29188;
30
format = "mautrix-go";
31
+
package = pkgs.mautrix-discord;
32
};
33
34
+
# signal = {
35
+
# port = 29184;
36
+
# format = "mautrix-python";
37
+
# package = pkgs.mautrix-signal;
38
+
# serviceConfig = {
39
+
# # StateDirectory = [ "matrix-as-signal" "signald" ];
40
+
# # SupplementaryGroups = [ "signald" ];
41
+
# TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
42
+
# # User = lib.mkForce config.services.signald.user;
43
+
# # Group = lib.mkForce config.services.signald.group;
44
+
# };
45
+
# # settings.signal = {
46
+
# # socket_path = config.services.signald.socketPath;
47
+
# # outgoing_attachment_dir = "/var/lib/signald/tmp";
48
+
# # };
49
+
# };
50
};
51
};
52
}
+4
-3
hosts/profiles/music/default.nix
+4
-3
hosts/profiles/music/default.nix
···
12
# Plugins
13
helm
14
# surge
15
-
distrho
16
orca-c
17
supercollider
18
dirt
···
22
bespokesynth
23
lsp-plugins
24
helio-workstation
25
-
projectm # milkdrop visualizer
26
27
# DAWs
28
# ardour
···
30
# renoise
31
];
32
33
-
hardware.pulseaudio.enable = lib.mkForce false;
34
security.rtkit.enable = false;
35
36
services.pipewire = {
···
12
# Plugins
13
helm
14
# surge
15
+
# distrho
16
orca-c
17
supercollider
18
dirt
···
22
bespokesynth
23
lsp-plugins
24
helio-workstation
25
+
# projectm # milkdrop visualizer
26
+
# i think it's projectm-sdl-cpp now
27
28
# DAWs
29
# ardour
···
31
# renoise
32
];
33
34
+
services.pulseaudio.enable = false;
35
security.rtkit.enable = false;
36
37
services.pipewire = {
+1
hosts/profiles/radicale/default.nix
+1
hosts/profiles/radicale/default.nix
+5
-2
hosts/profiles/sync/music/default.nix
+5
-2
hosts/profiles/sync/music/default.nix
···
5
serviceConfig.Type = "oneshot";
6
path = [
7
pkgs.coreutils
8
pkgs.rsync
9
];
10
script = builtins.readFile ./get-music.sh;
11
serviceConfig = {
12
User = "anish";
13
};
14
};
15
-
systemd.timers.get-music-timer = {
16
wantedBy = [ "timers.target" ];
17
partOf = [ "get-music-sync.service" ];
18
-
timerConfig.OnCalendar = [ "daily" ];
19
};
20
}
···
5
serviceConfig.Type = "oneshot";
6
path = [
7
pkgs.coreutils
8
+
pkgs.openssh
9
+
pkgs.gawk
10
pkgs.rsync
11
+
pkgs.beets
12
];
13
script = builtins.readFile ./get-music.sh;
14
serviceConfig = {
15
User = "anish";
16
};
17
};
18
+
systemd.timers.get-music-sync = {
19
wantedBy = [ "timers.target" ];
20
partOf = [ "get-music-sync.service" ];
21
+
timerConfig.OnCalendar = [ "hourly" ];
22
};
23
}
+58
-6
hosts/profiles/sync/music/get-music.sh
+58
-6
hosts/profiles/sync/music/get-music.sh
···
1
#!/usr/bin/env bash
2
-
rsync -r --ignore-existing --log-file=/data/incoming/download-log hypercube@talos.feralhosting.com:private/transmission/data/* /data/incoming
3
4
-
# you need to set defaults for beets
5
-
# if already imported -> Skip
6
-
# Auto accept changes
7
-
# also install it lmao
8
-
#beet import /data/incoming
9
···
1
#!/usr/bin/env bash
2
3
+
set -euo pipefail
4
+
5
+
REMOTE_HOST="aynish@talos.feralhosting.com"
6
+
REMOTE_PATH="private/transmission/data/"
7
+
LOCAL_PATH="/mnt/two/incoming"
8
+
TRACKING_FILE="/mnt/two/incoming/.downloaded_albums"
9
+
LOG_FILE="/mnt/two/incoming/download-log"
10
+
11
+
# Create tracking file if it doesn't exist
12
+
touch "$TRACKING_FILE"
13
14
+
# Get list of albums on remote server
15
+
echo "$(date): Checking for new albums on seedbox..." >>"$LOG_FILE"
16
+
REMOTE_ALBUMS=$(rsync --dry-run --list-only "$REMOTE_HOST:$REMOTE_PATH" | grep '^d' | awk '{$1=$2=$3=$4=""; sub(/^ +/, ""); print}' | grep -v '^\.') || true
17
+
18
+
if [ -z "$REMOTE_ALBUMS" ]; then
19
+
echo "$(date): No albums found on remote server" >>"$LOG_FILE"
20
+
exit 0
21
+
fi
22
+
23
+
# Check each album against tracking file
24
+
NEW_ALBUMS=""
25
+
while IFS= read -r album; do
26
+
if [ -n "$album" ] && ! grep -qF "$album" "$TRACKING_FILE"; then
27
+
NEW_ALBUMS="$NEW_ALBUMS$album\n"
28
+
echo "$(date): Found new album: $album" >>"$LOG_FILE"
29
+
fi
30
+
done <<<"$REMOTE_ALBUMS"
31
+
32
+
if [ -z "$NEW_ALBUMS" ]; then
33
+
echo "$(date): No new albums to download" >>"$LOG_FILE"
34
+
exit 0
35
+
fi
36
+
37
+
# Download new albums only
38
+
echo "$(date): Starting download of new albums..." >>"$LOG_FILE"
39
+
while IFS= read -r album; do
40
+
if [ -n "$album" ]; then
41
+
echo "$(date): Downloading $album" >>"$LOG_FILE"
42
+
if rsync -r --log-file="$LOG_FILE" "$REMOTE_HOST:$REMOTE_PATH$album/" "$LOCAL_PATH/$album/"; then
43
+
echo "$album" >>"$TRACKING_FILE"
44
+
echo "$(date): Successfully downloaded $album" >>"$LOG_FILE"
45
+
46
+
# Import to beets
47
+
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
48
+
# Set umask to allow group read/write access
49
+
umask 002
50
+
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
51
+
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
52
+
else
53
+
echo "$(date): Failed to import $album to beets" >>"$LOG_FILE"
54
+
fi
55
+
else
56
+
echo "$(date): Failed to download $album" >>"$LOG_FILE"
57
+
fi
58
+
fi
59
+
done <<<"$(echo -e "$NEW_ALBUMS")"
60
+
61
+
echo "$(date): Music sync completed" >>"$LOG_FILE"
+3
hosts/profiles/transmission/beet-import.sh
+3
hosts/profiles/transmission/beet-import.sh
+33
hosts/profiles/transmission/default.nix
+33
hosts/profiles/transmission/default.nix
···
···
1
+
{ pkgs, ... }:
2
+
{
3
+
environment.systemPackages = [ pkgs.beets ];
4
+
services.transmission = {
5
+
enable = true;
6
+
settings = {
7
+
rpc-enabled = true;
8
+
rpc-bind-address = "0.0.0.0";
9
+
rpc-whitelist-enabled = false;
10
+
script-torrent-done-enabled = true;
11
+
# Normally, I would write this into the homedir with home-manager
12
+
# And explictly set the dir to be the output of the home-manager location
13
+
script-torrent-done-filename = pkgs.writeShellScript "beet-import.sh" ''
14
+
#!/usr/bin/env bash
15
+
16
+
beet -p fetchart import -l /home/anish/music.log -q -g "$TR_TORRENT_DIR"
17
+
'';
18
+
rpc-url = "/transmission/rpc/";
19
+
download-dir = "/mnt/two/new-music";
20
+
};
21
+
};
22
+
services.nginx.virtualHosts."transmission.mossnet.lan" = {
23
+
enableACME = false;
24
+
forceSSL = false;
25
+
26
+
locations."/" = {
27
+
extraConfig = ''
28
+
proxy_pass http://localhost:9091/;
29
+
proxy_set_header X-Forwarded-Host $host;
30
+
'';
31
+
};
32
+
};
33
+
}
+2
-2
hosts/users/anish/default.nix
+2
-2
hosts/users/anish/default.nix
···
12
openssh.authorizedKeys.keys = [
13
# Curve
14
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
15
-
# Line
16
-
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtU2GMYjXj6RGO1+mwM4TDGOo0qrKLTL4Di8+QgDX0p5vUEsnE1PS9wnuqCmSu75U8g0XIAMtvtdYyGk1N+Bx01erAZpT8DLYtIXFCyaiN28PVu5T1D0T+TQ7xgIH1qenXZR2DOQdf6kpvKEfm7+7bWhCo0N/KFMpmReubyzHDQcq/1qQasxTL+YALQFOjwKqsOTBXbHwZ103AEAcQX4ftBFEOfVli4/1aKIK4dNSZYB7J9Htq707YnsEqo9RLAMh0aOTTYgTx9AoSUDeqGuh/AGkcB7NcS7EEtI6d5YUGylwZh/gF6hqE0jl8kn2m5jMKXL3CRohZvjifue8x/GIjpu5WRabUuhBEbrfTQQaC7taHnt5rvYCGzKZx09TexUzhuz2CL480DRoxSG+P+lCNm1dIg/EZrnGEzXCSr36PlOqS5t5gm8tPkzCmZf2wU15A3ZIYUPmnYLqsn4WmIV7rKmdqt2ctWELUXow3PPiZXBucP9P3xpsYEfF1SB2SGNc= u0_a139@localhost"
17
# Box
18
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKN8/SH55DBiwVoSnTU8k2Pen+wmovL9QaMyehxGEsJJv/8fzwsswGalD4C/4O51LOvdu4UKkZW5hG02uVSK+58p3UV3pOPyoqsu/aDeIsWsqmTeTzUrBIWOlNzcDKnohLz2oGC5YO+wyTJ9Iteq6aGJDjErsW7sG3h5lXCs551EmJNNGhtBQaaoytMNnWqSdlVjDNCijurH7WUpp40U/RjEp532l4rX6eIIj3jBKEFbhZkFSSjqbj4xM4SyFt+Jmigb1RMjsQjmpfY1vDtM84RcYfpTUte/T5w2dkD5H6kccmWnwKSJpm9wXfx4E7lR9APdUGnau2U1+XxiD3ytGl anish@box"
19
# Work
20
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/vvh0i6+uAN0GWlK6ZfyTlc/AW54xe2CroUDsDSoGnFKeIUiSsWexobODlVakNhqwCKfsvUh6g+RdA8ZVcamATcYqxysP4X5fRksmAzRm5281O7ZBDHMB2BdcfHSTgiz7JvMRIQYWDlU8Ck6IL4wlN0b2GMUj9t/GeG37us8280rxpRNoIY7M27AJEZ7XNQhctBIVujxctVBgIMYmZiTwziU7ywJv4rNT5OAWvjRXSo1rkxdvx3VESv4y/mp8m7dEupZpIjIFsLs52+UG5LtadulUqtTWg05sCw8LEcmRhflgZSAvjw60RrKFCuWxc8+/Pmaw+zExeBMenqi0NzuTc3S3k2wCKVIZDh/0tlXzIwZ6WRqxDevUtEKfvbEFMXd8akhTfYs0dyszcFRevBxOBPbcKku+FK/HkdPLmEANvxYty3cv+Eipkz3c8JPJPvXNTXrjepXMm0LUKodO3c15hGogCOxUO38kykkyYnn+MxxHparoMfEr2+oHNpQoS5wA1G43ppqjVoRDgnhleu6ixwRkLZzphY3cnOd5jL9Ie5xIGbFWH1qSlQRdHBkHjuf85z7+QK8nFYAhmG1K3Vt3GNtF8LN1tYQkfwBJ/vsroMNzGPoq4PjVbqb80Eq+96cP89XKfU2/xw1g+p2lJDm/zC1WCjXVzf8NRwC7gqPavQ== anishlakhwara@anishs-mbp.lan"
21
];
···
12
openssh.authorizedKeys.keys = [
13
# Curve
14
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
15
# Box
16
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKN8/SH55DBiwVoSnTU8k2Pen+wmovL9QaMyehxGEsJJv/8fzwsswGalD4C/4O51LOvdu4UKkZW5hG02uVSK+58p3UV3pOPyoqsu/aDeIsWsqmTeTzUrBIWOlNzcDKnohLz2oGC5YO+wyTJ9Iteq6aGJDjErsW7sG3h5lXCs551EmJNNGhtBQaaoytMNnWqSdlVjDNCijurH7WUpp40U/RjEp532l4rX6eIIj3jBKEFbhZkFSSjqbj4xM4SyFt+Jmigb1RMjsQjmpfY1vDtM84RcYfpTUte/T5w2dkD5H6kccmWnwKSJpm9wXfx4E7lR9APdUGnau2U1+XxiD3ytGl anish@box"
17
+
# Nix-on-droid line
18
+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJOiXBPVvZAp1fY0a0Tupxj0Ml6MoA51lvqt/jAQq249 nix-on-droid@localhost"
19
# Work
20
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/vvh0i6+uAN0GWlK6ZfyTlc/AW54xe2CroUDsDSoGnFKeIUiSsWexobODlVakNhqwCKfsvUh6g+RdA8ZVcamATcYqxysP4X5fRksmAzRm5281O7ZBDHMB2BdcfHSTgiz7JvMRIQYWDlU8Ck6IL4wlN0b2GMUj9t/GeG37us8280rxpRNoIY7M27AJEZ7XNQhctBIVujxctVBgIMYmZiTwziU7ywJv4rNT5OAWvjRXSo1rkxdvx3VESv4y/mp8m7dEupZpIjIFsLs52+UG5LtadulUqtTWg05sCw8LEcmRhflgZSAvjw60RrKFCuWxc8+/Pmaw+zExeBMenqi0NzuTc3S3k2wCKVIZDh/0tlXzIwZ6WRqxDevUtEKfvbEFMXd8akhTfYs0dyszcFRevBxOBPbcKku+FK/HkdPLmEANvxYty3cv+Eipkz3c8JPJPvXNTXrjepXMm0LUKodO3c15hGogCOxUO38kykkyYnn+MxxHparoMfEr2+oHNpQoS5wA1G43ppqjVoRDgnhleu6ixwRkLZzphY3cnOd5jL9Ie5xIGbFWH1qSlQRdHBkHjuf85z7+QK8nFYAhmG1K3Vt3GNtF8LN1tYQkfwBJ/vsroMNzGPoq4PjVbqb80Eq+96cP89XKfU2/xw1g+p2lJDm/zC1WCjXVzf8NRwC7gqPavQ== anishlakhwara@anishs-mbp.lan"
21
];
+1
-1
modules/nixos/gonic.nix
+1
-1
modules/nixos/gonic.nix
+18
-1
overlays/default.nix
+18
-1
overlays/default.nix
···
11
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.jsonschema ]; # allow kobo sync stuff
12
});
13
mautrix-signal = prev.mautrix-signal.overrideAttrs (prevAttrs: rec {
14
-
buildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.aiosqlite ]; # We're using sqlite and upstream doesn't package this dependency
15
});
16
17
wallabag = prev.wallabag.overrideAttrs (attrs: {
···
21
# so that the project source can remain immutable.
22
../pkgs/wallabag-data.patch
23
];
24
});
25
26
# Need to do server and agent too, maybe
···
11
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.jsonschema ]; # allow kobo sync stuff
12
});
13
mautrix-signal = prev.mautrix-signal.overrideAttrs (prevAttrs: rec {
14
+
buildInputs = prevAttrs.buildInputs ++ [ final.python3.pkgs.aiosqlite ]; # We're using sqlite and upstream doesn't package this dependency
15
+
withGoolm = true;
16
+
});
17
+
# headphones is not very stable...
18
+
# this is fixed in newer commits, but no release has gone out
19
+
# patching whitespace with sed is insane
20
+
headphones = prev.headphones.overrideAttrs (prevAttrs: rec {
21
+
patchPhase = ''
22
+
sed -i '1395s/^\([[:space:]]*\).*/\1"cat": "3000",/' headphones/searcher.py
23
+
'';
24
});
25
26
wallabag = prev.wallabag.overrideAttrs (attrs: {
···
30
# so that the project source can remain immutable.
31
../pkgs/wallabag-data.patch
32
];
33
+
});
34
+
35
+
olm = prev.olm.overrideAttrs (attrs: {
36
+
knownVulnerabilities = [];
37
+
});
38
+
39
+
mautrix-discord = prev.mautrix-discord.overrideAttrs (attrs: rec {
40
+
license = "";
41
});
42
43
# Need to do server and agent too, maybe
+2
-2
pkgs/default.nix
+2
-2
pkgs/default.nix
···
6
tic-80 = pkgs.callPackage ./tic-80.nix { };
7
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
8
# kobopatch = pkgs.callPackage ./kobopatch.nix { };
9
-
my-mautrix-discord = pkgs.callPackage ./mautrix-discord.nix { }; # Handled by matrix-appservices input
10
ulogger-server = pkgs.callPackage ./ulogger.nix { };
11
# Wallabag is now an overlay
12
# TODO: we still use the patch from this folder though
13
my-wallabag = pkgs.callPackage ./wallabag.nix { };
14
-
mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { };
15
gpodder2go = pkgs.callPackage ./gpodder2go.nix { };
16
}
···
6
tic-80 = pkgs.callPackage ./tic-80.nix { };
7
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
8
# kobopatch = pkgs.callPackage ./kobopatch.nix { };
9
+
# my-mautrix-discord = pkgs.callPackage ./mautrix-discord.nix { }; # Handled by matrix-appservices input
10
ulogger-server = pkgs.callPackage ./ulogger.nix { };
11
# Wallabag is now an overlay
12
# TODO: we still use the patch from this folder though
13
my-wallabag = pkgs.callPackage ./wallabag.nix { };
14
+
# mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { };
15
gpodder2go = pkgs.callPackage ./gpodder2go.nix { };
16
}
-29
pkgs/mautrix-discord.nix
-29
pkgs/mautrix-discord.nix
···
1
-
{ lib, buildGoModule, fetchFromGitHub, olm }:
2
-
3
-
buildGoModule rec {
4
-
pname = "mautrix-discord";
5
-
version = "unstable-2022-11-04";
6
-
7
-
src = fetchFromGitHub {
8
-
owner = "mautrix";
9
-
repo = "discord";
10
-
rev = "f53975cc91e3c643a722adf0d3e0dfb98d0127a2";
11
-
hash = "sha256-xUALcN5oQfwC6gmOeygCkOAXJrJzNitBxHRFAKKgFvE=";
12
-
};
13
-
14
-
buildInputs = [ olm ];
15
-
16
-
vendorHash = "sha256-yday2mSnPwuhXWkCG4XY7qoBl3DXHcSvzBoZbjgYz/c=";
17
-
18
-
ldflags = [ "-s" "-w" ]; # https://github.com/NixOS/nixpkgs/issues/177698
19
-
20
-
doCheck = false; # No tests available
21
-
22
-
meta = with lib; {
23
-
homepage = "https://go.mau.fi/mautrix-discord";
24
-
description = "Matrix to Discord hybrid puppeting/relaybot bridge";
25
-
license = licenses.agpl3Plus;
26
-
maintainers = with maintainers; [ robin ];
27
-
};
28
-
}
29
-
···
+1
-1
pkgs/tic-80.nix
+1
-1
pkgs/tic-80.nix