Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/infra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 476afc1a394c
Choose a base ref
...
head repository: NixOS/infra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 85f0489c3fd9
Choose a head ref
  • 1 commit
  • 10 files changed
  • 1 contributor

Commits on Oct 23, 2019

  1. Copy the full SHA
    85f0489 View commit details
Showing with 146 additions and 20 deletions.
  1. +49 −0 bastion/flake.lock
  2. +14 −0 bastion/flake.nix
  3. +13 −1 bastion/network.nix
  4. +1 −1 delft/datadog.nix
  5. +37 −0 delft/flake.lock
  6. +13 −0 delft/flake.nix
  7. +1 −14 delft/hydra.nix
  8. +16 −2 delft/network.nix
  9. +1 −1 delft/packet-importer.nix
  10. +1 −1 modules/hydra-mirror.nix
49 changes: 49 additions & 0 deletions bastion/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions bastion/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
edition = 201909;

inputs.nixpkgs.uri = "nixpkgs/release-19.09";
#inputs.nixops.uri = "/home/deploy/src/nixops";

outputs = { self, nixpkgs, nix, nixops }: {

nixopsConfigurations.default =
{ inherit nixpkgs; }
// import ./network.nix { inherit self nix nixops; };

};
}
14 changes: 13 additions & 1 deletion bastion/network.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{ self, nix, nixops }:

let
region = "eu-west-1";
zone = "eu-west-1a";
@@ -42,7 +44,7 @@ in
protocol = "udp";
}
] ++
(with import ../ip-addresses.nix;
(with import /home/deploy/src/nixos-org-configurations/ip-addresses.nix; # FIXME
map
(ip: { toPort = 22; fromPort = 22; sourceIp = "${ip}/32"; })
[ eelcoHome
@@ -122,6 +124,11 @@ in
../modules/hydra-mirror.nix
];

nixpkgs.overlays =
[ nix.overlay
nixops.overlay
];

users.extraUsers.tarball-mirror.openssh.authorizedKeys.keys = [ sshKeys.eelco ];

users.extraUsers.deploy =
@@ -144,6 +151,11 @@ in
#nix.gc.automatic = true;
nix.gc.dates = "daily";

nix.extraOptions =
''
experimental-features = nix-command flakes ca-references
'';

# Temporary hack until we have proper users/roles.
services.openssh.extraConfig =
''
2 changes: 1 addition & 1 deletion delft/datadog.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
services.dd-agent.enable = true;
services.dd-agent.api_key = builtins.readFile ./datadog.secret;
services.dd-agent.api_key = builtins.readFile /home/deploy/src/nixos-org-configurations/delft/datadog.secret;
}
37 changes: 37 additions & 0 deletions delft/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions delft/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
edition = 201909;

inputs.nixpkgs.uri = "nixpkgs/release-19.09";

outputs = { self, nixpkgs, hydra }: {

nixopsConfigurations.default =
{ inherit nixpkgs; }
// import ./network.nix { inherit self nixpkgs hydra; };

};
}
15 changes: 1 addition & 14 deletions delft/hydra.nix
Original file line number Diff line number Diff line change
@@ -3,16 +3,10 @@
with lib;

let
hydraSrc = ../../hydra;
hydra = (import (hydraSrc + "/release.nix") { nixpkgs = pkgs.path; }).build.x86_64-linux;
narCache = "/var/cache/hydra/nar-cache";
in

{
imports =
[ (hydraSrc + "/hydra-module.nix")
];

users.extraUsers.hydra.openssh.authorizedKeys.keys =
with import ../ssh-keys.nix; [ eelco rob ];
users.extraUsers.hydra-www.openssh.authorizedKeys.keys =
@@ -21,7 +15,6 @@ in
with import ../ssh-keys.nix; [ eelco rob ];

services.hydra-dev.enable = true;
services.hydra-dev.package = hydra;
services.hydra-dev.logo = ./hydra-logo.png;
services.hydra-dev.hydraURL = "https://hydra.nixos.org";
services.hydra-dev.notificationSender = "edolstra@gmail.com";
@@ -38,12 +31,6 @@ in
server_store_uri = https://cache.nixos.org?local-nar-cache=${narCache}
binary_cache_public_uri = https://cache.nixos.org
#<hipchat>
# jobs = (hydra|nixops):.*:.*
# room = 182482
# token = ${builtins.readFile ./hipchat-lb-token}
#</hipchat>
<Plugin::Session>
cache_size = 32m
</Plugin::Session>
@@ -62,7 +49,7 @@ in
evaluator_initial_heap_size = ${let gb = 20; in toString (gb * 1024 * 1024 * 1024)}
max_concurrent_evals = 2
max_concurrent_evals = 1
'';

systemd.tmpfiles.rules =
18 changes: 16 additions & 2 deletions delft/network.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
flakes:

let
makeMac = { ip, extra }: {
deployment = {
@@ -39,9 +41,21 @@ in {
lucifer = { deployment.targetHost = "lucifer.ewi.tudelft.nl"; imports = [ ./lucifer.nix ]; };
wendy = { deployment.targetHost = "wendy.ewi.tudelft.nl"; imports = [ ./wendy.nix ]; };
ike = { deployment.targetHost = "ike.ewi.tudelft.nl"; imports = [ ./build-machines-dell-r815.nix ]; };
chef = import ./chef.nix;

chef = {
system.configurationRevision = flakes.self.rev;
imports = [./chef.nix ];
};

eris = import ./eris.nix;
ceres = import ./ceres.nix;

ceres = {
system.configurationRevision = flakes.self.rev;
imports =
[ ./ceres.nix
flakes.hydra.nixosModules.hydra
];
};

mac1 = makeMac {
ip = "10.254.2.1";
2 changes: 1 addition & 1 deletion delft/packet-importer.nix
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ let
in
{
deployment.keys."hydra-packet-import.json" = {
keyFile = ../hydra-packet-import.json;
keyFile = /home/deploy/src/nixos-org-configurations/hydra-packet-import.json;
user = "hydra-packet";
};

2 changes: 1 addition & 1 deletion modules/hydra-mirror.nix
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ let
"nixpkgs-18.09-darwin" = "nixpkgs/nixpkgs-18.09-darwin/darwin-tested";
};

channelScripts = import <nixos-channel-scripts> { inherit pkgs; };
channelScripts = import /home/deploy/src/nixos-channel-scripts { inherit pkgs; }; # FIXME
orderLib = import ../lib/service-order.nix { inherit lib; };

makeUpdateChannel = channelName: mainJob: