Add nix-serve to Server7, enable flakes for hydra

This commit is contained in:
Emery Hemingway 2019-11-29 15:52:06 +01:00
parent 04159778a2
commit 1b5bd980e1
5 changed files with 196 additions and 11 deletions

View File

@ -10,13 +10,13 @@
./hardware-configuration.nix
./yggdrasil-prefix.nix
./hydra.nix
./nix-serve.nix
];
security.sudo.wheelNeedsPassword = false;
services.openssh = {
enable = true;
passwordAuthentication = false;
permitRootLogin = "no";
# DO NOT CHANGE, KINDERGARTEN IS OVER
};
@ -35,12 +35,19 @@
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
gc.automatic = true;
trustedUsers = [ "root" ];
buildMachines = [{
hostName = "hydra.hq.c3d2.de";
system = "x86_64-linux";
maxJobs = 2;
}];
};
networking = {
hostName = "nixbert";
firewall.enable = false;
hostName = "serve7";
useDHCP = false;
bridges.br0.interfaces = [ "enp2s0f1" ];
interfaces = {

View File

@ -163,7 +163,7 @@ in { config, pkgs, ... }: {
services.hydra = {
enable = true;
hydraURL = "https://flakes.hq.c3d2.de";
logo = ../../hosts/hydra/c3d2.svg;
logo = ./hydra.svg;
notificationSender = "hydra@spam.works";
package = hydraFlakes pkgs;
listenHost = "127.0.0.1";

163
hosts/server7/hydra.svg Normal file
View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="594.28000pt"
height="194.89000pt"
id="svg1"
sodipodi:version="0.32"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="hydra.svg"
version="1.1">
<defs
id="defs3" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.43415836"
inkscape:cx="497.42201"
inkscape:cy="266.76371"
inkscape:current-layer="svg1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:grid-points="true"
inkscape:guide-bbox="true"
inkscape:guide-points="true"
guidetolerance="2.0000000px"
inkscape:window-width="1362"
inkscape:window-height="740"
inkscape:window-x="0"
inkscape:window-y="12"
inkscape:window-maximized="0">
<inkscape:grid
id="GridFromPre046Settings"
type="xygrid"
originx="0"
originy="0"
spacingx="1.3333333"
spacingy="1.3333333"
color="#3f3fff"
empcolor="#3f3fff"
opacity="0.15"
empopacity="0.38"
empspacing="5" />
</sodipodi:namedview>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1" />
<path
d="M 5,123.6125 80,4.8625031 c 0,0 68.75,0 68.75,0 0,0 -68.75,118.7499969 -68.75,118.7499969 0,0 68.75,116.25 68.75,116.25 h -75 z"
id="path4772"
style="fill:#5175c0;fill-opacity:1" />
<path
d="M 92.5,123.6125 161.25,4.8625031 c 0,0 75,0 75,0 0,0 -68.75,118.7499969 -68.75,118.7499969 l 68.75,116.25 h -75 z"
id="path4770"
style="fill:#7eb3de;fill-opacity:1" />
<path
d="M 180,123.6125 248.75,4.8625031 c 0,0 75,0 75,0 0,0 -67.5,118.7499969 -67.5,118.7499969 l 67.5,116.25 h -75 z"
id="path4768"
style="fill:#5175c0;fill-opacity:1" />
<path
d="m 423.75,4.8625031 c 0,0 68.75,0 68.75,0 L 405,239.8625 h -68.75 z"
id="path4766"
style="fill:#7eb3de;fill-opacity:1" />
<path
d="m 573.75,123.6125 c 0,0 -68.75,-118.7499969 -68.75,-118.7499969 0,0 75,0 75,0 0,0 68.75,118.7499969 68.75,118.7499969 L 580,239.8625 h -75 c 0,0 68.75,-116.25 68.75,-116.25 z"
id="path4764"
style="fill:#5175c0;fill-opacity:1" />
<path
d="m 592.5,239.8625 c 0,0 68.75,-116.25 68.75,-116.25 0,0 -68.75,-118.7499969 -68.75,-118.7499969 h 75 L 736.25,123.6125 667.5,239.8625 c 0,0 -75,0 -75,0 z"
id="path1103"
style="fill:#7eb3de;fill-opacity:1" />
<path
style="opacity:0;fill:#ffffff;fill-opacity:1;stroke-width:1.15165353"
d="M 40.243955,182.04068 C 21.723264,150.70357 6.4358654,124.63858 6.2719589,124.11847 6.1080523,123.59834 22.729551,96.636025 43.208622,64.202186 L 80.443296,5.2315697 h 33.427314 c 27.32714,0 33.32015,0.279289 32.84004,1.5304274 C 146.25213,7.9568785 106.54016,76.84926 83.109504,117.09734 l -3.777885,6.48948 33.859941,57.25975 c 18.62297,31.49287 33.85994,57.46471 33.85994,57.71521 0,0.2505 -16.45505,0.45545 -36.56678,0.45545 H 73.917939 Z"
id="path4748"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 40.243955,182.04068 C 21.723264,150.70357 6.4358654,124.63858 6.2719589,124.11847 6.1080523,123.59834 22.729551,96.636025 43.208622,64.202186 L 80.443296,5.2315697 h 33.427314 c 27.32714,0 33.32015,0.279289 32.84004,1.5304274 C 146.25213,7.9568785 106.54016,76.84926 83.109504,117.09734 l -3.777885,6.48948 33.859941,57.25975 c 18.62297,31.49287 33.85994,57.46471 33.85994,57.71521 0,0.2505 -16.45505,0.45545 -36.56678,0.45545 H 73.917939 Z"
id="path4750"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 40.243955,182.04068 C 21.723264,150.70357 6.4358654,124.63858 6.2719589,124.11847 6.1080523,123.59834 22.729551,96.636025 43.208622,64.202186 L 80.443296,5.2315697 h 33.427314 c 27.32714,0 33.32015,0.279289 32.84004,1.5304274 C 146.25213,7.9568785 106.54016,76.84926 83.109504,117.09734 l -3.777885,6.48948 33.859941,57.25975 c 18.62297,31.49287 33.85994,57.46471 33.85994,57.71521 0,0.2505 -16.45505,0.45545 -36.56678,0.45545 H 73.917939 Z"
id="path4752"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 40.243955,182.04068 C 21.723264,150.70357 6.4358654,124.63858 6.2719589,124.11847 6.1080523,123.59834 22.729551,96.636025 43.208622,64.202186 L 80.443296,5.2315697 h 33.427314 c 27.32714,0 33.32015,0.279289 32.84004,1.5304274 C 146.25213,7.9568785 106.54016,76.84926 83.109504,117.09734 l -3.777885,6.48948 33.859941,57.25975 c 18.62297,31.49287 33.85994,57.46471 33.85994,57.71521 0,0.2505 -16.45505,0.45545 -36.56678,0.45545 H 73.917939 Z"
id="path4754"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 40.243955,182.04068 C 21.723264,150.70357 6.4358654,124.63858 6.2719589,124.11847 6.1080523,123.59834 22.729551,96.636025 43.208622,64.202186 L 80.443296,5.2315697 h 33.427314 c 27.32714,0 33.32015,0.279289 32.84004,1.5304274 C 146.25213,7.9568785 106.54016,76.84926 83.109504,117.09734 l -3.777885,6.48948 33.859941,57.25975 c 18.62297,31.49287 33.85994,57.46471 33.85994,57.71521 0,0.2505 -16.45505,0.45545 -36.56678,0.45545 H 73.917939 Z"
id="path4756"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 39.798247,182.97391 C 21.194881,151.51668 5.8549221,124.95667 5.7094473,123.95167 5.5639725,122.94667 22.182803,95.693953 42.640183,63.390072 L 79.835419,4.6557429 114.01929,4.3506923 c 22.26699,-0.1987067 34.18387,0.097179 34.18387,0.8487563 0,0.6345938 -15.27869,27.5376884 -33.95263,59.7846534 l -33.952629,58.630848 33.952629,57.40622 c 18.67394,31.57343 33.95263,57.79806 33.95263,58.27697 0,0.47891 -16.78064,0.87075 -37.29031,0.87075 H 73.622545 Z"
id="path4758" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="M 39.798247,182.97391 C 21.194881,151.51668 5.8549221,124.95667 5.7094473,123.95167 5.5639725,122.94667 22.182803,95.693953 42.640183,63.390072 L 79.835419,4.6557429 114.01929,4.3506923 c 22.26699,-0.1987067 34.18387,0.097179 34.18387,0.8487563 0,0.6345938 -15.27869,27.5376884 -33.95263,59.7846534 l -33.952629,58.630848 33.952629,57.40622 c 18.67394,31.57343 33.95263,57.79806 33.95263,58.27697 0,0.47891 -16.78064,0.87075 -37.29031,0.87075 H 73.622545 Z"
id="path4774"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="m 336.47317,238.17057 c 0.44551,-1.11786 18.66473,-49.97005 40.48715,-108.56042 C 398.78275,71.019777 418.2387,18.806685 420.19578,13.581058 l 3.55833,-9.5011418 h 34.39672 c 18.9182,0 34.38454,0.388683 34.36966,0.8637401 -0.0148,0.4750571 -19.62584,53.4655147 -43.57989,117.7565737 l -43.55283,116.89283 -34.86232,0.30499 c -32.91995,0.28801 -34.81718,0.19175 -34.05228,-1.72748 z"
id="path4776"
inkscape:connector-curvature="0" />
<path
style="opacity:0;fill:#ff0000;fill-opacity:1;stroke-width:1.15165353"
d="m 336.47317,238.17057 c 0.44551,-1.11786 18.66473,-49.97005 40.48715,-108.56042 C 398.78275,71.019777 418.2387,18.806685 420.19578,13.581058 l 3.55833,-9.5011418 h 34.39672 c 18.9182,0 34.38454,0.388683 34.36966,0.8637401 -0.0148,0.4750571 -19.62584,53.4655147 -43.57989,117.7565737 l -43.55283,116.89283 -34.86232,0.30499 c -32.91995,0.28801 -34.81718,0.19175 -34.05228,-1.72748 z"
id="path4778"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot8463"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:96px;line-height:125%;font-family:'Liberation Mono';-inkscape-font-specification:'Liberation Mono Bold';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(1.7228087,0,0,2.5200722,-118.4561,-151.78401)"><flowRegion
id="flowRegion8465"
style="font-size:96px;fill:#ff0000"><rect
id="rect8467"
width="679.47559"
height="191.17448"
x="108.25543"
y="57.162315"
style="font-size:96px;fill:#ff0000" /></flowRegion><flowPara
id="flowPara8469">FLAKES</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot8479"
style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:'Liberation Mono';font-style:normal;font-weight:bold;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px;-inkscape-font-specification:'Liberation Mono Bold';font-stretch:normal;font-variant:normal"><flowRegion
id="flowRegion8481"><rect
id="rect8483"
width="71.034798"
height="46.411858"
x="92.5"
y="123.6125" /></flowRegion><flowPara
id="flowPara8485"></flowPara></flowRoot></svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -0,0 +1,8 @@
{ ... }:
{
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
}

View File

@ -1,14 +1,21 @@
{ config, ... }:
{ config, lib, ... }:
{
let
notHydra = config.networking.hostName != "hydra";
notServer7 = config.networking.hostName != "server7";
port = toString config.services.nix-serve.port;
in {
networking.domain = "hq.c3d2.de";
nix = if config.networking.hostName == "hydra" then
{ }
else {
binaryCaches = [ "https://nix-serve.hq.c3d2.de" ];
binaryCachePublicKeys =
[ "nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo=" ];
nix = {
binaryCaches = [ ]
++ (lib.optional notHydra "http://hydra.hq.c3d2.de:${port}")
++ (lib.optional notServer7 "http://server7.hq.c3d2.de:${port}");
binaryCachePublicKeys = [
"nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo="
"server7:PxMuG2KvTibHSqOWi+6bY6fbv2ztjzbSEZHVIna/sRA="
];
};
users.motd = builtins.readFile ./motd;