fixed password update command
This commit is contained in:
parent
bd7e575868
commit
4515bab713
|
@ -32,9 +32,10 @@
|
||||||
- Look into this for home assistant configuration https://nixos.wiki/wiki/Home_Assistant https://myme.no/posts/2021-11-25-nixos-home-assistant.html
|
- Look into this for home assistant configuration https://nixos.wiki/wiki/Home_Assistant https://myme.no/posts/2021-11-25-nixos-home-assistant.html
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
updating passwords: `sops secrets/secrets.yaml`
|
|
||||||
set up git configuration for local development: `git config --local include.path .gitconfig`
|
set up git configuration for local development: `git config --local include.path .gitconfig`
|
||||||
|
|
||||||
|
to update passwords run: `nix shell nixpkgs#sops -c sops secrets/user-passwords.yaml` (NOTE: this depends on the SOPS_AGE_KEY_DIRECTORY environment variable being set)
|
||||||
|
|
||||||
# Tasks:
|
# Tasks:
|
||||||
|
|
||||||
## Tech Debt
|
## Tech Debt
|
||||||
|
|
|
@ -127,8 +127,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = rec {
|
environment.sessionVariables = rec {
|
||||||
AGE_KEY_DIRECTORY = "/var/lib/sops-nix";
|
SOPS_AGE_KEY_DIRECTORY = "/var/lib/sops-nix";
|
||||||
AGE_KEY_FILE = "${AGE_KEY_DIRECTORY}/key.txt";
|
SOPS_AGE_KEY_FILE = "${SOPS_AGE_KEY_DIRECTORY}/key.txt";
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
|
|
|
@ -47,8 +47,8 @@ cleanup() {
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# copy key file to temp folder to copy over to target
|
# copy key file to temp folder to copy over to target
|
||||||
mkdir -p $temp$AGE_KEY_DIRECTORY
|
mkdir -p $temp$SOPS_AGE_KEY_DIRECTORY
|
||||||
cp -r $AGE_KEY_DIRECTORY/* $temp$AGE_KEY_DIRECTORY
|
cp -r $SOPS_AGE_KEY_DIRECTORY/* $temp$SOPS_AGE_KEY_DIRECTORY
|
||||||
|
|
||||||
# commit number in this is because the main branch of nixos-anywhere is broken right now
|
# commit number in this is because the main branch of nixos-anywhere is broken right now
|
||||||
nix run github:nix-community/nixos-anywhere/b3b6bfebba35d55fba485ceda588984dec74c54f -- --extra-files $temp --flake ".#$flake" ${user:-nixos}@$target
|
nix run github:nix-community/nixos-anywhere/b3b6bfebba35d55fba485ceda588984dec74c54f -- --extra-files $temp --flake ".#$flake" ${user:-nixos}@$target
|
||||||
|
|
Loading…
Reference in a new issue