fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Naïm Favierssh: don't install a client by default (#4016)2d963854

master
691 B32 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.ssh = {
8      enable = true;
9      matchBlocks = {
10        abc = { port = 2222; };
11
12        xyz = {
13          match = "host xyz canonical";
14          port = 2223;
15        };
16
17        "* !github.com" = { port = 516; };
18      };
19    };
20
21    home.file.assertions.text = builtins.toJSON
22      (map (a: a.message) (filter (a: !a.assertion) config.assertions));
23
24    nmt.script = ''
25      assertFileExists home-files/.ssh/config
26      assertFileContent \
27        home-files/.ssh/config \
28        ${./match-blocks-match-and-hosts-expected.conf}
29      assertFileContent home-files/assertions ${./no-assertions.json}
30    '';
31  };
32}