From 9418588fede5d85b677da9f8d71bd1933e1366b8 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Fri, 29 Nov 2024 01:12:43 -0600 Subject: [PATCH] modularize accounts --- home/modules/accounts.nix | 22 +++++++++++++++++++ home/modules/terminal/default.nix | 12 +--------- .../fabian@posixlycorrect/default.nix | 1 + 3 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 home/modules/accounts.nix diff --git a/home/modules/accounts.nix b/home/modules/accounts.nix new file mode 100644 index 0000000..3ce1fbe --- /dev/null +++ b/home/modules/accounts.nix @@ -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"; + }; + }; + }; +} diff --git a/home/modules/terminal/default.nix b/home/modules/terminal/default.nix index 693be1e..05273d7 100644 --- a/home/modules/terminal/default.nix +++ b/home/modules/terminal/default.nix @@ -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"; - }; - }; }; } diff --git a/home/platforms/fabian@posixlycorrect/default.nix b/home/platforms/fabian@posixlycorrect/default.nix index 2a14e08..16f0302 100644 --- a/home/platforms/fabian@posixlycorrect/default.nix +++ b/home/platforms/fabian@posixlycorrect/default.nix @@ -45,6 +45,7 @@ local.services = { zsh.enable = true; + accounts.enable = true; gpg = { enalbe = true; defaultKey = "7AA277E604A4173916BBB4E91FFAC35E1798174F";