Compare commits
2 commits
41fc60e1eb
...
3f20242eab
Author | SHA1 | Date | |
---|---|---|---|
|
3f20242eab | ||
|
49ed2855a5 |
6 changed files with 20 additions and 164 deletions
|
@ -6,7 +6,7 @@ Refer to wiki for details.
|
|||
|
||||
- `core-services-01`
|
||||
- `public-cof`
|
||||
- `remote-builder-01`
|
||||
- `remote-builder-01`: **discontinued**.
|
||||
|
||||
## How to deploy a machine?
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
with dns.lib.combinators;
|
||||
let
|
||||
my = config.my;
|
||||
web01 = {
|
||||
CNAME = "web01.dmi01.infra.dgnum.eu";
|
||||
};
|
||||
public-cof-ips = {
|
||||
A = [ "45.13.104.27" ];
|
||||
AAAA = [ "2001:470:1f13:187:c08e:feff:fe4d:f5f5" ];
|
||||
};
|
||||
delegateACMEDNSChallenge = acme: { _acme-challenge.CNAME = [ acme ]; };
|
||||
|
||||
remoteBuilders = {
|
||||
nix01 = [ "2001:470:1f13:187:611:4514:d93a:f80a" ];
|
||||
};
|
||||
mkProxyRecord = AAAA: { inherit AAAA; A = [ "45.13.104.29" ]; };
|
||||
dualstack = {
|
||||
A = my.ipv4;
|
||||
|
@ -32,41 +32,21 @@ dualstack // {
|
|||
CAA = letsEncrypt my.email;
|
||||
|
||||
subdomains = {
|
||||
git = dualstack;
|
||||
git = web01;
|
||||
drone = dualstack;
|
||||
wiki = dualstack;
|
||||
monitoring = dualstack;
|
||||
auth = dualstack;
|
||||
push = dualstack;
|
||||
tailscale = dualstack;
|
||||
inventory = dualstack;
|
||||
core01 = dualstack;
|
||||
ns1 = dualstack;
|
||||
|
||||
# Non-beta service
|
||||
# Outline
|
||||
notion = public-cof-ips;
|
||||
notion = web01;
|
||||
# S3 API
|
||||
s3 = public-cof-ips;
|
||||
s3 = web01;
|
||||
# CDN API
|
||||
cdn = public-cof-ips // {
|
||||
CAA = [
|
||||
{ issuerCritical = false;
|
||||
tag = "issue";
|
||||
value = "letsencrypt.org";
|
||||
}
|
||||
{
|
||||
issuerCritical = false;
|
||||
tag = "iodef";
|
||||
value = "mailto:${my.email}";
|
||||
}
|
||||
];
|
||||
subdomains = {
|
||||
"*" = public-cof-ips;
|
||||
} // delegateACMEDNSChallenge "7a9dffd8-f57b-4635-ba79-07f8b0db4fad.acme.rz.ens.wtf.";
|
||||
};
|
||||
|
||||
builders.subdomains = lib.mapAttrs (n: AAAA: { inherit AAAA; }) remoteBuilders;
|
||||
cdn = web01;
|
||||
|
||||
gdd = {
|
||||
NS = [ "ns1.gdd.${my.subZone}." ];
|
||||
|
@ -83,21 +63,21 @@ dualstack // {
|
|||
beta = public-cof-ips // {
|
||||
subdomains = {
|
||||
traque = mkProxyRecord [ "2001:470:1f13:187:f053:94ff:fe46:9664" ];
|
||||
nuage = public-cof-ips;
|
||||
todo = public-cof-ips;
|
||||
minecraft = public-cof-ips;
|
||||
factorio = public-cof-ips;
|
||||
home = public-cof-ips;
|
||||
pads = public-cof-ips // {
|
||||
nuage = web01;
|
||||
todo = web01;
|
||||
minecraft = web01;
|
||||
factorio = web01;
|
||||
home = web01;
|
||||
pads = web01 // {
|
||||
subdomains = {
|
||||
api = public-cof-ips;
|
||||
files = public-cof-ips;
|
||||
sandbox = public-cof-ips;
|
||||
api = web01;
|
||||
files = web01;
|
||||
sandbox = web01;
|
||||
};
|
||||
};
|
||||
docs = public-cof-ips;
|
||||
jurisprudens = public-cof-ips;
|
||||
rstudio = public-cof-ips;
|
||||
docs = web01;
|
||||
jurisprudens = web01;
|
||||
rstudio = web01;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./system.nix
|
||||
# TODO monitoring
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.supportedFilesystems = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
networking.hostName = "remote-builder-01";
|
||||
networking.hostId = "11894198";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens18 = {
|
||||
useDHCP = true;
|
||||
ipv6.addresses = [{
|
||||
address = "2001:470:1f13:187:611:4514:d93a:f80a";
|
||||
prefixLength = 64;
|
||||
}];
|
||||
};
|
||||
networking.interfaces.ens19.useDHCP = true;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "us";
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
environment.systemPackages = with pkgs; [ vim wget kitty.terminfo git ];
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.mosh.enable = true;
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.zfs.autoScrub.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/4BC6-A750";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
# Auto GC and store optimizations
|
||||
nix = {
|
||||
settings.trusted-users = [ "root" ];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 90d";
|
||||
};
|
||||
optimise.automatic = true;
|
||||
extraOptions = ''
|
||||
min-free = ${toString (100 * 1024 * 1024)}
|
||||
max-free = ${toString (1024 * 1024 * 1024)}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -35,19 +35,6 @@ builtins.mapAttrs mkNode {
|
|||
stateVersion = "22.05";
|
||||
};
|
||||
|
||||
remote-builder-01 = {
|
||||
admins = [
|
||||
"gdd"
|
||||
"raito"
|
||||
"sinavir"
|
||||
"remote-builders"
|
||||
];
|
||||
|
||||
deployment.targetHost = "nix01.builders.rz.ens.wtf";
|
||||
|
||||
stateVersion = "21.05";
|
||||
};
|
||||
|
||||
public-cof = {
|
||||
admins = [
|
||||
"gdd"
|
||||
|
|
Loading…
Add table
Reference in a new issue