mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(fluidd): take over print
This commit is contained in:
parent
6c3727a246
commit
1c8a8f7a9e
6 changed files with 82 additions and 21 deletions
40
modules/system/exports/fluidd.nix
Normal file
40
modules/system/exports/fluidd.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
gensokyo-zone,
|
||||
...
|
||||
}: let
|
||||
inherit (gensokyo-zone.lib) mkAlmostOptionDefault;
|
||||
inherit (lib.modules) mkIf;
|
||||
in {
|
||||
config.exports.services.fluidd = {config, ...}: {
|
||||
displayName = mkAlmostOptionDefault "Fluidd";
|
||||
id = mkAlmostOptionDefault "print";
|
||||
nixos = {
|
||||
serviceAttr = "fluidd";
|
||||
assertions = let
|
||||
mkAssertion = f: nixosConfig: let
|
||||
cfg = nixosConfig.services.nginx;
|
||||
in
|
||||
f nixosConfig cfg;
|
||||
in
|
||||
mkIf config.enable [
|
||||
(mkAssertion (nixosConfig: cfg: {
|
||||
assertion = config.ports.default.port == 80;
|
||||
message = "port mismatch";
|
||||
}))
|
||||
];
|
||||
};
|
||||
defaults.port.listen = mkAlmostOptionDefault "lan";
|
||||
ports = {
|
||||
default = {
|
||||
port = mkAlmostOptionDefault 80;
|
||||
protocol = "http";
|
||||
status = {
|
||||
enable = mkAlmostOptionDefault true;
|
||||
gatus.client.network = mkAlmostOptionDefault "ip4";
|
||||
};
|
||||
prometheus.exporter.enable = mkAlmostOptionDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue