Disable dotnet telemetry in dev shell

This commit is contained in:
Jaculabilis 2022-02-12 11:06:57 -08:00
parent c0c9ab15d1
commit fee929df47
2 changed files with 14 additions and 1 deletions

View File

@ -65,4 +65,13 @@ rec {
```
$ which dotnet
/nix/store/87s452c8wj2zmy21q8q394f6rzf5y1br-dotnet-sdk-6.0.100/bin/dotnet
```
```
So now we have our development tools (well, tool). The `dotnet --help` text tells us a few things about telemetry, so let's define a prompt so we know when we're in the nix shell and then set the telemetry opt-out.
```
shellHook = ''
PS1="5dplomacy:\W$ "
'';
DOTNET_CLI_TELEMETRY_OPTOUT = 1;
```

View File

@ -8,6 +8,10 @@
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
devShell = pkgs.mkShell {
shellHook = ''
PS1="5dplomacy:\W$ "
'';
DOTNET_CLI_TELEMETRY_OPTOUT = 1;
packages = [ pkgs.dotnet-sdk ];
};
}