uhhh
uhhh the 2nd rendition
This commit is contained in:
parent
132a109da8
commit
565aac949c
37 changed files with 2606 additions and 36 deletions
47
modules/desktop/default.nix
Normal file
47
modules/desktop/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop;
|
||||
in {
|
||||
options.modules.desktop = {
|
||||
envProto = mkOption {
|
||||
type = types.nullOr (types.enum ["x11" "wayland"]);
|
||||
description = "What display protocol to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
|
||||
modules.desktop.fonts.enable = builtins.trace "enabling fonts" true;
|
||||
modules.desktop.fonts.baseFonts = builtins.trace "enabling basefonts" true;
|
||||
}
|
||||
(mkIf (cfg.envProto == "wayland") {
|
||||
hm.home.packages = with pkgs; [ wl-clipboard-x11 ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
# magic, dont ask
|
||||
NIXOS_OZONE_WL = "1";
|
||||
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
||||
GDK_BACKEND = "wayland,x11";
|
||||
ANKI_WAYLAND = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
# this fixes cursors on nvidia, maybe move all nvidia stuff to a module? or put this in hardware
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.envProto == "x11") {
|
||||
hm.home.packages = with pkgs; [ xclip ];
|
||||
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue