niri: add output options
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
966ad57cb8
commit
fa69a8a747
4 changed files with 39 additions and 17 deletions
|
@ -13,6 +13,7 @@
|
||||||
width = 3440;
|
width = 3440;
|
||||||
height = 1440;
|
height = 1440;
|
||||||
refresh = 100;
|
refresh = 100;
|
||||||
|
desktops.niri.output.connectors = ["DP-1"];
|
||||||
|
|
||||||
programs.looking-glass = {
|
programs.looking-glass = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||||
|
|
||||||
|
@ -18,6 +15,7 @@ in {
|
||||||
width = 2256;
|
width = 2256;
|
||||||
height = 1504;
|
height = 1504;
|
||||||
scale = 1.5;
|
scale = 1.5;
|
||||||
|
desktops.niri.output.connectors = ["eDP-1"];
|
||||||
|
|
||||||
# BUG: Phoenix support not currently functional
|
# BUG: Phoenix support not currently functional
|
||||||
# https://github.com/Cryolitia/ryzen_smu/issues/1
|
# https://github.com/Cryolitia/ryzen_smu/issues/1
|
||||||
|
@ -54,19 +52,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
home-manager.users.${config.custom.username} = {
|
||||||
programs.niri.settings.outputs = {
|
|
||||||
"eDP-1" = {
|
|
||||||
background-color = "#073642";
|
|
||||||
|
|
||||||
mode = with config.custom; {
|
|
||||||
inherit width height;
|
|
||||||
refresh = refresh + 0.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
scale = config.custom.scale;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
device = [
|
device = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,7 @@ in {
|
||||||
input.enable = true;
|
input.enable = true;
|
||||||
layout.enable = true;
|
layout.enable = true;
|
||||||
misc.enable = true;
|
misc.enable = true;
|
||||||
|
output.enable = true;
|
||||||
rules.enable = true;
|
rules.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
35
options/custom/desktops/niri/output.nix
Normal file
35
options/custom/desktops/niri/output.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.custom.desktops.niri.output;
|
||||||
|
in {
|
||||||
|
options.custom.desktops.niri.output = {
|
||||||
|
enable = mkOption {default = false;};
|
||||||
|
connectors = mkOption {default = [];};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
|
# https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||||
|
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
|
||||||
|
name = connector;
|
||||||
|
|
||||||
|
value = {
|
||||||
|
background-color = "#073642";
|
||||||
|
|
||||||
|
mode = with config.custom; {
|
||||||
|
inherit width height;
|
||||||
|
refresh = refresh + 0.0; # Convert to float
|
||||||
|
};
|
||||||
|
|
||||||
|
scale = config.custom.scale;
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue