clan-cli secrets: flake_name -> flake_dir

This commit is contained in:
lassulus
2023-11-03 12:51:17 +01:00
parent fd6b5a57bd
commit efafe6f0e3
25 changed files with 584 additions and 399 deletions

View File

@@ -3,18 +3,16 @@ import shutil
from pathlib import Path
from typing import Callable
from ..dirs import specific_flake_dir
from ..errors import ClanError
from ..types import FlakeName
def get_sops_folder(flake_name: FlakeName) -> Path:
return specific_flake_dir(flake_name) / "sops"
def get_sops_folder(flake_dir: Path) -> Path:
return flake_dir / "sops"
def gen_sops_subfolder(subdir: str) -> Callable[[FlakeName], Path]:
def folder(flake_name: FlakeName) -> Path:
return specific_flake_dir(flake_name) / "sops" / subdir
def gen_sops_subfolder(subdir: str) -> Callable[[Path], Path]:
def folder(flake_dir: Path) -> Path:
return flake_dir / "sops" / subdir
return folder