From c50b4d2d7b1450f7b5f0e4d99d74c761695fe1f0 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 15 Nov 2024 22:12:04 -0800 Subject: [PATCH] feat(home): Xsession config --- modules/home/xorg/xsession/default.nix | 36 ++++++++++++++++++++++++++ old/home/xorg/default.nix | 6 ----- old/home/xorg/xsession.nix | 18 ------------- 3 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 modules/home/xorg/xsession/default.nix delete mode 100644 old/home/xorg/default.nix delete mode 100644 old/home/xorg/xsession.nix diff --git a/modules/home/xorg/xsession/default.nix b/modules/home/xorg/xsession/default.nix new file mode 100644 index 0000000..8c534f7 --- /dev/null +++ b/modules/home/xorg/xsession/default.nix @@ -0,0 +1,36 @@ +{ + lib, + config, + namespace, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.xorg.xsession; +in +{ + options.xorg = mkEnableModule "xsession"; + + config = mkIf cfg.enable { + xsession = { + enable = true; + + numlock.enable = true; + + # TODO: Switch to autorandr. + profileEtra = # sh + '' + sudo mount -a + "${config.home.homeDirectory}/.config/xrandr/desktop.sh" + ''; + + initExtra = # sh + '' + mpd & + pidgin & + ''; + }; + }; +} diff --git a/old/home/xorg/default.nix b/old/home/xorg/default.nix deleted file mode 100644 index 8b8e882..0000000 --- a/old/home/xorg/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - imports = [ - ./xsession.nix - ]; -} diff --git a/old/home/xorg/xsession.nix b/old/home/xorg/xsession.nix deleted file mode 100644 index fbbbf74..0000000 --- a/old/home/xorg/xsession.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: -{ - home.keyboard.options = [ "apple:alupckeys" ]; - - xsession = { - enable = true; - - numlock.enable = true; - # TODO: Switch to autorandr - profileExtra = # sh - '' - sudo mount -a - "$HOME/.config/xrandr/desktop.sh" - mpd & - pidgin & - ''; - }; -}