2019-10-24 02:20:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.hcloud.nixserver;
|
|
|
|
|
2021-11-01 19:30:41 +01:00
|
|
|
in
|
|
|
|
{
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
options.hcloud.nixserver = {
|
|
|
|
enable = mkEnableOption ''
|
|
|
|
create a nixos server on hetzner.
|
|
|
|
this module will take car of everything needed
|
|
|
|
to be done, to install stuff on it.
|
|
|
|
|
|
|
|
wip
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
hcloud.resource = {
|
|
|
|
server."todo" = {
|
|
|
|
name = "todo-module-created-server";
|
|
|
|
image = "ubuntu-18.04";
|
|
|
|
iso = "nixos-graphical-18.09.1195.bf7930d582b-x86_64-linux.iso";
|
|
|
|
server_type = "cx11";
|
|
|
|
location = "nbg1";
|
|
|
|
rescue = "linux64";
|
2019-12-20 05:54:26 +01:00
|
|
|
labels = { system = "nixos"; };
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|