1 { config, lib, pkgs, ... }:
4 cfg = config.services.keybase;
17 description = lib.mdDoc "Whether to start the Keybase service.";
25 config = mkIf cfg.enable {
27 # Upstream: https://github.com/keybase/client/blob/master/packaging/linux/systemd/keybase.service
28 systemd.user.services.keybase = {
29 description = "Keybase service";
30 unitConfig.ConditionUser = "!@system";
31 environment.KEYBASE_SERVICE_TYPE = "systemd";
35 "-%E/keybase/keybase.autogen.env"
36 "-%E/keybase/keybase.env"
38 ExecStart = "${pkgs.keybase}/bin/keybase service";
39 Restart = "on-failure";
42 wantedBy = [ "default.target" ];
45 environment.systemPackages = [ pkgs.keybase ];