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

61 lines
1.4 KiB
Nix
Raw Normal View History

2024-08-05 20:31:34 +02:00
{
config,
pkgs,
inputs,
...
}:
let
workflowDir = "${config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}/stellar-sanctum/smos";
in
{
2024-02-12 19:07:12 +01:00
sops.secrets.smos_password.sopsFile = ../secrets.yaml;
2024-08-05 20:31:34 +02:00
# {{{ Smos config
2023-09-05 19:59:37 +02:00
programs.smos = {
inherit workflowDir;
2024-07-26 20:18:26 +02:00
# We don't want to use the statically-linked binary, as it requires pulling-in ghc-musl.
smosReleasePackages = inputs.smos.packages.${pkgs.system}.default;
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-04-01 05:57:56 +02:00
calendar.enable = true;
2023-09-05 19:59:37 +02:00
};
2024-01-31 20:03:00 +01:00
# }}}
2024-08-05 20:31:34 +02:00
# {{{ Storage & secrets
satellite.persistence.at.data.apps.smos.directories = [ config.programs.smos.workflowDir ];
2023-09-05 19:59:37 +02:00
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
2024-07-06 19:32:14 +02:00
# Start smos with a custom class so our WM can move it to the correct workspace
xdg.desktopEntries.smostui = {
name = "Smos TUI";
type = "Application";
terminal = false;
2024-02-24 04:35:03 +01:00
icon = ../../../../../common/icons/smos.svg;
2024-08-05 20:31:34 +02:00
exec = builtins.toString (
pkgs.writeShellScript "smostui" ''
foot -a Smos -D ${workflowDir} smos
''
);
};
2024-01-31 20:03:00 +01:00
# }}}
2023-09-05 19:59:37 +02:00
}