depot/third_party/home-manager/tests/modules/programs/tmate/tmate.nix
Default email 2eafb8192e Project import generated by Copybara.
GitOrigin-RevId: 176e455371a8371586e8a3ff0d56ee9f3ca2324e
2023-01-10 02:35:00 -07:00

25 lines
645 B
Nix

{ config, lib, pkgs, ... }:
{
programs.tmate = {
enable = true;
port = 222;
dsaFingerprint = "SHA256:1111111111111111111111111111111111111111111";
extraConfig = ''set tmate-session-name "session-name"'';
};
test.stubs.tmate = { };
nmt.script = let
expectedConfig = ''
set -g tmate-server-port 222
set -g tmate-server-ed25519-fingerprint "SHA256:1111111111111111111111111111111111111111111"
set tmate-session-name "session-name"
'';
in ''
assertFileExists home-files/.tmate.conf
assertFileContent home-files/.tmate.conf ${
builtins.toFile "config" expectedConfig
}
'';
}