🧑‍💻 Zed configs, Nextcloud as service, moved dev stuff

This commit is contained in:
2025-01-11 20:59:51 +01:00
parent 99c1d855ab
commit c75db3b717
9 changed files with 47 additions and 5 deletions

View File

@ -0,0 +1,7 @@
{
imports = [
./git.nix
./nixvim
./zed.nix
];
}

View File

@ -0,0 +1,16 @@
{
programs.git = {
enable = true;
userName = "Martin Berg Alstad";
userEmail = "git@martials.no";
aliases = {
cm = "commit";
s = "status";
};
extraConfig = {
push.autoSetupRemote = true;
};
};
}

View File

@ -0,0 +1,60 @@
# Neovim configuration for Nix
{
home.sessionVariables = {
EDITOR = "nvim";
};
programs.nixvim = {
enable = true;
clipboard.providers.wl-copy.enable = true;
opts = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
};
plugins = {
bufferline.enable = true;
# Formatters
conform-nvim = {
enable = true;
# TODO use nix fmt on save
settings = { };
};
lsp = {
enable = true;
servers = {
nixd.enable = true;
};
};
lualine.enable = true;
luasnip.enable = true;
# Completions
cmp = {
enable = true;
autoEnableSources = true;
# TODO complete on <tab>
settings = {
sources = [
{ name = "nvim-lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
};
treesitter.enable = true;
web-devicons.enable = true;
};
};
}

View File

@ -0,0 +1,32 @@
{
programs.zed-editor = {
enable = true;
extensions = [
"html"
"catppuccin"
"toml"
"nix"
"git_firefly"
];
userSettings =
let
theme = import ../../theme.nix;
font = "${theme.nerdFont} Nerd Font";
fontSize = 14;
in
{
autosave = "on_focus_change";
base_keymap = "JetBrains";
ui_font_family = font;
buffer_font_family = font;
ui_font_size = fontSize;
buffer_font_size = fontSize;
theme = {
mode = "system";
light = "Catppuccin Frappé";
dark = "Catppuccin Mocha";
};
lsp.nil.initialization_options.formatting.command = [ "nixfmt" ];
};
};
}