Skip to content

Commit d44bd34

Browse files
committed
flake: add SAP CHV and libvirt to NixOS modules
On-behalf-of: SAP [email protected]
1 parent 13a8b65 commit d44bd34

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

flake.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@
8282

8383
checks = import ./checks { inherit pkgs pre-commit-hooks-run; };
8484

85-
nixosModules = import ./modules { openstackPkgs = packages; };
85+
nixosModules = import ./modules {
86+
openstackPkgs = packages;
87+
inherit self;
88+
};
8689

8790
tests = import ./tests/default.nix {
8891
inherit pkgs nixosModules;

modules/chv-sap.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Ensures libvirt and Cloud Hypervisor are set with the proper sources for SAP
2+
# (for gardenlinux).
3+
4+
# Function returning a NixOS Module
5+
{ self }:
6+
7+
# NixOS Module start
8+
{ pkgs, ... }:
9+
{
10+
virtualisation.libvirtd.package = pkgs.libvirt;
11+
nixpkgs.overlays = [
12+
(prev: final: {
13+
inherit (self.packages.${pkgs.system}) cloud-hypervisor;
14+
})
15+
];
16+
}

modules/default.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ openstackPkgs }:
1+
{ openstackPkgs, self }:
22
{
33
controllerModule = import ./controller/openstack-controller.nix {
44
inherit (openstackPkgs)
@@ -14,4 +14,6 @@
1414
computeModule = import ./compute/compute.nix { inherit (openstackPkgs) neutron nova; };
1515

1616
testModules = import ./testing { };
17+
18+
chv-sap = import ./chv-sap.nix { inherit self; };
1719
}

tests/openstack-default-setup.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pkgs.nixosTest {
2020
imports = [
2121
nixosModules.computeModule
2222
nixosModules.testModules.testCompute
23+
nixosModules.chv-sap
2324
];
2425
};
2526

tests/openstack-live-migration.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ pkgs.nixosTest {
130130
imports = [
131131
nixosModules.computeModule
132132
nixosModules.testModules.testCompute
133+
nixosModules.chv-sap
133134
(novaConfigForIp "10.0.0.39")
134135
];
135136

@@ -153,6 +154,7 @@ pkgs.nixosTest {
153154
imports = [
154155
nixosModules.computeModule
155156
nixosModules.testModules.testCompute
157+
nixosModules.chv-sap
156158
(novaConfigForIp "10.0.0.40")
157159
];
158160

0 commit comments

Comments
 (0)