diff --git a/bundles/arch-with-gui/metadata.py b/bundles/arch-with-gui/metadata.py index 852a1a2..ff82a8a 100644 --- a/bundles/arch-with-gui/metadata.py +++ b/bundles/arch-with-gui/metadata.py @@ -1,6 +1,11 @@ assert node.os == 'arch' defaults = { + 'backups': { + 'paths': { + '/etc/netctl', + }, + }, 'pacman': { 'packages': { # fonts @@ -47,3 +52,21 @@ defaults = { }, }, } + +@metadata_reactor.provides( + 'backups/paths', +) +def backup_every_user_home(metadata): + paths = set() + + for user, config in metadata.get('users', {}).items(): + if config.get('delete', False): + continue + + paths.add(config.get('home', f'/home/{user}')) + + return { + 'backups': { + 'paths': paths, + }, + }