flake-update-diff/utils/sops-add-machine.py
ahuston-0 ef9050523d
Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 7s
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 2m36s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Failing after 2m38s
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Successful in 4m55s
migrate to uv2nix
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
2025-03-18 18:11:42 -04:00

21 lines
498 B
Python
Executable File

#!/usr/bin/env nix
#! nix shell nixpkgs#python312 nixpkgs#python312Packages.pyyaml --command python
import yaml
import pprint
with open(".sops.yaml", "r") as in_yamlfile:
cur_yaml = yaml.safe_load(in_yamlfile)
cur_yaml["keys"].append("&test testkey")
pprint.pprint(cur_yaml)
# with open('new.yaml','w') as out_yamlfile:
# yaml.safe_dump(cur_yaml, out_yamlfile)
# with open('new.yaml','r') as inn_yamlfile:
# new_yaml = yaml.safe_load(inn_yamlfile)
# assert(cur_yaml == new_yaml)