This repository has been archived on 2024-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
desktop_nixos_config_legacy/home/gui/startx.nix

27 lines
501 B
Nix
Raw Permalink Normal View History

2024-08-23 21:32:44 +02:00
{
2024-08-24 09:55:59 +02:00
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.local.gui.startx;
in {
2024-08-23 21:32:44 +02:00
options.local.gui.startx.enable = mkEnableOption "startx";
config = mkIf cfg.enable {
xsession.enable = true;
2024-08-24 09:55:59 +02:00
home.file.".xinitrc".source = let
content =
if config.local.nixos
then ''
exec ~/.xsession
''
else ''
exec ${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel ~/.xsession
'';
in
2024-08-23 21:32:44 +02:00
pkgs.writeShellScript "xinitrc" content;
};
}