From 2dff9d2b61244fed49136028d0e0f6ae3ae759cf Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 16 Jan 2025 00:13:06 -0800 Subject: modules about done --- nix/modules/home/secrets.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'nix/modules/home/secrets.nix') diff --git a/nix/modules/home/secrets.nix b/nix/modules/home/secrets.nix index 64eab73..d24129c 100644 --- a/nix/modules/home/secrets.nix +++ b/nix/modules/home/secrets.nix @@ -1,19 +1,18 @@ -{ lib, config, pkgs, inputs, ... }: +{ config, ... }: { - imports = [ - ../vars.nix - ]; - - options = { - secrets.enable = lib.mkEnableOption "enables encrypted secrets on system"; + defaultSopsFile = ../../secrets/secrets.yaml; + age = { + keyFile = "/home/${config.vars.userName}/.ssh/keys.txt"; }; - - config = lib.mkIf config.secrets.enable { - home-manager = { - sharedModules = [ - inputs.sops-nix.homeManagerModules.sops - ]; - users."${user.user}" = {}; - }; + secrets.mail = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/mail"; }; + secrets.digikey = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/digikey"; + }; + + defaultSymlinkPath = "/run/user/1000/secrets"; + defaultSecretsMountPoint = "/run/user/1000/secrets.d"; } -- cgit