mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(aya): runner
This commit is contained in:
parent
d13eaaaca6
commit
3fcca353dd
7 changed files with 115 additions and 20 deletions
|
|
@ -5,8 +5,8 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.attrsets) filterAttrs mapAttrs' nameValuePair;
|
||||
inherit (lib.modules) mkIf mkDefault mkForce;
|
||||
inherit (lib.attrsets) attrNames attrValues filterAttrs mapAttrs' nameValuePair;
|
||||
inherit (inputs.self.lib.lib) unmerged;
|
||||
cfg = config.services.github-runners;
|
||||
nixosConfig = config;
|
||||
|
|
@ -23,14 +23,31 @@
|
|||
};
|
||||
};
|
||||
config = {
|
||||
replace = mkIf config.ephemeral (mkDefault true);
|
||||
serviceSettings = mkIf (config.networkNamespace.name != null) {
|
||||
networkNamespace = {
|
||||
name = mkDefault config.networkNamespace.name;
|
||||
afterOnline = mkDefault true;
|
||||
};
|
||||
restartTriggers = [
|
||||
config.ephemeral
|
||||
config.url
|
||||
config.name
|
||||
config.runnerGroup
|
||||
config.extraLabels
|
||||
config.noDefaultLabels
|
||||
config.user
|
||||
config.group
|
||||
config.workDir
|
||||
"${config.package}"
|
||||
config.extraPackages
|
||||
config.nodeRuntimes
|
||||
(attrNames config.extraEnvironment)
|
||||
(attrValues config.extraEnvironment)
|
||||
];
|
||||
};
|
||||
serviceOverrides = mkIf (config.user != null && nixosConfig.users.users ? ${config.user}) {
|
||||
DynamicUser = false;
|
||||
serviceOverrides = mkIf (config.user != null || config.group != null) {
|
||||
DynamicUser = mkForce true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue