summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-06-16 21:17:26 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-06-16 21:17:26 -0400
commitda81f70d18bd92e600e87fd5c39b1fd849021cc3 (patch)
tree0b57659ea6295678e36a3efa776c6686f27d31f5 /users
parentc6a08aa02b6701d6ad80eddc7c29c9720f04dd5b (diff)
declare screen settings and initial nvim setup
Diffstat (limited to 'users')
-rw-r--r--users/ryan/home.nix5
-rw-r--r--users/ryan/modules/default.nix15
-rw-r--r--users/ryan/modules/nvim/default.nix53
-rw-r--r--users/ryan/modules/nvim/extraConfigs/after/ftplugin/mail/custom.vim2
-rw-r--r--users/ryan/modules/nvim/extraConfigs/after/ftplugin/markdown/custom.vim2
-rw-r--r--users/ryan/modules/nvim/init.lua26
-rw-r--r--users/ryan/modules/nvim/init.vim27
-rw-r--r--users/ryan/zen/zenPolicies.nix1
8 files changed, 130 insertions, 1 deletions
diff --git a/users/ryan/home.nix b/users/ryan/home.nix
index de776c4..2c099ba 100644
--- a/users/ryan/home.nix
+++ b/users/ryan/home.nix
@@ -8,10 +8,14 @@
8 # You should not change this value, even if you update Home Manager. If you do 8 # You should not change this value, even if you update Home Manager. If you do
9 # want to update the value, then make sure to first check the Home Manager 9 # want to update the value, then make sure to first check the Home Manager
10 # release notes. 10 # release notes.
11 imports = [ ./modules ];
11 home.stateVersion = "26.05"; # Please read the comment before changing. 12 home.stateVersion = "26.05"; # Please read the comment before changing.
12 13
13 news.display = "silent"; 14 news.display = "silent";
14 15
16 # My own modules
17 ryan.neovim.enable = true;
18
15 programs.starship = { 19 programs.starship = {
16 enable = true; 20 enable = true;
17 settings = { 21 settings = {
@@ -84,7 +88,6 @@
84 # The home.packages option allows you to install Nix packages into your 88 # The home.packages option allows you to install Nix packages into your
85 # environment. 89 # environment.
86 home.packages = with pkgs; [ 90 home.packages = with pkgs; [
87 neovim
88 git 91 git
89 yt-dlp 92 yt-dlp
90 aerc 93 aerc
diff --git a/users/ryan/modules/default.nix b/users/ryan/modules/default.nix
new file mode 100644
index 0000000..55af9ec
--- /dev/null
+++ b/users/ryan/modules/default.nix
@@ -0,0 +1,15 @@
1{ lib, ... }:
2let
3 entries = builtins.readDir ./.;
4
5 modulesDirs = lib.filterAttrs
6 (name: type:
7 type == "directory" &&
8 builtins.pathExists (./. + "/${name}/default.nix"))
9 entries;
10in
11{
12 imports = map
13 (name: ./${name})
14 (builtins.attrNames modulesDirs);
15}
diff --git a/users/ryan/modules/nvim/default.nix b/users/ryan/modules/nvim/default.nix
new file mode 100644
index 0000000..83c9e1f
--- /dev/null
+++ b/users/ryan/modules/nvim/default.nix
@@ -0,0 +1,53 @@
1{config, lib, pkgs, ...}:
2
3with lib;
4
5let
6 cfg = config.ryan.neovim;
7in
8{
9 options.ryan.neovim.enable = mkEnableOption "Neovim";
10
11 config = mkIf cfg.enable {
12 programs.neovim = {
13 enable = true;
14
15 extraConfig = builtins.readFile ./init.vim;
16
17 initLua = builtins.readFile ./init.lua;
18
19 plugins = with pkgs.vimPlugins; [
20 vim-pandoc
21 vim-pandoc-syntax
22 vim-table-mode
23
24 tokyonight-nvim
25 lualine-nvim
26 nvim-web-devicons
27
28 coq_nvim
29 #coq-artifacts
30
31 (nvim-treesitter.withPlugins (p: [
32 p.zig
33 p.go
34 p.python
35 p.vim
36 ]))
37
38 #transparent-nvim
39 marks-nvim
40 leap-nvim
41 ];
42
43 extraPackages = with pkgs; [
44 pyright
45 gopls
46 zls
47 ];
48
49 };
50
51 xdg.configFile."nvim/after".source = ./extraConfigs/after;
52 };
53}
diff --git a/users/ryan/modules/nvim/extraConfigs/after/ftplugin/mail/custom.vim b/users/ryan/modules/nvim/extraConfigs/after/ftplugin/mail/custom.vim
new file mode 100644
index 0000000..75078e5
--- /dev/null
+++ b/users/ryan/modules/nvim/extraConfigs/after/ftplugin/mail/custom.vim
@@ -0,0 +1,2 @@
1setlocal tw=0 wm=0
2setlocal wrap linebreak
diff --git a/users/ryan/modules/nvim/extraConfigs/after/ftplugin/markdown/custom.vim b/users/ryan/modules/nvim/extraConfigs/after/ftplugin/markdown/custom.vim
new file mode 100644
index 0000000..96aac6e
--- /dev/null
+++ b/users/ryan/modules/nvim/extraConfigs/after/ftplugin/markdown/custom.vim
@@ -0,0 +1,2 @@
1"Used to overwrite table behavior in markdown files
2let b:table_mode_corner='+'
diff --git a/users/ryan/modules/nvim/init.lua b/users/ryan/modules/nvim/init.lua
new file mode 100644
index 0000000..2686f15
--- /dev/null
+++ b/users/ryan/modules/nvim/init.lua
@@ -0,0 +1,26 @@
1require('lualine').setup()
2local coq = require 'coq'
3--require("transparent")
4--require("mason").setup()
5--require("mason-lspconfig").setup {
6-- ensure_installed = { "pyright" },
7-- }
8
9-- nvim marks
10require'marks'.setup {
11 default_mappings = true
12}
13
14-- Leap keybinds
15config = function(_, opts)
16 vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap-forward)')
17 vim.keymap.set({'n', 'x', 'o'}, 'S', '<Plug>(leap-backward)')
18 vim.keymap.set({'n', 'x', 'o'}, 'gs', '<Plug>(leap-from-window)')
19end
20
21--require'nvim-treesitter'.install { 'zig','go','python','vim' }
22
23vim.opt.conceallevel = 2
24vim.opt.concealcursor = nc
25
26--local lspconfig = require('lspconfig')
diff --git a/users/ryan/modules/nvim/init.vim b/users/ryan/modules/nvim/init.vim
new file mode 100644
index 0000000..8a4d54e
--- /dev/null
+++ b/users/ryan/modules/nvim/init.vim
@@ -0,0 +1,27 @@
1set nu rnu
2imap kj <Esc>
3set ts=4
4set sw=4
5set sts=4
6set et
7set mouse=
8set cursorline
9set cc=79
10
11"Load Theme
12colorscheme tokyonight-night
13
14"vim-pandoc config
15let g:pandoc#modules#disabled = ['spell', 'folding']
16
17"vim-table-mode config
18let g:table_mode_corner_corner='+'
19let g:table_mode_header_fillchar='='
20
21"pandoc render and open preview
22command Pv AsyncRun zathura '%:r.pdf'
23command Rd silent exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
24command Rr exec "!pandoc -t pdf -o %:r.pdf --from=markdown+escaped_line_breaks -V geometry:margin=1in %"
25
26"Auto-rerender markdown files to pdf
27autocmd BufWritePost *.mkd :Rd
diff --git a/users/ryan/zen/zenPolicies.nix b/users/ryan/zen/zenPolicies.nix
index edde27d..ad0627a 100644
--- a/users/ryan/zen/zenPolicies.nix
+++ b/users/ryan/zen/zenPolicies.nix
@@ -69,6 +69,7 @@ in
69 "uBlock0@raymondhill.net" = { 69 "uBlock0@raymondhill.net" = {
70 install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; 70 install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
71 installation_mode = "force_installed"; 71 installation_mode = "force_installed";
72 private_browsing = true;
72 }; 73 };
73 # Bitwarden 74 # Bitwarden
74 "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { 75 "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {