nix/lib/modules/nixos/desktop.nix
Daniel Flanagan a59d571b31
Some checks failed
/ check (push) Failing after 9s
I might be getting closer
2025-02-16 11:17:59 -06:00

61 lines
1.3 KiB
Nix

{
pkgs,
lib,
config,
options,
...
}:
let
cfg = config.lyte.desktop;
in
{
options = {
lyte = {
desktop = {
enable = lib.mkEnableOption "Enable my default desktop configuration and applications";
};
};
};
config = lib.mkIf cfg.enable {
services.xserver.desktopManager.gnome.enable = true;
fonts.packages = [
(
# allow nixpkgs 24.11 and unstable to both work
if builtins.hasAttr "nerd-fonts" pkgs then
(pkgs.nerd-fonts.symbols-only)
else
(pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
)
pkgs.iosevkaLyteTerm
];
xdg.portal.enable = true;
hardware =
if builtins.hasAttr "graphics" options.hardware then
{
graphics = {
enable = true;
# enable32Bit = true;
/*
driSupport32Bit = true;
driSupport = true;
*/
};
}
else
{
opengl = {
enable = true;
# driSupport32Bit = true;
driSupport = true;
};
};
services.flatpak.enable = true;
programs.appimage.binfmt = true;
services.printing.enable = true;
programs.virt-manager.enable = config.virtualisation.libvirtd.enable;
};
}