mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 12:20:04 +00:00
🚧 Initial work on generating homeConfigurations output + syntax changes
This commit is contained in:
parent
f139b88c0b
commit
f89cbcc552
12 changed files with 131 additions and 106 deletions
|
@ -3,13 +3,11 @@
|
|||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop.gnome = { enable = mkEnableOption "Enable the gnome desktop environment ${namespace}"; };
|
||||
in {
|
||||
options.${namespace}.desktop.gnome = {enable = mkEnableOption "Enable the gnome desktop environment ${namespace}";};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.enable = true;
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
namespace,
|
||||
puzzlelib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (puzzlelib) mkOpt mkBool;
|
||||
|
||||
cfg = config.${namespace}.utils.vm;
|
||||
in
|
||||
{
|
||||
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";
|
||||
|
@ -19,25 +17,28 @@ in
|
|||
|
||||
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;
|
||||
};
|
||||
})
|
||||
(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;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue