From 3ea06b0f61da129b6cd6a4f4d8648f051c30a74c Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 8 Mar 2024 17:42:39 +0530 Subject: home-manager: init --- home-manager/common/home.nix | 13 +++++++++++++ home-manager/common/modules/git.nix | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 home-manager/common/home.nix create mode 100644 home-manager/common/modules/git.nix (limited to 'home-manager') diff --git a/home-manager/common/home.nix b/home-manager/common/home.nix new file mode 100644 index 0000000..b5886d4 --- /dev/null +++ b/home-manager/common/home.nix @@ -0,0 +1,13 @@ +{ config, ... }: let + username = config.userdata.user; +in { + imports = [ ./modules/git.nix ]; + + programs.home-manager.enable = true; + + home = { + inherit username; + stateVersion = "23.11"; + homeDirectory = "/home/${config.home.username}"; + }; +} diff --git a/home-manager/common/modules/git.nix b/home-manager/common/modules/git.nix new file mode 100644 index 0000000..df0407e --- /dev/null +++ b/home-manager/common/modules/git.nix @@ -0,0 +1,15 @@ +{ config, ... }: let + userName = config.userdata.userFq; + userEmail = config.userdata.email; +in { + programs.git = { + enable = true; + inherit userName; + inherit userEmail; + + extraConfig = { + color.ui = "auto"; + init.defaultBranch = "master"; + }; + }; +} -- cgit v1.2.3