add(wivrn): added wivrn onto modules

This commit is contained in:
2025-11-12 20:51:27 +00:00
parent 06085c3d09
commit 642c89bb1c
5 changed files with 89 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
{
config,
lib,
inputs,
pkgs,
home,
system,
...
}:
let
cfg = config.modules.wivrn;
wivrn_override = pkgs.wivrn.overrideAttrs (
final: prev: {
pname = "wivrn";
version = "25.11.1";
src = pkgs.fetchFromGitHub {
owner = "wivrn";
repo = "wivrn";
rev = "v25.11.1";
hash = "sha256-pEKMeRdI9UhdZ+NksRBcF7yPC7Ys2haE+B4PPGQ4beE=";
};
monado = pkgs.applyPatches {
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "monado";
repo = "monado";
rev = "06e62fc7d9c5cbcbc43405bb86dfde3bf01ce043";
hash = "sha256-0ALB9eLY4NAUqNOYZMwpvYnLxVpHsQDJc1er8Txdezs=";
};
postPatch = ''
${final.src}/patches/apply.sh ${final.src}/patches/monado/*
'';
};
patches = [ ];
}
);
in
{
options.modules.wivrn = {
enable = lib.mkEnableOption "Wivrn configuration module";
};
# whole blender config including addons is too fat to include here
config = lib.mkIf cfg.enable {
services.wivrn = {
enable = true;
package = wivrn_override;
openFirewall = true;
defaultRuntime = true;
};
};
# nix'ing a blender config is most likely not possible
# could probs install blender addons through nix since they are fat fat mega fat to install TODO
}