dotfiles/modules/nixos/services/keybase.nix

41 lines
933 B
Nix
Raw Normal View History

2024-01-10 04:11:11 +00:00
# Keybase is an encrypted communications tool with a synchronized encrypted
# filestore that can be mounted onto a machine's filesystem.
2024-04-20 13:42:06 +00:00
{
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 {
home-manager.users.${config.user} = lib.mkIf config.keybase.enable {
services.keybase.enable = true;
services.kbfs = {
enable = true;
mountPoint = "keybase";
};
# https://github.com/nix-community/home-manager/issues/4722
systemd.user.services.kbfs.Service.PrivateTmp = lib.mkForce false;
2022-12-21 21:18:03 +00:00
home.packages = [ (lib.mkIf config.gui.enable pkgs.keybase-gui) ];
2024-04-20 13:42:06 +00:00
home.file =
let
ignorePatterns = ''
keybase/
kbfs/'';
in
{
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
};
2022-12-21 21:18:03 +00:00
};
};
2022-04-27 01:36:16 +00:00
}