diff --git a/hosts/default/git.nix b/hosts/default/git.nix new file mode 100644 index 0000000..220837c --- /dev/null +++ b/hosts/default/git.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in +{ + 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"; + + }; +} diff --git a/hosts/default/home.nix b/hosts/default/home.nix index d8b7280..eead353 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -1,9 +1,13 @@ { config, pkgs, ... }: -let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in { - imports = [ ./gnome.nix ]; + imports = [ + ./gnome.nix + ./aws.nix + ./git.nix + ./shell.nix + ]; home = { file = { @@ -16,6 +20,7 @@ let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in sessionVariables = { GOPATH = "${config.home.homeDirectory}/Public/go"; GOBIN = "${config.home.sessionVariables.GOPATH}/bin"; + CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv"; }; sessionPath = [ config.home.sessionVariables.GOBIN "${config.home.homeDirectory}/.cargo/bin" ]; @@ -34,57 +39,6 @@ let githubHelper = "${pkgs.gh}/bin/gh auth git-credential"; in 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"; - - }; - - 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 '\uf313 \u0000' - set_color normal - ''; - }; - fish_greeting.body = ""; - }; - }; - helix = { enable = true; settings = { diff --git a/hosts/default/shell.nix b/hosts/default/shell.nix new file mode 100644 index 0000000..31e76a3 --- /dev/null +++ b/hosts/default/shell.nix @@ -0,0 +1,39 @@ +{ config, pkgs, ... }: + +{ + 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 ' + + 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 '\uf313 \u0000' + set_color normal + ''; + }; + fish_greeting.body = ""; + }; + }; +} +