From 15f3472bf86854fad3e30121b835be7e733a2ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 20 Aug 2022 14:21:15 +0200 Subject: [PATCH] :rocket: add helix and kakoune --- modules/profiles/base.nix | 5 ++ modules/programs/default.nix | 2 + modules/programs/helix.nix | 31 ++++++++++ modules/programs/kakoune.nix | 107 +++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 modules/programs/helix.nix create mode 100644 modules/programs/kakoune.nix diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index cf24373..921cb2c 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -42,6 +42,11 @@ with lib; }; variables = { EDITOR = "vim"; }; }; + programs = { + vim.enable = true; + helix.enable = true; + kakoune.enable = true; + }; }; console.keyMap = "de"; diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 21b91ae..2b440a8 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -16,7 +16,9 @@ ./git.nix ./gnome.nix ./gpg.nix + ./helix.nix ./hub.nix + ./kakoune.nix ./kitty.nix ./ledger ./rofi diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix new file mode 100644 index 0000000..93bb5ab --- /dev/null +++ b/modules/programs/helix.nix @@ -0,0 +1,31 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.helix; +in +{ + options.my.programs.helix = { + enable = mkOption { + default = true; + type = types.bool; + example = false; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.moritz.programs.helix = { + enable = true; + settings = { + theme = "dracula"; + keys.normal = { + space.space = "file_picker"; + }; + }; + }; + }; +} diff --git a/modules/programs/kakoune.nix b/modules/programs/kakoune.nix new file mode 100644 index 0000000..a4efa50 --- /dev/null +++ b/modules/programs/kakoune.nix @@ -0,0 +1,107 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.kakoune; +in +{ + options.my.programs.kakoune = { + enable = mkOption { + default = true; + type = types.bool; + example = false; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.moritz = { + xdg.configFile."kak/colors/dracula.kak".text = '' + evaluate-commands %sh{ + black="rgb:282a36" + gray="rgb:44475a" + white="rgb:f8f8f2" + pink="rgb:ff79c6" + purple="rgb:bd93f9" + blue="rgb:6272a4" + cyan="rgb:8be9fd" + green="rgb:50fa7b" + yellow="rgb:f1fa8c" + orange="rgb:ffb86c" + red="rgb:ff5555" + echo " + face global value $green + face global type $purple + face global variable $red + face global function $red + face global module $red + face global string $yellow + face global error $red + face global keyword $cyan + face global operator $orange + face global attribute $pink + face global comment $blue+i + face global meta $red + face global builtin $white+b + face global title $red + face global header $orange + face global mono $green + face global block $cyan + face global link $green + face global bullet $green + face global list $white + face global Default $white,$black + face global PrimarySelection $black,$pink + face global PrimaryCursor $black,$cyan + face global PrimaryCursorEol $black,$cyan + face global SecondarySelection $black,$purple + face global SecondaryCursor $black,$orange + face global SecondaryCursorEol $black,$orange + face global MatchingChar $black,$blue + face global Search $blue,$green + face global CurrentWord $white,$blue + # listchars + face global Whitespace $gray,$black+f + # ~ lines at EOB + face global BufferPadding $gray,$black + # must use wrap -marker hl + face global WrapMarker Whitespace + face global LineNumbers $gray,$black + # must use -hl-cursor + face global LineNumberCursor $white,$gray+b + face global LineNumbersWrapped $gray,$black+i + # when item focused in menu + face global MenuForeground $blue,$white+b + # default bottom menu and autocomplete + face global MenuBackground $white,$blue + # complement in autocomplete like path + face global MenuInfo $cyan,$blue + # clippy + face global Information $yellow,$gray + face global Error $black,$red + # all status line: what we type, but also client@[session] + face global StatusLine $white,$black + # insert mode, prompt mode + face global StatusLineMode $black,$green + # message like '1 sel' + face global StatusLineInfo $purple,$black + # count + face global StatusLineValue $orange,$black + face global StatusCursor $white,$blue + # like the word 'select:' when pressing 's' + face global Prompt $black,$green + " + } + ''; + programs.kakoune = { + enable = true; + config = { + colorScheme = "dracula"; + }; + }; + }; + }; +}