Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8621,6 +8621,12 @@
githubId = 10290864;
name = "Peter Frank";
};
frantathefranta = {
github = "frantathefranta";
githubId = 64412753;
name = "Franta Bartik";
email = "fb@franta.us";
};
franzmondlichtmann = {
name = "Franz Schroepf";
email = "franz-schroepf@t-online.de";
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2511.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@

- [paisa](https://github.com/ananthakumaran/paisa), a personal finance tracker and dashboard. Available as [services.paisa](#opt-services.paisa.enable).

- [conman](https://github.com/dun/conman), a serial console management program. Available as [services.conman](#opt-services.conman.enable).

## Backward Incompatibilities {#sec-release-25.11-incompatibilities}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@
./services/misc/clipcat.nix
./services/misc/clipmenu.nix
./services/misc/confd.nix
./services/misc/conman.nix
./services/misc/cpuminer-cryptonight.nix
./services/misc/db-rest.nix
./services/misc/devmon.nix
Expand Down
89 changes: 89 additions & 0 deletions nixos/modules/services/misc/conman.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
config,
lib,
pkgs,
...
}:

{
options = {
services.conman = {
enable = lib.mkEnableOption ''
Enable the conman Console manager.

Either `configFile` or `config` must be specified.
'';
package = lib.mkPackageOption pkgs "conman" { };

configFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
example = "/run/secrets/conman.conf";
description = ''
The absolute path to the configuration file.

Either `configFile` or `config` must be specified.

See <https://github.com/dun/conman/wiki/Man-5-conman.conf#files>.
'';
};
config = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
example = ''
server coredump=off
server keepalive=on
server loopback=off
server timestamp=1h

# global config
global log="/var/log/conman/%N.log"
global seropts="9600,8n1"
global ipmiopts="U:<user>,P:<password>"
'';
description = ''
The configuration object.

Either `configFile` or `config` must be specified.

See <https://github.com/dun/conman/wiki/Man-5-conman.conf#files>.
'';
};
};
};
meta.maintainers = with lib.maintainers; [
frantathefranta
];

config =
let
cfg = config.services.conman;
configFile =
if cfg.configFile != null then
cfg.configFile
else
pkgs.writeTextFile {
name = "conman.conf";
text = cfg.config;
};
in
lib.mkIf cfg.enable {
assertions = [
{
assertion =
(cfg.configFile != null) && (cfg.config == null) || (cfg.configFile == null && cfg.config != null);
message = "Either but not both `configFile` and `config` must be specified for conman.";
}
];
environment.systemPackages = [ cfg.package ];
systemd.services.conmand = {
description = "serial console management program";
documentation = [ "man:conman(8)" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/conmand -F -c ${configFile}";
KillMode = "process";
};
};
};
}
45 changes: 45 additions & 0 deletions pkgs/by-name/co/conman/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
freeipmi,
autoreconfHook,
pkg-config,
fetchFromGitHub,
tcp_wrappers,
stdenv,
expect,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "conman";
version = "0.3.1";

src = fetchFromGitHub {
owner = "dun";
repo = "conman";
tag = "conman-${finalAttrs.version}";
hash = "sha256-CHWvHYTmTiEpEfHm3TF5aCKBOW2GsT9Vv4ehpj775NQ=";
};

enableParallelBuilding = true;

nativeBuildInputs = [
autoreconfHook
pkg-config
];

buildInputs = [
freeipmi # For libipmiconsole.so.2
tcp_wrappers # For libwrap.so.0
expect # For conman/*.exp scripts
];

meta = {
description = "The Console Manager";
homepage = "https://github.com/dun/conman";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
frantathefranta
];
};

})
Loading