feat(modules): Write home.me module

This commit is contained in:
punkfairie 2024-11-13 21:00:00 -08:00
parent 90ca5c22d2
commit dd3ac891d1
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
2 changed files with 67 additions and 6 deletions

View file

@ -19,10 +19,15 @@
homeModules.marley = homeModules.marley =
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports =
let
myHomeMods = "${self}/modules/home";
in
[
inputs.rose-pine.homeManagerModules.rose-pine inputs.rose-pine.homeManagerModules.rose-pine
"${self}/modules/home/iconTheme.nix" "${myHomeMods}/iconTheme.nix"
"${self}/modules/home/shellAbbrs.nix" "${myHomeMods}/me.nix"
"${myHomeMods}/shellAbbrs.nix"
"${self}/home" "${self}/home"
]; ];
}; };

56
modules/home/me.nix Normal file
View file

@ -0,0 +1,56 @@
{ lib, ... }:
with lib;
{
options = {
home = {
me = rec {
name = mkOption {
type = types.str;
default = builtins.getEnv "HOME";
defaultText =
# nix
literalExpression ''
builtins.getEnv "HOME"
'';
description = ''
Your username, for use as your home folder and login name.
'';
};
username = mkOption {
type = types.str;
default = name;
defaultText = literalMD "{option}`home.me.name`";
description = ''
Your username, for external profiles.
'';
};
email = mkOption {
type = with types; nullOr str;
default = null;
description = ''
Your email.
'';
};
git.name = mkOption {
type = with types; nullOr str;
default = null;
description = ''
Your git committer name.
'';
};
git.email = mkOption {
type = with types; nullOr str;
default = email;
defaultText = literalMD "{option}`home.me.email`";
description = ''
Your git committer email.
'';
};
};
};
};
}