From 77ea83fae31b360bbc9c0e7287febdbc1df16a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Fri, 8 Nov 2024 23:29:19 +0100 Subject: [PATCH] 446 current 1970-01-01 01:00:00 24.05.20241106.dba4149 6.6.52-rt43 * --- modules/nixos/default.nix | 3 ++- modules/nixos/touch.nix | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 modules/nixos/touch.nix diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index b2f45f0..1ae01cf 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,7 +5,7 @@ }: let cfg = config.myConfig; in { - imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix]; + imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix]; options.myConfig = { enable = lib.mkEnableOption "my custom config"; @@ -26,5 +26,6 @@ in { sway.laptop = lib.mkIf cfg.laptop true; wifi.enable = lib.mkIf cfg.laptop true; + touch.enable = lib.mkIf cfg.laptop true; }; } diff --git a/modules/nixos/touch.nix b/modules/nixos/touch.nix new file mode 100644 index 0000000..d989720 --- /dev/null +++ b/modules/nixos/touch.nix @@ -0,0 +1,18 @@ +{ + lib, + config, + ... +}: let + cfg = config.myConfig.touch; +in { + options.myConfig.touch = { + enable = lib.mkEnableOption "touch screen"; + }; + + config = lib.mkIf cfg.enable { + services = { + xserver.wacom.enable = true; + libinput.enable = true; + }; + }; +}