From 2824dea9e3e8f090685bc0a85dcc3e4ef90f64f4 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Sun, 6 Oct 2024 07:18:46 -0700 Subject: [PATCH] dwm: couple home settings to nixos module --- hosts/snowhawk/home.nix | 4 ---- modules/dwm.nix | 2 ++ modules/home/dwm.nix | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 modules/home/dwm.nix diff --git a/hosts/snowhawk/home.nix b/hosts/snowhawk/home.nix index a532982..acd4767 100644 --- a/hosts/snowhawk/home.nix +++ b/hosts/snowhawk/home.nix @@ -48,10 +48,6 @@ homeNetwork = true; }; - # WM Stuff - xsession.numlock.enable = true; - services.unclutter.enable = true; - home.packages = with pkgs; [ ripgrep unzip diff --git a/modules/dwm.nix b/modules/dwm.nix index 8d5c1cd..de132ca 100644 --- a/modules/dwm.nix +++ b/modules/dwm.nix @@ -56,5 +56,7 @@ in dmenu xclip ]; + + home-manager.sharedModules = [ (import ./home/dwm.nix) ]; }; } diff --git a/modules/home/dwm.nix b/modules/home/dwm.nix new file mode 100644 index 0000000..8b8c8f4 --- /dev/null +++ b/modules/home/dwm.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: + +let + inherit (lib) mkIf mkEnableOption; + cfg = config.snowhawk.dwm; +in +{ + options.snowhawk.dwm = { + enable = mkEnableOption "niri home-manager module"; + }; + + config = mkIf cfg.enable { + # WM Stuff + xsession.numlock.enable = true; + services.unclutter.enable = true; + }; +} +