nix/os/devices: renname CFB4ED74 -> vmd32387.contaboserver.net

This is in accordance to the reverse IPv4 entry
This commit is contained in:
steveej 2019-02-03 11:55:43 +01:00
parent fdf0160458
commit b115e73ac7
6 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,8 @@
{ lib
, ...
}:
{
boot.loader.grub.efiSupport = lib.mkForce false;
boot.extraModulePackages = [ ];
}

View file

@ -0,0 +1,16 @@
{ ... }:
{
disabledModules = [
"services/continuous-integration/gitlab-runner.nix"
];
imports = [
../../profiles/common/configuration.nix
../../modules/encryptedDisk.nix
../../modules/gitlab-runner.nix
./system.nix
./hw.nix
./pkg.nix
];
}

View file

@ -0,0 +1,30 @@
{ ... }:
let
stage1Modules = [
"aesni_intel"
"kvm-intel"
"aes_x86_64"
"virtio_balloon"
"virtio_scsi"
"virtio_net"
"virtio_pci"
"virtio_ring"
"virtio"
"scsi_mod"
];
in
{
# TASK: new device
hardware.encryptedDisk = {
enable = true;
diskId = "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
};
boot.initrd.availableKernelModules = stage1Modules;
boot.initrd.kernelModules = stage1Modules;
boot.extraModprobeConfig = ''
'';
}

View file

@ -0,0 +1,58 @@
{ config
, pkgs
, lib
, ...
}:
{
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix;
services.syncthing = {
enable = true;
openDefaultPorts = true;
};
services.hydra = {
enable = false;
hydraURL = "http://localhost:3000"; # externally visible URL
notificationSender = "hydra@${config.networking.hostName}.stefanjunker.de"; # e-mail of hydra service
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
buildMachinesFiles = [];
# you will probably also want, otherwise *everything* will be built from scratch
useSubstitutes = true;
};
nix.buildMachines = [
{ hostName = "localhost";
system = "x86_64-linux";
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
maxJobs = 4;
}
];
services.gitlab-runner = {
enable = true;
packages = with pkgs; [
bash
gitlab-runner
nix
gitFull
git-crypt
];
configFile = let
nixRunnerToken = "/etc/secrets/gitlab-runner/nix-runner.token";
in pkgs.writeText "config.toml" ''
concurrent = 2
check_interval = 0
[[runners]]
name = "nix-runner"
url = "https://gitlab.com"
token = "<% sed -z 's/[\n\s]//g' ${nixRunnerToken} %>"
executor = "shell"
shell = "bash"
[runners.cache]
'';
};
}

View file

@ -0,0 +1,84 @@
{ pkgs
, lib
, config
, ... }:
let
keys = import ../../../variables/keys.nix;
in {
# TASK: new device
networking.hostName = "vmd32387"; # Define your hostname.
networking.domain = "contaboserver.net";
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
# iperf3
5201
];
networking.firewall.logRefusedConnections = false;
networking.usePredictableInterfaceNames = false;
networking.dhcpcd = {
enable = true;
persistent = true;
};
networking.interfaces.eth0 = {
useDHCP = true;
ipv6.addresses = [
{ address = "2a02:c207:3003:2387::1"; prefixLength = 64; }
];
};
networking.defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
networking.nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "eth0";
};
# Kubernetes
# services.kubernetes.roles = ["master" "node"];
# virtualization
virtualisation = {
docker.enable = true;
};
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
boot.initrd.network = {
enable = true;
udhcpc.extraArgs = [ "-x hostname:${config.networking.hostName}" ];
ssh = {
enable = true;
authorizedKeys = keys.users.steveej.openssh;
};
};
boot.initrd.postMountCommands = ''
for iface in $(cd /sys/class/net && ls); do
echo "Bringing down $iface..."
ip address flush dev $iface
ip link set $iface down
done
'';
containers = {
mailserver = import ../../containers/mailserver.nix {
hostAddress = "192.168.100.10";
localAddress = "192.168.100.11";
};
webserver = import ../../containers/webserver.nix {
hostAddress = "192.168.100.12";
localAddress = "192.168.100.13";
};
};
}

View file

@ -0,0 +1,10 @@
{
channelsNixosStable = {
ref = "nixos-18.09";
rev = "c2950341d038995bf46a7b72db961bb3d3e9ac12";
};
channelsNixosUnstable = {
ref = "nixos-unstable";
rev = "44b02b52ea6a49674f124f50009299f192ed78bb";
};
}