feat; configure helix purely with nix
This commit is contained in:
107
home.nix
107
home.nix
@@ -7,13 +7,10 @@ let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/helix/config.toml".source = ./sources/helix/config.toml;
|
||||
".config/mpv" = {
|
||||
source = ./sources/mpv;
|
||||
recursive = true;
|
||||
};
|
||||
# Do not display fish in the menu
|
||||
".local/share/applications/fish.desktop".source = ./sources/fish.desktop;
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
@@ -21,9 +18,7 @@ let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in
|
||||
GOBIN = "${config.home.sessionVariables.GOPATH}/bin";
|
||||
};
|
||||
|
||||
|
||||
sessionPath = [ config.home.sessionVariables.GOBIN "${config.home.homeDirectory}/.cargo/bin" ];
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
@@ -34,55 +29,71 @@ let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in
|
||||
${pkgs.tesseract}/bin/tesseract /tmp/ocr-tmp.png - | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
rm /tmp/ocr-tmp.png
|
||||
''}";
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Himadri Bhattacharjee";
|
||||
userEmail = "107522312+lavafroth@users.noreply.github.com";
|
||||
delta.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
credential."https://github.com".helper = githubHelper;
|
||||
credential."https://gist.github.com".helper = githubHelper;
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
signing.signByDefault = true;
|
||||
signing.key = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
|
||||
};
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
functions = {
|
||||
fish_prompt = {
|
||||
body = ''
|
||||
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
||||
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
||||
end
|
||||
set_color yellow
|
||||
printf '%s' $USER
|
||||
set_color normal
|
||||
printf ' at '
|
||||
|
||||
set_color magenta
|
||||
echo -n (prompt_hostname)
|
||||
set_color normal
|
||||
printf ' in '
|
||||
programs = {
|
||||
|
||||
set_color $fish_color_cwd
|
||||
printf '%s' (prompt_pwd)
|
||||
set_color normal
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Himadri Bhattacharjee";
|
||||
userEmail = "107522312+lavafroth@users.noreply.github.com";
|
||||
delta.enable = true;
|
||||
|
||||
# Line 2
|
||||
echo
|
||||
if test -n "$VIRTUAL_ENV"
|
||||
printf "(%s) " (set_color blue)(basename $VIRTUAL_ENV)(set_color normal)
|
||||
end
|
||||
printf '↪ '
|
||||
set_color normal
|
||||
'';
|
||||
extraConfig = {
|
||||
credential."https://github.com".helper = githubHelper;
|
||||
credential."https://gist.github.com".helper = githubHelper;
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
fish_greeting.body = "";
|
||||
signing.signByDefault = true;
|
||||
signing.key = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
|
||||
};
|
||||
|
||||
fish = {
|
||||
enable = true;
|
||||
functions = {
|
||||
fish_prompt = {
|
||||
body = ''
|
||||
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
||||
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
||||
end
|
||||
set_color yellow
|
||||
printf '%s' $USER
|
||||
set_color normal
|
||||
printf ' at '
|
||||
|
||||
set_color magenta
|
||||
echo -n (prompt_hostname)
|
||||
set_color normal
|
||||
printf ' in '
|
||||
|
||||
set_color $fish_color_cwd
|
||||
printf '%s' (prompt_pwd)
|
||||
set_color normal
|
||||
|
||||
# Line 2
|
||||
echo
|
||||
if test -n "$VIRTUAL_ENV"
|
||||
printf "(%s) " (set_color blue)(basename $VIRTUAL_ENV)(set_color normal)
|
||||
end
|
||||
printf '↪ '
|
||||
set_color normal
|
||||
'';
|
||||
};
|
||||
fish_greeting.body = "";
|
||||
};
|
||||
};
|
||||
|
||||
helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "adwaita-dark";
|
||||
editor.cursor-shape.insert = "bar";
|
||||
editor.line-number = "relative";
|
||||
editor.idle-timeout = 0;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=true
|
||||
Exec=fish
|
||||
Name=fish
|
||||
Comment=The user-friendly command line shell
|
||||
Icon=fish
|
||||
Categories=ConsoleOnly;System;
|
||||
NoDisplay=true
|
||||
@@ -1,11 +0,0 @@
|
||||
theme = "adwaita-dark"
|
||||
|
||||
[editor.lsp]
|
||||
display-inlay-hints = true
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
idle-timeout = 0
|
||||
Reference in New Issue
Block a user