From c3d22fdca11b39a859501d4b223266d528101e80 Mon Sep 17 00:00:00 2001 From: devhell Date: Wed, 23 Jan 2019 23:22:05 +0000 Subject: [PATCH] nixos-generate-config: Include extraGroups "wheel" I've been asked, on numerous occasions, by my students and others, how to 'sudo' on NixOS. Of course new users could read up in the manual on how to do that, or we could make it more accessible for them by simply making it visible in the default `configuration.nix` file. Additionally, as raised in [1], replacing `guest` with something more recognizable could be potentially beneficial to new users. I've opted for `jane` for now. [1]: https://github.com/NixOS/nixpkgs/pull/54519#issuecomment-457012223 --- nixos/modules/installer/tools/nixos-generate-config.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index bad9356ab5a6..e58392ad05b4 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -635,9 +635,10 @@ $bootLoaderConfig # services.xserver.desktopManager.plasma5.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.guest = { + # users.users.jane = { # isNormalUser = true; # uid = 1000; + # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. # }; # This value determines the NixOS release with which your system is to be