Compare commits

...

3 commits

Author SHA1 Message Date
655d5fdaf5
home: enable neovim 2024-10-28 19:31:55 -04:00
e68ce7fed7
flake.nix: remove zen browser
tsuki: remove zen
2024-10-28 19:31:21 -04:00
8c63954273
editors: enable basic nixvim config 2024-10-28 19:30:48 -04:00
23 changed files with 282 additions and 42 deletions

View file

@ -2037,22 +2037,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_22": {
"locked": {
"lastModified": 1725634671,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1727634051, "lastModified": 1727634051,
@ -2325,8 +2309,7 @@
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
"xdg-portal-hyprland": "xdg-portal-hyprland", "xdg-portal-hyprland": "xdg-portal-hyprland",
"yazi": "yazi", "yazi": "yazi"
"zen-browser": "zen-browser"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -2928,24 +2911,6 @@
"repo": "yazi", "repo": "yazi",
"type": "github" "type": "github"
} }
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_22"
},
"locked": {
"lastModified": 1730078377,
"narHash": "sha256-OJL1P1rLD+O6BgITFJC/oapu6o+twvDsY6gBDmGR5nw=",
"owner": "fufexan",
"repo": "zen-browser-flake",
"rev": "6c22931e60beb805276a9eb31701047e6cb6afb2",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "zen-browser-flake",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -83,7 +83,6 @@
eww.url = "github:elkowar/eww"; eww.url = "github:elkowar/eww";
anyrun.url = "github:Kirottu/anyrun"; anyrun.url = "github:Kirottu/anyrun";
botoh.url = "git+https://git.flake.sh/notohh/botoh"; botoh.url = "git+https://git.flake.sh/notohh/botoh";
zen-browser.url = "github:fufexan/zen-browser-flake";
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./programs/editors/helix ./programs/editors/helix
./programs/editors/neovim
./programs/terminal/lazygit ./programs/terminal/lazygit
./programs/terminal/nushell ./programs/terminal/nushell
./programs/terminal/yazi ./programs/terminal/yazi

View file

@ -8,11 +8,12 @@
../../services ../../services
../../programs/anyrun ../../programs/anyrun
../../programs/eww ../../programs/eww
# ../../programs/browsers/firefox ../../programs/browsers/firefox
../../programs/terminal/wezterm ../../programs/terminal/wezterm
../../programs/terminal/zellij ../../programs/terminal/zellij
../../programs/media/cava.nix ../../programs/media/cava.nix
../../programs/gtk.nix ../../programs/gtk.nix
../../programs/qt.nix
../../programs/mako.nix ../../programs/mako.nix
../../programs/media/spotify-player.nix ../../programs/media/spotify-player.nix
../../programs/media/zathura.nix ../../programs/media/zathura.nix
@ -25,14 +26,12 @@
chromium chromium
vesktop vesktop
technorino technorino
vscode-fhs
obsidian obsidian
signal-desktop signal-desktop
thunderbird thunderbird
obs-studio obs-studio
pavucontrol pavucontrol
anki-bin anki-bin
tomato-c
virt-manager virt-manager
qbittorrent qbittorrent
miru miru
@ -51,12 +50,11 @@
r2modman r2modman
moonlight-qt moonlight-qt
kitty kitty
tetrio-desktop
waydroid waydroid
mousam mousam
inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
inputs.zen-browser.packages.${pkgs.system}.default
inputs.hyprsysteminfo.packages.${pkgs.system}.default inputs.hyprsysteminfo.packages.${pkgs.system}.default
inputs.hyprsunset.packages.${pkgs.system}.default
(callPackage ../../../pkgs/passgen {}) (callPackage ../../../pkgs/passgen {})
(callPackage ../../../pkgs/forex {}) (callPackage ../../../pkgs/forex {})
(callPackage ../../../pkgs/cpm {}) (callPackage ../../../pkgs/cpm {})

View file

@ -0,0 +1,61 @@
{inputs, ...}: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
./plugins
./themes
];
programs.nixvim = {
enable = true;
clipboard.providers.wl-copy.enable = true;
autoGroups = {
vim_enter = {};
};
highlightOverride = {
LspInlayHint.bg = "";
};
autoCmd = [
{
group = "vim_enter";
event = ["VimEnter"];
pattern = "*";
command = "Neotree";
}
];
extraConfigLua = ''
vim.wo.relativenumber = true
'';
extraConfigLuaPre = ''
local slow_format_filetypes = {}
vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
vim.api.nvim_create_user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
vim.api.nvim_create_user_command("FormatToggle", function(args)
if args.bang then
-- Toggle formatting for current buffer
vim.b.disable_autoformat = not vim.b.disable_autoformat
else
-- Toggle formatting globally
vim.g.disable_autoformat = not vim.g.disable_autoformat
end
end, {
desc = "Toggle autoformat-on-save",
bang = true,
})
'';
};
}

View file

@ -0,0 +1,20 @@
_: {
imports = [
./editor/neotree.nix
./editor/trouble.nix
./editor/autoclose.nix
./editor/bufferline.nix
./editor/autosave.nix
./editor/treesitter.nix
./lsp/lsp.nix
./lsp/conform.nix
./misc/wakatime.nix
./misc/direnv.nix
./misc/presence.nix
./ui/lualine.nix
./ui/mini.nix
./ui/transparent.nix
./ui/telescope.nix
];
programs.nixvim.plugins.web-devicons.enable = true;
}

View file

@ -0,0 +1,5 @@
_: {
programs.nixvim.plugins.autoclose = {
enable = true;
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.auto-save.enable = true;
}

View file

@ -0,0 +1,17 @@
_: {
programs.nixvim.plugins.bufferline = {
enable = true;
settings = {
options = {
offsets = [
{
filetype = "neo-tree";
highlight = "Directory";
text = "File Explorer";
text_align = "center";
}
];
};
};
};
}

View file

@ -0,0 +1,6 @@
_: {
programs.nixvim.plugins.neo-tree = {
enable = true;
enableDiagnostics = true;
};
}

View file

@ -0,0 +1,16 @@
{pkgs, ...}: {
programs.nixvim.plugins.treesitter = {
enable = true;
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
bash
json
lua
markdown
nix
regex
toml
xml
yaml
];
};
}

View file

@ -0,0 +1,8 @@
_: {
programs.nixvim.plugins.trouble = {
enable = true;
settings = {
auto_refresh = true;
};
};
}

View file

@ -0,0 +1,55 @@
{
pkgs,
lib,
...
}: {
programs.nixvim.plugins.conform-nvim = {
enable = true;
settings = {
formatters_by_ft = {
nix = [
[
"alejandra"
]
];
};
format_on_save = ''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
local function on_format(err)
if err and err:match("timeout$") then
slow_format_filetypes[vim.bo[bufnr].filetype] = true
end
end
return { timeout_ms = 200, lsp_fallback = true }, on_format
end
'';
format_after_save = ''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
return { lsp_fallback = true }
end
'';
formatters = {
alejandra = {
commmand = "${lib.getExe pkgs.alejandra}";
};
};
};
};
}

View file

@ -0,0 +1,33 @@
_: {
programs.nixvim.plugins = {
lsp-format.enable = true;
lsp-lines.enable = true;
lint = {
lintersByFt = {
nix = [
"statix"
];
};
linters = {
statix = {
cmd = ["statix"];
};
};
};
lsp = {
enable = true;
inlayHints = true;
servers = {
nil_ls = {
enable = true;
};
rust_analyzer = {
enable = true;
autostart = true;
installCargo = true;
installRustc = true;
};
};
};
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.direnv.enable = true;
}

View file

@ -0,0 +1,9 @@
_: {
programs.nixvim.plugins.neocord = {
enable = true;
settings = {
auto_update = true;
enable_line_number = true;
};
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.wakatime.enable = true;
}

View file

@ -0,0 +1,5 @@
_: {
programs.nixvim.plugins.lualine = {
enable = true;
};
}

View file

@ -0,0 +1,5 @@
_: {
programs.nixvim.plugins.mini = {
enable = true;
};
}

View file

@ -0,0 +1,5 @@
_: {
programs.nixvim.plugins.telescope = {
enable = true;
};
}

View file

@ -0,0 +1,12 @@
_: {
programs.nixvim.plugins.transparent = {
enable = true;
settings = {
extra_groups = [
"NeoTreeNormal"
"NeoTreeNormalNC"
"NormalFloat"
];
};
};
}

View file

@ -0,0 +1,3 @@
_: {
imports = [./tokyonight.nix];
}

View file

@ -0,0 +1,8 @@
_: {
programs.nixvim.colorschemes.tokyonight = {
enable = true;
settings = {
transparent = true;
};
};
}