killing exporters
This commit is contained in:
1 parent
3b764654d2
commit
e719674851
14 files changed
+25
-61
No files matched your search
@@ -24,17 +24,16 @@ containers/
|
||||
## Runtime selection (`skyg.nixos.common.containers`)
|
||||
|
||||
Picks **one** of Docker or Podman based on `runtime` and configures it
|
||||
consistently (compose tooling, user group membership, OCI backend, metrics).
|
||||
consistently (compose tooling, user group membership, OCI backend).
|
||||
|
||||
- `runtime` defaults to `"docker"`. Each backend file gates on `cfg.runtime == "<name>"`,
|
||||
so exactly one applies.
|
||||
- **Docker** enables autoprune, sets `insecure-registries` from `localDockerRegistries`
|
||||
(default `minipc1.lab.internal:5001`), exposes metrics on `metricsPort` (9323), adds the
|
||||
user to the `docker` group, and installs `docker-compose`.
|
||||
(default `minipc1.lab.internal:5001`), adds the user to the `docker` group, and installs
|
||||
`docker-compose`. Engine metrics are deliberately off (removed; no scraper, unauthenticated).
|
||||
- **Podman** enables `dockerCompat` + docker socket so `docker`/`oci-containers` keep working,
|
||||
allows plain-HTTP pulls from `localDockerRegistries` via
|
||||
`virtualisation.containers.registries.insecure`, and installs `podman-compose` + `podman-tui`.
|
||||
- `openMetricsPort` opens the metrics port in the firewall (Docker only).
|
||||
|
||||
### Option namespace
|
||||
|
||||
@@ -43,8 +42,7 @@ skyg.nixos.common.containers.enable → false to disable the con
|
||||
skyg.nixos.common.containers.runtime → "docker" | "podman"
|
||||
skyg.nixos.common.containers.enableOnBoot
|
||||
skyg.nixos.common.containers.localDockerRegistries
|
||||
skyg.nixos.common.containers.metricsPort
|
||||
skyg.nixos.common.containers.openMetricsPort
|
||||
|
||||
skyg.nixos.common.containers.networks.macvlanLab.* → predefined macvlan lab network
|
||||
skyg.nixos.common.containers.networks.ipvlanLab.* → predefined ipvlan lab network
|
||||
skyg.nixos.common.containers.networks.extra.<name>.* → custom networks (networks.nix)
|
||||
|
||||
@@ -27,11 +27,7 @@
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "minipc1.lab.internal:5001" ];
|
||||
};
|
||||
metricsPort = lib.mkOption {
|
||||
type = lib.types.number;
|
||||
default = 9323;
|
||||
};
|
||||
openMetricsPort = lib.mkEnableOption "Open container metrics port";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -12,20 +12,11 @@ in
|
||||
liveRestore = false;
|
||||
daemon.settings = {
|
||||
insecure-registries = cfg.localDockerRegistries;
|
||||
metrics-addr = "0.0.0.0:${toString cfg.metricsPort}";
|
||||
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||
users.users.${config.skyg.user.name}.extraGroups = [ "docker" ];
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
networking.firewall.allowedUDPPorts =
|
||||
(if cfg.openMetricsPort then [
|
||||
cfg.metricsPort
|
||||
] else [ ]);
|
||||
networking.firewall.allowedTCPPorts =
|
||||
(if cfg.openMetricsPort then [
|
||||
cfg.metricsPort
|
||||
] else [ ]);
|
||||
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user