home-manager/modules/services/keybase.nix

33 lines
639 B
Nix
Raw Normal View History

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