2017-11-22 00:29:30 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.keybase;
|
|
|
|
|
2021-04-26 20:16:25 +02:00
|
|
|
in {
|
|
|
|
options.services.keybase.enable = mkEnableOption "Keybase";
|
2017-11-22 00:29:30 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-07 23:24:27 +02:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.keybase" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2018-11-28 00:21:25 +01:00
|
|
|
home.packages = [ pkgs.keybase ];
|
|
|
|
|
2017-11-22 00:29:30 +01:00
|
|
|
systemd.user.services.keybase = {
|
2021-04-26 20:16:25 +02:00
|
|
|
Unit.Description = "Keybase service";
|
2017-11-22 00:29:30 +01:00
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${pkgs.keybase}/bin/keybase service --auto-forked";
|
|
|
|
Restart = "on-failure";
|
|
|
|
PrivateTmp = true;
|
|
|
|
};
|
|
|
|
|
2021-04-26 20:16:25 +02:00
|
|
|
Install.WantedBy = [ "default.target" ];
|
2017-11-22 00:29:30 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|