From 1eae8c3ebbe0611f7a129620c2d5d854ebc7420b Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 21:18:54 -0800 Subject: [PATCH] feat(home): Clipboard --- homes/x86_64-linux/marley@nyx/default.nix | 3 +++ modules/home/services/clipboard/default.nix | 26 +++++++++++++++++++++ old/home/services/clipboard.nix | 10 -------- 3 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 modules/home/services/clipboard/default.nix delete mode 100644 old/home/services/clipboard.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 84d6564..d052056 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -50,6 +50,9 @@ in zathura = enabled; zoxide = enabled; }; + services = { + clipboard = enabled; + }; xorg = { xsession = enabled; }; diff --git a/modules/home/services/clipboard/default.nix b/modules/home/services/clipboard/default.nix new file mode 100644 index 0000000..fbe63a4 --- /dev/null +++ b/modules/home/services/clipboard/default.nix @@ -0,0 +1,26 @@ +{ + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.services.clipboard; +in +{ + options = mkEnableModule "services.clipboard"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + clipboard-jh + ]; + + home.sessionVariables = { + CLIPBOARD_THEME = "ansi"; + }; + }; +} diff --git a/old/home/services/clipboard.nix b/old/home/services/clipboard.nix deleted file mode 100644 index f114539..0000000 --- a/old/home/services/clipboard.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - clipboard-jh - ]; - - home.sessionVariables = { - CLIPBOARD_THEME = "ansi"; - }; -}