git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests/hardened: test loading out-of-tree-modules
commit39c30a33c182764a26dba00f56fa4e3982a1c979 authorJoachim Fasting <joachifm@fastmail.fm> dateSun 6 Jan 2019, 13:17 (8 years ago) parentb3d8aa2
1 file changed+8−1
nixos/tests/hardened.nix+8−1
nixos/tests/hardened.nix+8−1
@@ -5,7 +5,7 @@ import ./make-test.nix ({ pkgs, ...} : {
55 };
66
77 machine =
8− { lib, pkgs, ... }:
8+ { lib, pkgs, config, ... }:
99 with lib;
1010 { users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
1111 users.users.sybil = { isNormalUser = true; group = "wheel"; };
@@ -22,12 +22,19 @@ import ./make-test.nix ({ pkgs, ...} : {
2222 options = [ "noauto" ];
2323 };
2424 };
25+ boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
26+ boot.kernelModules = [ "wireguard" ];
2527 };
2628
2729 testScript =
2830 ''
2931 $machine->waitForUnit("multi-user.target");
3032
33+ # Test loading out-of-tree modules
34+ subtest "extra-module-packages", sub {
35+ $machine->succeed("grep -Fq wireguard /proc/modules");
36+ };
37+
3138 # Test hidepid
3239 subtest "hidepid", sub {
3340 $machine->succeed("grep -Fq hidepid=2 /proc/mounts");