Refactor codebase to use nix modules
This commit is contained in:
parent
a4735423b4
commit
ffada2703c
114 changed files with 1018 additions and 744 deletions
19
hmModules/apps/git/default.nix
Normal file
19
hmModules/apps/git/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.git = {
|
||||
enable = lib.mkEnableOption "Enables git";
|
||||
username = lib.mkOption { default = config.home.username; };
|
||||
email = lib.mkOption {
|
||||
default = "git@" + config.home.username + ".com";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.git.username;
|
||||
userEmail = config.git.email;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue