aboutsummaryrefslogtreecommitdiff
path: root/nix/tests/server.nix
blob: a8bbda622827ea27be5b5705d768d93cde71ff1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# SPDX-FileCopyrightText: 2024 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: MPL-2.0
{ pkgs, ... }:
{
  nix.settings.trusted-users = [ "deploy" ];
  users = let
    inherit (import "${pkgs.path}/nixos/tests/ssh-keys.nix" pkgs) snakeOilPublicKey;
  in {
    mutableUsers = false;
    users = {
      deploy = {
        password = "";
        isNormalUser = true;
        createHome = true;
        openssh.authorizedKeys.keys = [ snakeOilPublicKey ];
      };
      root.openssh.authorizedKeys.keys = [ snakeOilPublicKey ];
    };
  };
  services.openssh.enable = true;
  virtualisation.writableStore = true;
}