diff --git a/README.md b/README.md index aabc59b6..09a4a5d6 100644 --- a/README.md +++ b/README.md @@ -1789,9 +1789,8 @@ Types: - pubKey (`str`): Public key of the cache server. - token (`str`): The name of the environment variable that contains the token to push the cache. - - type: (`enum [cachix | attic]`): Binary cache type. - Can be [Cachix](https://docs.cachix.org/) - or [Attic](https://docs.attic.rs/introduction.html). + - type: (`enum [cachix]`): Binary cache type. + Can be [Cachix](https://docs.cachix.org/). - url (`str`): URL of the cache. - write (`bool`): Enable pushing derivations to the cache. Requires `token`. @@ -1811,14 +1810,6 @@ Example `makes.nix`: cache = { readNixos = true; extra = { - local = { - enable = true; - pubKey = "local:nKOS5sOc0MKPoBJZmY4qWjbcXvoJFaO2S/zN6aUztII="; - token = "ATTIC_AUTH_TOKEN"; - type = "attic"; - url = "http://192.168.1.8:8085/local?priority=1"; - write = true; - }; main = { enable = true; pubKey = "makes.cachix.org-1:zO7UjWLTRR8Vfzkgsu1PESjmb6ymy1e4OE9YfMmCQR4="; diff --git a/makes/cli/env/runtime/main.nix b/makes/cli/env/runtime/main.nix index 113f95f1..c791fa78 100644 --- a/makes/cli/env/runtime/main.nix +++ b/makes/cli/env/runtime/main.nix @@ -12,7 +12,6 @@ makeSearchPaths { __nixpkgs__.gzip __nixpkgs__.nixStable __nixpkgs__.openssh - # it is necessary to inject the attic client ]; source = [ outputs."/cli/env/runtime/pypi" diff --git a/src/cli/main/cli.py b/src/cli/main/cli.py index 94bea290..11661c20 100644 --- a/src/cli/main/cli.py +++ b/src/cli/main/cli.py @@ -264,41 +264,6 @@ def _clone_src_cache_refresh(head: str, cache_key: str) -> None: shutil.copytree(head, cached) -def _attic_login(caches: List[Dict[str, Any]]) -> None: - for config in caches: - if config["type"] == "attic" and config["token"] in environ: - _run( - args=[ - "attic", - "login", - "local", - config["url"], - environ[config["token"]], - ], - stderr=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - ) - _run( - args=[ - "attic", - "cache", - "create", - config["name"], - ], - stderr=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - ) - _run( - args=[ - "attic", - "use", - config["name"], - ], - stderr=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - ) - - def _nix_build( *, attr: str, @@ -312,7 +277,6 @@ def _nix_build( "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ) else: - _attic_login(cache) substituters = " ".join( [ item["url"] @@ -704,39 +668,6 @@ def cache_push(cache: List[Dict[str, str]], out: str) -> None: stderr=None, stdout=sys.stderr.fileno(), ) - elif config["type"] == "attic": - _run( - args=[ - "attic", - "login", - "local", - config["url"], - environ[config["token"]], - ], - stderr=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - ) - _run( - args=[ - "attic", - "cache", - "create", - config["name"], - ], - stderr=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - ) - _run( - args=[ - "attic", - "push", - "--ignore-upstream-cache-filter", - config["name"], - out, - ], - stderr=sys.stderr.fileno(), - stdout=sys.stderr.fileno(), - ) def _get_sys_id() -> str: