Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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=";
Expand Down
1 change: 0 additions & 1 deletion makes/cli/env/runtime/main.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
69 changes: 0 additions & 69 deletions src/cli/main/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -312,7 +277,6 @@ def _nix_build(
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
)
else:
_attic_login(cache)
substituters = " ".join(
[
item["url"]
Expand Down Expand Up @@ -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:
Expand Down