summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-10-11 16:45:13 +0000
committerMike Vink <mike1994vink@gmail.com>2023-10-11 16:45:13 +0000
commitee55a5ab4d4c2006f56f07707699e8d90388e4e2 (patch)
treea4b7755aa973be39a743afc381fba19100729686
parenta73324d2fe19f0516c881bbe7cd864850e77fd61 (diff)
fixup
-rw-r--r--machines/wsl.nix34
1 files changed, 25 insertions, 9 deletions
diff --git a/machines/wsl.nix b/machines/wsl.nix
index 5c25f8c..09e674b 100644
--- a/machines/wsl.nix
+++ b/machines/wsl.nix
@@ -12,15 +12,31 @@ let
wsl.enable = true;
wsl.defaultUser = "nixos";
- ${lib.optionalString (!cfg.nativeSystemd) "wsl.nativeSystemd = false;"}
-
- # This value determines the NixOS release from which the default
- # settings for stateful data, like file locations and database versions
- # on your system were taken. It's perfectly fine and recommended to leave
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "${config.system.nixos.release}"; # Did you read the comment?
+ environment.systemPackages = with pkgs; [
+ git
+ ];
+
+ system.stateVersion = "23.05";
+ virtualisation.docker = {
+ enable = true;
+ autoPrune = {
+ enable = true;
+ flags = ["-af"];
+ };
+ };
+ systemd.services.docker.serviceConfig = {
+ ExecStart = ["" $'$'
+ ${pkgs.docker}/bin/dockerd --config-file=/wsl/dockerd/daemon.json
+ $'$'];
+ EnvironmentFile = "/wsl/dockerd/environmentfile";
+ };
+ # TODO: why does this not work with just etc."resolv.conf"??
+ environment.etc."/resolv.conf".source = "/wsl/etc/resolv.conf";
+ environment.etc."profile.local".source = "/wsl/etc/profile";
+ security.pki.certificateFiles = [
+ (/. + "/wsl/pr-root.cer")
+ ];
+ system.stateVersion = "${config.system.nixos.release}";
}
'';
in