Compare commits

..

9 Commits

Author SHA1 Message Date
d6c908dc70 git signs tweak 2025-06-09 13:22:03 -04:00
b1981a2dcc autopep8 2025-05-01 14:06:05 -04:00
a58d02d1bd nvim: use pyright for starlark 2025-04-30 13:12:00 -04:00
c2af87fce5 add telescope undo tree 2025-04-22 19:11:08 -04:00
93d50641c1 macos update instructions 2025-04-22 11:47:10 -04:00
a6a9a97650 add pin hyprland bind 2025-04-22 07:46:05 -04:00
5455230930 add gimp 2025-04-20 21:16:56 -04:00
b632c0c3af sync system clipboard 2025-04-20 21:10:15 -04:00
cf0fa75058 Migrate to Snowfall (#1)
Reviewed-on: #1
Co-authored-by: Evan Reichard <evan@reichard.io>
Co-committed-by: Evan Reichard <evan@reichard.io>
2025-04-21 00:56:53 +00:00
11 changed files with 125 additions and 54 deletions

View File

@ -64,3 +64,44 @@ rsync -av --exclude='.git' . root@HOST:/etc/nixos
```bash ```bash
sudo nixos-rebuild switch sudo nixos-rebuild switch
``` ```
# Nix Home Manager Configuration - macOS
## Upgrade
```bash
# Update System Channels
sudo nix-channel --add https://nixos.org/channels/nixpkgs-24.11-darwin nixpkgs
sudo nix-channel --update
# Update Home Manager
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
nix-channel --update
# Link Repo
ln -s /Users/evanreichard/Development/git/personal/nix/home-manager ~/.config/home-manager
# Build Home Manager
home-manager switch
```
## Clean Garbage
NOTE: This will remove previous generations
```bash
sudo nix-collect-garbage --delete-old
nix-collect-garbage --delete-old
```
## OS Update
`/etc/bashrc` may get overridden. To properly load Nix, prepend the following:
```bash
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
```

View File

@ -43,7 +43,7 @@ in
android-tools android-tools
imagemagick imagemagick
mosh mosh
python311 python312
texliveSmall # Pandoc PDF Dep texliveSmall # Pandoc PDF Dep
google-cloud-sdk google-cloud-sdk
tldr tldr

View File

@ -26,6 +26,7 @@ in
graphical = { graphical = {
wms.hyprland = enabled; wms.hyprland = enabled;
ghostty = enabled; ghostty = enabled;
gimp = enabled;
ghidra = enabled; ghidra = enabled;
browsers.firefox = { browsers.firefox = {
enable = true; enable = true;
@ -44,9 +45,9 @@ in
}; };
}; };
# home.packages = with pkgs; [ home.packages = with pkgs; [
# catppuccin-gtk jellyfin-media-player
# ]; ];
dconf = { dconf = {
settings = { settings = {

View File

@ -0,0 +1,17 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.gimp;
in
{
options.${namespace}.programs.graphical.gimp = {
enable = mkEnableOption "GIMP";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
gimp-with-plugins
];
};
}

View File

@ -39,8 +39,8 @@ in
"$mainMod, Q, killactive" "$mainMod, Q, killactive"
"$mainMod, M, exit" "$mainMod, M, exit"
"$mainMod, V, togglefloating" "$mainMod, V, togglefloating"
"$mainMod, P, pseudo" # dwindle "$mainMod, P, pin"
"$mainMod, J, togglesplit" # dwindle "$mainMod, J, togglesplit"
"$mainMod, S, togglespecialworkspace, magic" "$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic" "$mainMod SHIFT, S, movetoworkspace, special:magic"

View File

@ -20,7 +20,7 @@ vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- Synchronize with system clipboard -- Synchronize with system clipboard
vim.opt.clipboard = "unnamed" vim.opt.clipboard:append("unnamedplus")
-- Always show the signcolumn -- Always show the signcolumn
vim.opt.signcolumn = "yes" vim.opt.signcolumn = "yes"

View File

@ -1,16 +1,18 @@
require('gitsigns').setup { require("gitsigns").setup({
on_attach = function(bufnr) current_line_blame = true,
local gitsigns = require('gitsigns') current_line_blame_opts = { delay = 0 },
on_attach = function(bufnr)
local gitsigns = require("gitsigns")
local function map(mode, l, r, opts) local function map(mode, l, r, opts)
opts = opts or {} opts = opts or {}
opts.buffer = bufnr opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts) vim.keymap.set(mode, l, r, opts)
end end
map('n', '<leader>gb', gitsigns.toggle_current_line_blame) map("n", "<leader>gb", gitsigns.toggle_current_line_blame)
map('n', '<leader>gB', function() map("n", "<leader>gB", function()
gitsigns.blame_line {full = true} gitsigns.blame_line({ full = true })
end) end)
end end,
} })

View File

@ -80,6 +80,7 @@ nvim_lsp.pyright.setup({
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,
capabilities = capabilities, capabilities = capabilities,
filetypes = { "starlark", "python" },
}) })
-- HTML LSP Configuration -- HTML LSP Configuration
@ -183,9 +184,9 @@ nvim_lsp.golangci_lint_ls.setup({
}) })
------------------------------------------------------ ------------------------------------------------------
--------------------- Null-LS LSP -------------------- --------------------- None-LS LSP --------------------
------------------------------------------------------ ------------------------------------------------------
local null_ls = require("null-ls") local none_ls = require("null-ls")
local eslintFiles = { local eslintFiles = {
".eslintrc", ".eslintrc",
@ -202,26 +203,27 @@ local eslintFiles = {
"eslint.config.cts", "eslint.config.cts",
} }
has_eslint_in_parents = function(fname) local has_eslint_in_parents = function(fname)
root_file = nvim_lsp.util.insert_package_json(eslintFiles, "eslintConfig", fname) local root_file = nvim_lsp.util.insert_package_json(eslintFiles, "eslintConfig", fname)
return nvim_lsp.util.root_pattern(unpack(root_file))(fname) return nvim_lsp.util.root_pattern(unpack(root_file))(fname)
end end
null_ls.setup({ none_ls.setup({
sources = { sources = {
-- Prettier Formatting -- Prettier Formatting
null_ls.builtins.formatting.prettier, none_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }), none_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }),
require("none-ls.diagnostics.eslint_d").with({ require("none-ls.diagnostics.eslint_d").with({
condition = function(utils) condition = function(utils)
return has_eslint_in_parents(vim.fn.getcwd()) return has_eslint_in_parents(vim.fn.getcwd())
end, end,
}), }),
null_ls.builtins.completion.spell, none_ls.builtins.completion.spell,
null_ls.builtins.formatting.nixpkgs_fmt, none_ls.builtins.formatting.nixpkgs_fmt,
null_ls.builtins.formatting.stylua, none_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.sqlfluff, none_ls.builtins.diagnostics.sqlfluff,
null_ls.builtins.formatting.sqlfluff, none_ls.builtins.formatting.sqlfluff,
require("none-ls.formatting.autopep8").with({ filetypes = { "starlark", "python" } }),
}, },
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then if client.supports_method("textDocument/formatting") then

View File

@ -1,20 +1,22 @@
require('telescope').setup { require("telescope").setup({
extensions = { extensions = {
fzf = { fzf = {
fuzzy = true, fuzzy = true,
override_generic_sorter = true, override_generic_sorter = true,
override_file_sorter = true, override_file_sorter = true,
case_mode = "smart_case" case_mode = "smart_case",
} },
} },
} })
require('telescope').load_extension('fzf') require("telescope").load_extension("fzf")
require("telescope").load_extension("ui-select") require("telescope").load_extension("ui-select")
require("telescope").load_extension("undo")
local builtin = require('telescope.builtin') local builtin = require("telescope.builtin")
vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {}) vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {}) vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
vim.keymap.set('n', '<leader>fj', builtin.jumplist, {}) vim.keymap.set("n", "<leader>fj", builtin.jumplist, {})
vim.keymap.set("n", "<leader>fu", "<cmd>Telescope undo<cr>")

View File

@ -47,6 +47,7 @@ in
telescope-fzf-native-nvim # Faster Telescope telescope-fzf-native-nvim # Faster Telescope
telescope-nvim # Fuzzy Finder telescope-nvim # Fuzzy Finder
telescope-ui-select-nvim # UI telescope-ui-select-nvim # UI
telescope-undo-nvim # Undo Tree
toggleterm-nvim # Terminal Helper toggleterm-nvim # Terminal Helper
vim-nix # Nix Helpers vim-nix # Nix Helpers
which-key-nvim # Shortcut Helper which-key-nvim # Shortcut Helper
@ -81,12 +82,12 @@ in
( (
pkgs.vimUtils.buildVimPlugin { pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-extras.nvim"; pname = "none-ls-extras.nvim";
version = "2024-06-11"; version = "2025-05-01";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "nvimtools"; owner = "nvimtools";
repo = "none-ls-extras.nvim"; repo = "none-ls-extras.nvim";
rev = "336e84b9e43c0effb735b08798ffac382920053b"; rev = "80dfc30b674c45ad892726f656440cc9e69b82e3";
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk="; sha256 = "sha256-VwI3jIqSYkhMS1S1sVZbyGb9mXliBoFytkFXkks4PD0=";
}; };
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/"; meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
} }
@ -165,6 +166,7 @@ in
nodePackages.vscode-langservers-extracted nodePackages.vscode-langservers-extracted
pyright pyright
eslint_d eslint_d
python312Packages.autopep8
# Formatters # Formatters
luaformatter luaformatter

View File

@ -1,4 +1,4 @@
{ config, lib, namespace, ... }: { config, pkgs, lib, namespace, ... }:
let let
inherit (lib) mkIf; inherit (lib) mkIf;
@ -17,6 +17,10 @@ in
}; };
}; };
environment.systemPackages = with pkgs; [
wl-clipboard
];
reichard = { reichard = {
display-managers = { display-managers = {
sddm = { sddm = {