From a265b9db44fbd7ab9d2e63de6c5f71d923a6ffc5 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 12 Aug 2024 17:37:18 +0200 Subject: [PATCH] home/zed: init --- home/home.nix | 1 + home/programs/zed/default.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 home/programs/zed/default.nix diff --git a/home/home.nix b/home/home.nix index eb70b3c..d3a478f 100644 --- a/home/home.nix +++ b/home/home.nix @@ -43,6 +43,7 @@ in { # ./programs/xmobar ./programs/xmonad ./programs/zathura.nix + ./programs/zed ./services/copyq.nix ./services/dunst.nix diff --git a/home/programs/zed/default.nix b/home/programs/zed/default.nix new file mode 100644 index 0000000..90ced3b --- /dev/null +++ b/home/programs/zed/default.nix @@ -0,0 +1,34 @@ +{ config, pkgs, lib, ... }: +{ + home.packages = with pkgs; [ zed-editor ]; + + xdg.configFile."zed/settings.json".source = let + format = pkgs.formats.json { }; + in format.generate "zed-settings.json" { + autosave = "off"; + buffer_font_family = "Fira Code"; + load_direnv = "shell_hook"; + format_on_save = "off"; + + telemetry = { + diagnostics = false; + metrics = false; + }; + + vim_mode = true; + + theme = { + mod = "dark"; + dark = "monokai Classic"; + }; + }; + + xdg.configFile."zed/themes/monokai.json".source = let + package = pkgs.fetchFromGitHub { + owner = "billgo"; + repo = "monokai"; + rev = "061a86ff4845b11ac2f183c2e26c77b15cfae7d0"; + hash = "sha256-mlEcgnLStYH1pV3p1iqNSvfVu4MpvpEOc+vxI+90MJs="; + }; + in "${package}/themes/monokai.json"; +}