add(wivrn): added wivrn onto modules
This commit is contained in:
54
nix/modules/wivrn/nixos.nix
Normal file
54
nix/modules/wivrn/nixos.nix
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user