2018-12-12 07:59:08 -05:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
inherit (import ./../ssh-keys.nix pkgs)
|
|
|
|
snakeOilPrivateKey snakeOilPublicKey;
|
|
|
|
in {
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
|
|
|
|
systemd.services.mock-google-metadata = {
|
|
|
|
description = "Mock Google metadata service";
|
|
|
|
serviceConfig.Type = "simple";
|
|
|
|
serviceConfig.ExecStart = "${pkgs.python3}/bin/python ${./server.py}";
|
|
|
|
environment = {
|
|
|
|
SNAKEOIL_PUBLIC_KEY = snakeOilPublicKey;
|
|
|
|
};
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
after = [ "network.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
2022-01-15 07:51:28 -05:00
|
|
|
services.openssh.kbdInteractiveAuthentication = false;
|
2018-12-12 07:59:08 -05:00
|
|
|
services.openssh.passwordAuthentication = false;
|
|
|
|
|
|
|
|
security.googleOsLogin.enable = true;
|
|
|
|
|
|
|
|
# Mock google service
|
2021-03-18 13:02:07 -04:00
|
|
|
networking.interfaces.lo.ipv4.addresses = [ { address = "169.254.169.254"; prefixLength = 32; } ];
|
2018-12-12 07:59:08 -05:00
|
|
|
}
|