home-manager/modules/services/keybase.nix

38 lines
592 B
Nix
Raw Normal View History

2017-11-22 00:29:30 +01:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.keybase;
in
{
options = {
services.keybase = {
enable = mkEnableOption "Keybase";
};
};
config = mkIf cfg.enable {
home.packages = [ pkgs.keybase ];
2017-11-22 00:29:30 +01:00
systemd.user.services.keybase = {
Unit = {
Description = "Keybase service";
};
Service = {
ExecStart = "${pkgs.keybase}/bin/keybase service --auto-forked";
Restart = "on-failure";
PrivateTmp = true;
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
}