From aa84d79ccc1213ef95ddc72fca3c0f80a58fd2f8 Mon Sep 17 00:00:00 2001 From: Attila Gulyas Date: Mon, 27 Nov 2023 09:11:42 -0500 Subject: [PATCH] Fix deprecation warnings (see issue #3 by @behrica) [..] > https://github.com/society-for-the-blind/nixos-azure-deploy/blob/8847efbb7950091a8e6bf0f43d47d6744bfa1e02/nixos/maintainers/scripts/azure-new/examples/basic/system.nix#L24-L25 > > `nix.trustedUsers` has been deprecated in favor of [`nix.settings.trusted-users`](https://nixos.org/manual/nixos/stable/options#opt-nix.settings.trusted-users) ([source permalink](https://github.com/NixOS/nixpkgs/blob/5b528f99f73c4fad127118a8c1126b5e003b01a9/nixos/modules/config/nix.nix#L292-L305); couldn't find anything about this in the release notes) > > https://github.com/society-for-the-blind/nixos-azure-deploy/blob/8847efbb7950091a8e6bf0f43d47d6744bfa1e02/nixos/maintainers/scripts/azure-new/examples/basic/system.nix#L33 > > `services.openssh.passwordAuthentication` has been deprecated in favor of [`services.openssh.settings.PasswordAuthentication`](https://nixos.org/manual/nixos/stable/options#opt-services.openssh.settings.PasswordAuthentication) (see [NixOS 23.05 release notes entry](https://nixos.org/manual/nixos/stable/release-notes#sec-release-23.05-notable-changes) - perhaps the same applies to `trusted-users` as well) --- .../maintainers/scripts/azure-new/examples/basic/system.nix | 6 +++--- nixos/maintainers/scripts/azure-new/tr2-image/system.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/maintainers/scripts/azure-new/examples/basic/system.nix b/nixos/maintainers/scripts/azure-new/examples/basic/system.nix index 9d70bd7..f43d8aa 100644 --- a/nixos/maintainers/scripts/azure-new/examples/basic/system.nix +++ b/nixos/maintainers/scripts/azure-new/examples/basic/system.nix @@ -21,8 +21,8 @@ in # description = "Azure NixOS Test User"; # openssh.authorizedKeys.keys = [ (builtins.readFile ~/.ssh/id_ed25519.pub) ]; }; - # nix.trustedUsers = [ username ]; - nix.trustedUsers = [ "@wheel" ]; + # nix.settings.trusted-users = [ username ]; + nix.settings.trusted-users = [ "@wheel" ]; virtualisation.azureImage.diskSize = 2500; @@ -30,7 +30,7 @@ in boot.kernelPackages = pkgs.linuxPackages_latest; # test user doesn't have a password - services.openssh.passwordAuthentication = false; + services.openssh.settings.PasswordAuthentication = false; security.sudo.wheelNeedsPassword = false; environment.systemPackages = with pkgs; [ diff --git a/nixos/maintainers/scripts/azure-new/tr2-image/system.nix b/nixos/maintainers/scripts/azure-new/tr2-image/system.nix index d33cc18..5a579a4 100644 --- a/nixos/maintainers/scripts/azure-new/tr2-image/system.nix +++ b/nixos/maintainers/scripts/azure-new/tr2-image/system.nix @@ -21,8 +21,8 @@ in # description = "Azure NixOS Test User"; # openssh.authorizedKeys.keys = [ (builtins.readFile ~/.ssh/id_ed25519.pub) ]; }; - # nix.trustedUsers = [ username ]; - nix.trustedUsers = [ "@wheel" ]; + # nix.settings.trusted-users = [ username ]; + nix.settings.trusted-users = [ "@wheel" ]; virtualisation.azureImage.diskSize = 2500; @@ -30,7 +30,7 @@ in boot.kernelPackages = pkgs.linuxPackages_latest; # test user doesn't have a password - services.openssh.passwordAuthentication = false; + services.openssh.settings.PasswordAuthentication = false; security.sudo.wheelNeedsPassword = false; environment.systemPackages = with pkgs; [