{ config, pkgs, lib, inputs, hostName, outputs, ... }: with lib; with lib.my; let cfg = config.custom.keybase; username = config.home.username; secretstore = config._secretstore; in { # imports = [ # "${inputs.self}/libs/map.nix" # ]; options.custom.keybase = { enable = mkOption { type = types.bool; default = false; description = "Enable KeyBase"; }; }; config = mkIf cfg.enable { services.keybase.enable = true; services.kbfs.enable = true; systemd.user.services.keybase.Unit.After = [ "sops-nix.service" ]; systemd.user.services.kbfs.Unit.After = [ "sops-nix.service" ]; sops = { secrets = map.hm_secrets "${secretstore}/user_dotfiles/${username}@${hostName}/keybase/" "${config.xdg.configHome}/keybase/"; }; }; }