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
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
21 lines
498 B
Python
Executable File
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)
|