Moved hosts/common to modules. Updated CI effects.
This commit is contained in:
parent
fb0c1a4451
commit
96fb8b568f
6 changed files with 17 additions and 4 deletions
5
modules/nixos/common/default.nix
Normal file
5
modules/nixos/common/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./hercules.nix
|
||||
];
|
||||
}
|
26
modules/nixos/common/hercules.nix
Normal file
26
modules/nixos/common/hercules.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
_file = ./hercules.nix;
|
||||
|
||||
options.common.hercules.enable = lib.mkEnableOption "Enables hercules-ci-agent with my configuration";
|
||||
|
||||
config = lib.mkIf config.common.hercules.enable {
|
||||
age.secrets.hercules-token = {
|
||||
file = ../../secrets/hercules-token.age;
|
||||
owner = config.systemd.services.hercules-ci-agent.serviceConfig.User;
|
||||
};
|
||||
|
||||
services.hercules-ci-agent = {
|
||||
enable = true;
|
||||
settings = {
|
||||
clusterJoinTokenPath = config.age.secrets.hercules-token.path;
|
||||
concurrentTasks = lib.mkDefault 4;
|
||||
binaryCachesPath = pkgs.writeText "empty-caches.json" "{}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
{config, ...}: {
|
||||
flake.nixosModules.settei = import ./settei {inherit (config) perInput;};
|
||||
flake.nixosModules = {
|
||||
settei = import ./settei {inherit (config) perInput;};
|
||||
common = ./common;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue