summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authornzbr <mail@nzbr.de>2022-11-25 19:17:05 +0100
committerGitHub <noreply@github.com>2022-11-25 19:17:05 +0100
commitbab9aa46a90a6be42fabdec8b22f3294c1ad4949 (patch)
treef9e94e3e6eb8f01ff0686c398dec54a8ec6d17f0 /modules
parente9e8d01c5a2f57d330d42c9a772cf67d89b43650 (diff)
Add CI Tests (#161)
* use systemd-run instead of machinectl * fix systemd user sessions by launching through runuser * skip mounting binfmt_misc if the kernel lacks support for it * link syschdemd/installer to static location * make check happy * test tests * add a simple installer test * add second test for exit codes * make tests responsible for checking exit code * fix: add which to path * overhaul actions workflow * move checks out of flake.nix * use GUID for image name * Split flake checks into matrix job * Check for side-effects * reformat powershell scripts * extend basic test * use pester for tests * "fix" (purposefully) failing test * rename lib -> init * Add test for systemd --user * Add test for docker-native * move release to separate workflow * change downstream workflow path * switch to a class * Test running with different user shells * Add lib implementation for Windows * Add documentation for the tests * readme: docker permissions * remove empty files
Diffstat (limited to 'modules')
-rw-r--r--modules/build-tarball.nix6
-rw-r--r--modules/installer.nix1
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/build-tarball.nix b/modules/build-tarball.nix
index feba78d..5eba52d 100644
--- a/modules/build-tarball.nix
+++ b/modules/build-tarball.nix
@@ -75,8 +75,10 @@ in
# These options make no sense without the wsl-distro module anyway
system.build.tarball = pkgs.callPackage "${nixpkgs}/nixos/lib/make-system-tarball.nix" {
- # No contents, structure will be added by prepare script
- contents = [ ];
+
+ contents = [
+ { source = config.users.users.root.shell; target = "/nix/nixos-wsl/entrypoint"; }
+ ];
fileName = "nixos-wsl-${pkgs.hostPlatform.system}";
diff --git a/modules/installer.nix b/modules/installer.nix
index 3fd404f..63bdc9e 100644
--- a/modules/installer.nix
+++ b/modules/installer.nix
@@ -56,6 +56,7 @@ with builtins; with lib; {
{ source = passwd; target = "/etc/passwd"; }
{ source = "${pkgs.busybox}/bin/busybox"; target = "/bin/sh"; }
{ source = "${pkgs.busybox}/bin/busybox"; target = "/bin/mount"; }
+ { source = "${installer}"; target = "/nix/nixos-wsl/entrypoint"; }
];
extraCommands = pkgs.writeShellScript "prepare" ''