2024-06-13 03:47:38 +02:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
exampleChannel = pkgs.writeTextDir "default.nix" ''
|
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
|
|
|
|
{
|
|
|
|
example = pkgs.emptyDirectory;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
in {
|
2024-12-06 12:24:37 +01:00
|
|
|
nix = {
|
|
|
|
package = config.lib.test.mkStubPackage {
|
|
|
|
version = lib.getVersion pkgs.nixVersions.stable;
|
2024-06-13 03:47:38 +02:00
|
|
|
};
|
2024-12-06 12:24:37 +01:00
|
|
|
channels.example = exampleChannel;
|
|
|
|
settings.use-xdg-base-directories = true;
|
2024-06-13 03:47:38 +02:00
|
|
|
};
|
2024-12-06 12:24:37 +01:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
|
|
|
'export NIX_PATH="/home/hm-user/.local/state/nix/defexpr/50-home-manager''${NIX_PATH:+:$NIX_PATH}"'
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.local/state/nix/defexpr/50-home-manager/example/default.nix \
|
|
|
|
${exampleChannel}/default.nix
|
|
|
|
'';
|
2024-06-13 03:47:38 +02:00
|
|
|
}
|