diff options
author | Sereja313 | 2024-03-29 20:29:42 +0300 |
---|---|---|
committer | GitHub | 2024-03-29 20:29:42 +0300 |
commit | 2bad21828ee2c5d1e42588d5f4c53f5b10300c6a (patch) | |
tree | f22e488e7d057772809a9936ad124915ff968b6f /nix/tests/server.nix | |
parent | 0a0187794ac7f7a1e62cda3dabf8dc041f868790 (diff) | |
parent | a92835264100583903dc408abe43d461ff7d4dca (diff) |
Merge pull request #264 from serokell/sereja/OPS-1384-add-nixos-vm-test
[OPS-1384] Introduce NixOS VM tests
Diffstat (limited to 'nix/tests/server.nix')
-rw-r--r-- | nix/tests/server.nix | 23 |
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; +} |