nixos-config/terranix/servers/modules/nix-server.nix
Ingolf Wagner 973e3b3305
reformat
2021-11-01 19:30:41 +01:00

35 lines
682 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hcloud.nixserver;
in
{
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";
labels = { system = "nixos"; };
};
};
};
}