mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge staging-next into staging
This commit is contained in:
commit
ae9f8ec1b6
41 changed files with 364 additions and 183 deletions
|
@ -82,6 +82,15 @@ in
|
|||
|
||||
nix = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable Nix.
|
||||
Disabling Nix makes the system hard to modify and the Nix programs and configuration will not be made available by NixOS itself.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nix;
|
||||
|
@ -499,7 +508,7 @@ in
|
|||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||
nix.binaryCaches = [ "https://cache.nixos.org/" ];
|
||||
|
|
|
@ -478,6 +478,7 @@ in
|
|||
wasabibackend = handleTest ./wasabibackend.nix {};
|
||||
wiki-js = handleTest ./wiki-js.nix {};
|
||||
wireguard = handleTest ./wireguard {};
|
||||
without-nix = handleTest ./without-nix.nix {};
|
||||
wmderland = handleTest ./wmderland.nix {};
|
||||
wpa_supplicant = handleTest ./wpa_supplicant.nix {};
|
||||
wordpress = handleTest ./wordpress.nix {};
|
||||
|
|
|
@ -11,10 +11,6 @@ import ./make-test-python.nix (
|
|||
meta.maintainers = with pkgs.lib.maintainers; [ pborzenkov ];
|
||||
|
||||
nodes = {
|
||||
default = { ... }: {
|
||||
services.calibre-web.enable = true;
|
||||
};
|
||||
|
||||
customized = { pkgs, ... }: {
|
||||
services.calibre-web = {
|
||||
enable = true;
|
||||
|
@ -33,12 +29,6 @@ import ./make-test-python.nix (
|
|||
testScript = ''
|
||||
start_all()
|
||||
|
||||
default.wait_for_unit("calibre-web.service")
|
||||
default.wait_for_open_port(${toString defaultPort})
|
||||
default.succeed(
|
||||
"curl --fail 'http://localhost:${toString defaultPort}/basicconfig' | grep 'Basic Configuration'"
|
||||
)
|
||||
|
||||
customized.succeed(
|
||||
"mkdir /tmp/books && calibredb --library-path /tmp/books add -e --title test-book"
|
||||
)
|
||||
|
|
23
nixos/tests/without-nix.nix
Normal file
23
nixos/tests/without-nix.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
import ./make-test-python.nix ({ lib, ... }: {
|
||||
name = "without-nix";
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ ericson2314 ];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
nix = throw "don't want to use this";
|
||||
})
|
||||
];
|
||||
|
||||
nodes.machine = { ... }: {
|
||||
nix.enable = false;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.succeed("which which")
|
||||
machine.fail("which nix")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue