ci.nix 1.41 KB
Newer Older
Valentin Reis's avatar
stub ci    
Valentin Reis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  pkgs ? import ../pin.nix ../nixpkgs-18.03.json,
}:
let
  keys = [ (pkgs.lib.readFile keys/id_rsa_vrg.pub) ];
  argopkgs = import ../pkgs {};
in
  {
    network.description = "argo-ci";
    network.enableRollback = false;

    main =
    { nodes, ... }:
Valentin Reis's avatar
Valentin Reis committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    {
      imports = [
        ./providers/openstack-tacc.nix
      ];

      networking = {
        firewall = {
          allowedTCPPorts=[
            22
            8080 # micro-ci
          ];
          allowedUDPPorts=[
            22
            8080 # micro-ci
          ];
        };
      };

      deployment.targetEnv = "none";
      deployment.targetHost = "129.114.111.116";

      users.extraUsers.fre = {
        isNormalUser = true;
        extraGroups= ["wheel"];
        openssh.authorizedKeys.keys = keys;
      };

      services.openssh.enable = true;
      services.openssh.passwordAuthentication = false;
      users.users.root.openssh.authorizedKeys.keys = keys ;

      systemd.services = {
         ## nova-config.nix disables these via profiles/headless.nix
         "serial-getty@ttyS0".enable = pkgs.lib.mkForce true;
         "getty@tty1".enable = pkgs.lib.mkForce true;
         ## For some reason, getty@.service is missing
         ## a dependency on the getty.target.
         "getty@tty1".wantedBy = [ "getty.target" ];
       };

       boot.kernelParams = [ "console=tty1" ];
       boot.kernelPackages = pkgs.linuxPackages_latest;
     };
   }