mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-28 13:48:13 +02:00
add nixos option for newt in site creation
This commit is contained in:
parent
86a4656651
commit
52d46f9879
1 changed files with 18 additions and 1 deletions
|
@ -42,6 +42,7 @@ import {
|
||||||
FaFreebsd,
|
FaFreebsd,
|
||||||
FaWindows
|
FaWindows
|
||||||
} from "react-icons/fa";
|
} from "react-icons/fa";
|
||||||
|
import { SiNixos } from "react-icons/si";
|
||||||
import { Checkbox } from "@app/components/ui/checkbox";
|
import { Checkbox } from "@app/components/ui/checkbox";
|
||||||
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
|
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
|
||||||
import { generateKeypair } from "../[niceId]/wireguardConfig";
|
import { generateKeypair } from "../[niceId]/wireguardConfig";
|
||||||
|
@ -74,6 +75,7 @@ type Commands = {
|
||||||
windows: Record<string, string[]>;
|
windows: Record<string, string[]>;
|
||||||
docker: Record<string, string[]>;
|
docker: Record<string, string[]>;
|
||||||
podman: Record<string, string[]>;
|
podman: Record<string, string[]>;
|
||||||
|
nixos: Record<string, string[]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const platforms = [
|
const platforms = [
|
||||||
|
@ -82,7 +84,8 @@ const platforms = [
|
||||||
"podman",
|
"podman",
|
||||||
"mac",
|
"mac",
|
||||||
"windows",
|
"windows",
|
||||||
"freebsd"
|
"freebsd",
|
||||||
|
"nixos"
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
type Platform = (typeof platforms)[number];
|
type Platform = (typeof platforms)[number];
|
||||||
|
@ -285,6 +288,14 @@ WantedBy=default.target`
|
||||||
"Podman Run": [
|
"Podman Run": [
|
||||||
`podman run -dit docker.io/fosrl/newt --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
`podman run -dit docker.io/fosrl/newt --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
nixos: {
|
||||||
|
x86_64: [
|
||||||
|
`nix run 'nixpkgs#fosrl-newt' --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||||
|
],
|
||||||
|
aarch64: [
|
||||||
|
`nix run 'nixpkgs#fosrl-newt' --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
setCommands(commands);
|
setCommands(commands);
|
||||||
|
@ -304,6 +315,8 @@ WantedBy=default.target`
|
||||||
return ["Podman Quadlet", "Podman Run"];
|
return ["Podman Quadlet", "Podman Run"];
|
||||||
case "freebsd":
|
case "freebsd":
|
||||||
return ["amd64", "arm64"];
|
return ["amd64", "arm64"];
|
||||||
|
case "nixos":
|
||||||
|
return ["x86_64", "aarch64"];
|
||||||
default:
|
default:
|
||||||
return ["x64"];
|
return ["x64"];
|
||||||
}
|
}
|
||||||
|
@ -321,6 +334,8 @@ WantedBy=default.target`
|
||||||
return "Podman";
|
return "Podman";
|
||||||
case "freebsd":
|
case "freebsd":
|
||||||
return "FreeBSD";
|
return "FreeBSD";
|
||||||
|
case "nixos":
|
||||||
|
return "NixOS";
|
||||||
default:
|
default:
|
||||||
return "Linux";
|
return "Linux";
|
||||||
}
|
}
|
||||||
|
@ -365,6 +380,8 @@ WantedBy=default.target`
|
||||||
return <FaCubes className="h-4 w-4 mr-2" />;
|
return <FaCubes className="h-4 w-4 mr-2" />;
|
||||||
case "freebsd":
|
case "freebsd":
|
||||||
return <FaFreebsd className="h-4 w-4 mr-2" />;
|
return <FaFreebsd className="h-4 w-4 mr-2" />;
|
||||||
|
case "nixos":
|
||||||
|
return <SiNixos className="h-4 w-4 mr-2" />;
|
||||||
default:
|
default:
|
||||||
return <Terminal className="h-4 w-4 mr-2" />;
|
return <Terminal className="h-4 w-4 mr-2" />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue