working nixvim!
This commit is contained in:
parent
d19d367cb3
commit
cee77dd6af
8 changed files with 100 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "lololo";
|
description = "My NixOS config flake";
|
||||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
nixosConfigurations = import ./hosts { inherit inputs; };
|
nixosConfigurations = import ./hosts { inherit inputs; };
|
||||||
|
@ -51,8 +51,8 @@
|
||||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
||||||
nur = { url = "github:nix-community/NUR"; };
|
nur = { url = "github:nix-community/NUR"; };
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ in {
|
||||||
../modules
|
../modules
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
|
inputs.nixvim.nixosModules.nixvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
editors = {
|
editors = {
|
||||||
emacs = {
|
emacs = {
|
||||||
enable = false;
|
enable = false;
|
||||||
doom.enable = false;
|
doom.enable = false;
|
||||||
};
|
};
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
kakoune.enable = true;
|
kakoune.enable = true;
|
||||||
|
|
|
@ -75,6 +75,7 @@ in {
|
||||||
polkit
|
polkit
|
||||||
python3
|
python3
|
||||||
qbittorrent
|
qbittorrent
|
||||||
|
ripgrep
|
||||||
rustdesk
|
rustdesk
|
||||||
scc
|
scc
|
||||||
scummvm
|
scummvm
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
_: { imports = [ ./emacs.nix ./helix.nix ./kakoune.nix ]; }
|
_: { imports = [ ./emacs.nix ./helix.nix ./kakoune.nix ./nixvim.nix ]; }
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.editors.helix;
|
cfg = config.modules.editors.helix;
|
||||||
username = config.modules.other.system.username;
|
username = config.modules.other.system.username;
|
||||||
in {
|
in {
|
||||||
options.modules.editors.helix.enable = mkEnableOption "helix";
|
options.modules.editors.helix.enable = lib.mkEnableOption "helix";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -20,7 +19,7 @@ in {
|
||||||
cursor-shape = { insert = "bar"; };
|
cursor-shape = { insert = "bar"; };
|
||||||
statusline.left =
|
statusline.left =
|
||||||
|
|
||||||
[ "mode" "spinner" "version-control" "file-name" ];
|
[ "mode" "spinner" "version-control" "file-name" ];
|
||||||
};
|
};
|
||||||
keys.normal = {
|
keys.normal = {
|
||||||
C-g =
|
C-g =
|
||||||
|
|
|
@ -1,14 +1,93 @@
|
||||||
{pkgs, config, lib, ...}:
|
{ config, lib, ... }:
|
||||||
with lib;
|
let cfg = config.modules.editors.nixvim;
|
||||||
let
|
|
||||||
cfg = config.modules.editors.nixvim;
|
|
||||||
inherit (inputs.nixvim.packges.${pkgs.system}) nixvim;
|
|
||||||
in {
|
in {
|
||||||
options.modules.editors.nivim.enable = mkEnableOption "nixvim";
|
options.modules.editors.nixvim.enable = lib.mkEnableOption "nixvim";
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
colorschemes.gruvbox.enable = true;
|
||||||
|
options = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
scrolloff = 8;
|
||||||
|
};
|
||||||
|
plugins = {
|
||||||
|
lightline.enable = true;
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
nixd.enable = true;
|
||||||
|
lua-ls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
sources = [ { name = "nvim_lsp"; } { name = "buffer"; } { name = "path"; } ];
|
||||||
|
mapping = {
|
||||||
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||||
|
"<Tab>" = {
|
||||||
|
action = ''
|
||||||
|
function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expandable() then
|
||||||
|
luasnip.expand()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
elseif check_backspace() then
|
||||||
|
fallback()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
modes = [ "i" "s" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions = {
|
||||||
|
fzf-native = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
fuzzy = true;
|
||||||
|
override_file_sorter = true;
|
||||||
|
override_generic_sorter = true;
|
||||||
|
case_mode = "smart_case";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
treesitter.enable = true;
|
||||||
|
treesitter-context.enable = true;
|
||||||
|
comment.enable = true;
|
||||||
|
gitblame.enable = true;
|
||||||
|
trouble.enable = true;
|
||||||
|
todo-comments.enable = true;
|
||||||
|
fugitive.enable = true;
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
|
diffview.enable = true;
|
||||||
|
oil.enable = true;
|
||||||
|
undotree.enable = true;
|
||||||
|
fzf-lua.enable = true;
|
||||||
|
surround.enable = true;
|
||||||
|
lazygit.enable = true;
|
||||||
|
# Theming
|
||||||
|
gitsigns.enable = true;
|
||||||
|
# barbar.enable = true;
|
||||||
|
lualine = {
|
||||||
|
enable = true;
|
||||||
|
#theme = "palenight";
|
||||||
|
};
|
||||||
|
nix.enable = true;
|
||||||
|
zig.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@ let
|
||||||
username = config.modules.other.system.username;
|
username = config.modules.other.system.username;
|
||||||
hmCfg = config.home-manager.users.${username};
|
hmCfg = config.home-manager.users.${username};
|
||||||
|
|
||||||
primary_browser = "firefox-schizo.desktop";
|
primary_browser = "Schizofox.desktop";
|
||||||
mail_client = "thunderbird.desktop";
|
mail_client = "thunderbird.desktop";
|
||||||
file_manager = "nautilus.desktop";
|
file_manager = "nautilus.desktop";
|
||||||
media_player = "mpv.desktop";
|
media_player = "mpv.desktop";
|
||||||
image_viewer = "imv.desktop";
|
image_viewer = "imv.desktop";
|
||||||
text_editor = "helix.desktop";
|
text_editor = "helix.desktop";
|
||||||
terminal = "kitty.desktop";
|
terminal = "foot.desktop";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
environment.sessionVariables = { TERMINAL = "${terminal}"; };
|
environment.sessionVariables = { TERMINAL = "${terminal}"; };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue