mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-14 02:20:53 -06:00
feat: uncucked server
This commit is contained in:
parent
8649008c93
commit
d32ece51bf
22 changed files with 273 additions and 112 deletions
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
flake,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -15,11 +13,12 @@ in
|
|||
user,
|
||||
ip,
|
||||
mac,
|
||||
ssh,
|
||||
userMac,
|
||||
package,
|
||||
}:
|
||||
{
|
||||
microvm.vms.${serviceCfg.name} = {
|
||||
microvm.vms."${serviceCfg.name}" = {
|
||||
autostart = true;
|
||||
config = {
|
||||
system.stateVersion = "25.05";
|
||||
|
|
@ -66,6 +65,18 @@ in
|
|||
id = "vm-ws-${user}";
|
||||
mac = mac;
|
||||
}
|
||||
{
|
||||
type = "user";
|
||||
id = "vmuser-web";
|
||||
mac = userMac;
|
||||
}
|
||||
];
|
||||
forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = ssh;
|
||||
guest.port = 22;
|
||||
}
|
||||
];
|
||||
shares = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../config { inherit flake config pkgs; }) websiteVM;
|
||||
inherit (import ../config { inherit flake; }) websiteVM;
|
||||
inherit (flake.config.services) instances;
|
||||
|
||||
websiteUpRoot =
|
||||
|
|
@ -17,21 +17,10 @@ let
|
|||
user = "uproot";
|
||||
ip = interfaceCfg.microvm.ip;
|
||||
mac = interfaceCfg.microvm.mac;
|
||||
ssh = interfaceCfg.microvm.ssh;
|
||||
userMac = interfaceCfg.microvm.macUser;
|
||||
package = websitePkg;
|
||||
};
|
||||
|
||||
websiteProject =
|
||||
let
|
||||
websitePkg = flake.inputs.linkpage.packages.${pkgs.stdenv.hostPlatform.system}.websiteFrontend;
|
||||
interfaceCfg = instances.website.interfaces.interface1;
|
||||
in
|
||||
websiteVM {
|
||||
user = "project";
|
||||
ip = interfaceCfg.microvm.ip;
|
||||
mac = interfaceCfg.microvm.mac;
|
||||
userMac = interfaceCfg.microvm.macUser;
|
||||
package = websitePkg;
|
||||
};
|
||||
in
|
||||
websiteProject // websiteUpRoot
|
||||
websiteUpRoot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue