nixos/sshServe: use bash as default shell for nix-ssh user

Using the user-set default shell (which is intended for non-system users) for the nix-ssh user can lead to unpredictable behavior, such as `fish` complaining about the unwritable home directory on every connection. Bash is guaranteed to be available and work as expected, so explicitly use it instead.
This commit is contained in:
Melvyn 2023-12-08 14:01:35 -08:00 committed by GitHub
parent 2d0e419819
commit de12dd74d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.nix.sshServe;
@ -46,7 +46,7 @@ in {
description = "Nix SSH store user";
isSystemUser = true;
group = "nix-ssh";
useDefaultShell = true;
shell = pkgs.bashInteractive;
};
users.groups.nix-ssh = {};