fork/home-manager
git clone https://git.julia.blue/fork/home-manager
2d963854
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5{ 6config = { 7programs . ssh = { 8enable = true ; 9matchBlocks = { 10abc = { 11identityFile = null ; 12proxyJump = "jump-host" ; 13}; 14 15ordered = hm . dag . entryAfter [ "xyz" ] { port = 1 ; }; 16 17xyz = { 18identityFile = "file" ; 19serverAliveInterval = 60 ; 20serverAliveCountMax = 10 ; 21localForwards = [{ 22bind . port = 8080 ; 23host . address = "10.0.0.1" ; 24host . port = 80 ; 25}]; 26remoteForwards = [ 27{ 28bind . port = 8081 ; 29host . address = "10.0.0.2" ; 30host . port = 80 ; 31} 32{ 33bind . address = "/run/user/1000/gnupg/S.gpg-agent.extra" ; 34host . address = "/run/user/1000/gnupg/S.gpg-agent" ; 35} 36]; 37dynamicForwards = [{ port = 2839 ; }]; 38setEnv = { 39FOO = "foo12" ; 40BAR = "_bar_ 42" ; 41}; 42}; 43 44"* !github.com" = { 45identityFile = [ "file1" "file2" ]; 46port = 516 ; 47}; 48}; 49}; 50 51home . file . assertions . text = builtins . toJSON 52( map ( a :a . message ) ( filter ( a :! a . assertion ) config . assertions )); 53 54nmt . script = '' 55assertFileExists home-files/.ssh/config 56assertFileContent \ 57home-files/.ssh/config \ 58${ ./match-blocks-attrs-expected.conf } 59assertFileContent home-files/assertions ${ ./no-assertions.json } 60'' ; 61}; 62}