1
1
Fork 0
nixos/options/custom/programs/onedrive.nix
Myned ab485dec35
nix: format with alejandra
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:50:53 -05:00

32 lines
878 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.programs.onedrive;
in {
options.custom.programs.onedrive.enable = mkOption {default = false;};
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
home.file = {
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#configuration
".config/onedrive/config".text = ''
sync_dir = "~/SYNC/edu/hawkeye"
'';
# https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-selective-sync-via-sync_list-file
".config/onedrive/sync_list".text = ''
!/Apps/
!/Attachments/
/*
'';
};
};
}