Closed jluttine closed 2 years ago
I see that you appear to be using an alternate worktree? or perhaps are trying to? The passwords are at /etc/nixos/passwords. The encryption will happen for the passwords/ directory relative to the work tree. Can you share the output of:
yadm gitconfig --get core.worktree
$ yadm gitconfig --get core.worktree
**WARNING**
Legacy paths have been detected.
With version 3.0.0, yadm uses the XDG Base Directory Specification
to find its configurations and data. Read more about these changes here:
https://yadm.io/docs/upgrade_from_2
https://yadm.io/docs/upgrade_from_1
In your environment, the data directory has been resolved to:
/home/jluttine/.local/share/yadm
To remove this warning do one of the following:
* Run "yadm upgrade" to move the yadm data to the new paths. (RECOMMENDED)
* Manually move yadm data to new default paths and reinit any submodules.
* Specify your preferred paths with --yadm-data and --yadm-archive each execution.
Legacy paths detected:
* /home/jluttine/.config/yadm/repo.git
* /home/jluttine/.config/yadm/files.gpg
***********
ERROR: Git repo does not exist. did you forget to run 'init' or 'clone'?
Or did you mean:
$ yadm --yadm-dir /etc/nixos/.yadm/config --yadm-data /etc/nixos/.yadm/data gitconfig --get core.worktree
fatal: not a git repository: '/etc/nixos/.yadm/data/repo.git'
Ok, repo.git
seems to be in the wrong place... I moved it from /etc/nixos/.yadm/repo.git
to /etc/nixos/.yadm/data/repo.git
, and now the encrypt command seems to do the right thing:
$ yadm --yadm-dir /etc/nixos/.yadm/config --yadm-data /etc/nixos/.yadm/data encrypt
Encrypting the following files:
passwords/ddclient-account.nix
passwords/default.nix##hostname.leevi
passwords/default.nix##hostname.martta
passwords/default.nix##hostname.nipsu
passwords/radicale-passwords
A really weird that the symptom of having repo.git
in the wrong place was not an error message but that only some of the files were going to be encrypted..
Also, I don't know why repo.git
was in the wrong place. Probably I've tried to manually put things in right places after upgrading yadm but got that wrong..
By the way, it would be nice if yadm worked similarly to git: It searches for .yadm
directory in the current directory and then its parent directories (recursively) until it finds .yadm
directory. Then, it would use that directory by default. If not found, then it would default to using the home directory locations. Now I need to always give those --yadm-dir
and --yadm-data
options which makes using yadm quite painful in practice.. I could of course define an alias.
Anyway, thanks for the help!
Describe the bug
Some of the files that are supposed to be encrypted aren't encrypted.
To reproduce
Not sure how to reproduce this in general - I can think about it if needed - but here's what happens on my machine:
Expected behavior
The list of encrypted files should have included also
passwords/ddclient-account.nix
andpasswords/radicale-passwords
.Most likely I'm just missing something obvious..
Environment