1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00
nix-darwin/tests/services-eternal-terminal.nix
ryane 6adc4c680b
eternal-terminal: add module
Adds an eternal-terminal module. Much of the implementation is borrowed
from the corresponding nixos module:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/eternal-terminal.nix
2023-07-23 08:20:28 -04:00

19 lines
629 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
eternal-terminal = pkgs.runCommand "eternal-terminal-0.0.0" { } "mkdir $out";
in {
services.eternal-terminal.enable = true;
services.eternal-terminal.package = eternal-terminal;
services.eternal-terminal.port = 2222;
services.eternal-terminal.silent = true;
test = ''
echo >&2 "checking eternal-terminal service in /Library/LaunchDaemons"
grep "org.nixos.eternal-terminal" ${config.out}/Library/LaunchDaemons/org.nixos.eternal-terminal.plist
grep "${eternal-terminal}/bin/etserver" ${config.out}/Library/LaunchDaemons/org.nixos.eternal-terminal.plist
'';
}