mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-10 12:50:05 +00:00
✨ finalize home configuration loading as nixos module, and more stuffs :3
This commit is contained in:
parent
f89cbcc552
commit
dc87b2c186
16 changed files with 192 additions and 87 deletions
|
@ -1,44 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
puzzlelib,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (puzzlelib) mkOpt mkBool;
|
||||
inherit (lib) mkIf;
|
||||
inherit (self) namespace;
|
||||
|
||||
cfg = config.${namespace}.utils.vm;
|
||||
in {
|
||||
options.${namespace}.utils.vm = {
|
||||
enable = mkBool true "Whether to enable custom vm presets";
|
||||
preset = mkOpt lib.types.str "performance" "Specify the prefered vm settings preset: performance, balance or powersave";
|
||||
enable = self.lib.mkBool true "Whether to enable custom vm presets";
|
||||
preset = self.lib.mkOpt lib.types.str "performance" "Specify the prefered vm settings preset: performance, balance or powersave";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.vmVariant = mkMerge [
|
||||
(mkIf cfg.preset
|
||||
== "performance" {
|
||||
virtualisation = {
|
||||
cores = 6;
|
||||
memorySize = 4096;
|
||||
graphics = true;
|
||||
};
|
||||
})
|
||||
(mkIf cfg.preset
|
||||
== "balance" {
|
||||
virtualisation = {
|
||||
cores = 4;
|
||||
memorySize = 2048;
|
||||
};
|
||||
})
|
||||
(mkIf cfg.preset
|
||||
== "powersave" {
|
||||
virtualisation = {
|
||||
cores = 2;
|
||||
memorySize = 1024;
|
||||
};
|
||||
})
|
||||
];
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
cores = 6;
|
||||
memorySize = 4096;
|
||||
graphics = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue