Initial drone container config

This commit is contained in:
Erwin Boskma 2021-12-10 15:58:04 +01:00
parent fd289c62d4
commit 7cb55cd7b2
Signed by: erwin
GPG key ID: 270B20D17394F7E5
4 changed files with 48 additions and 1 deletions

View file

@ -32,4 +32,5 @@ rec {
# nix-build ./krops.nix -A loki && ./result # nix-build ./krops.nix -A loki && ./result
loki = createHost "loki" "root@loki"; loki = createHost "loki" "root@loki";
drone = createHost "drone" "root@10.0.0.185";
} }

View file

@ -0,0 +1,40 @@
{ self, ... }:
{
imports = [
./hardware-configuration.nix
../../users/root
../../users/erwin
];
eboskma = {
docker.enable = true;
nix-common.enable = true;
};
boot.isContainer = true;
time.timeZone = "Europe/Amsterdam";
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
networking = {
hostName = "drone";
useDHCP = false;
interfaces = {
eth0 = {
ipv4.addresses = [{
address = "10.0.0.202";
prefixLength = "24";
}];
};
};
defaultGateway = "10.0.0.1";
nameservers = [ "10.0.0.254" ];
};
services.openssh.enable = true;
system.stateVersion = "21.11";
}

View file

@ -0,0 +1,6 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
];
}

View file

@ -10,7 +10,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
config.eboskma.docker.enable = true; eboskma.docker.enable = true;
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
element-web = { element-web = {