File tree Expand file tree Collapse file tree 4 files changed +33
-19
lines changed Expand file tree Collapse file tree 4 files changed +33
-19
lines changed Original file line number Diff line number Diff line change 1010 inputs' ,
1111 self' ,
1212 pkgs ,
13+ system ,
1314 ...
1415 } :
1516 {
1617 checks = {
1718 "healthcheck-test-01" = pkgs . testers . runNixOSTest {
1819 name = "healthcheck-test-01" ;
19- nodes = {
20- machine =
21- { config , pkgs , ... } :
22- {
23-
24- imports = [
25- self . modules . nixos . machine_healthcheck
26- ] ;
27-
28- } ;
29- testScript =
30- { nodes , ... } :
31- ''
32- machine.wait_for_unit("default.target")
33- '' ;
20+ node . specialArgs = {
21+ inherit self system lib ;
3422 } ;
23+ testScript = ''
24+ machine.start()
25+ machine.wait_for_unit("default.target")
26+ '' ;
27+ nodes . machine =
28+ { pkgs , ... } :
29+ {
30+ imports = [
31+ ../machines/modules/base.nix
32+ ../machines/modules/healthcheck.nix
33+ ] ;
34+ } ;
35+
3536 } ;
3637 } ;
3738 } ;
Original file line number Diff line number Diff line change 55} :
66let
77 system = "x86_64-linux" ;
8+ pkgs = import self . inputs . nixpkgs {
9+ inherit system ;
10+ config . allowUnfree = true ;
11+ } ;
812 mkMachine = x : {
913 "${ lib . removeSuffix ".nix" x } " = lib . nixosSystem {
1014 specialArgs = { inherit self system ; } ;
1115 modules = lib . unique [
16+ {
17+ nixpkgs . system = system ;
18+ }
1219 ./modules/base.nix
1320 ./modules/${ x }
1421 ] ;
2229 flake . modules . nixos = (
2330 lib . mergeAttrsList (
2431 lib . map ( x : {
25- "machine_${ lib . removeSuffix ".nix" x } " = ( import ( ./modules + "/${ x } " ) ) ;
32+ "machine_${ lib . removeSuffix ".nix" x } " = (
33+ import ( ./modules + "/${ x } " ) {
34+ inherit
35+ self
36+ pkgs
37+ ;
38+ }
39+ ) ;
2640 } ) ( builtins . attrNames ( builtins . readDir ./modules ) )
2741 )
2842 ) ;
Original file line number Diff line number Diff line change 1- { system , lib , ... } :
1+ { lib , ... } :
22{
3- nixpkgs . system = system ;
43 fileSystems = {
54 "/" . device = lib . mkDefault "/dev/sda" ;
65 } ;
Original file line number Diff line number Diff line change 77 systemd . services . test = {
88 description = "" ;
99 enable = true ;
10- path = with pkgs ; [
10+ path = [
1111 ] ;
1212 serviceConfig = {
1313 Type = "simple" ;
You can’t perform that action at this time.
0 commit comments