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; + }; + }; +}