mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Rename hosts for clarity
This commit is contained in:
parent
d99844df8f
commit
fc386b98dd
24 changed files with 0 additions and 0 deletions
68
hosts/srv-monitor/default.nix
Normal file
68
hosts/srv-monitor/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
config,
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
meta = {
|
||||
domains.assertUnique = true;
|
||||
ports.assertUnique = true;
|
||||
};
|
||||
|
||||
custom = {
|
||||
sops = {
|
||||
enable = true;
|
||||
agePublicKey = "age1dnru7l0agvnw3t9kmx60u4vh5u4tyd49xdve53zspxkznnp9f34qtec9dl";
|
||||
};
|
||||
boot.loader.grub.enable = true;
|
||||
users.seb.enable = true;
|
||||
|
||||
services = {
|
||||
resolved.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
gatus = {
|
||||
enable = true;
|
||||
domain = "status.${config.custom.services.tailscale.domain}";
|
||||
domainsToMonitor = config.meta.domains.globalList;
|
||||
hostsToMonitor = self.nixosConfigurations |> lib.attrNames;
|
||||
customEndpoints = {
|
||||
"alerts" = {
|
||||
group = "Monitoring";
|
||||
url = "https://${config.custom.services.ntfy.domain}/v1/health";
|
||||
extraConditions = [ "[BODY].healthy == true" ];
|
||||
};
|
||||
"git ssh".url = "ssh://git.sstork.dev";
|
||||
};
|
||||
};
|
||||
|
||||
ntfy = {
|
||||
enable = true;
|
||||
domain = "alerts.${config.custom.services.tailscale.domain}";
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.${config.custom.services.tailscale.domain}";
|
||||
};
|
||||
|
||||
caddy.virtualHosts = {
|
||||
gatus = {
|
||||
inherit (config.custom.services.gatus) domain port;
|
||||
};
|
||||
ntfy = {
|
||||
inherit (config.custom.services.ntfy) domain port;
|
||||
};
|
||||
grafana = {
|
||||
inherit (config.custom.services.grafana) domain port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
36
hosts/srv-monitor/disko.nix
Normal file
36
hosts/srv-monitor/disko.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
device = "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
hosts/srv-monitor/hardware.nix
Normal file
47
hosts/srv-monitor/hardware.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ modulesPath, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.default
|
||||
"${modulesPath}/profiles/qemu-guest.nix"
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking.useDHCP = false;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."10-enp1s0" = {
|
||||
matchConfig.Name = "enp1s0";
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
networkConfig.DHCP = "no";
|
||||
address = [
|
||||
"49.13.231.235/32"
|
||||
"2a01:4f8:1c1e:76fe::1/64"
|
||||
];
|
||||
routes = [
|
||||
{
|
||||
Gateway = "172.31.1.1";
|
||||
GatewayOnLink = true;
|
||||
}
|
||||
{ Gateway = "fe80::1"; }
|
||||
];
|
||||
dns = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
"2606:4700:4700::1111"
|
||||
"2001:4860:4860::8888"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
29
hosts/srv-monitor/secrets.json
Normal file
29
hosts/srv-monitor/secrets.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"seb-password": "ENC[AES256_GCM,data:laGJomW5c5TB3alpPgZKElQ3Y46OBxPrA0AxVNgx/09oSuG0EM63cnnkwZkrTeZxqjBH2UOryLqCr9DUr9mhZsovqNtZ2t8Uzg==,iv:GpBQNm1jspU8PCN+SzfAUKSps3YySg6JJVYOLOFetOI=,tag:2nARGI9XwzLfJFRhDyGBSw==,type:str]",
|
||||
"tailscale": {
|
||||
"auth-key": "ENC[AES256_GCM,data:hF6SMEZhCSXq0+4IYiFIUPbe+OdaBw6YctV9d7z5SGPktYJBi+Bz2Y7vjcW1gwAqIeueZWcYHXsWpoc6Kw==,iv:9KRhsNdOu0LHGBlgeovJcC1DHaiHZTXD2Z52ZRBV4XQ=,tag:b/+W+O1kmKRmuzmiPjk+3w==,type:str]",
|
||||
"service-auth-key": "ENC[AES256_GCM,data:eW+qrl8STML5c3TuSDCn6VRK5hwsgr1+4VjyBw10oYSw8y2tf9yQyN8Q9U5+pscFMDncg6bmATDO3sZpNdQ=,iv:gH44PlSM8qNqiB+NXg+YiwsfL2kc++CaHbXc3YnTDiY=,tag:EfTfUYzGS+bwJlnhLjtGsw==,type:str]"
|
||||
},
|
||||
"healthchecks": {
|
||||
"ping-key": "ENC[AES256_GCM,data:wlrgEbJ9B57kjmB+0hof/fJOBb4tcA==,iv:ibMBpcrSocLBhtumsSV00+KVN6Pi4SzE7soCkZcU4fY=,tag:wqYBB0Bi3M+UYinhd8pY+w==,type:str]"
|
||||
},
|
||||
"grafana": {
|
||||
"admin-password": "ENC[AES256_GCM,data:VXM9heVazDBVltWvzlMrKTjeSmpArPvz9ZhTlPs=,iv:owHyuoupNQO09aRBgU2phIwxg22U1rUqKyYbw2193m4=,tag:EPiRny2k2Gw2kONyyzLpug==,type:str]"
|
||||
},
|
||||
"sops": {
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1mpq8m4p7dnxh5ze3fh7etd2k6sp85zdnmp9te3e9chcw4pw07pcq960zh5",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvd29MSnZKanp3OXZxNHhv\nVks2ajgwb25qVnVDSWIvZWh1MytGTFBHL1dvCmhDNEF2R3Zac29HVHdLdXljYjJs\nalZYZDF2MjR2cWdBNWZYQXh1OElSWTgKLS0tIHY0eDJhRlVqbUtJQkFSTUh6cFor\nTWhBRXFNb3p1NU5udW9SU1Q4L2YyaVUKUMopZJ68KwiAknBFvz01X0TvBVH+1amz\nPxhHWvrcY54s8vfw9gk6LiN3o4vlZVCSfzHGLGoXxFeylc6RTM4CIw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
},
|
||||
{
|
||||
"recipient": "age1dnru7l0agvnw3t9kmx60u4vh5u4tyd49xdve53zspxkznnp9f34qtec9dl",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhSDhRQmpXaGdocDMvaS9u\na0ZyOEtNT2N4bG01NERFQTErc1hFaE1xWFFVClA4YjBwdGVhbTZ3dE9ZSFV2M1Zu\nZCtuVHN4R0NMQU16UXFRdVVqQlJLazgKLS0tIDdmWVc4ejFNRWVhY1piSTBXU0cx\nV1F2cjlmRWNKWkN1U3hwNWl6U2lEb1kKgsj22mpgxpgA5oXTXhoA5DtkySqqcn17\nOrpUiZmfOABXEZ0b5pnkAD06aW+7j2SqajYpvguxIrD9x1w562FmZA==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-08-15T16:43:35Z",
|
||||
"mac": "ENC[AES256_GCM,data:T8KGPxXrtL2BsBQHJM9StM2m+/cbvWUJTRcxFoOYzqphkU+ePeffVOpRvP+dftb6yQ+PUm7fHATCkRrhJ4uWmHp2baiC/2g9102ebb1bzzIJ+Aj9+167/JoeWa+c+UIFAIv5nBn2Wl759eghLI8tNRW0q4F9LR8Tc1q/BK0BCqE=,iv:hxy7RnPsnX7Ua2I9zMGMYQUx5Jhm6YPBdXAmX1+pZKo=,tag:4/eQmA8O114cR41husA/UA==,type:str]",
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.10.2"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue