2022-11-30 00:28:53 +01:00
|
|
|
{ config, pkgs, lib, ... } :
|
|
|
|
with lib;
|
2022-11-30 04:29:21 +01:00
|
|
|
let
|
|
|
|
cfg = config.local.gui.startx;
|
|
|
|
in
|
2022-11-30 00:28:53 +01:00
|
|
|
{
|
2022-11-30 04:29:21 +01:00
|
|
|
options.local.gui.startx.enable = mkEnableOption "startx";
|
|
|
|
config = mkIf cfg.enable {
|
2022-11-30 00:28:53 +01:00
|
|
|
xsession.enable = true;
|
2022-11-30 04:29:21 +01:00
|
|
|
|
2022-11-30 00:46:55 +01:00
|
|
|
home.file.".xinitrc".source = let
|
2022-11-30 00:28:53 +01:00
|
|
|
content = if config.local.nixos then ''
|
|
|
|
exec ~/.xsession
|
|
|
|
'' else ''
|
|
|
|
exec ${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel ~/.xsession
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
pkgs.writeShellScript "xinitrc" content;
|
|
|
|
};
|
2022-11-30 04:29:21 +01:00
|
|
|
}
|