mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat[client,server]: add remote builds, confLib
Some checks failed
Flake check / Check flake (push) Has been cancelled
Some checks failed
Flake check / Check flake (push) Has been cancelled
This commit is contained in:
parent
c20f1b0b59
commit
9acfc5f934
133 changed files with 4297 additions and 3249 deletions
|
|
@ -1,14 +1,14 @@
|
|||
{ config, lib, globals, ... }:
|
||||
{ config, lib, globals, nixosConfig ? null, ... }:
|
||||
{
|
||||
_module.args = {
|
||||
confLib = rec {
|
||||
|
||||
addressDefault = if config.swarselsystems.proxyHost != config.node.name then globals.networks."${if config.swarselsystems.isCloud then config.node.name else "home"}-${config.swarselsystems.server.localNetwork}".hosts.${config.node.name}.ipv4 else "localhost";
|
||||
addressDefault = if config.swarselsystems.proxyHost != config.node.name then globals.networks.${config.swarselsystems.server.netConfigName}.hosts.${config.node.name}.ipv4 else "localhost";
|
||||
|
||||
domainDefault = service: config.repo.secrets.common.services.domains.${service};
|
||||
proxyDefault = config.swarselsystems.proxyHost;
|
||||
|
||||
getConfig = config;
|
||||
getConfig = if nixosConfig == null then config else nixosConfig;
|
||||
|
||||
gen = { name, user ? name, group ? name, dir ? null, port ? null, domain ? (domainDefault name), address ? addressDefault, proxy ? proxyDefault }: rec {
|
||||
servicePort = port;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,24 @@
|
|||
options.swarselsystems = {
|
||||
proxyHost = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
default = config.node.name;
|
||||
};
|
||||
isBastionTarget = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
isCloud = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
isServer = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.swarselsystems.isCloud;
|
||||
};
|
||||
isClient = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.swarselsystems.isLaptop;
|
||||
};
|
||||
withHomeManager = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue