add a specialisation for niri with hybrid gpu mode

This commit is contained in:
ulic-youthlic 2025-05-08 23:58:23 +08:00
parent 3cebfb6a4c
commit cf70828749
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
5 changed files with 50 additions and 17 deletions

View file

@ -5,6 +5,16 @@ in {
extraConfig = let
output = node "output";
in [
(output "DP-3" [
(leaf "mode" "2560x1440@169.900")
(leaf "scale" 1.0)
(leaf "position" {
x = 0;
y = 0;
})
(leaf "transform" "normal")
(flag "focus-at-startup")
])
(output "DP-1" [
(leaf "mode" "2560x1440@169.900")
(leaf "scale" 1.0)

View file

@ -19,6 +19,8 @@
./networking.nix
./disk-config.nix
./hardware.nix
./specialisation/kde.nix
./specialisation/niri-hybrid.nix
];
youthlic = {
@ -48,21 +50,6 @@
};
};
specialisation = {
# cosmic = {
# inheritParentConfig = true;
# configuration = {
# youthlic.gui.enabled = lib.mkForce "cosmic";
# };
# };
kde = {
inheritParentConfig = true;
configuration = {
youthlic.gui.enabled = lib.mkForce "kde";
};
};
};
programs.gnupg.agent = {
enable = true;
};

View file

@ -1,6 +1,6 @@
{pkgs, ...}: let
extraConfig = ''
output "DP-1" {
output "DP-3" {
mode "2560x1440@169.900"
scale 1.0
position x=0 y=0
@ -15,7 +15,7 @@
}
window-rule {
match app-id="apps.regreet"
open-on-output "DP-1"
open-on-output "DP-3"
}
'';
in {

View file

@ -0,0 +1,8 @@
{lib, ...}: {
config.specialisation.kde = {
inheritParentConfig = true;
configuration = {
youthlic.gui.enabled = lib.mkForce "kde";
};
};
}

View file

@ -0,0 +1,28 @@
{lib, ...}: let
extraConfig = ''
output "DP-1" {
mode "2560x1440@169.900"
scale 1.0
position x=0 y=0
transform "normal"
focus-at-startup
}
output "eDP-1" {
mode "2560x1440@165.003"
scale 1.5
position x=2560 y=0
transform "normal"
}
window-rule {
match app-id="apps.regreet"
open-on-output "DP-1"
}
'';
in {
config.specialisation.niri-hybrid = {
inheritParentConfig = true;
configuration = {
youthlic.gui.niri.extraConfig = lib.mkForce extraConfig;
};
};
}