mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-15 17:51:01 +00:00
6adc4c680b
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
19 lines
629 B
Nix
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
|
|
'';
|
|
}
|