1
Fork 0
satellite/home/features/cli/productivity/smos/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
let workflowDir = "${config.home.homeDirectory}/productivity/smos";
in
{
sops.secrets.smos_password.sopsFile = ./secrets.yaml;
2024-01-31 20:03:00 +01:00
# {{{ Smos config
2023-09-05 19:59:37 +02:00
programs.smos = {
inherit workflowDir;
2023-09-05 19:59:37 +02:00
enable = true;
2023-12-12 14:32:06 +01:00
notify.enable = true;
2023-09-05 19:59:37 +02:00
sync = {
enable = true;
server-url = "api.smos.moonythm.dev";
username = "prescientmoon";
password-file = config.sops.secrets.smos_password.path;
};
2023-09-05 19:59:37 +02:00
github = {
enable = true;
2024-01-31 20:03:00 +01:00
oauth-token-file = config.sops.secrets.smos_github_token.path;
2023-09-05 19:59:37 +02:00
};
};
2024-01-31 20:03:00 +01:00
# }}}
# {{{ Storage & secrets
2023-09-05 19:59:37 +02:00
satellite.persistence.at.data.apps.smos.directories = [
config.programs.smos.workflowDir
];
2024-01-31 20:03:00 +01:00
sops.secrets.smos_github_token = {
sopsFile = ../secrets.yaml;
2023-09-05 19:59:37 +02:00
path = "${config.xdg.dataHome}/smos/.github_token";
};
2024-01-31 20:03:00 +01:00
# }}}
# {{{ Add desktop entry
home.packages =
# Start smos with a custom class so our WM can move it to the correct workspace
let smosgui = pkgs.writeShellScriptBin "smosgui" ''
wezterm start --class "org.wezfurlong.wezterm.smos" --cwd ${workflowDir} smos
'';
in
[ smosgui ];
xdg.desktopEntries.smosgui = {
name = "Smos GUI";
type = "Application";
exec = "smosgui";
terminal = false;
};
2024-01-31 20:03:00 +01:00
# }}}
2023-09-05 19:59:37 +02:00
}