{"action":"created","issue":{"url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/16","repository_url":"https://api.github.com/repos/TheLocehiliosan/yadm","labels_url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/16/comments","events_url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/16/events","html_url":"https://github.com/TheLocehiliosan/yadm/issues/16","id":169394873,"number":16,"title":"Can yadm implement an include mechanism for config files?","user":{"login":"infokiller","id":10516814,"avatar_url":"https://avatars.githubusercontent.com/u/10516814?v=3","gravatar_id":"","url":"https://api.github.com/users/infokiller","html_url":"https://github.com/infokiller","followers_url":"https://api.github.com/users/infokiller/followers","following_url":"https://api.github.com/users/infokiller/following{/other_user}","gists_url":"https://api.github.com/users/infokiller/gists{/gist_id}","starred_url":"https://api.github.com/users/infokiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infokiller/subscriptions","organizations_url":"https://api.github.com/users/infokiller/orgs","repos_url":"https://api.github.com/users/infokiller/repos","events_url":"https://api.github.com/users/infokiller/events{/privacy}","received_events_url":"https://api.github.com/users/infokiller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TheLocehiliosan/yadm/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-04T14:55:30Z","updated_at":"2016-08-04T20:30:28Z","closed_at":null,"body":"Sorry if was already covered in the docs - I went over the README and didn't understand this.\r\n\r\n## Background\r\n\r\nThere are programs like `i3` that neither have an include mechanism, nor allow you to do the configuration based on the host/os (there's no if/else logic). In addition, it's sometimes undesirable to put all the config in the same file. For example, I can't put work related configuration in the same files because it might be confidential, but I want to share my dotfiles on github. This means that files must be split to multiple repos.\r\nDoes yadm support this use case? let's use i3 configuration as an example. Ideally, I'd be able to work with the following files:\r\n\r\n*  `.i3config` - my regular i3 config with common stuff, stored in one repo/branch.\r\n* `.i3config_work` - an i3 config file specific to my work, stored in another repo/branch.\r\n\r\nIs it possible to have yadm concatenate these files for me automatically, based, for example, on the hostname?\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/comments/237673991","html_url":"https://github.com/TheLocehiliosan/yadm/issues/16#issuecomment-237673991","issue_url":"https://api.github.com/repos/TheLocehiliosan/yadm/issues/16","id":237673991,"user":{"login":"TheLocehiliosan","id":1503609,"avatar_url":"https://avatars.githubusercontent.com/u/1503609?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLocehiliosan","html_url":"https://github.com/TheLocehiliosan","followers_url":"https://api.github.com/users/TheLocehiliosan/followers","following_url":"https://api.github.com/users/TheLocehiliosan/following{/other_user}","gists_url":"https://api.github.com/users/TheLocehiliosan/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLocehiliosan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLocehiliosan/subscriptions","organizations_url":"https://api.github.com/users/TheLocehiliosan/orgs","repos_url":"https://api.github.com/users/TheLocehiliosan/repos","events_url":"https://api.github.com/users/TheLocehiliosan/events{/privacy}","received_events_url":"https://api.github.com/users/TheLocehiliosan/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T20:30:28Z","updated_at":"2016-08-04T20:30:28Z","body":"**yadm** only operates on files that either exist in its repository, or are in the encrypted archive it uses (the encrypted can also be part of the repository).\r\n\r\n**yadm** does not support mixing data from multiple repos.\r\n\r\nInitially I thought that you could use **yadm**'s alternate file symlinks, and put the confidential version in the encrypted file archive. However, I just looked at it a bit closer, and alternates are only processed for files which exist in the repository. I think it would be relatively easy to update the alternates processing to also include encrypted files. If I made that change, you could probably do the following:\r\n\r\n`.yadm/encrypt` contains:\r\n```\r\npath/i3config##Linux.workhost\r\n```\r\n\r\nAdd your normal i3config with the name `path/i3config##` (this is added to the **yadm** repo)\r\n\r\nAdd your work i3config with the name `path/i3config##Linux.workhost` (this gets encrypted using `yadm encrypt`)\r\n\r\nIn this way, `yadm decrypt` would extract your \"work version\" from the encrypted archive. **yadm** would also have your default version from what is maintained in the repository. And **yadm**'s alternates system would symlink `path/i3config` to the appropriate and available version.\r\n\r\nAgain, this strategy will not work with **yadm** as it is today because the `Linux.workhost` version would not be considered by the alternates system.\r\n\r\nI'm sorry if this answer is very confusing. I'm trying hard to be clear. Would this type of change be useful for your use case?\r\n\r\nIf you truly want to maintain these files in multiple repos, perhaps a tool like [vcsh](https://github.com/RichiH/vcsh) could fit your needs?\r\n"}}
{"actor":{"display_login":"TheLocehiliosan"}}