forked from foxora/nix
fixed gpu initialization order :3
This commit is contained in:
parent
7f1f03f647
commit
28ef9220d9
3 changed files with 44 additions and 4 deletions
|
|
@ -86,6 +86,7 @@
|
||||||
# fonts
|
# fonts
|
||||||
nerd-fonts.departure-mono # pretty pixel art font i love!! x3
|
nerd-fonts.departure-mono # pretty pixel art font i love!! x3
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
noto-fonts
|
||||||
|
|
||||||
# cli / tui tools and commands!
|
# cli / tui tools and commands!
|
||||||
eza # replaces: ls (rust)
|
eza # replaces: ls (rust)
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,6 @@
|
||||||
"wl-clip-persist --clipboard regular"
|
"wl-clip-persist --clipboard regular"
|
||||||
|
|
||||||
"playerctld daemon"
|
"playerctld daemon"
|
||||||
|
|
||||||
# swaps around the 3rd and 4th workspace because they always start
|
|
||||||
# in the wrong order
|
|
||||||
"hyprctl dispatch workspace 4 && hyprctl dispatch workspace 5 && hyprctl dispatch workspace 3 && hyprctl dispatch workspace 4 && hyprctl dispatch workspace 5 && hyprctl dispatch workspace 3 && hyprctl dispatch workspace 1"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# monitor configuration
|
# monitor configuration
|
||||||
|
|
@ -57,6 +53,13 @@
|
||||||
"HDMI-A-1, 1920x1080@60.00, -1920x0, 1" # tv
|
"HDMI-A-1, 1920x1080@60.00, -1920x0, 1" # tv
|
||||||
];
|
];
|
||||||
|
|
||||||
|
workspace = [
|
||||||
|
"1, monitor:DP-2, default:true"
|
||||||
|
"2, monitor:DP-3, default:true"
|
||||||
|
"3, monitor:HDMI-A-2, default:true"
|
||||||
|
"4, monitor:HDMI-A-1, default:true"
|
||||||
|
];
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
gaps_out = "0, 10, 10, 10";
|
gaps_out = "0, 10, 10, 10";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
root,
|
root,
|
||||||
upkgs,
|
upkgs,
|
||||||
...
|
...
|
||||||
|
|
@ -25,6 +26,14 @@
|
||||||
# FIX: it said my disk was full
|
# FIX: it said my disk was full
|
||||||
kernelPackages = upkgs.linuxPackages_latest;
|
kernelPackages = upkgs.linuxPackages_latest;
|
||||||
kernelModules = ["v4l2loopback"];
|
kernelModules = ["v4l2loopback"];
|
||||||
|
# force kernel to use dGPU
|
||||||
|
kernelParams = [
|
||||||
|
"amdgpu.primary=0000:03:00.0"
|
||||||
|
"video=PCI:0000:03:00.0:e"
|
||||||
|
"initcall_blacklist=simpledrm_platform_driver_init"
|
||||||
|
"fbcon=map:0"
|
||||||
|
"pci=assign-busses"
|
||||||
|
];
|
||||||
extraModulePackages = with kernelPackages; [v4l2loopback];
|
extraModulePackages = with kernelPackages; [v4l2loopback];
|
||||||
|
|
||||||
# qemu
|
# qemu
|
||||||
|
|
@ -131,6 +140,30 @@
|
||||||
services = {
|
services = {
|
||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
displayManager.sddm.wayland.enable = true;
|
displayManager.sddm.wayland.enable = true;
|
||||||
|
# force sddm to be on the dGPU
|
||||||
|
displayManager.sddm.wayland.compositor = "weston";
|
||||||
|
displayManager.sddm.settings = let
|
||||||
|
xcfg = config.services.xserver;
|
||||||
|
# from: https://github.com/NixOS/nixpkgs/blob/1ad2d2e524cb1e7b91ebebcd10d224105dd4e1f2/nixos/modules/services/display-managers/sddm.nix#L132-L143
|
||||||
|
# as for some reason they do it like this and it makes it harder for me to set the option correctly for my gpu
|
||||||
|
# NOTE: ask butterfly if there is a better way <3
|
||||||
|
westonIni = (upkgs.formats.ini {}).generate "weston.ini" {
|
||||||
|
libinput = {
|
||||||
|
enable-tap = config.services.libinput.mouse.tapping;
|
||||||
|
left-handed = config.services.libinput.mouse.leftHanded;
|
||||||
|
};
|
||||||
|
keyboard = {
|
||||||
|
keymap_model = xcfg.xkb.model;
|
||||||
|
keymap_layout = xcfg.xkb.layout;
|
||||||
|
keymap_variant = xcfg.xkb.variant;
|
||||||
|
keymap_options = xcfg.xkb.options;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
Wayland = {
|
||||||
|
CompositorCommand = "${lib.getExe upkgs.weston} --shell=kiosk --drm-device=card0 -c ${westonIni}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
udisks2.enable = true;
|
udisks2.enable = true;
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
|
|
@ -301,6 +334,9 @@
|
||||||
# linux packages!!!
|
# linux packages!!!
|
||||||
linuxPackages.v4l2loopback
|
linuxPackages.v4l2loopback
|
||||||
|
|
||||||
|
# weston is needed for sddm
|
||||||
|
weston
|
||||||
|
|
||||||
# android yay
|
# android yay
|
||||||
android-tools
|
android-tools
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue