From 9f4cca6f07322cb220e8cfb3f2e4ae347c69dc1a Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Sat, 25 Jan 2025 23:17:18 -0500 Subject: [PATCH] add attic back in Signed-off-by: ahuston-0 --- flake.lock | 74 +++++++++++++++++++++++++++++++ flake.nix | 22 ++++----- systems/palatine-hill/default.nix | 2 +- utils/attic-token.bash | 2 +- 4 files changed, 88 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 06c990a..5228a3e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,57 @@ { "nodes": { + "attic": { + "inputs": { + "crane": "crane", + "flake-compat": [ + "flake-compat" + ], + "flake-parts": [ + "flake-parts" + ], + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1731270564, + "narHash": "sha256-6KMC/NH/VWP5Eb+hA56hz0urel3jP6Y6cF2PX6xaTkk=", + "owner": "zhaofengli", + "repo": "attic", + "rev": "47752427561f1c34debb16728a210d378f0ece36", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "repo": "attic", + "type": "github" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722960479, + "narHash": "sha256-NhCkJJQhD5GUib8zN9JrmYGMwt4lCRp6ZVNzIiYCl0Y=", + "owner": "ipetkov", + "repo": "crane", + "rev": "4c6c77920b8d44cd6660c1621dea6b3fc4b4c4f4", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "firefox-addons": { "inputs": { "flake-utils": [ @@ -138,6 +190,27 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729742964, + "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "e04df33f62cdcf93d73e9a04142464753a16db67", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -302,6 +375,7 @@ }, "root": { "inputs": { + "attic": "attic", "firefox-addons": "firefox-addons", "flake-compat": "flake-compat", "flake-parts": "flake-parts", diff --git a/flake.nix b/flake.nix index 0b33a2f..864b6f8 100644 --- a/flake.nix +++ b/flake.nix @@ -5,15 +5,17 @@ substituters = [ "https://cache.nixos.org/?priority=1&want-mass-query=true" "https://nix-community.cachix.org/?priority=10&want-mass-query=true" + "https://attic.alicehuston.xyz/nix-cache" ]; trusted-substituters = [ "https://cache.nixos.org" - "https://attic.alicehuston.xyz/cache-nix-dot" "https://nix-community.cachix.org" + "https://attic.alicehuston.xyz/nix-cache" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "nix-cache:trR+y5nwpQHR4hystoogubFmp97cewkjWeqqbygRQRs=" ]; trusted-users = [ "root" ]; }; @@ -27,15 +29,15 @@ nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05"; systems.url = "github:nix-systems/default"; - # attic = { - # url = "github:zhaofengli/attic"; - # inputs = { - # nixpkgs.follows = "nixpkgs"; - # nixpkgs-stable.follows = "nixpkgs-stable"; - # flake-compat.follows = "flake-compat"; - # flake-parts.follows = "flake-parts"; - # }; - # }; + attic = { + url = "github:zhaofengli/attic"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpkgs-stable.follows = "nixpkgs-stable"; + flake-compat.follows = "flake-compat"; + flake-parts.follows = "flake-parts"; + }; + }; firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; diff --git a/systems/palatine-hill/default.nix b/systems/palatine-hill/default.nix index d469ee0..fe22604 100644 --- a/systems/palatine-hill/default.nix +++ b/systems/palatine-hill/default.nix @@ -2,6 +2,6 @@ { users = [ "alice" ]; modules = [ - # inputs.attic.nixosModules.atticd + inputs.attic.nixosModules.atticd ]; } diff --git a/utils/attic-token.bash b/utils/attic-token.bash index 4b2febf..650ca5b 100755 --- a/utils/attic-token.bash +++ b/utils/attic-token.bash @@ -19,7 +19,7 @@ case $token_type in "admin") atticd-atticadm make-token --sub "$cache-admin" --validity "1y" --pull "$cache_pattern" \ --push "$cache_pattern" --configure-cache "$cache_pattern" \ - --configure-cache-pattern "$cache_pattern" + --configure-cache-retention "$cache_pattern" ;; "writer") atticd-atticadm make-token --sub "$cache-writer" --validity "1y" --pull "$cache_pattern" \