Files
home-manager/tests/modules/programs/opkssh/opkssh-basic-config.nix
Austin Horstman 3c3ede6ad8 tests: update YAML expectations for remarshal v2
Nixpkgs switched pkgs.formats.yaml to remarshal v2. Generated files now
start with a %YAML 1.1 directive and a --- document start, and multiline
strings use double-quoted escapes.

Only files written through yamlFormat.generate change. Modules that
declare the YAML type but write the file with builtins.toJSON keep their
current output.
2026-08-19 10:14:55 -05:00

45 lines
1.2 KiB
Nix

_: {
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" ''
%YAML 1.1
---
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
''}
'';
}