1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/modules/services/keybase.nix
Austin Horstman 03fdb31290
treewide: add missing package options (#7575)
Add options to support more flexible module configurations.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-29 12:20:22 -05:00

38 lines
700 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.keybase;
in
{
options.services.keybase = {
enable = lib.mkEnableOption "Keybase";
package = lib.mkPackageOption pkgs "keybase" { };
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.keybase" pkgs lib.platforms.linux)
];
home.packages = [ cfg.package ];
systemd.user.services.keybase = {
Unit.Description = "Keybase service";
Service = {
ExecStart = "${lib.getExe cfg.package} service --auto-forked";
Restart = "on-failure";
PrivateTmp = true;
};
Install.WantedBy = [ "default.target" ];
};
};
}