mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
parent
e0026e16a5
commit
6702b22b98
12 changed files with 35 additions and 1 deletions
|
@ -103,7 +103,7 @@ in
|
||||||
entries = mkOption {
|
entries = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
type = types.listOf entryModule;
|
type = types.listOf entryModule;
|
||||||
default = [];
|
default = [ ];
|
||||||
description = "News entries.";
|
description = "News entries.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1023,6 +1023,16 @@ in
|
||||||
A new module is available: 'programs.fuzzel'.
|
A new module is available: 'programs.fuzzel'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2023-05-13T14:34:21+00:00";
|
||||||
|
condition = config.programs.ssh.enable;
|
||||||
|
message = ''
|
||||||
|
The module 'programs.ssh' now installs an SSH client. The installed
|
||||||
|
client is controlled by the 'programs.ssh.package` option, which
|
||||||
|
defaults to 'pkgs.openssh'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,6 +361,8 @@ in
|
||||||
options.programs.ssh = {
|
options.programs.ssh = {
|
||||||
enable = mkEnableOption "SSH client configuration";
|
enable = mkEnableOption "SSH client configuration";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "openssh" { };
|
||||||
|
|
||||||
forwardAgent = mkOption {
|
forwardAgent = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -525,6 +527,8 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.file.".ssh/config".text =
|
home.file.".ssh/config".text =
|
||||||
let
|
let
|
||||||
sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks;
|
sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks;
|
||||||
|
|
|
@ -6,6 +6,8 @@ with lib;
|
||||||
config = {
|
config = {
|
||||||
programs.ssh = { enable = true; };
|
programs.ssh = { enable = true; };
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
home.file.assertions.text = builtins.toJSON
|
home.file.assertions.text = builtins.toJSON
|
||||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,8 @@ with lib;
|
||||||
home.file.result.text = builtins.toJSON
|
home.file.result.text = builtins.toJSON
|
||||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.ssh/config
|
assertFileExists home-files/.ssh/config
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
|
|
|
@ -21,6 +21,8 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
test.asserts.assertions.expected = [ "Forwarded paths cannot have ports." ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
includes = [ "config.d/*" "other/dir" ];
|
includes = [ "config.d/*" "other/dir" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.ssh/config
|
assertFileExists home-files/.ssh/config
|
||||||
assertFileContains home-files/.ssh/config "Include config.d/* other/dir"
|
assertFileContains home-files/.ssh/config "Include config.d/* other/dir"
|
||||||
|
|
|
@ -51,6 +51,8 @@ with lib;
|
||||||
home.file.assertions.text = builtins.toJSON
|
home.file.assertions.text = builtins.toJSON
|
||||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.ssh/config
|
assertFileExists home-files/.ssh/config
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
|
|
|
@ -21,6 +21,8 @@ with lib;
|
||||||
home.file.assertions.text = builtins.toJSON
|
home.file.assertions.text = builtins.toJSON
|
||||||
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
(map (a: a.message) (filter (a: !a.assertion) config.assertions));
|
||||||
|
|
||||||
|
test.stubs.openssh = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.ssh/config
|
assertFileExists home-files/.ssh/config
|
||||||
assertFileContent \
|
assertFileContent \
|
||||||
|
|
Loading…
Reference in a new issue