Added quinto host
This commit is contained in:
46
data/nomad/cua-quinto.nomad
Normal file
46
data/nomad/cua-quinto.nomad
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
job "cua-quinto" {
|
||||||
|
region = "global"
|
||||||
|
datacenters = ["samfelag"]
|
||||||
|
type = "service"
|
||||||
|
|
||||||
|
group "cua-quinto" {
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
restart {
|
||||||
|
attempts = 5
|
||||||
|
delay = "15s"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
to = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# CUA-QUINTO APP
|
||||||
|
task "cua-quinto" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
env {
|
||||||
|
API_PREFIX = "/cua-quinto"
|
||||||
|
API_SCHEME = "https"
|
||||||
|
}
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "marc.sastre.cat/quinto-cua:latest"
|
||||||
|
ports = ["http"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 50
|
||||||
|
memory = 64
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "cua-quinto"
|
||||||
|
port = "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
55
hosts/quinto/default.nix
Normal file
55
hosts/quinto/default.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware.nix
|
||||||
|
./secrets.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# - Basic --------------------------------------
|
||||||
|
|
||||||
|
user.name = "marc";
|
||||||
|
user.shell = pkgs.zsh;
|
||||||
|
networking = {
|
||||||
|
hostName = "quinto";
|
||||||
|
firewall = {
|
||||||
|
enable = false;
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Bootloader ---------------------------------
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/vda";
|
||||||
|
};
|
||||||
|
|
||||||
|
# - Agenix ---------------------------------
|
||||||
|
|
||||||
|
age.identityPaths = [
|
||||||
|
"/home/marc/.ssh/id_ed25519"
|
||||||
|
];
|
||||||
|
|
||||||
|
# - Modules ------------------------------------
|
||||||
|
|
||||||
|
samfelag.modules = {
|
||||||
|
# - Common -----------------------------------
|
||||||
|
# See modules/common.nix for common packages installed
|
||||||
|
|
||||||
|
# - System -----------------------------------
|
||||||
|
system.utils.enable = true;
|
||||||
|
system.ssh.enable = true;
|
||||||
|
|
||||||
|
# - Server ----------------------------------
|
||||||
|
|
||||||
|
# - Editors and development ------------------
|
||||||
|
dev.git.userName = "marc";
|
||||||
|
dev.git.userEmail = "marc@sastre.cat";
|
||||||
|
|
||||||
|
dev.docker.enable = true;
|
||||||
|
dev.docker.users = ["marc"];
|
||||||
|
};
|
||||||
|
}
|
||||||
36
hosts/quinto/hardware.nix
Normal file
36
hosts/quinto/hardware.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
kernelModules = [ ];
|
||||||
|
};
|
||||||
|
kernelModules = [ ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-label/swap"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
|
interfaces = {
|
||||||
|
ens3.useDHCP = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
nameservers = [ "108.61.10.10" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.hypervGuest.enable = true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
2
hosts/quinto/quinto.org
Normal file
2
hosts/quinto/quinto.org
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* Quinto
|
||||||
|
Servidor a Vultr per a la cua del quinto
|
||||||
6
hosts/quinto/secrets.nix
Normal file
6
hosts/quinto/secrets.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user