mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 17:19:45 +01:00
36 lines
553 B
Nix
36 lines
553 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
|
||
|
cfg = config.services.keybase;
|
||
|
|
||
|
in
|
||
|
|
||
|
{
|
||
|
options = {
|
||
|
services.keybase = {
|
||
|
enable = mkEnableOption "Keybase";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
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" ];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|