Merge branch 'main' of ssh://git.amarth.cloud/amarth/infra

This commit is contained in:
Chris Kruining 2025-09-24 06:04:03 +00:00
commit 8d85bb2ab9
2 changed files with 204 additions and 69 deletions

View file

@ -11,28 +11,28 @@
description = "Management node 1"; description = "Management node 1";
machineClass = "nixos"; machineClass = "nixos";
tags = [ "cloud:amarth" "region:oss" "nodeType:management" "criticallity:critical" "" ]; tags = [ "cloud:amarth" "region:oss" "nodeType:management" "criticallity:critical" "" ];
deploy.targetHost = "root@192.168.1.223"; # deploy.targetHost = "root@192.168.1.223";
}; };
c1 = { c1 = {
name = "compute-1"; name = "compute-1";
description = "Compute node 1"; description = "Compute node 1";
machineClass = "nixos"; machineClass = "nixos";
tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ]; tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ];
deploy.targetHost = "root@192.168.1.224"; # deploy.targetHost = "root@192.168.1.224";
}; };
c2 = { c2 = {
name = "compute-2"; name = "compute-2";
description = "Compute node 2"; description = "Compute node 2";
machineClass = "nixos"; machineClass = "nixos";
tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ]; tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ];
deploy.targetHost = "root@192.168.1.225"; # deploy.targetHost = "root@192.168.1.225";
}; };
c3 = { c3 = {
name = "compute-3"; name = "compute-3";
description = "Compute node 3"; description = "Compute node 3";
machineClass = "nixos"; machineClass = "nixos";
tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ]; tags = [ "cloud:amarth" "region:oss" "nodeType:compute" "criticallity:medium" "" ];
deploy.targetHost = "root@192.168.1.226"; # deploy.targetHost = "root@192.168.1.226";
}; };
}; };
@ -45,6 +45,15 @@
}; };
}; };
internet = {
roles.default.machines = {
m1.settings.host = "192.168.1.223";
c1.settings.host = "192.168.1.224";
c2.settings.host = "192.168.1.225";
c3.settings.host = "192.168.1.226";
};
};
zerotier = { zerotier = {
roles.controller.machines."m1" = { }; roles.controller.machines."m1" = { };
roles.peer.tags.all = { }; roles.peer.tags.all = { };
@ -76,6 +85,15 @@
roles.agent.machines."c2" = {}; roles.agent.machines."c2" = {};
roles.agent.machines."c3" = {}; roles.agent.machines."c3" = {};
}; };
customer-portal = {
module = {
name = "customer-portal";
input = "amarth-services";
};
roles.server.machines."m1" = {};
};
}; };
# Additional NixOS configuration can be added here. # Additional NixOS configuration can be added here.
@ -84,7 +102,7 @@
machines = { machines = {
# m1 = { config, pkgs, ... }: { # m1 = { config, pkgs, ... }: {
# environment.systemPackages = [ pkgs.asciinema ]; # environment.systemPackages = [ pkgs.asciinema ];
# nixpkgs.hostPlatform = "x86_64-linux"; # nixpkgs.hostPlatform = "x86_64-linux";
# }; # };
m1 = { m1 = {

245
flake.lock generated
View file

@ -1,19 +1,39 @@
{ {
"nodes": { "nodes": {
"amarth-services": { "amarth-customer-portal": {
"inputs": { "inputs": {
"clan-core": "clan-core", "bun2nix": "bun2nix",
"devshell": "devshell",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs"
"systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1758205629, "lastModified": 1758634522,
"narHash": "sha256-cfBBtyeH9PgetawgQf0ogKdSn1bIPPoimapAjm7RanM=", "narHash": "sha256-Y5J+yCAbNZnPhrCvrTjhGUTD5amONxH/R/MGqwm0uIc=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "33aadaaecda17d3fd472507551974a3e6158ac22", "rev": "e7b0307690730781d9908cf3a48b9081b9ffe87c",
"revCount": 41, "revCount": 23,
"type": "git",
"url": "https://git.amarth.cloud/amarth/customer-portal"
},
"original": {
"type": "git",
"url": "https://git.amarth.cloud/amarth/customer-portal"
}
},
"amarth-services": {
"inputs": {
"amarth-customer-portal": "amarth-customer-portal",
"clan-core": "clan-core",
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2",
"systems": "systems_3"
},
"locked": {
"lastModified": 1758657712,
"narHash": "sha256-j1jbJ0PD1k4FQoHSmbzAteF1euLc1ChAIDyOsJc4Qns=",
"ref": "refs/heads/main",
"rev": "ad2b96180f00d45e4319d1595b948bba38e3915a",
"revCount": 45,
"type": "git", "type": "git",
"url": "https://git.amarth.cloud/amarth/services" "url": "https://git.amarth.cloud/amarth/services"
}, },
@ -22,6 +42,60 @@
"url": "https://git.amarth.cloud/amarth/services" "url": "https://git.amarth.cloud/amarth/services"
} }
}, },
"blueprint": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth-customer-portal",
"bun2nix",
"nixpkgs"
],
"systems": [
"amarth-services",
"amarth-customer-portal",
"bun2nix",
"systems"
]
},
"locked": {
"lastModified": 1744632722,
"narHash": "sha256-0chvqUV1Kzf8BMQ7MsH3CeicJEb2HeCpwliS77FGyfc=",
"owner": "numtide",
"repo": "blueprint",
"rev": "49bbd5d072b577072f4a1d07d4b0621ecce768af",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "blueprint",
"type": "github"
}
},
"bun2nix": {
"inputs": {
"blueprint": "blueprint",
"nixpkgs": [
"amarth-services",
"amarth-customer-portal",
"nixpkgs"
],
"systems": "systems",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1758108094,
"narHash": "sha256-ZO7dOTEipchkK/2mX6uAGbe6zQXnvHr40ri6jOztNR4=",
"owner": "baileyluTCD",
"repo": "bun2nix",
"rev": "72c047583edc83e2c2eada6e348dfaa622781331",
"type": "github"
},
"original": {
"owner": "baileyluTCD",
"repo": "bun2nix",
"type": "github"
}
},
"clan-core": { "clan-core": {
"inputs": { "inputs": {
"data-mesher": "data-mesher", "data-mesher": "data-mesher",
@ -38,8 +112,8 @@
"nixpkgs" "nixpkgs"
], ],
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"systems": "systems", "systems": "systems_2",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1758121565, "lastModified": 1758121565,
@ -67,15 +141,15 @@
"nixpkgs" "nixpkgs"
], ],
"sops-nix": "sops-nix_2", "sops-nix": "sops-nix_2",
"systems": "systems_3", "systems": "systems_4",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
"lastModified": 1758204028, "lastModified": 1758642849,
"narHash": "sha256-X4zDdbrhaHY8hcU422TrIlCESFFfRD1Zj/sTxbxdTqg=", "narHash": "sha256-t6fn1DuP8acTIUJ6uQuNJojT4pjMcjC6aiEZRljiyQg=",
"rev": "854481fd49671f09fbd55727436fafdcda8e3022", "rev": "3171512f30802ada403d47c9d7a19b5350aa5565",
"type": "tarball", "type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/854481fd49671f09fbd55727436fafdcda8e3022.tar.gz" "url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/3171512f30802ada403d47c9d7a19b5350aa5565.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -128,35 +202,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757905600, "lastModified": 1758510393,
"narHash": "sha256-Yd7buL9N7N7IaDVViItqP9HsECfnlDFykxvvNgMYcKk=", "narHash": "sha256-Bd7gr2RBaDJn1Zppus1WpW6CCdtJFn9Ccv4x0/HqCjo=",
"rev": "c10c4002bdc5aef040fcbb814d5f482e82dc8345", "rev": "e8418ce6a514d3561ea7dd2242d4bb9b36bc003b",
"type": "tarball", "type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/c10c4002bdc5aef040fcbb814d5f482e82dc8345.tar.gz" "url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/e8418ce6a514d3561ea7dd2242d4bb9b36bc003b.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz" "url": "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz"
} }
}, },
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1741473158,
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
"owner": "numtide",
"repo": "devshell",
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -187,11 +243,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758160037, "lastModified": 1758287904,
"narHash": "sha256-fXelTdjdILspZ1IUU9aICB1+PXwSFiF8j+7ujwo1VpQ=", "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "4f554162fff88e77655073d352eec0cea71103a2", "rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -201,6 +257,28 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": [
"amarth-services",
"amarth-customer-portal",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"amarth-services", "amarth-services",
@ -221,7 +299,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixpkgs" "nixpkgs"
@ -271,11 +349,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758102940, "lastModified": 1758447883,
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=", "narHash": "sha256-yGA6MV0E4JSEXqLTb4ZZkmdJZcoQ8HUzihRRX12Bvpg=",
"owner": "nix-darwin", "owner": "nix-darwin",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd", "rev": "25381509d5c91bbf3c30e23abc6d8476d2143cd1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -342,16 +420,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1722073938, "lastModified": 1758035966,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", "narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", "rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixpkgs-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -374,11 +452,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1758035966, "lastModified": 1758427187,
"narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=", "narHash": "sha256-pHpxZ/IyCwoTQPtFIAG2QaxuSm8jWzrzBGjwQZIttJc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b", "rev": "554be6495561ff07b6c724047bdd7e0716aa7b46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -392,9 +470,9 @@
"inputs": { "inputs": {
"amarth-services": "amarth-services", "amarth-services": "amarth-services",
"clan-core": "clan-core_2", "clan-core": "clan-core_2",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"systems": "systems_4" "systems": "systems_5"
} }
}, },
"sops-nix": { "sops-nix": {
@ -427,11 +505,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758007585, "lastModified": 1758425756,
"narHash": "sha256-HYnwlbY6RE5xVd5rh0bYw77pnD8lOgbT4mlrfjgNZ0c=", "narHash": "sha256-L3N8zV6wsViXiD8i3WFyrvjDdz76g3tXKEdZ4FkgQ+Y=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "f77d4cfa075c3de66fc9976b80e0c4fc69e2c139", "rev": "e0fdaea3c31646e252a60b42d0ed8eafdb289762",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -465,8 +543,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "systems", "owner": "nix-systems",
"type": "indirect" "repo": "default",
"type": "github"
} }
}, },
"systems_3": { "systems_3": {
@ -499,7 +578,45 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth-customer-portal",
"bun2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748243702,
"narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"amarth-services", "amarth-services",
@ -521,7 +638,7 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_2": { "treefmt-nix_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"clan-core", "clan-core",
@ -529,11 +646,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756662192, "lastModified": 1758206697,
"narHash": "sha256-F1oFfV51AE259I85av+MAia221XwMHCOtZCMcZLK2Jk=", "narHash": "sha256-/DbPkh6PZOgfueCbs3uzlk4ASU2nPPsiVWhpMCNkAd0=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "1aabc6c05ccbcbf4a635fb7a90400e44282f61c4", "rev": "128222dc911b8e2e18939537bed1762b7f3a04aa",
"type": "github" "type": "github"
}, },
"original": { "original": {