From 2db30c13e7a9627700216c598cd2f2077d011107 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 5 Apr 2022 11:26:26 +0300 Subject: [PATCH] feat(nix/prog): enable git --- nix/home.nix | 15 +++++++++++++-- nix/secrets.example.nix | 11 +++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index d087e22..50ccd1b 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -6,8 +6,8 @@ in { # Home Manager needs a bit of information about you and the # paths it should manage. - home.username = secrets.username; - home.homeDirectory = secrets.homeDir; + home.username = secrets.home.name; + home.homeDirectory = secrets.home.dir; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage @@ -22,6 +22,17 @@ in # Let Home Manager install and manage itself. programs.home-manager.enable = true; + programs.git = { + enable = true; + userName = secrets.git.name; + userEmail = secrets.git.email; + extraConfig = { + core.editor = "nvim"; + init.defaultBranch = "main"; + pull.rebase = true; + }; + }; + programs.exa = { enable = true; # TODO: install zsh and activate aliases diff --git a/nix/secrets.example.nix b/nix/secrets.example.nix index eb4f81f..9bcb5e8 100644 --- a/nix/secrets.example.nix +++ b/nix/secrets.example.nix @@ -1,4 +1,11 @@ { - username = "Bob"; - homeDir = "/home/bob"; + home = { + name = "Bob"; + dir = "/home/bob"; + }; + + git = { + name = "Bob Ross"; + email = "bross@example.com"; + }; }