Comments (5)
Interestingly manually testing by way of sudo su
also works. I copied over the prudent information from the gpg-agent process /proc/environ
[root@DovDev:/etc/nixos]# export GNUPGHOME=/var/lib/gnupg
[root@DovDev:/etc/nixos]# /nix/store/wh4g47b3l5prx25iyf9rlcl5qasjrzzf-gnupg-2.2.27/bin/gpg --list-keys
gpg: WARNING: unsafe permissions on homedir '/var/lib/gnupg'
/var/lib/gnupg/pubring.kbx
--------------------------
pub rsa3072 2022-01-04 [SC] [expires: 2024-01-04]
---snip---
from sops-nix.
Does it work, if you fix this warning?
gpg: WARNING: unsafe permissions on homedir '/var/lib/gnupg'
from sops-nix.
No:
[root@DovDev:/etc/nixos]# export GNUPGHOME=/var/lib/gnupg
[root@DovDev:/etc/nixos]# /nix/store/wh4g47b3l5prx25iyf9rlcl5qasjrzzf-gnupg-2.2.27/bin/gpg --list-keys
/var/lib/gnupg/pubring.kbx
--------------------------
---snip---
dovalperin in nixos at DovDev on main [!+?] took 12s ➜ sudo nixos-rebuild switch
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
/nix/store/cx01anlvsgf23y7m801wmwmmrm9jark4-sops-install-secrets-0.0.1/bin/sops-install-secrets: Failed to decrypt '/nix/store/kyygj6xkax7qziizh8lhlh00s69jhgbf-example.yaml': Error getting data key: 0 successful groups required, got 0
Activation script snippet 'setupSecrets' failed (1)
reloading user units for dovalperin...
setting up tmpfiles
warning: error(s) occurred while switching to the new configuration
from sops-nix.
If you run sops <yoursecret.yaml>
as root with the gpg2 executable in your $PATH, does it than works with your export GNUPGHOME=/var/lib/gnupg
?
from sops-nix.
Closing because lack of feedback. In general if you have issues with gpg, I would suggest to use age instead. GPG is not good software.
from sops-nix.
Related Issues (20)
- %r not being replaced when using the home-manager module HOT 10
- sops.secrets.<name>.path not working properly in the home-manager module HOT 15
- `sops.age.keyFile` vs `sops.age.sshKeyPaths` HOT 2
- keygroups in .sops.yaml examples
- understanding keys.txt HOT 3
- Can we avoid two nixos rebuild ? HOT 2
- Expose the values of unencrypted keys as-is HOT 5
- `sops.templates` is insecure: does not use ramfs HOT 4
- Feature Request: Detect that secret decryption depends on decrypted secret HOT 2
- Hanging on "setting up tmpfiles" (Raspberry Pi 4) HOT 6
- All secrets missing if one secret cannot be decrypted HOT 2
- Opt-in state + sops-nix? HOT 3
- Can I use sops-nix with nixos-generators? HOT 6
- restartUnits fails silently HOT 2
- Can't execute `nix-shell -p sops-init-gpg-key` HOT 1
- Why does a container failure prevent sops-nix from working? HOT 1
- QUESTION: Why is there both nixpkgs and nixpkgs-stable in flake inputs? HOT 2
- sops-nix always requests yubikey with home-manager module HOT 2
- Permissions of secrets.d generations HOT 2
- Symlinking or bind mounting encrypted ssh keys in a secret file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sops-nix.