From b7bfcbeb7d23335fa396c47daecb46c697e3a670 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:46:26 -0800 Subject: [PATCH] helix config --- systems/BASED.nix | 10 ++++----- users/tao.nix | 6 ++++-- users/tao/helix.nix | 51 +++++++++++++++++++++++++++++++++++++++++++++ users/tao/home.nix | 20 ++++++++++++++++++ 4 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 users/tao/helix.nix diff --git a/systems/BASED.nix b/systems/BASED.nix index 0e5dbc0..a31abcc 100644 --- a/systems/BASED.nix +++ b/systems/BASED.nix @@ -1,10 +1,6 @@ { lib, pkgs, modulesPath, ... }: { environment.systemPackages = with pkgs; [ - xorg.xkill - macchina - rustdesk - screen - libthai + # xorg.xkill bat bottom cifs-utils @@ -14,11 +10,15 @@ firefox git helix + libthai localsend + macchina mesa mpv ouch ripgrep + rustdesk + screen skim tree wezterm diff --git a/users/tao.nix b/users/tao.nix index 6a18b86..ccece69 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -118,7 +118,9 @@ # } # home.username = "tao"; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = false; + home-manager.verbose = true; + home-manager.backupFileExtension = ".hm-bak"; home-manager.users.tao = import ./tao/home.nix; } diff --git a/users/tao/helix.nix b/users/tao/helix.nix new file mode 100644 index 0000000..eb46074 --- /dev/null +++ b/users/tao/helix.nix @@ -0,0 +1,51 @@ +{ + programs.helix = { + settings = { + theme = "dracula"; + editor = { + line-number = "relative"; + cursorline = true; + completion-replace = true; + preview-completion-insert = false; + indent-guides = { + render = true; + skip-levels = 2; + }; + cursor-shape = { + insert = "bar"; + select = "underline"; + }; + statusline = { + left = [ "mode" "spinner" "spacer" "version-control" ]; + center = [ "file-name" "file-modification-indicator" ]; + right = [ "diagnostics" "primary-selection-length" "total-line-numbers" "selections" "position" ]; + }; + lsp = { + display-messages = true; + display-inlay-hints = true; + }; + }; + }; + languages = { + language = [ + { + name = "c"; + auto-format = true; + formatter = { + command = "clang-format"; + args = [ "--style=file:/home/tao/Templates/clang-format" ]; + }; + } + { + name = "nix"; + auto-format = true; + formatter = { + command = "nixpkgs-fmt"; + }; + } + ]; + }; + }; + enable = true; + defaultEditor = true; +} diff --git a/users/tao/home.nix b/users/tao/home.nix index a4aae70..e85456d 100644 --- a/users/tao/home.nix +++ b/users/tao/home.nix @@ -1,4 +1,24 @@ { + programs.helix = { + enable = true; + defaultEditor = true; + settings = { + theme = "dracula"; + editor = { + line-number = "relative"; + cursorline = true; + completion-replace = true; + }; + }; + languages = { }; + }; + + programs.git = { + enable = true; + userName = "Tao Tien"; + userEmail = "29749622+taotien@users.noreply.github.com"; + }; + home.username = "tao"; home.homeDirectory = "/home/tao"; home.stateVersion = "23.11";