New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use this to track system level files? #63
Comments
Managing files outside of your home directory isn't really within the standard use-case for yadm. yadm only manages files within the configured worktree ( However, if you wanted to bend yadm into managing system files, I could see doing something like this:
Assuming you have sudo rights, the |
Thanks! That answers my query. 👍 |
This should definitely go into the documentation. Who stores only his user dotfiles and not the system-wide ones? |
This isn’t a use I would particularly endorse, as there are generally other configuration management tools for system level configurations; Ansible, Puppet, etc. However, I have found myself using yadm to manage configs on my routers. 😬 I’ll reopen this issue, and add a version of it to the website so it is easier for others to find. |
I see your point. Still I think, more information can not harm ;-) |
This has been added to the FAQ. |
when I tried to clone to a new machine with sysyadm ... it did not replace the files . |
it cloned the repo, but didn't put the files where they suppose to be. |
@eyadsibai What clone command did you use? Did you specify the |
nope, just |
@eyadsibai - OK, Can you try using I'm going to re-open this issue, and have the FAQ updated. |
it works now thanks! |
Quick note: I had an issue where the user settings, i.e. the email and username, weren't being detected by the root version, even after setting them for just the repo and globally, and thus, I couldn't commit anything. However, I solved it by using |
For anyone curious about permissions and stuff - I had the issue that, when using sudo, I would have had to duplicate my ssh keys to the root user. alias sysyadm="yadm --yadm-dir /etc/yadm --yadm-data /etc/yadm"
alias sysinit="sysyadm init -b main -w /; sysyadm gitconfig include.path '$XDG_CONFIG_HOME/git/config'"
sy() {
unignore="/etc/yadm/unignore"
test -r "$unignore" && cat "$unignore" | envsubst | sysyadm add --intent-to-add --pathspec-from-file=-
case "$1" in
("") sysyadm status;;
(p) sysyadm push;;
(l) sysyadm fetch && sy rebase main --onto origin/main;;
(*) sudo -E $(alias sysyadm | cut -d\' -f2) "$@";;
esac
sudo chown -R $USER /etc/yadm
} |
That solution works just fine. No permission issues here. I just can't encrypt anything, otherwise, I can't boot. I didn't troubleshoot why yet, so I dropped encryption for now. Here's the repository for my system dotfiles -> https://github.com/rizzini/Dotfiles.system |
Btw, another way I use #407 (comment)
If anybody like to automate the manually copying and directory structure hassle... |
official FAQ method didn't work for me:
neither
this helped:
|
Hi,
I want to be able to track system level files, like
/etc/pacman.conf
.How does
yadm
manage permissions and ownership of such files?Thanks!
The text was updated successfully, but these errors were encountered: