dotfiles/modules/nixos/services/keybase.nix

35 lines
793 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }: {
2022-04-27 01:36:16 +00:00
2022-12-21 21:18:03 +00:00
options.keybase.enable = lib.mkEnableOption "Keybase.";
2022-04-27 13:23:26 +00:00
2022-12-21 21:18:03 +00:00
config = lib.mkIf config.keybase.enable {
services.keybase.enable = true;
services.kbfs = {
enable = true;
# enableRedirector = true;
mountPoint = "/run/user/1000/keybase/kbfs";
};
security.wrappers.keybase-redirector = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.kbfs}/bin/redirector";
};
2022-12-21 21:18:03 +00:00
home-manager.users.${config.user} = {
home.packages = [ (lib.mkIf config.gui.enable pkgs.keybase-gui) ];
home.file = let
ignorePatterns = ''
keybase/
kbfs/'';
in {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
};
};
};
2022-04-27 13:23:26 +00:00
2022-04-27 01:36:16 +00:00
}