「🏗️」 wip: work in progress, not done yet.
This commit is contained in:
50
flake.nix
Normal file → Executable file
50
flake.nix
Normal file → Executable 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}";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user