TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.91k stars 176 forks source link

Encrypt in root system #442

Closed mnzsss closed 1 year ago

mnzsss commented 1 year ago

This question is about

Describe your question

I follow this issue for manage my system configs but i can't encrypt .ssh files inside /etc folder.

Setup:

# create an alias to run yadm for system files
alias sysyadm="sudo yadm -Y /etc/yadm"

# initialize the yadm repo using the worktree of "/"
sysyadm init -w /

Try run command for move .ssh folder to /etc/yadm/encrypt

❯ sudo echo '.ssh/' > /etc/yadm/encrypt
-> permission denied: /etc/yadm/encrypt

Has any alternative for that?

Obs.: I need control my system configs. For exemple the pacman.conf

Thaodan commented 1 year ago

You have to run yadm as root, use separate variants of yadm.

mnzsss commented 1 year ago

You have to run yadm as root, use separate variants of yadm.

I thought that had a way I use this command as root when I run yadm encrypt but I found't nothing about that. So I solved my point using:

# Login as root
$ sudo -i
$ echo '.ssh/' > /etc/yadm/encrypt
# Leave root
$ exit

# Add encrypt in my tracked files
$ sysyadm add /etc/yadm/encrypt

Following the Yadm docs, but here don't show how I encrypt using /etc/yadm as repository.