feat: fixed(?) binds and window-rules modules

This commit is contained in:
serenity-F 2026-09-22 00:44:20 +10:00
parent e540b21ed9
commit e7320119cd
No known key found for this signature in database
2 changed files with 104 additions and 103 deletions

View file

@ -1,13 +1,17 @@
{ self, inputs, ... }:
{ {
self,
inputs, # niri keybinds module declaration
flake.nixosModules.niri-binds =
{
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: }:
let let
widthDivisions = [ widthDivisions = [
1.0 1.0
@ -46,17 +50,8 @@ let
windowHeights = getProportions heightDivisions; windowHeights = getProportions heightDivisions;
windowHeightsFiltered = builtins.filter (x: builtins.lessThan x.proportion 1.0) windowHeights; windowHeightsFiltered = builtins.filter (x: builtins.lessThan x.proportion 1.0) windowHeights;
in in
{
flake.nixosModules.niri-binds =
{
config,
pkgs,
lib,
...
}:
{ {
# for home manager functionality # for home manager functionality

View file

@ -1,6 +1,12 @@
{ self, inputs, ... }: { self, inputs, ... }:
let {
# niri window rules module declaration
flake.nixosModules.niri-window-rules =
{ pkgs, ... }:
let
windowRules = [ windowRules = [
{ {
@ -51,20 +57,21 @@ let
} }
]; ];
in in
{ {
flake.nixosModules.niri-window-rules = { pkgs, ... }: {
# for home manager functionality # for home manager functionality
imports = [ inputs.home-manager.nixosModules.home-manager ]; imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager.users.serenity = { # using the home manager module to assign binds
programs.niri.settings = { home-manager.users.serenity.programs.niri.settings = {
# grabs assigned rules from let bindings above
window-rules = windowRules; window-rules = windowRules;
layout = { layout = {
background-color = "transparent"; background-color = "transparent";
}; };
# pushes wallpaper set by noctalia to the lowest layer
layer-rules = [ layer-rules = [
{ {
matches = [ { namespace = "^noctalia-wallpaper*"; } ]; matches = [ { namespace = "^noctalia-wallpaper*"; } ];
@ -73,5 +80,4 @@ in
]; ];
}; };
}; };
};
} }