From bfcc79bed7ee6f225c27d0f9d8cb098e03cfd96f Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Thu, 10 Oct 2024 16:40:17 +0200 Subject: [PATCH] init: helix editor --- modules/nixos/apps/cli-apps/helix/default.nix | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 modules/nixos/apps/cli-apps/helix/default.nix diff --git a/modules/nixos/apps/cli-apps/helix/default.nix b/modules/nixos/apps/cli-apps/helix/default.nix new file mode 100644 index 0000000..2dfe93a --- /dev/null +++ b/modules/nixos/apps/cli-apps/helix/default.nix @@ -0,0 +1,55 @@ +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib) mkIf mkEnableOption; + cfg = config.wyrdgard.apps.cli-apps.helix; +in +{ + options.wyrdgard.apps.cli-apps.helix = { + enable = mkEnableOption "Whether to enable nixvim or not (Default true)"; + }; + + config = mkIf cfg.enable { + environment = { + systemPackages = with pkgs; [ helix ]; + }; + + wyrdgard.home = { + extraOptions = { + programs.helix = { + enable = true; + settings = { + theme = "autumn_night_transparent"; + editor.cursor-shape = { + normal = "block"; + insert = "bar"; + select = "underline"; + }; + }; + languages.language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.nixfmt}/bin/nixfmt"; + } + { + name = "rust"; + auto-format = true; + formatter.command = "cargo fmt"; + } + ]; + themes = { + autumn_night_transparent = { + "inherits" = "autumn_night"; + "ui.background" = { }; + }; + }; + }; + }; + }; + }; +}