diff options
| author | Fuwn <[email protected]> | 2024-10-01 06:17:12 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-01 06:17:12 -0700 |
| commit | 1422c6d330133fc8f382b43cb815a24d15dc651d (patch) | |
| tree | 59a4b7a11783775af63f24aa18344b77fe43822f /modules/pc | |
| parent | modules: move emulated systems to extended nix configuration (diff) | |
| download | nixos-config-1422c6d330133fc8f382b43cb815a24d15dc651d.tar.xz nixos-config-1422c6d330133fc8f382b43cb815a24d15dc651d.zip | |
modules: move variables and initrd systemd to pc
Diffstat (limited to 'modules/pc')
| -rw-r--r-- | modules/pc/software/boot/default.nix | 1 | ||||
| -rw-r--r-- | modules/pc/variables/default.nix | 10 | ||||
| -rw-r--r-- | modules/pc/variables/electron.nix | 7 | ||||
| -rw-r--r-- | modules/pc/variables/mozilla.nix | 6 | ||||
| -rw-r--r-- | modules/pc/variables/opengl.nix | 7 | ||||
| -rw-r--r-- | modules/pc/variables/qt.nix | 11 | ||||
| -rw-r--r-- | modules/pc/variables/wayland.nix | 10 | ||||
| -rw-r--r-- | modules/pc/variables/wlroots.nix | 12 |
8 files changed, 63 insertions, 1 deletions
diff --git a/modules/pc/software/boot/default.nix b/modules/pc/software/boot/default.nix index 0798849..41531c8 100644 --- a/modules/pc/software/boot/default.nix +++ b/modules/pc/software/boot/default.nix @@ -10,6 +10,7 @@ crashDump.enable = false; consoleLogLevel = 3; kernelPackages = pkgs.linuxPackages_zen; + initrd.systemd.enable = true; kernelParams = [ "iommu=pt" diff --git a/modules/pc/variables/default.nix b/modules/pc/variables/default.nix index 1a0e958..c4f3d48 100644 --- a/modules/pc/variables/default.nix +++ b/modules/pc/variables/default.nix @@ -1,5 +1,13 @@ { - imports = [ ./fcitx.nix ]; + imports = [ + ./electron.nix + ./fcitx.nix + ./mozilla.nix + ./opengl.nix + ./qt.nix + ./wayland.nix + ./wlroots.nix + ]; environment.variables = { _JAVA_AWT_WM_NONREPARENTING = "1"; diff --git a/modules/pc/variables/electron.nix b/modules/pc/variables/electron.nix new file mode 100644 index 0000000..62e7c72 --- /dev/null +++ b/modules/pc/variables/electron.nix @@ -0,0 +1,7 @@ +{ + environment.variables = { + # ELECTRON_OZONE_PLATFORM_HINT = "auto"; + # OZONE_PLATFORM = "wayland"; + NIXOS_OZONE_WL = "1"; + }; +} diff --git a/modules/pc/variables/mozilla.nix b/modules/pc/variables/mozilla.nix new file mode 100644 index 0000000..e85d27c --- /dev/null +++ b/modules/pc/variables/mozilla.nix @@ -0,0 +1,6 @@ +{ + environment.variables = { + MOZ_ENABLE_WAYLAND = "1"; + MOZ_DISABLE_RDD_SANDBOX = "1"; + }; +} diff --git a/modules/pc/variables/opengl.nix b/modules/pc/variables/opengl.nix new file mode 100644 index 0000000..1edce45 --- /dev/null +++ b/modules/pc/variables/opengl.nix @@ -0,0 +1,7 @@ +{ + environment.variables = { + __GL_GSYNC_ALLOWED = "1"; + __GL_VRR_ALLOWED = "0"; + __GL_MaxFramesAllowed = "1"; + }; +} diff --git a/modules/pc/variables/qt.nix b/modules/pc/variables/qt.nix new file mode 100644 index 0000000..cedf6a0 --- /dev/null +++ b/modules/pc/variables/qt.nix @@ -0,0 +1,11 @@ +{ + environment.variables = { + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_QPA_PLATFORM = "wayland;xcb"; + DISABLE_QT5_COMPAT = "0"; + DISABLE_QT_COMPAT = "0"; + QT_QPA_PLATFORMTHEME = "qt5ct"; + # QT_STYLE_OVERRIDE = "kvantum"; + }; +} diff --git a/modules/pc/variables/wayland.nix b/modules/pc/variables/wayland.nix new file mode 100644 index 0000000..ee21d52 --- /dev/null +++ b/modules/pc/variables/wayland.nix @@ -0,0 +1,10 @@ +{ + environment.variables = { + GDK_BACKEND = "wayland,x11,*"; + SDL_VIDEODRIVER = "wayland"; + CLUTTER_BACKEND = "wayland"; + XWAYLAND_NO_GLAMOR = "0"; # Gamescope + ANKI_WAYLAND = "1"; + XDG_SESSION_TYPE = "wayland"; + }; +} diff --git a/modules/pc/variables/wlroots.nix b/modules/pc/variables/wlroots.nix new file mode 100644 index 0000000..25aaf4d --- /dev/null +++ b/modules/pc/variables/wlroots.nix @@ -0,0 +1,12 @@ +{ + environment.variables = { + WLR_NO_HARDWARE_CURSORS = "1"; + WLR_DRM_NO_ATOMIC = "1"; + WLR_USE_LIBINPUT = "1"; + WLR_RENDERER_ALLOW_SOFTWARE = "1"; + WLR_DRM_DEVICES = "/dev/dri/card0"; + WLR_EGL_NO_MODIFIERS = "1"; + WLR_BACKEND = "vulkan"; + WLR_RENDERER = "vulkan"; + }; +} |