forked from fediversity/fediversity
Compare commits
129 commits
5cd02be848
...
098298a31c
| Author | SHA1 | Date | |
|---|---|---|---|
| 098298a31c | |||
| 43e4d3a497 | |||
| c209a1bdad | |||
| e0c6390ef5 | |||
| b5c3caa984 | |||
| 365fbc7c18 | |||
| d9b380d279 | |||
| 1496b51be5 | |||
| 5c32e73cb1 | |||
| c574eb3ba8 | |||
| 7b0db200c3 | |||
| 20ac7d6aff | |||
| 0cd7a523d0 | |||
| b242670cfc | |||
| a45d64bbf4 | |||
| 218330b676 | |||
| 9d4a3cbf75 | |||
| aaa49de5c0 | |||
| 71a979e5db | |||
| e86035bc52 | |||
| 4b2898f831 | |||
| 6cb8a38321 | |||
| 92b8535ff9 | |||
| e64684f906 | |||
| ea1f76fd40 | |||
| f13a9e18a7 | |||
| 53dc08f5e9 | |||
| 0b3e545c58 | |||
| b42d6887dd | |||
| 30f15835c1 | |||
| 7ee1422f2b | |||
| cf24255ab9 | |||
| eabd540910 | |||
| 09297b9b4e | |||
| 80570064a9 | |||
| c0e0aa1ee6 | |||
| 9ede4a41f8 | |||
| 5b4d811c75 | |||
| d2d61f3646 | |||
| 74743b00fd | |||
| f0f23f43fe | |||
| 9931269b17 | |||
| bd4b870556 | |||
| 0654205eda | |||
| a973c2589f | |||
| 1b9c99b2d3 | |||
| 0e17329e2c | |||
| be01af269d | |||
| c6cfe9eef9 | |||
| aea15084fd | |||
| ab67a6d637 | |||
| 892b18e23f | |||
| 37177ce993 | |||
| 186cdbd79e | |||
| 017bbf05b5 | |||
| 979747dd79 | |||
| 7bcc854ef1 | |||
| 28264801d7 | |||
| 56d8c4235b | |||
| f97db2802c | |||
| 1328e76fe9 | |||
| 1c52088125 | |||
| 3e0280c40e | |||
| 67e28644f2 | |||
| 35ff03c9f8 | |||
| c25a1727a9 | |||
| ea26048e58 | |||
| 811f5c3f84 | |||
| 89ced0cb82 | |||
| a6a3396211 | |||
| 6522ef8e67 | |||
| c1fe32f12a | |||
| 5b28788387 | |||
| 42c1cfd888 | |||
| 430754cf95 | |||
| 98bc0754cc | |||
| ca304932b6 | |||
| bfe0e51983 | |||
| 65863cd9e1 | |||
| 67fa4b2274 | |||
| 469b22fe4e | |||
| 0d0890cb17 | |||
| d35db3dcab | |||
| 3eb42e7991 | |||
| a40a23a3d7 | |||
| a758147b16 | |||
| 73630ffac6 | |||
| 4009d6c8e0 | |||
| b71d152b34 | |||
| 4a0aa7f0a6 | |||
| f5db4bd51e | |||
| 27d33141d2 | |||
| 6238b12f88 | |||
| f8a2d11c2f | |||
| f13348fb57 | |||
| 29d8345a57 | |||
| d2ee86a77c | |||
| e1a22437a0 | |||
| 9ebca54d50 | |||
| 09ef3ebbc7 | |||
| d73fa538c1 | |||
| d3a4137900 | |||
| 40fad454a7 | |||
| 6464cf61ec | |||
| 6c00f98801 | |||
| 98d8a91a80 | |||
| b5d2b2cb87 | |||
| b0b158050d | |||
| 6613959037 | |||
| d3a0d66fe6 | |||
| d051c9ffc6 | |||
| d76e0ddb98 | |||
| eb39b278a3 | |||
| 0758f6aa5b | |||
| 3c375da97c | |||
| a8a62f00cf | |||
| c5351e85ce | |||
| 03e564f3d8 | |||
| b89c7cbd3d | |||
| c9c8d8b457 | |||
| 4d0e549c6b | |||
| c4e06a5748 | |||
| 9bdfdf6ef7 | |||
| a6fdff0b18 | |||
| 14d7ce7214 | |||
| a97d658f1e | |||
| df9814f0f5 | |||
| 7f6aad0a58 | |||
| 0440758e28 |
24 changed files with 76 additions and 36 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
modulesPath,
|
||||||
sources,
|
sources,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -75,7 +76,7 @@ in
|
||||||
machine =
|
machine =
|
||||||
(pkgs.nixos [
|
(pkgs.nixos [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
config.system.extraDependenciesFromModule
|
config.system.extraDependenciesFromModule
|
||||||
{
|
{
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
config,
|
config,
|
||||||
hostPkgs,
|
hostPkgs,
|
||||||
sources,
|
sources,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -114,7 +115,7 @@ in
|
||||||
(genAttrs config.targetMachines (_: {
|
(genAttrs config.targetMachines (_: {
|
||||||
imports = [
|
imports = [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
] ++ (lib.optional config.useFlake "${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix");
|
] ++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix");
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
enableAcme = config.enableAcme;
|
enableAcme = config.enableAcme;
|
||||||
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
|
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
sources = import ../../../npins;
|
|
||||||
testCerts = import "${inputs.nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix";
|
testCerts = import "${inputs.nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix";
|
||||||
inherit (lib) mkIf mkMerge;
|
inherit (lib) mkIf mkMerge;
|
||||||
|
|
||||||
|
|
@ -15,7 +15,8 @@ in
|
||||||
_class = "nixos";
|
_class = "nixos";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/minimal.nix"
|
||||||
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
./sharedOptions.nix
|
./sharedOptions.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
sources,
|
sources,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -39,7 +40,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./targetNode.nix
|
./targetNode.nix
|
||||||
(lib.modules.importJSON (config.pathToCwd + "/${config.nodeName}-network.json"))
|
(lib.modules.importJSON (config.pathToCwd + "/${config.nodeName}-network.json"))
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
sources ? import ../../../npins,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../common/sharedOptions.nix
|
../common/sharedOptions.nix
|
||||||
../common/targetNode.nix
|
../common/targetNode.nix
|
||||||
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users = environment.config.resources."operator-environment".login-shell.apply {
|
users.users = environment.config.resources."operator-environment".login-shell.apply {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
inputs,
|
inputs,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
...
|
...
|
||||||
|
|
@ -9,7 +10,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathFromRoot
|
pathFromRoot
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { inherit inputs; }).evalModel (
|
(pkgs.callPackage ../../utils.nix { inherit inputs; }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -44,7 +45,7 @@ in
|
||||||
nixos.module = {
|
nixos.module = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = { inherit inputs sources; };
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -11,7 +12,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
import ./mkFlake.nix inputs (
|
import ./mkFlake.nix inputs (
|
||||||
{ inputs, ... }:
|
{ inputs, modulesPath, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in
|
in
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
nixops4Deployments.check-deployment-model =
|
nixops4Deployments.check-deployment-model =
|
||||||
(import ./deployment/check/data-model-nixops4/data-model.nix {
|
(import ./deployment/check/data-model-nixops4/data-model.nix {
|
||||||
inherit system inputs;
|
inherit system inputs modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit (import ./deployment/check/data-model-nixops4/constants.nix) pathToRoot pathFromRoot;
|
inherit (import ./deployment/check/data-model-nixops4/constants.nix) pathToRoot pathFromRoot;
|
||||||
nodeName = "nixops4";
|
nodeName = "nixops4";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -34,7 +35,7 @@ in
|
||||||
nixos-configuration = {
|
nixos-configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -11,7 +12,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
nodeName = "ssh";
|
nodeName = "ssh";
|
||||||
deploy =
|
deploy =
|
||||||
(import ./data-model.nix {
|
(import ./data-model.nix {
|
||||||
inherit system;
|
inherit system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit nodeName;
|
inherit nodeName;
|
||||||
inherit (import ./constants.nix) pathToRoot;
|
inherit (import ./constants.nix) pathToRoot;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,10 @@ pkgs.testers.runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
sources,
|
sources,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -17,7 +18,7 @@ let
|
||||||
# FIXME generate the image `nixos-generate` was to make, but now do it for a desired `-c configuration.nix` rather than whatever generic thing now
|
# FIXME generate the image `nixos-generate` was to make, but now do it for a desired `-c configuration.nix` rather than whatever generic thing now
|
||||||
template-deployment =
|
template-deployment =
|
||||||
(import ./setups/template.nix {
|
(import ./setups/template.nix {
|
||||||
inherit sources system;
|
inherit sources system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
httpBackend = tfBackend "proxmox-test/upload";
|
httpBackend = tfBackend "proxmox-test/upload";
|
||||||
nodeName = "pve";
|
nodeName = "pve";
|
||||||
|
|
@ -28,7 +29,7 @@ let
|
||||||
}).default.tf-proxmox-template;
|
}).default.tf-proxmox-template;
|
||||||
vm-deployment =
|
vm-deployment =
|
||||||
(import ./setups/vm.nix {
|
(import ./setups/vm.nix {
|
||||||
inherit sources system;
|
inherit sources system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
httpBackend = tfBackend "proxmox-test/nixos";
|
httpBackend = tfBackend "proxmox-test/nixos";
|
||||||
inherit (import ./constants.nix) pathToRoot;
|
inherit (import ./constants.nix) pathToRoot;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../../npins,
|
sources ? import ../../../../npins,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../../common/utils.nix { inherit sources; }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
targetSystem
|
targetSystem
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
|
modulesPath,
|
||||||
sources ? import ../../../../npins,
|
sources ? import ../../../../npins,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
@ -8,7 +9,7 @@ let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../../common/utils.nix { inherit sources; }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,14 @@
|
||||||
config,
|
config,
|
||||||
system,
|
system,
|
||||||
sources ? import ../../../npins,
|
sources ? import ../../../npins,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
let
|
let
|
||||||
inherit (sources) nixpkgs;
|
inherit (sources) nixpkgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (pkgs.callPackage ../common/utils.nix { }) mkNixosConfiguration;
|
inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
nodeName
|
nodeName
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
@ -18,7 +19,7 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
(pkgs.callPackage ../../utils.nix { }).evalModel (
|
||||||
{ config, ... }:
|
{ config, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../common/model.nix ];
|
imports = [ ../common/model.nix ];
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -34,7 +35,7 @@ in
|
||||||
nixos-configuration = {
|
nixos-configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
(mkNixosConfiguration environment required-resources)
|
(mkNixosConfiguration environment required-resources)
|
||||||
"${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"
|
"${modulesPath}/../lib/testing/nixos-test-base.nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,10 @@ pkgs.testers.runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
sources,
|
sources,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -11,7 +12,7 @@ let
|
||||||
backendPort = builtins.toString 8080;
|
backendPort = builtins.toString 8080;
|
||||||
deploy =
|
deploy =
|
||||||
(import ./data-model.nix {
|
(import ./data-model.nix {
|
||||||
inherit system;
|
inherit system modulesPath;
|
||||||
config = {
|
config = {
|
||||||
inherit nodeName pathToRoot;
|
inherit nodeName pathToRoot;
|
||||||
targetSystem = system;
|
targetSystem = system;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
runNixOSTest,
|
runNixOSTest,
|
||||||
inputs,
|
inputs,
|
||||||
sources,
|
sources,
|
||||||
|
|
@ -9,7 +10,10 @@ runNixOSTest {
|
||||||
../common/nixosTest.nix
|
../common/nixosTest.nix
|
||||||
./nixosTest.nix
|
./nixosTest.nix
|
||||||
];
|
];
|
||||||
_module.args = { inherit inputs sources; };
|
_module.args = {
|
||||||
|
inherit inputs sources;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
|
};
|
||||||
inherit (import ./constants.nix)
|
inherit (import ./constants.nix)
|
||||||
targetMachines
|
targetMachines
|
||||||
pathToRoot
|
pathToRoot
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ runNixOSTest {
|
||||||
sources
|
sources
|
||||||
pkgs
|
pkgs
|
||||||
;
|
;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./proxmoxTest.nix
|
./proxmoxTest.nix
|
||||||
|
|
|
||||||
|
|
@ -14,27 +14,27 @@
|
||||||
|
|
||||||
deployment-basic = import ./check/basic {
|
deployment-basic = import ./check/basic {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-cli = import ./check/cli {
|
deployment-cli = import ./check/cli {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-panel = import ./check/panel {
|
deployment-panel = import ./check/panel {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-ssh = import ./check/data-model-ssh {
|
deployment-model-ssh = import ./check/data-model-ssh {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-nixops4 = import ./check/data-model-nixops4 {
|
deployment-model-nixops4 = import ./check/data-model-nixops4 {
|
||||||
inherit (pkgs.testers) runNixOSTest;
|
inherit (pkgs.testers) runNixOSTest;
|
||||||
inherit inputs sources;
|
inherit pkgs inputs sources;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment-model-tf = import ./check/data-model-tf {
|
deployment-model-tf = import ./check/data-model-tf {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
(lib.evalModules {
|
(lib.evalModules {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit pkgs inputs;
|
inherit pkgs inputs;
|
||||||
|
modulesPath = "${builtins.toString pkgs.path}/nixos/modules";
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./data-model.nix
|
./data-model.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue