mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
nix vm: try and make vm creation more re-usable
This commit is contained in:
41
nix/vm/create.nix
Normal file
41
nix/vm/create.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
system,
|
||||||
|
nixpkgs,
|
||||||
|
overlay,
|
||||||
|
path,
|
||||||
|
uid ? 1000,
|
||||||
|
gid ? 1000,
|
||||||
|
}: let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
overlay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
system = builtins.replaceStrings ["darwin"] ["linux"] system;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
virtualisation.vmVariant = {
|
||||||
|
virtualisation.host.pkgs = pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
overlay
|
||||||
|
];
|
||||||
|
|
||||||
|
users.groups.ghostty = {
|
||||||
|
gid = gid;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.ghostty = {
|
||||||
|
uid = uid;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
||||||
|
./common.nix
|
||||||
|
path
|
||||||
|
];
|
||||||
|
}
|
Reference in New Issue
Block a user