1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-22 10:19:39 +01:00
home-manager/tests/modules/programs/nix-init/basic-config.nix
Austin Horstman a8e99a9608 tests/nix-init: fix expected config
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 12:47:26 -05:00

41 lines
993 B
Nix

{ pkgs, ... }:
{
programs.nix-init = {
enable = true;
settings = {
maintainers = [ "figsoda" ];
nixpkgs = "<nixpkgs>";
commit = true;
access-tokens = {
"github.com" = "ghp_blahblahblah...";
"gitlab.com".command = [
"secret-tool"
"or"
"whatever"
"you"
"use"
];
"gitlab.gnome.org".file = "/path/to/api/token";
};
};
};
nmt.script = ''
assertFileExists home-files/.config/nix-init/config.toml
assertFileContent home-files/.config/nix-init/config.toml \
${pkgs.writeText "settings-expected" ''
commit = true
maintainers = ["figsoda"]
nixpkgs = "<nixpkgs>"
[access-tokens]
"github.com" = "ghp_blahblahblah..."
[access-tokens."gitlab.com"]
command = ["secret-tool", "or", "whatever", "you", "use"]
[access-tokens."gitlab.gnome.org"]
file = "/path/to/api/token"
''}
'';
}