fix (options): remove unused option & fix errors in option's code
This commit is contained in:
parent
27de19b32d
commit
d87fa01cf7
4 changed files with 4 additions and 35 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -36,7 +35,7 @@ in
|
||||||
description = "CPU configuration for the laptop.";
|
description = "CPU configuration for the laptop.";
|
||||||
};
|
};
|
||||||
type = lib.mkOption {
|
type = lib.mkOption {
|
||||||
type = lib.enum [
|
type = lib.types.enum [
|
||||||
"intel"
|
"intel"
|
||||||
"amd"
|
"amd"
|
||||||
];
|
];
|
||||||
|
|
@ -91,9 +90,6 @@ in
|
||||||
enable = true;
|
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") {
|
services.thermald = lib.mkIf (cfg.cpu.enable && cfg.cpu.type == "intel") {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.thermald;
|
package = pkgs.thermald;
|
||||||
|
|
|
||||||
|
|
@ -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 = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -29,7 +29,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||||
|
|
@ -44,9 +44,7 @@ in
|
||||||
pkgs.wl-clipboard
|
pkgs.wl-clipboard
|
||||||
pkgs.wayland-utils
|
pkgs.wayland-utils
|
||||||
]
|
]
|
||||||
++ lib.optional cfg.sddm.enable [
|
++ lib.optional cfg.sddm.enable pkgs.kdePackages.sddm-kcm;
|
||||||
pkgs.kdePackages.sddm-kcm
|
|
||||||
];
|
|
||||||
|
|
||||||
services.power-profiles-daemon.enable = cfg.powerProfiles.enable;
|
services.power-profiles-daemon.enable = cfg.powerProfiles.enable;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ in
|
||||||
options = {
|
options = {
|
||||||
host.xserver = {
|
host.xserver = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
types = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Xserver configurations for host.";
|
description = "Xserver configurations for host.";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Reference in a new issue