mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2025-12-12 12:33:25 -05:00
Switched To A New/Modified Structure
Based heavily on https://github.com/nmasur/dotfiles
This commit is contained in:
parent
634a129840
commit
99a16590b3
25 changed files with 495 additions and 703 deletions
6
modules/common/utilities/default.nix
Normal file
6
modules/common/utilities/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
];
|
||||
}
|
||||
28
modules/common/utilities/git.nix
Normal file
28
modules/common/utilities/git.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue