feat(servers): add odin, the chief.

This commit is contained in:
CronyAkatsuki 2025-05-10 20:35:22 +02:00
parent 7528722942
commit 69b79aa3d9
12 changed files with 119 additions and 1 deletions

View file

@ -132,6 +132,15 @@
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.thor;
};
};
odin = {
hostname = "odin";
profiles.system = {
sshUser = "root";
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.odin;
};
};
};
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
@ -201,6 +210,17 @@
];
};
odin = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
disko.nixosModules.disko
agenix.nixosModules.default
./hosts/odin/configuration.nix
./modules/servers/general
./modules/servers/odin
];
};
nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [

View file

@ -0,0 +1,41 @@
{
modulesPath,
lib,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disk-config.nix
];
networking.hostName = "odin";
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
environment.systemPackages = map lib.lowPrio [
pkgs.curl
pkgs.neovim
pkgs.gitMinimal
];
networking.useNetworkd = true;
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "enp1s0"; # either ens3 or enp1s0 depending on system, check 'ip addr'
networkConfig.DHCP = "ipv4";
address = [
# replace this address with the one assigned to your instance
"2a01:4f9:c012:f6df::1/64"
];
routes = [
{Gateway = "fe80::1";}
];
};
system.stateVersion = "24.05";
}

View file

@ -0,0 +1,54 @@
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -0,0 +1,2 @@
{...}: {
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -5,6 +5,7 @@ let
baldur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOvZ7Z8GS4+1+9D6u/BDit4Eij5Ubbii2dzJ/+ecT8iR";
bragi = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBKMV2vqlDvIkUefl5oEuVjVtjgFLEXyDKX2LWhVQsWT";
thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZGQLUhyLwmkTYhSccqO8umQJN0QHk6YaD863x7lcGv";
odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGfwv4CzZlPGsBukfoq5wBTlVfWJo7UHH7DP3ILP6/Z";
# USERS
root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz";
@ -12,7 +13,7 @@ let
users = [
root
];
systems = [heimdall loki baldur bragi thor];
systems = [heimdall loki baldur bragi thor odin];
in {
"traefik.age".publicKeys = systems ++ users;
"wg-heimdall.age".publicKeys = systems ++ users;

Binary file not shown.

Binary file not shown.

Binary file not shown.