Skip to content

Commit

Permalink
nixos/sshServe: use bash as default shell for nix-ssh user
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
melvyn2 authored Dec 8, 2023
1 parent 2d0e419 commit de12dd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/misc/nix-ssh-serve.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:

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

Expand Down

0 comments on commit de12dd7

Please sign in to comment.