diff --git a/modules/common/default.nix b/modules/common/default.nix index 6fcc2cb..84477db 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -1,5 +1,8 @@ { config, lib, pkgs, ...}: { + imports = [ + ./utilities + ]; options = { user = lib.mkOption { type = lib.types.str; @@ -16,7 +19,6 @@ in { environment.systemPackages = with pkgs; [ - git vim wget curl diff --git a/modules/common/utilities/default.nix b/modules/common/utilities/default.nix new file mode 100644 index 0000000..feab8c5 --- /dev/null +++ b/modules/common/utilities/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./git.nix + ]; +} \ No newline at end of file diff --git a/modules/common/utilities/git.nix b/modules/common/utilities/git.nix new file mode 100644 index 0000000..e28bd8c --- /dev/null +++ b/modules/common/utilities/git.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: +let + home-packages = config.home-manager.users.${config.user}.home.packages; +in +{ + options = { + gitName = lib.mkOption { + type = lib.types.str; + description = "Name to use for git commits"; + }; + gitEmail = lib.mkOption { + type = lib.types.str; + description = "Email to use for git commits"; + }; + }; + config = { + home-manager.users.root.programs.git = { + enable = true; + }; + home-manager.users.${config.user} = { + programs.git = { + enable = true; + userName = config.gitName; + userEmail = config.gitEmail; + }; + }; + }; +} \ No newline at end of file