From b084f65130ce5f4a2f78ed068b07025c656620bb Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 7 Jul 2024 13:20:16 -0400 Subject: [PATCH] aly: move secrets to home-manager config --- homes/aly/mail/default.nix | 10 +++++++--- nixosModules/users/aly/default.nix | 11 ----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/homes/aly/mail/default.nix b/homes/aly/mail/default.nix index cda22bea..0435bc22 100644 --- a/homes/aly/mail/default.nix +++ b/homes/aly/mail/default.nix @@ -1,19 +1,23 @@ { config, lib, - osConfig, pkgs, ... }: let mkPassword = secret: "${lib.getExe' pkgs.coreutils "cat"} ${secret}"; in { + age.secrets = { + achacegaGmail.file = ../../../secrets/mail/achacega_gmail.age; + alyraffaufFastmail.file = ../../../secrets/mail/alyraffauf_fastmail.age; + }; + accounts.email.accounts = { "alyraffauf@fastmail.com" = { address = "alyraffauf@fastmail.com"; aliases = ["aly@raffauflabs.com"]; flavor = "fastmail.com"; himalaya.enable = true; - passwordCommand = mkPassword osConfig.age.secrets.alyraffaufFastmail.path; + passwordCommand = mkPassword config.age.secrets.alyraffaufFastmail.path; primary = true; realName = "Aly Raffauf"; @@ -41,7 +45,7 @@ in { aliases = ["alyraffauf@gmail.com"]; flavor = "gmail.com"; himalaya.enable = true; - passwordCommand = mkPassword osConfig.age.secrets.achacegaGmail.path; + passwordCommand = mkPassword config.age.secrets.achacegaGmail.path; realName = "Aly Raffauf"; signature = { diff --git a/nixosModules/users/aly/default.nix b/nixosModules/users/aly/default.nix index 90ed823d..3859d931 100644 --- a/nixosModules/users/aly/default.nix +++ b/nixosModules/users/aly/default.nix @@ -5,17 +5,6 @@ ... }: { config = lib.mkIf config.ar.users.aly.enable { - age.secrets = { - alyraffaufFastmail = { - file = ../../../secrets/mail/alyraffauf_fastmail.age; - owner = "aly"; - }; - achacegaGmail = { - file = ../../../secrets/mail/achacega_gmail.age; - owner = "aly"; - }; - }; - home-manager.users.aly = lib.attrsets.optionalAttrs config.ar.users.aly.manageHome