nixos-config/terranix/servers/modules/nix-server.nix
2019-12-20 17:54:26 +13:00

34 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"; };
};
};
};
}