i am an idiot, i forgot to remove the xdg portal config in configuration.nix on apollo, this broke screensharing
This commit is contained in:
parent
d28b00841c
commit
4d2554aae8
12 changed files with 418 additions and 35 deletions
52
base/virtualisation/kvmfr-options.nix
Normal file
52
base/virtualisation/kvmfr-options.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# https://gist.github.com/j-brn/716a03822d256bc5bf5d77b951c7915c
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.virtualisation.kvmfr;
|
||||
in
|
||||
{
|
||||
options.virtualisation.kvmfr = {
|
||||
enable = mkEnableOption "Kvmfr";
|
||||
|
||||
shm = {
|
||||
enable = mkEnableOption "shm";
|
||||
|
||||
size = mkOption {
|
||||
type = types.int;
|
||||
default = "128";
|
||||
description = "Size of the shared memory device in megabytes.";
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = "Owner of the shared memory device.";
|
||||
};
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = "Group of the shared memory device.";
|
||||
};
|
||||
mode = mkOption {
|
||||
type = types.str;
|
||||
default = "0600";
|
||||
description = "Mode of the shared memory device.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
(pkgs.callPackage ./kvmfr-git-package.nix { inherit kernel;})
|
||||
];
|
||||
boot.initrd.kernelModules = [ "kvmfr" ];
|
||||
|
||||
boot.kernelParams = optionals cfg.shm.enable [
|
||||
"kvmfr.static_size_mb=${toString cfg.shm.size}"
|
||||
];
|
||||
|
||||
services.udev.extraRules = optionals cfg.shm.enable ''
|
||||
SUBSYSTEM=="kvmfr", OWNER="${cfg.shm.user}", GROUP="${cfg.shm.group}", MODE="${cfg.shm.mode}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue