Files
vmimages/home-manager/global/keybase.nix
2023-03-08 18:00:18 +00:00

39 lines
852 B
Nix

{ config, pkgs, inputs, lib, util, hostName, ... }:
with lib;
with lib.my;
let
cfg = config.custom.keybase;
username = config.home.username;
secretstore = config._secretstore;
# host = config.networking.hostName;
in {
# imports = [
# "${inputs.self}/lib/hm_secrets.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 = hm_secrets "${secretstore}/user_dotfiles/${username}@${hostName}/keybase/" "${config.xdg.configHome}/keybase/";
};
};
}