diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 394684e70..fd8dafb43 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -48,6 +48,7 @@ sane.programs.eg25-control.enableFor.user.colin = true; sane.programs.dino.config.autostart = true; + # sane.programs.calls.config.autostart = true; # sane.programs.firefox.mime.priority = 300; # prefer other browsers when possible # HACK/TODO: make `programs.P.env.VAR` behave according to `mime.priority` diff --git a/hosts/common/programs/calls.nix b/hosts/common/programs/calls.nix index deec1daf4..e6f3e224e 100644 --- a/hosts/common/programs/calls.nix +++ b/hosts/common/programs/calls.nix @@ -20,6 +20,16 @@ let in { sane.programs.calls = { + configOption = with lib; mkOption { + default = {}; + type = types.submodule { + options.autostart = mkOption { + type = types.bool; + default = false; + }; + }; + }; + persist.private = [ # ".cache/folks" # contact avatars? # ".config/calls" @@ -32,13 +42,14 @@ in ]; services.gnome-calls = { + # TODO: prevent gnome-calls from daemonizing when started manually description = "gnome-calls daemon to monitor incoming SIP calls"; - wantedBy = [ "default.target" ]; + wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ]; serviceConfig = { # add --verbose for more debugging ExecStart = "${cfg.package}/bin/gnome-calls --daemon"; Type = "simple"; - Restart = "on-failure"; + Restart = "always"; RestartSec = "10s"; }; environment.G_MESSAGES_DEBUG = "all";