mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
opkssh: init module
This commit is contained in:
parent
aa6936bb63
commit
c39c07bf31
4 changed files with 115 additions and 0 deletions
3
tests/modules/programs/opkssh/default.nix
Normal file
3
tests/modules/programs/opkssh/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
opkssh-basic-config = ./opkssh-basic-config.nix;
|
||||
}
|
||||
42
tests/modules/programs/opkssh/opkssh-basic-config.nix
Normal file
42
tests/modules/programs/opkssh/opkssh-basic-config.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
_: {
|
||||
programs.opkssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_provider = "test-provider";
|
||||
providers = [
|
||||
{
|
||||
alias = "test-provider";
|
||||
issuer = "https://test.domain/oauth2/openid/opkssh";
|
||||
client_id = "opkssh";
|
||||
scopes = "openid email profile";
|
||||
redirect_uris = [
|
||||
"http://localhost:3000/login-callback"
|
||||
"http://localhost:10001/login-callback"
|
||||
"http://localhost:11110/login-callback"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
configFile=home-files/.opk/config.yml
|
||||
|
||||
assertFileExists "$configFile"
|
||||
|
||||
configFileNormalized="$(normalizeStorePaths "$configFile")"
|
||||
|
||||
assertFileContent "$configFileNormalized" ${builtins.toFile "expected.service" ''
|
||||
default_provider: test-provider
|
||||
providers:
|
||||
- alias: test-provider
|
||||
client_id: opkssh
|
||||
issuer: https://test.domain/oauth2/openid/opkssh
|
||||
redirect_uris:
|
||||
- http://localhost:3000/login-callback
|
||||
- http://localhost:10001/login-callback
|
||||
- http://localhost:11110/login-callback
|
||||
scopes: openid email profile
|
||||
''}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue