diff options
| author | K900 <me@0upti.me> | 2023-09-29 23:21:23 +0300 |
|---|---|---|
| committer | K900 <me@0upti.me> | 2023-09-29 23:23:09 +0300 |
| commit | f347f6c75fe861dfd8f4c277d2bafa4e343968b6 (patch) | |
| tree | 38d7e878b579e1374c4216441fb084fc0c672a4d | |
| parent | 5bca9165acee81d3187fb75df858db765de102cd (diff) | |
fix: add better indirection to syschdemd proxy
Fixes username-change test
| -rw-r--r-- | flake.nix | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -50,14 +50,21 @@ system = "x86_64-linux"; modules = [ self.nixosModules.default - ({ config, ... }: { + ({ config, pkgs, ... }: { wsl.enable = true; wsl.nativeSystemd = false; - system.activationScripts.create-test-entrypoint.text = '' - mkdir -p /bin - ln -sfn ${config.users.users.root.shell} /bin/syschdemd - ''; + system.activationScripts.create-test-entrypoint.text = + let + syschdemdProxy = pkgs.writeShellScript "syschdemd-proxy" '' + shell=$(${pkgs.glibc.bin}/bin/getent passwd root | ${pkgs.coreutils}/bin/cut -d: -f7) + exec $shell $@ + ''; + in + '' + mkdir -p /bin + ln -sfn ${syschdemdProxy} /bin/syschdemd + ''; }) ]; }; |
