feat(modules): Write home.me module
This commit is contained in:
parent
90ca5c22d2
commit
dd3ac891d1
2 changed files with 67 additions and 6 deletions
17
flake.nix
17
flake.nix
|
@ -19,12 +19,17 @@
|
|||
homeModules.marley =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.rose-pine.homeManagerModules.rose-pine
|
||||
"${self}/modules/home/iconTheme.nix"
|
||||
"${self}/modules/home/shellAbbrs.nix"
|
||||
"${self}/home"
|
||||
];
|
||||
imports =
|
||||
let
|
||||
myHomeMods = "${self}/modules/home";
|
||||
in
|
||||
[
|
||||
inputs.rose-pine.homeManagerModules.rose-pine
|
||||
"${myHomeMods}/iconTheme.nix"
|
||||
"${myHomeMods}/me.nix"
|
||||
"${myHomeMods}/shellAbbrs.nix"
|
||||
"${self}/home"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
56
modules/home/me.nix
Normal file
56
modules/home/me.nix
Normal 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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue