This commit is contained in:
Ray Andrew 2024-11-20 00:36:49 -06:00
parent 106459cd00
commit c60f15823b
10 changed files with 123 additions and 57 deletions

View file

@ -24,12 +24,14 @@ in
# This second one is chosen by auto_view due to the copiousoutput tag # This second one is chosen by auto_view due to the copiousoutput tag
text/html; ${w3m} -I %{charset} -T text/html -cols 140 -o tmp_dir=~/.cache/w3m -o display_link_number=1 -dump; copiousoutput text/html; ${w3m} -I %{charset} -T text/html -cols 140 -o tmp_dir=~/.cache/w3m -o display_link_number=1 -dump; copiousoutput
text/plain; vim %s text/plain; nvim %s
#PDFs #PDFs
application/x-pdf; ${zathura} '%s'; test=test -n "$DISPLAY" application/x-pdf; ${zathura} '%s'; test=test -n "$DISPLAY"
application/pdf; ${zathura} '%s'; test=test -n "$DISPLAY" application/pdf; ${zathura} '%s'; test=test -n "$DISPLAY"
message/rfc822; nvim %s
#Images #Images
# image/png; /usr/bin/feh %s # image/png; /usr/bin/feh %s
# image/jpeg; /usr/bin/feh %s # image/jpeg; /usr/bin/feh %s

View file

@ -31,6 +31,7 @@
jq jq
sd sd
ugrep ugrep
unzip
] ]
++ (lib.attrValues config.custom.shell.packages); ++ (lib.attrValues config.custom.shell.packages);

View file

@ -4,11 +4,33 @@
config, config,
... ...
}: }:
let
home = config.home.homeDirectory;
in
{ {
home.packages = with pkgs; [ programs.git = {
git enable = true;
]; lfs = {
# programs.git = { enable = true;
# enable = true; };
# }; userEmail = "rs@rs.ht";
userName = "Ray Andrew";
signing.key = "${home}/.ssh/id_ed25519.pub";
};
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
extensions = with pkgs; [
gh-copilot
];
};
custom.persist = {
home.files = [
".config/gh/hosts.yml"
];
};
} }

View file

@ -322,7 +322,7 @@ require("lazy").setup({
-- Fuzzy find all the symbols in your current workspace. -- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project. -- Similar to document symbols, except searches over your entire project.
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols") map("<leader>ps", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[P]roject [S]ymbols")
-- Rename the variable under your cursor. -- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc. -- Most Language Servers support renaming across files, etc.
@ -388,6 +388,7 @@ require("lazy").setup({
-- gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
taplo = {},
lua_ls = { lua_ls = {
settings = { settings = {
Lua = { Lua = {
@ -400,6 +401,13 @@ require("lazy").setup({
}, },
} }
if vim.fn.executable('pip') == 1 then
vim.list_extend(servers, {
pylsp = {},
})
end
require("mason").setup() require("mason").setup()
local ensure_installed = vim.tbl_keys(servers or {}) local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
@ -415,6 +423,7 @@ require("lazy").setup({
require("lspconfig")[server_name].setup(server) require("lspconfig")[server_name].setup(server)
end, end,
}, },
-- ensure_installed = ensure_installed,
}) })
end, end,
}, },
@ -425,29 +434,30 @@ require("lazy").setup({
cmd = { "ConformInfo" }, cmd = { "ConformInfo" },
keys = { keys = {
{ {
"<leader>f", "<leader>ff",
function() function()
require("conform").format({ async = true, lsp_format = "fallback" }) require("conform").format({ async = true, lsp_format = "fallback" })
end, end,
mode = "", mode = "",
desc = "[F]ormat buffer", desc = "[F]ile [F]ormat",
}, },
}, },
opts = { opts = {
notify_on_error = false, notify_on_error = false,
format_on_save = function(bufnr) format_on_save = nil,
local disable_filetypes = { c = true, cpp = true, python = true } -- format_on_save = function(bufnr)
local lsp_format_opt -- local disable_filetypes = { c = true, cpp = true, python = true }
if disable_filetypes[vim.bo[bufnr].filetype] then -- local lsp_format_opt
lsp_format_opt = "never" -- if disable_filetypes[vim.bo[bufnr].filetype] then
else -- lsp_format_opt = "never"
lsp_format_opt = "fallback" -- else
end -- lsp_format_opt = "fallback"
return { -- end
timeout_ms = 500, -- return {
lsp_format = lsp_format_opt, -- timeout_ms = 500,
} -- lsp_format = lsp_format_opt,
end, -- }
-- end,
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
python = { "isort", "black" }, python = { "isort", "black" },
@ -568,29 +578,28 @@ require("lazy").setup({
-- end, -- end,
-- }, -- },
-- {
-- "ellisonleao/gruvbox.nvim",
-- priority = 1000,
-- opts = {},
-- config = function(_, opts)
-- require("gruvbox").setup(opts)
-- vim.o.background = "dark"
-- vim.cmd.colorscheme("gruvbox")
-- end,
-- },
{ {
"blazkowolf/gruber-darker.nvim", "sainnhe/gruvbox-material",
priority = 1000,
lazy = false, lazy = false,
opts = {}, priority = 1000,
config = function(_, opts) config = function()
require("gruber-darker").setup(opts) vim.g.gruvbox_material_enable_italic = true
vim.cmd.colorscheme("gruber-darker") vim.cmd.colorscheme("gruvbox-material")
vim.o.background = "dark"
end, end,
}, },
-- {
-- "blazkowolf/gruber-darker.nvim",
-- priority = 1000,
-- lazy = false,
-- opts = {},
-- config = function(_, opts)
-- require("gruber-darker").setup(opts)
-- vim.cmd.colorscheme("gruber-darker")
-- vim.o.background = "dark"
-- end,
-- },
{ -- Highlight todo, notes, etc in comments { -- Highlight todo, notes, etc in comments
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" }, cmd = { "TodoTrouble", "TodoTelescope" },
@ -1154,13 +1163,13 @@ local yank_relative_path = function()
local path = MiniFiles.get_fs_entry().path local path = MiniFiles.get_fs_entry().path
path = vim.fn.fnamemodify(path, ":.") path = vim.fn.fnamemodify(path, ":.")
vim.fn.setreg("+", path) vim.fn.setreg("+", path)
vim.notify(path) vim.notify("Copied: " .. path)
end end
local yank_absolute_path = function() local yank_absolute_path = function()
local path = MiniFiles.get_fs_entry().path local path = MiniFiles.get_fs_entry().path
vim.fn.setreg("+", path) vim.fn.setreg("+", path)
vim.notify(path) vim.notify("Copied: " .. path)
end end
local set_mark = function(id, path, desc) local set_mark = function(id, path, desc)
@ -1187,5 +1196,9 @@ vim.api.nvim_create_autocmd("User", {
end, end,
}) })
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile", "BufWritePre" }, {
callback = require("mason-tool-installer").run_on_start,
})
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View file

@ -7,7 +7,7 @@
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
"gruber-darker.nvim": { "branch": "main", "commit": "a2dda61d9c1225e16951a51d6b89795b0ac35cd6" }, "gruvbox-material": { "branch": "master", "commit": "170148af9350f578f3623f810e54698fa1e5bdbf" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, "harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
@ -24,6 +24,7 @@
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" }, "nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" },
"nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" }, "nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" },
"oil.nvim": { "branch": "master", "commit": "8ea40b5506115b6d355e304dd9ee5089f7d78601" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"snacks.nvim": { "branch": "main", "commit": "be8feef4ab584f50aaa96b69d50b3f86a35aacff" }, "snacks.nvim": { "branch": "main", "commit": "be8feef4ab584f50aaa96b69d50b3f86a35aacff" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },

View file

@ -57,6 +57,39 @@ Host polaris
ControlPersist yes ControlPersist yes
LogLevel FATAL LogLevel FATAL
# LLNL
Host lassen
ForwardX11Trusted yes
User sinurat1
HostName lassen.llnl.gov
ControlMaster auto
ControlPersist yes
LogLevel FATAL
Host corona
ForwardX11Trusted yes
User sinurat1
HostName corona.llnl.gov
ControlMaster auto
ControlPersist yes
LogLevel FATAL
Host czgitlab
HostName czgitlab.llnl.gov
ProxyCommand ssh oslic -W %h:7999
ControlMaster no
User sinurat1
Host oslic
ForwardX11Trusted yes
Hostname oslic.llnl.gov
PreferredAuthentications password
User sinurat1
ControlMaster auto
ControlPersist yes
LogLevel FATAL
# Box # Box
Host box Host box
@ -148,7 +181,7 @@ Host cs-uc-07
# ControlPersist yes # ControlPersist yes
LogLevel FATAL LogLevel FATAL
ForwardAgent yes ForwardAgent yes
ForwardX11 yes # ForwardX11 yes
Host ucare-gpu-1.cs.uchicago.edu Host ucare-gpu-1.cs.uchicago.edu
ForwardAgent yes ForwardAgent yes

View file

@ -150,8 +150,8 @@ in
"${modifier}+s" = "layout stacking"; "${modifier}+s" = "layout stacking";
"${modifier}+t" = "layout tabbed"; "${modifier}+t" = "layout tabbed";
"${modifier}+e" = "layout toggle split"; "${modifier}+e" = "layout toggle split";
"${modifier}+Shift+p" = "floating toggle"; "${modifier}+p" = "floating toggle";
"${modifier}+p" = "focus mode_toggle"; "${modifier}+Shift+p" = "focus mode_toggle";
"${modifier}+f" = "fullscreen toggle"; "${modifier}+f" = "fullscreen toggle";
"${modifier}+Shift+v" = "split v"; "${modifier}+Shift+v" = "split v";
"${modifier}+v" = "split h"; "${modifier}+v" = "split h";

View file

@ -50,7 +50,7 @@
sway.enable = false; sway.enable = false;
}; };
gnome = { gnome = {
enable = true; enable = false;
stylix = true; stylix = true;
}; };
kde = { kde = {

View file

@ -9,8 +9,8 @@
autoEnable = false; autoEnable = false;
image = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.src; image = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.src;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-forest.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-forest.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml";
polarity = "dark"; polarity = "dark";
fonts = { fonts = {
serif = config.stylix.fonts.sansSerif; serif = config.stylix.fonts.sansSerif;

View file

@ -4,15 +4,9 @@
enable = true; enable = true;
# xdgOpenUsePortal = true; # xdgOpenUsePortal = true;
wlr.enable = true; wlr.enable = true;
extraPortals = with pkgs; [ configPackages = with pkgs; [
# xdg-desktop-portal-kde
# xdg-desktop-portal-gnome
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
]; ];
# config = {
# common = { default = [ "gtk" ]; };
# gnome = { default = [ "gnome" "gtk" ]; };
# };
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [