diff --git a/modules/services/borgmatic.nix b/modules/services/borgmatic.nix index c5dedc3..277acd8 100644 --- a/modules/services/borgmatic.nix +++ b/modules/services/borgmatic.nix @@ -1,19 +1,23 @@ { flake.modules.homeManager.borgmatic = { config + , osConfig , pkgs + , lib , ... }: let - hostname = config.networking.hostname; + hostname = osConfig.networking.hostName; username = config.home.username; in { home.packages = with pkgs; [ libnotify + borgmatic ]; programs.borgmatic = { + enable = true; backups.default = { location = { repositories = [ @@ -25,6 +29,7 @@ excludeHomeManagerSymlinks = true; patterns = [ #TODO: home.homeDirectory might be usable here + #TODO: should be user and machine specific "R /home/${username}/Documents" "R /home/${username}/.ssh" "- /home/${username}/Documents/SteamLibrary" @@ -50,6 +55,8 @@ }; }; + #TODO: there is a services.borgmatic + systemd.user.services.borgmatic = { Unit.Description = "Create a backup using borgmatic"; Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats";