forked from nix-community/home-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
76 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
{ config, ... }: | ||
|
||
{ | ||
config = { | ||
nix = { package = config.lib.test.mkStubPackage { }; }; | ||
nix = { package = config.lib.test.mkStubPackage { }; }; | ||
|
||
nmt.script = '' | ||
assertPathNotExists home-files/.config/nix | ||
assertPathNotExists home-files/.nix-defexpr/50-home-manager | ||
''; | ||
}; | ||
nmt.script = '' | ||
assertPathNotExists home-files/.config/nix | ||
assertPathNotExists home-files/.nix-defexpr/50-home-manager | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
{ ... }: | ||
|
||
{ | ||
config = { | ||
nix = { | ||
registry = { | ||
nixpkgs = { | ||
to = { | ||
type = "github"; | ||
owner = "my-org"; | ||
repo = "my-nixpkgs"; | ||
}; | ||
nix = { | ||
registry = { | ||
nixpkgs = { | ||
to = { | ||
type = "github"; | ||
owner = "my-org"; | ||
repo = "my-nixpkgs"; | ||
}; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/nix/registry.json \ | ||
${./example-registry-expected.json} | ||
''; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/nix/registry.json \ | ||
${./example-registry-expected.json} | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
{ | ||
config = { | ||
nix = { | ||
package = config.lib.test.mkStubPackage { | ||
version = lib.getVersion pkgs.nixVersions.stable; | ||
buildScript = '' | ||
target=$out/bin/nix | ||
mkdir -p "$(dirname "$target")" | ||
nix = { | ||
package = config.lib.test.mkStubPackage { | ||
version = lib.getVersion pkgs.nixVersions.stable; | ||
buildScript = '' | ||
target=$out/bin/nix | ||
mkdir -p "$(dirname "$target")" | ||
echo -n "true" > "$target" | ||
echo -n "true" > "$target" | ||
chmod +x "$target" | ||
''; | ||
}; | ||
chmod +x "$target" | ||
''; | ||
}; | ||
|
||
nixPath = [ "/a" "/b/c" ]; | ||
nixPath = [ "/a" "/b/c" ]; | ||
|
||
settings = { | ||
use-sandbox = true; | ||
show-trace = true; | ||
system-features = [ "big-parallel" "kvm" "recursive-nix" ]; | ||
}; | ||
settings = { | ||
use-sandbox = true; | ||
show-trace = true; | ||
system-features = [ "big-parallel" "kvm" "recursive-nix" ]; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/nix/nix.conf \ | ||
${./example-settings-expected.conf} | ||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/nix/nix.conf \ | ||
${./example-settings-expected.conf} | ||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ | ||
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"' | ||
''; | ||
}; | ||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ | ||
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"' | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
{ config, ... }: | ||
|
||
{ | ||
config = { | ||
nix = { | ||
package = config.lib.test.mkStubPackage { }; | ||
nixPath = [ "/a" "/b/c" ]; | ||
keepOldNixPath = false; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ | ||
'export NIX_PATH="/a:/b/c"' | ||
''; | ||
nix = { | ||
package = config.lib.test.mkStubPackage { }; | ||
nixPath = [ "/a" "/b/c" ]; | ||
keepOldNixPath = false; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \ | ||
'export NIX_PATH="/a:/b/c"' | ||
''; | ||
} |