🏗️」 wip: work in progress, not done yet.

This commit is contained in:
2025-08-11 13:24:24 +02:00
parent 3625f94c03
commit e426bf83c9
11 changed files with 988 additions and 14 deletions

50
flake.nix Normal file → Executable file
View File

@ -3,14 +3,21 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
keyzconf = {
url = "github:keyzox71/nixos-config";
};
};
outputs =
{
inputs@{
nixpkgs,
self,
...
}:
let
inherit (self) outputs;
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem =
@ -19,12 +26,13 @@
system:
f {
pkgs = import nixpkgs { inherit system; };
system = system;
}
);
in
{
devShells = forEachSupportedSystem (
{ pkgs }:
{ pkgs, system }:
{
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
@ -43,5 +51,43 @@
};
}
);
apps = forEachSupportedSystem (
{ pkgs, system }:
{
virtualBoyy =
let
scriptName = "run-virtualBoyy-vm";
script = pkgs.writeShellScriptBin "${scriptName}" ''
${self.packages.${system}.virtualBoyy { mount-enabled = true; }}/bin/run-virtualBoyy-vm \
-enable-kvm \
-m 8G \
-smp 4 \
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd),mount_tag=host0,security_model=mapped-xattr,id=host0
'';
in
{
type = "app";
program = "${script}/bin/${scriptName}";
};
virtualBoyy-headless =
let
scriptName = "run-virtualBoyy-vm-headless";
script = pkgs.writeShellScriptBin "${scriptName}" ''
${inputs.keyzconf.packages.${system}.virtualBoyy { mount-enabled = true; }}/bin/run-virtualBoyy-vm \
-enable-kvm \
-nographic \
-m 8G \
-smp 4 \
-virtfs local,path=$(${pkgs.coreutils}/bin/pwd),mount_tag=host0,security_model=mapped-xattr,id=host0
'';
in
{
type = "app";
program = "${script}/bin/${scriptName}";
};
}
);
};
}