Credentials
The authentication credentials are managed using sops-nix at secrets.
The sops encrypted secrets (using GPG) are stored at multiple places, like in this directory, as well as passwords.
User passwords are generated using mkpasswd -m sha-512 and specified using the hashedPasswordFile option.
The sops encrypted secrets are of binary format (and have the extension .secret) and can be conveniently managed using the os secret command.
The keys directory contains the public User GPG Keys which are automatically imported
To create a secret, use the os secret create command, and append the directory along with requisite access permissions to the secrets.yaml file.
Device-specific secrets are automatically imported, if a directory (with the same name as the device HOSTNAME) containing them is present in this directory
Note
Any update to a
creation_ruleinsecrets.yamlmust be accompanied by anos secret updateto re-encrypt for the new key set
Per-User Secrets
Secrets scoped to a single user (decrypted at login using their personal GPG Key) are stored under user in a directory named after their username.
Important
Do not forget to import the
homeManager.secretsmodule in the user configuration