8 cfg = config.services.keybase;
18 enable = lib.mkOption {
19 type = lib.types.bool;
21 description = "Whether to start the Keybase service.";
29 config = lib.mkIf cfg.enable {
31 # Upstream: https://github.com/keybase/client/blob/master/packaging/linux/systemd/keybase.service
32 systemd.user.services.keybase = {
33 description = "Keybase service";
34 unitConfig.ConditionUser = "!@system";
35 environment.KEYBASE_SERVICE_TYPE = "systemd";
39 "-%E/keybase/keybase.autogen.env"
40 "-%E/keybase/keybase.env"
42 ExecStart = "${pkgs.keybase}/bin/keybase service";
43 Restart = "on-failure";
46 wantedBy = [ "default.target" ];
49 environment.systemPackages = [ pkgs.keybase ];