Skip to content

Commit 45cf923

Browse files
committed
feat: add aphrodite host(gmms)
1 parent 7908c3b commit 45cf923

File tree

5 files changed

+125
-0
lines changed

5 files changed

+125
-0
lines changed

hosts/Aphrodite/configuration.nix

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
lib,
3+
config,
4+
...
5+
}: {
6+
imports = [
7+
./hardware-configuration.nix
8+
./extras/tinyproxy.nix
9+
../../users/sylveon.nix
10+
];
11+
12+
zaphkiel = {
13+
data.headless = true;
14+
data.wallpaper = ./kokomi_116824847_p0_cropped.jpg;
15+
secrets.tailAuth.file = ../../secrets/secret8.age;
16+
services = {
17+
enable = true;
18+
tailscale = {
19+
enable = true;
20+
exitNode.enable = true;
21+
exitNode.networkDevice = "ens18";
22+
authFile = config.age.secrets.tailAuth.path;
23+
};
24+
openssh.enable = true;
25+
fail2ban.enable = false;
26+
};
27+
programs.shpool = {
28+
enable = true;
29+
users = ["rexies"];
30+
};
31+
};
32+
time.timeZone = "Asia/Kathmandu";
33+
34+
boot.tmp.cleanOnBoot = true;
35+
networking.hostName = "Aphrodite";
36+
networking.domain = "divinity.org";
37+
38+
networking = {
39+
interfaces = {
40+
ens18.ipv4.addresses = [
41+
{
42+
address = "103.160.145.75";
43+
prefixLength = 24;
44+
}
45+
];
46+
};
47+
48+
defaultGateway = {
49+
address = "103.160.144.1";
50+
interface = "ens18";
51+
};
52+
};
53+
54+
# forward dns onto the tailnet
55+
networking = {
56+
nftables.enable = true;
57+
firewall = {
58+
interfaces."tailscale0" = {
59+
allowedTCPPorts = config.services.openssh.ports;
60+
allowedUDPPorts = [53];
61+
};
62+
};
63+
};
64+
services.dnscrypt-proxy.settings = {
65+
listen_addresses = [
66+
"100.121.86.4:53"
67+
"[fd7a:115c:a1e0::6e01:5604]:53"
68+
"127.0.0.1:53"
69+
"[::1]:53"
70+
];
71+
};
72+
73+
services.openssh = {
74+
openFirewall = lib.mkForce false;
75+
startWhenNeeded = lib.mkForce false;
76+
};
77+
system.stateVersion = "23.11";
78+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
services.tinyproxy = {
3+
enable = true;
4+
settings = {
5+
Port = 8888;
6+
Listen = "100.121.86.4";
7+
Timeout = 600;
8+
Allow = [
9+
"100.112.116.17" # Seraphine
10+
"100.65.1.15" # Persephone (New)
11+
];
12+
};
13+
};
14+
15+
networking.firewall.interfaces."tailscale0".allowedTCPPorts = [8888];
16+
systemd.services.tinyproxy.serviceConfig.RestartSec = 30;
17+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
modulesPath,
3+
lib,
4+
...
5+
}: {
6+
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
7+
boot.loader.grub.device = "/dev/sda";
8+
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
9+
boot.initrd.kernelModules = ["nvme"];
10+
fileSystems."/" = {
11+
device = "/dev/sda1";
12+
fsType = "ext4";
13+
};
14+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
15+
}
419 KB
Loading

users/sylveon.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let
2+
username = "Sylveon";
3+
description = "Sylveon SV";
4+
in {
5+
zaphkiel.data.users = [username];
6+
users.users.${username} = {
7+
inherit description;
8+
isNormalUser = true;
9+
# extraGroups = ["networkmanager" "wheel" "multimedia"];
10+
11+
openssh.authorizedKeys.keys = [
12+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlB7+ziR/1Wcvx/QvVGfI0x/84DjJQzgbUn0/SiGzyj sylveonsv@gmail.com"
13+
];
14+
};
15+
}

0 commit comments

Comments
 (0)