2024-09-09 00:22:14 +00:00
|
|
|
{
|
2024-09-13 01:50:53 +00:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.custom.programs.onedrive;
|
|
|
|
in {
|
|
|
|
options.custom.programs.onedrive.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
|
|
|
# https://github.com/abraunegg/onedrive
|
|
|
|
#!! Login is imperative
|
|
|
|
#?? onedrive
|
|
|
|
#?? systemctl --user enable --now onedrive@onedrive.service
|
|
|
|
|
|
|
|
#!! Option not available, files written directly
|
2024-11-17 23:27:14 +00:00
|
|
|
xdg.configFile = {
|
2024-09-09 00:22:14 +00:00
|
|
|
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#configuration
|
2024-11-17 23:27:14 +00:00
|
|
|
"onedrive/config".text = ''
|
2024-09-09 00:22:14 +00:00
|
|
|
sync_dir = "~/SYNC/edu/hawkeye"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-selective-sync-via-sync_list-file
|
2024-11-17 23:27:14 +00:00
|
|
|
"onedrive/sync_list".text = ''
|
2024-09-09 00:22:14 +00:00
|
|
|
!/Apps/
|
|
|
|
!/Attachments/
|
|
|
|
/*
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|