From 60da6bc47620681b557ea2d105df87b22382efcd Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 12 Feb 2022 13:22:29 -0800 Subject: home-manager: re-organize configuration for myself --- users/fcuny/cli/default.nix | 15 +++++++++++++++ users/fcuny/cli/git.nix | 40 ++++++++++++++++++++++++++++++++++++++++ users/fcuny/cli/go.nix | 6 ++++++ users/fcuny/cli/tmux.nix | 13 +++++++++++++ users/fcuny/cli/zsh.nix | 21 +++++++++++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 users/fcuny/cli/default.nix create mode 100644 users/fcuny/cli/git.nix create mode 100644 users/fcuny/cli/go.nix create mode 100644 users/fcuny/cli/tmux.nix create mode 100644 users/fcuny/cli/zsh.nix (limited to 'users/fcuny/cli') diff --git a/users/fcuny/cli/default.nix b/users/fcuny/cli/default.nix new file mode 100644 index 0000000..ff2b89f --- /dev/null +++ b/users/fcuny/cli/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ...}: + +{ + imports = [ + ./git.nix + ./go.nix + ./tmux.nix + ./zsh.nix + ]; + + home.packages = [ + pkgs.jq + pkgs.ripgrep + ]; +} diff --git a/users/fcuny/cli/git.nix b/users/fcuny/cli/git.nix new file mode 100644 index 0000000..f7aeb27 --- /dev/null +++ b/users/fcuny/cli/git.nix @@ -0,0 +1,40 @@ +{ + programs.git = { + enable = true; + aliases = { + s = "status --short --branch"; + amend = "commit --amend --no-edit"; + }; + extraConfig = { + core.whitespace = "trailing-space,space-before-tab"; + color.ui = "true"; + push.default = "simple"; + init.defaultBranch = "main"; + branch.autosetuprebase = "remote"; + branch.sort = "authordate"; + }; + userName = "Franck Cuny"; + userEmail = "franck@fcuny.net"; + ignores = [ + "*.elc" + "*.iml" + "*.o" + "*.pyc" + "*.pyo" + "*pyc" + "*~" + ".DS_Store" + ".\\#" + ".dir-locals.el" + ".direnv/*" + ".idea" + ".projectile" + ".pytest_cache/" + "/env/*" + "Icon" + "TAGS" + "\\#*\\#" + "tags" + ]; + }; +} diff --git a/users/fcuny/cli/go.nix b/users/fcuny/cli/go.nix new file mode 100644 index 0000000..990b2ae --- /dev/null +++ b/users/fcuny/cli/go.nix @@ -0,0 +1,6 @@ +{ + programs.go = { + enable = true; + goPath = "workspace/go"; + }; +} diff --git a/users/fcuny/cli/tmux.nix b/users/fcuny/cli/tmux.nix new file mode 100644 index 0000000..1a9a2d4 --- /dev/null +++ b/users/fcuny/cli/tmux.nix @@ -0,0 +1,13 @@ +{ + programs.tmux = { + enable = true; + terminal = "xterm-256color"; + escapeTime = 0; + aggressiveResize = true; + shortcut = "z"; + + extraConfig = '' + setw -g mouse on + ''; + }; +} diff --git a/users/fcuny/cli/zsh.nix b/users/fcuny/cli/zsh.nix new file mode 100644 index 0000000..6b56d35 --- /dev/null +++ b/users/fcuny/cli/zsh.nix @@ -0,0 +1,21 @@ +{config, lib, pkgs, ...}: + +{ + + xdg.configFile."zsh/personal".source = config.lib.file.mkOutOfStoreSymlink ../../configs/zsh; + + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + defaultKeymap = "emacs"; + history = { + save = 100000; + extended = true; + ignoreDups = true; + }; + initExtra = '' + source ${config.xdg.configHome}/zsh/personal/init.zsh + ''; + }; +} -- cgit 1.4.1