fix (options): remove unused option & fix errors in option's code

This commit is contained in:
Kirill Samoylenkov 2025-09-27 17:38:26 +05:00
parent 27de19b32d
commit d87fa01cf7
4 changed files with 4 additions and 35 deletions

View file

@ -2,7 +2,6 @@
lib,
pkgs,
config,
inputs,
...
}:
let
@ -36,7 +35,7 @@ in
description = "CPU configuration for the laptop.";
};
type = lib.mkOption {
type = lib.enum [
type = lib.types.enum [
"intel"
"amd"
];
@ -91,9 +90,6 @@ in
enable = true;
};
imports = lib.optional (
cfg.cpu.enable && cfg.cpu.type == "intel"
) inputs.nixos-hardware.nixosModules.common-cpu-intel;
services.thermald = lib.mkIf (cfg.cpu.enable && cfg.cpu.type == "intel") {
enable = true;
package = pkgs.thermald;

View file

@ -1,25 +0,0 @@
{ lib, config, ... }:
let
cfg = config.host.xserver;
in
{
options = {
host.xserver = {
enable = lib.mkOption {
types = lib.types.bool;
default = true;
description = "Xserver configurations for host.";
};
};
};
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
xkb = {
layout = "us";
variant = "";
};
};
};
}

View file

@ -29,7 +29,7 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
@ -44,9 +44,7 @@ in
pkgs.wl-clipboard
pkgs.wayland-utils
]
++ lib.optional cfg.sddm.enable [
pkgs.kdePackages.sddm-kcm
];
++ lib.optional cfg.sddm.enable pkgs.kdePackages.sddm-kcm;
services.power-profiles-daemon.enable = cfg.powerProfiles.enable;

View file

@ -6,7 +6,7 @@ in
options = {
host.xserver = {
enable = lib.mkOption {
types = lib.types.bool;
type = lib.types.bool;
default = true;
description = "Xserver configurations for host.";
};