modularize accounts

This commit is contained in:
Fabian Montero 2024-11-29 01:12:43 -06:00
parent 541f80ff91
commit 9418588fed
3 changed files with 24 additions and 11 deletions

22
home/modules/accounts.nix Normal file
View file

@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.services.accounts;
in {
options.local.services.accounts.enable = mkEnableOption "accounts settings";
config = mkIf cfg.enable {
accounts.email.accounts = {
"fabian@posixlycorrect.com" = {
address = "fabian@posixlycorrect.com";
userName = "fabianmontero@fastmail.com";
realName = "fabian";
primary = true;
flavor = "fastmail.com";
};
};
};
}

View file

@ -7,7 +7,7 @@
with lib; let
cfg = config.local.apps.terminal;
in {
options.local.apps.terminal.enable = mkEnableOption "Terminal emulator settings";
options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings";
config = mkIf cfg.enable {
programs = {
kitty = {
@ -33,15 +33,5 @@ in {
'';
};
};
accounts.email.accounts = {
"fabian@posixlycorrect.com" = {
address = "fabian@posixlycorrect.com";
userName = "fabianmontero@fastmail.com";
realName = "fabian";
primary = true;
flavor = "fastmail.com";
};
};
};
}

View file

@ -45,6 +45,7 @@
local.services = {
zsh.enable = true;
accounts.enable = true;
gpg = {
enalbe = true;
defaultKey = "7AA277E604A4173916BBB4E91FFAC35E1798174F";