From fa4d5d06abd1d6e2bff9a20cc60abc1cc2f18f29 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 5 Jan 2023 10:36:37 +0530 Subject: [PATCH] consolidate hci modules --- flake.nix | 2 +- nix-darwin/hercules.nix | 11 ----------- nixos/hercules.nix | 9 ++++----- 3 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 nix-darwin/hercules.nix diff --git a/flake.nix b/flake.nix index 551abfc..de31e69 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,7 @@ default = self.lib.mkMacosSystem { imports = [ self.darwinModules.default # Defined in nix-darwin/default.nix - ./nix-darwin/hercules.nix + ./nixos/hercules.nix ./systems/darwin.nix ]; }; diff --git a/nix-darwin/hercules.nix b/nix-darwin/hercules.nix deleted file mode 100644 index d6d0d29..0000000 --- a/nix-darwin/hercules.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, inputs, system, ... }: - -{ - # TODO: use agenix to manage - # - secrets - # - ssh keys - services.hercules-ci-agent = { - enable = true; - package = inputs.hci.packages.${system}.hercules-ci-agent; - }; -} diff --git a/nixos/hercules.nix b/nixos/hercules.nix index bed56ba..8825774 100644 --- a/nixos/hercules.nix +++ b/nixos/hercules.nix @@ -1,6 +1,9 @@ { pkgs, lib, inputs, system, ... }: { + # TODO: use agenix to manage + # - secrets + # - ssh keys services.hercules-ci-agent = { enable = true; # nixpkgs may not always have the latest HCI. @@ -10,11 +13,7 @@ # Regularly optimize nix store if using CI, because CI use can produce *lots* # of derivations. nix.gc = { - automatic = true; - dates = "weekly"; - # NOTE: If the repos that use cache are updated as often as once a week (eg: - # flake.lock update action?), its cache should not be invalidated over time - # of idle periods. + automatic = ! pkgs.stdenv.isDarwin; # Enable only on Linux options = "--delete-older-than 90d"; }; }