diff options
author | Calum MacRae <calum0macrae@gmail.com> | 2017-05-22 01:14:12 +0100 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2017-05-22 08:14:12 +0800 |
commit | abe0da425bb887df59c6b29aacf1a664b7cd646c (patch) | |
tree | 6dc7bbe37e21f243978f9251420ac1de4f398791 /nixos/modules/services/networking/keybase.nix | |
parent | 4e88906f41f77c8a716dff2e4da1b2b3b0c29fd3 (diff) | |
download | nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar.gz nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar.bz2 nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar.lz nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar.xz nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.tar.zst nixlib-abe0da425bb887df59c6b29aacf1a664b7cd646c.zip |
kbfs service: init (#25610)
* kbfs service: init
Diffstat (limited to 'nixos/modules/services/networking/keybase.nix')
-rw-r--r-- | nixos/modules/services/networking/keybase.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/keybase.nix b/nixos/modules/services/networking/keybase.nix new file mode 100644 index 000000000000..ca5c279ac6f0 --- /dev/null +++ b/nixos/modules/services/networking/keybase.nix @@ -0,0 +1,40 @@ +{ 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 ]; + }; +} |