hosts/grail: init

This commit is contained in:
Max Headroom 2023-11-04 00:24:43 +01:00
parent 0752d1e1d8
commit be013f184e
4 changed files with 79 additions and 0 deletions

25
hosts/grail/default.nix Normal file
View file

@ -0,0 +1,25 @@
tools: {
ssh.enable = true;
ssh.id = with tools.dns; {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBi5Fm2pmMBhRgJms+me1ldt9Vgj9cMSnB7UllSz3mpY";
hostNames = subResolve "grail" "node";
};
interfaces = {
primary = {
addr = "37.27.11.202";
link = "enp1s0";
};
vstub = {
addr = "10.1.0.6";
link = "vstub";
};
};
enterprise = {
subdomain = "node";
};
system = "aarch64-linux";
nixos = ./system.nix;
}

View file

@ -0,0 +1,10 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/boot" = { device = "/dev/disk/by-partlabel/boot"; fsType = "vfat"; };
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/disk/by-partlabel/rootfs"; fsType = "ext4"; };
}

42
hosts/grail/system.nix Normal file
View file

@ -0,0 +1,42 @@
{ depot, ... }:
let
inherit (depot.reflection.interfaces) primary;
in
{
imports = [
./hardware-configuration.nix
depot.inputs.agenix.nixosModules.age
depot.nixosModules.serverBase
];
zramSwap.enable = true;
networking.hostName = "grail";
networking.nameservers = [ depot.hours.VEGAS.interfaces.vstub.addr ];
i18n.defaultLocale = "en_US.UTF-8";
services.openssh.enable = true;
time.timeZone = "Europe/Helsinki";
networking = {
defaultGateway = "172.31.1.1";
useDHCP = false;
dhcpcd.enable = false;
interfaces = {
${primary.link} = {
ipv4.addresses = [
{ address = primary.addr; prefixLength = 32; }
];
ipv4.routes = [ { address = "172.31.1.1"; prefixLength = 32; } ];
};
};
};
system.stateVersion = "23.05";
}

View file

@ -16,6 +16,8 @@ in with tools.dns;
VEGAS = import ./VEGAS tools; VEGAS = import ./VEGAS tools;
prophet = import ./prophet tools; prophet = import ./prophet tools;
grail = import ./grail tools;
}; };
fromFlesh = { fromFlesh = {