feat(home): Xsession config

This commit is contained in:
punkfairie 2024-11-15 22:12:04 -08:00
parent 2dbcc4e246
commit c50b4d2d7b
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 36 additions and 24 deletions

View file

@ -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 &
'';
};
};
}

View file

@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./xsession.nix
];
}

View file

@ -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 &
'';
};
}