1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/modules/services/networking/keybase.nix
Calum MacRae abe0da425b kbfs service: init (#25610)
* kbfs service: init
2017-05-22 08:14:12 +08:00

41 lines
678 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.keybase;
in {
###### interface
options = {
services.keybase = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to start the Keybase service.";
};
};
};
###### implementation
config = mkIf cfg.enable {
systemd.user.services.keybase = {
description = "Keybase service";
serviceConfig = {
ExecStart = ''
${pkgs.keybase}/bin/keybase service
'';
Restart = "on-failure";
PrivateTmp = true;
};
};
environment.systemPackages = [ pkgs.keybase ];
};
}