diff options
| author | K900 <me@0upti.me> | 2023-10-02 09:10:45 +0300 |
|---|---|---|
| committer | K900 <me@0upti.me> | 2023-10-02 09:23:00 +0300 |
| commit | 83d3356e5c0becc6b7ab0429b4fe6a5f3d2dbb6b (patch) | |
| tree | c387344ae04f304f72a8212ca8fecf420493169d /modules | |
| parent | cadde47d123d1a534c272b04a7582f1d11474c48 (diff) | |
feat: add welcome message
Direct people to upgrade their systems first and link to support channels just in case.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/default.nix | 1 | ||||
| -rw-r--r-- | modules/welcome.nix | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/modules/default.nix b/modules/default.nix index 08a612a..c2f9a38 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,6 +6,7 @@ ./recovery.nix ./systemd ./version.nix + ./welcome.nix ./wsl-conf.nix ./wsl-distro.nix diff --git a/modules/welcome.nix b/modules/welcome.nix new file mode 100644 index 0000000..30b2466 --- /dev/null +++ b/modules/welcome.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, config, ... }: +let + welcomeMessage = pkgs.writeText "nixos-wsl-welcome-message" '' + Welcome to your new NixOS-WSL system! + + Please run `sudo nix-channel --update` and `sudo nixos-rebuild switch` now, to ensure you're running the latest NixOS and NixOS-WSL versions. + + If you run into issues, please report them on our Github page at https://github.com/nix-community/NixOS-WSL or come talk to us on Matrix at #wsl:nixos.org. + + ❄️ Enjoy NixOS-WSL! ❄️ + + Note: this message will disappear after you rebuild your system. If you want to see it again, run `nixos-wsl-welcome`. + ''; + welcome = pkgs.writeShellScriptBin "nixos-wsl-welcome" '' + cat ${welcomeMessage} + ''; +in +{ + config = lib.mkIf config.wsl.enable { + environment.systemPackages = [ welcome ]; + }; +} |
