enforce new flake schema. formatting.
This commit is contained in:
parent
4b0a90e00d
commit
ecf5132cbb
121 changed files with 1606 additions and 1554 deletions
|
|
@ -78,34 +78,32 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
deviceType = (
|
||||
types.submodule (
|
||||
{ config, options, ... }:
|
||||
{
|
||||
options = {
|
||||
resolution = mkOption {
|
||||
type = types.nullOr resolutionType;
|
||||
default = null;
|
||||
description = "Automatically calculate the minimum device size for a specific resolution. Overrides `size` if set.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = types.number;
|
||||
description = "Size for the kvmfr device in megabytes.";
|
||||
};
|
||||
|
||||
permissions = mkOption {
|
||||
type = permissionsType;
|
||||
default = { };
|
||||
description = "Permissions of the kvmfr device.";
|
||||
};
|
||||
deviceType = types.submodule (
|
||||
{ config, options, ... }:
|
||||
{
|
||||
options = {
|
||||
resolution = mkOption {
|
||||
type = types.nullOr resolutionType;
|
||||
default = null;
|
||||
description = "Automatically calculate the minimum device size for a specific resolution. Overrides `size` if set.";
|
||||
};
|
||||
|
||||
config = {
|
||||
size = mkIf (config.resolution != null) (sizeFromResolution config.resolution);
|
||||
size = mkOption {
|
||||
type = types.number;
|
||||
description = "Size for the kvmfr device in megabytes.";
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
permissions = mkOption {
|
||||
type = permissionsType;
|
||||
default = { };
|
||||
description = "Permissions of the kvmfr device.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
size = mkIf (config.resolution != null) (sizeFromResolution config.resolution);
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
inherit (lib)
|
||||
|
|
@ -144,7 +142,7 @@ in
|
|||
'';
|
||||
|
||||
"modprobe.d/kvmfr.conf".text = ''
|
||||
options kvmfr static_size_mb=${concatStringsSep "," (map (size: toString size) deviceSizes)}
|
||||
options kvmfr static_size_mb=${concatStringsSep "," (map toString deviceSizes)}
|
||||
'';
|
||||
|
||||
"apparmor.d/local/abstractions/libvirt-qemu" = mkIf config.security.apparmor.enable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue