nixcfg/homeManagerModules/apps/zed/default.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

{
config,
2024-07-13 21:24:21 -04:00
lib,
pkgs,
...
2024-07-13 21:24:21 -04:00
}: {
config = lib.mkIf config.ar.home.apps.zed.enable {
home.packages = [
config.ar.home.apps.zed.package
pkgs.nixd
];
2024-07-13 21:24:21 -04:00
xdg.configFile."zed/settings.json".text = let
defaults = {
auto_install_extensions = {
adwaita_pastel = true;
bahser = true;
docker-compose = true;
dockerfile = true;
git-firefly = true;
haskell = true;
html = true;
ini = true;
just = true;
log = true;
make = true;
nix = true;
python = true;
ruby = true;
};
auto_update = false;
autosave = "on_focus_change";
buffer_font_family = "NotoSansM Nerd Font";
buffer_font_size = 14;
2024-07-13 21:24:21 -04:00
indent_guides = {
enabled = true;
background_coloring = "disabled";
coloring = "indent_aware";
line_width = 1;
};
languages = {
Nix.formatter.external = {
command = lib.getExe pkgs.alejandra;
arguments = [];
};
};
telemetry = {
diagnostics = true;
metrics = true;
};
theme =
if config.ar.home.theme.darkMode
then "Adwaita Pastel Dark"
else "Adwaita Pastel Light";
ui_font_size = 16;
vim_mode = false;
};
settings = defaults // config.ar.home.apps.zed.settings;
in
lib.generators.toJSON {} settings;
};
}