mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-10 10:12:37 +08:00
hci linux: update hci, enable gc
This commit is contained in:
parent
c9ba59bb73
commit
f2f81985c7
3 changed files with 21 additions and 10 deletions
|
|
@ -6,12 +6,15 @@
|
|||
inputs.nix-serve-ng.nixosModules.default
|
||||
];
|
||||
|
||||
# Cache server
|
||||
age.secrets.${keyName}.file = ../secrets/${keyName}.age;
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = config.age.secrets.${keyName}.path;
|
||||
};
|
||||
nix.settings.trusted-users = [ "nix-serve" ];
|
||||
|
||||
# Web servr
|
||||
services.nginx = {
|
||||
virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{ pkgs, lib, inputs, system, ... }:
|
||||
|
||||
# https://github.com/hercules-ci/hercules-ci-agent/blob/master/templates/nixos/flake.nix
|
||||
# https://docs.hercules-ci.com/hercules-ci/getting-started/deploy/nixos/
|
||||
{
|
||||
services.hercules-ci-agent.enable = true;
|
||||
services.hercules-ci-agent.settings.concurrentTasks = 6;
|
||||
services.hercules-ci-agent = {
|
||||
enable = true;
|
||||
# nixpkgs may not always have the latest HCI.
|
||||
package = inputs.hci.packages.${system}.hercules-ci-agent;
|
||||
};
|
||||
|
||||
# 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.
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,10 +67,6 @@
|
|||
home = "/Users/${flake.config.people.myself}";
|
||||
};
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
|
@ -78,9 +74,9 @@
|
|||
# TODO: use agenix to manage
|
||||
# - secrets
|
||||
# - ssh keys
|
||||
# TODO: consolidate with nixos/hercules.nix
|
||||
services.hercules-ci-agent = {
|
||||
enable = true;
|
||||
# cache push to ssh fix is in master branch only. --Dec 23, 2022
|
||||
package = inputs.hci.packages.${system}.hercules-ci-agent;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue