aboutsummaryrefslogtreecommitdiff
path: root/nix/tests/server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/tests/server.nix')
-rw-r--r--nix/tests/server.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nix/tests/server.nix b/nix/tests/server.nix
new file mode 100644
index 0000000..a8bbda6
--- /dev/null
+++ b/nix/tests/server.nix
@@ -0,0 +1,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;
+}