Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created February 7, 2018 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/68f2951ec16fd544219559e4eabc4bf4 to your computer and use it in GitHub Desktop.
Save grahamc/68f2951ec16fd544219559e4eabc4bf4 to your computer and use it in GitHub Desktop.
{
defaults = {
networking.firewall.enable = false;
services.openssh.enable = true;
imports = [ ./roles.nix ];
};
} // (import ./terraform.nix)
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.roles.webnode;
in {
options = {
roles.webnode = {
enable = mkOption {
type = types.bool;
default = false;
};
};
};
config = mkIf cfg.enable rec {
services.nginx.enable = true;
};
}
{
webnode =
{ imports = [ ./webnode-hardware-configuration.nix ];
roles.webnode.enable = true;
deployment.targetHost = "195.201.27.88";
};
}
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/bd283d50-653e-43e6-a1d6-fd74b7a47fdb";
fsType = "ext4";
};
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 1;
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment