feat(servers): add loki, the tricker.

This commit is contained in:
CronyAkatsuki 2025-05-05 22:11:11 +02:00
parent e88bccf101
commit 926884f6bf
9 changed files with 134 additions and 1 deletions

View File

@ -107,6 +107,15 @@
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.heimdall; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.heimdall;
}; };
}; };
loki = {
hostname = "loki";
profiles.system = {
sshUser = "root";
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.loki;
};
};
}; };
homeConfigurations = { homeConfigurations = {
@ -162,6 +171,17 @@
]; ];
}; };
loki = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
disko.nixosModules.disko
agenix.nixosModules.default
./hosts/loki/configuration.nix
./modules/servers/general
./modules/servers/loki
];
};
nixos = nixpkgs.lib.nixosSystem { nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
modules = [ modules = [

View File

@ -0,0 +1,27 @@
{
modulesPath,
lib,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disk-config.nix
];
networking.hostName = "loki";
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
environment.systemPackages = map lib.lowPrio [
pkgs.curl
pkgs.neovim
pkgs.gitMinimal
];
system.stateVersion = "24.05";
}

View File

@ -0,0 +1,54 @@
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/vda";
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,5 @@
{...}: {
imports = [
./rimgo.nix
];
}

View File

@ -0,0 +1,26 @@
{...}: {
services.rimgo = {
enable = true;
settings = {
PORT = 3000;
ADDRESS = "127.0.0.1";
};
};
services.traefik.dynamicConfigOptions.http = {
services.rimgo.loadBalancer.servers = [
{
url = "http://localhost:3000";
}
];
routers.rimgo = {
rule = "Host(`rimgo.cronyakatsuki.xyz`)";
tls = {
certResolver = "porkbun";
};
service = "rimgo";
entrypoints = "websecure";
};
};
}

View File

@ -1,6 +1,7 @@
let let
# SYSTEMS # SYSTEMS
heimdall = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs+qYjpeAEHPFUQeatNkhKbXz8+A1VAl21jgifDYJK8"; heimdall = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs+qYjpeAEHPFUQeatNkhKbXz8+A1VAl21jgifDYJK8";
loki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF+xpWCoBEO/pzAwS1ZZEsiLSarvSVkdxQEo49xma2PV";
# USERS # USERS
root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz"; root = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz";
@ -8,7 +9,7 @@ let
users = [ users = [
root root
]; ];
systems = [heimdall]; systems = [heimdall loki];
in { in {
"traefik.age".publicKeys = systems ++ users; "traefik.age".publicKeys = systems ++ users;
"wg-heimdall.age".publicKeys = systems ++ users; "wg-heimdall.age".publicKeys = systems ++ users;

Binary file not shown.

Binary file not shown.

Binary file not shown.