fractal: launch on boot
This commit is contained in:
parent
bbdc6f3aa9
commit
2de6c01262
|
@ -1,10 +1,23 @@
|
||||||
{ pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.fractal;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sane.programs.fractal = {
|
sane.programs.fractal = {
|
||||||
package = pkgs.fractal-nixified;
|
package = pkgs.fractal-nixified;
|
||||||
# package = pkgs.fractal-latest;
|
# package = pkgs.fractal-latest;
|
||||||
# package = pkgs.fractal-next;
|
# package = pkgs.fractal-next;
|
||||||
|
|
||||||
|
configOption = with lib; mkOption {
|
||||||
|
default = {};
|
||||||
|
type = types.submodule {
|
||||||
|
options.autostart = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
persist.private = [
|
persist.private = [
|
||||||
# XXX by default fractal stores its state in ~/.local/share/<build-profile>/<UUID>.
|
# XXX by default fractal stores its state in ~/.local/share/<build-profile>/<UUID>.
|
||||||
".local/share/hack" # for debug-like builds
|
".local/share/hack" # for debug-like builds
|
||||||
|
@ -12,5 +25,17 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
suggestedPrograms = [ "gnome-keyring" ];
|
suggestedPrograms = [ "gnome-keyring" ];
|
||||||
|
|
||||||
|
services.fractal = {
|
||||||
|
description = "auto-start and maintain fractal Matrix connection";
|
||||||
|
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${cfg.package}/bin/fractal";
|
||||||
|
Type = "simple";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "20s";
|
||||||
|
};
|
||||||
|
# environment.G_MESSAGES_DEBUG = "all";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,10 +322,17 @@ in
|
||||||
] ++ lib.optionals config.sane.programs.dino.config.autostart [
|
] ++ lib.optionals config.sane.programs.dino.config.autostart [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "jingle"; # XMPP calls
|
label = "XMPP"; # XMPP calls (jingle)
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user dino";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user dino";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user dino";
|
active = "${pkgs.systemd}/bin/systemctl is-active --user dino";
|
||||||
}
|
}
|
||||||
|
] ++ lib.optionals config.sane.programs.fractal.config.autostart [
|
||||||
|
{
|
||||||
|
type = "toggle";
|
||||||
|
label = "Matrix"; # Matrix messages
|
||||||
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user fractal";
|
||||||
|
active = "${pkgs.systemd}/bin/systemctl is-active --user fractal";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
dnd = {
|
dnd = {
|
||||||
|
|
|
@ -145,6 +145,7 @@ for_window [title="megapixels"] inhibit_idle open
|
||||||
# Dino (XMPP) is ordinarily started for the purpose of daemonizing (but still visible). keep it on a predictable, out-of-the-way workspace
|
# Dino (XMPP) is ordinarily started for the purpose of daemonizing (but still visible). keep it on a predictable, out-of-the-way workspace
|
||||||
# TODO: could be neat to somehow do this in a way that it never steals focus from anything...
|
# TODO: could be neat to somehow do this in a way that it never steals focus from anything...
|
||||||
for_window [app_id="im.dino.Dino"] move container to workspace number 1
|
for_window [app_id="im.dino.Dino"] move container to workspace number 1
|
||||||
|
for_window [app_id="org.gnome.Fractal"] move container to workspace number 1
|
||||||
|
|
||||||
### displays
|
### displays
|
||||||
## DESKTOP
|
## DESKTOP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user