mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-08-17 00:20:44 +03:00
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
20 lines
629 B
Nix
20 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
|
|
'';
|
|
}
|