From 658543f820ddd9b63dc53744add3447df439030f Mon Sep 17 00:00:00 2001 From: KnightArtorias Date: Thu, 11 Dec 2025 23:39:49 +0000 Subject: [PATCH] Fix screen layout. Add fuzzel --- flake.nix | 33 +++++++------- home-manager/roles/desktop/niri/default.nix | 4 +- .../roles/desktop/tiling/apps/default.nix | 1 + .../roles/desktop/tiling/apps/fuzzel.nix | 7 +++ .../crow/host-configs/niri/config.kdl | 45 ++++--------------- 5 files changed, 34 insertions(+), 56 deletions(-) create mode 100644 home-manager/roles/desktop/tiling/apps/fuzzel.nix diff --git a/flake.nix b/flake.nix index 71764be..0797562 100644 --- a/flake.nix +++ b/flake.nix @@ -23,9 +23,8 @@ # Generic NixOS config mkNixOSConfig = { path, - type, - hostname, extraModules ? [], + vars, }: nixpkgs.lib.nixosSystem { specialArgs = { @@ -37,23 +36,21 @@ path ] ++ extraModules; - - vars.type = type; - vars.hostname = hostname; }; - # Additional modules for physical hosts - mkPhysicalNixOSConfig = { - path, - type, - hostname, - }: - mkNixOSConfig { - path = path; - type = type; - hostname = hostname; - extraModules = [ ./hosts/physical ]; - }; + # Additional modules for physical hosts + mkPhysicalNixOSConfig = path: + let + updatedVars = vars // { + hostType = "physical"; + hostName = "crow"; + }; + in + mkNixOSConfig { + vars = updatedVars; + path = path; + extraModules = [ ./hosts/physical ]; + }; # Additional modules for servers # mkServerNixOSConfig = path: serverType: @@ -72,7 +69,7 @@ # Collection of all of our configs nixosConfigurations = { # =========== Desktops =========== - crow = mkPhysicalNixOSConfig ./hosts/physical/crow "physical" "crow"; + crow = mkPhysicalNixOSConfig ./hosts/physical/crow; }; }; } diff --git a/home-manager/roles/desktop/niri/default.nix b/home-manager/roles/desktop/niri/default.nix index 9cf5861..fe253ac 100644 --- a/home-manager/roles/desktop/niri/default.nix +++ b/home-manager/roles/desktop/niri/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, vars, ... }: { imports = [ @@ -6,7 +6,7 @@ ../tiling ]; - xdg.configFile."niri/config.kdl".source = ../../../../hosts/${vars.type}/${vars.hostname}/host-configs/niri/config.kdl; + xdg.configFile."niri/config.kdl".source = ../../../../hosts/${vars.hostType}/${vars.hostName}/host-configs/niri/config.kdl; programs.zsh = { profileExtra = '' diff --git a/home-manager/roles/desktop/tiling/apps/default.nix b/home-manager/roles/desktop/tiling/apps/default.nix index 4e6f6ea..fb59528 100644 --- a/home-manager/roles/desktop/tiling/apps/default.nix +++ b/home-manager/roles/desktop/tiling/apps/default.nix @@ -5,5 +5,6 @@ ./mako.nix ./swayidle.nix ./quickshell.nix + ./fuzzel.nix ]; } diff --git a/home-manager/roles/desktop/tiling/apps/fuzzel.nix b/home-manager/roles/desktop/tiling/apps/fuzzel.nix new file mode 100644 index 0000000..6355e4c --- /dev/null +++ b/home-manager/roles/desktop/tiling/apps/fuzzel.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + programs.fuzzel = { + enable = true; + }; +} diff --git a/hosts/physical/crow/host-configs/niri/config.kdl b/hosts/physical/crow/host-configs/niri/config.kdl index 0430738..01fad56 100644 --- a/hosts/physical/crow/host-configs/niri/config.kdl +++ b/hosts/physical/crow/host-configs/niri/config.kdl @@ -3,6 +3,9 @@ // Check the wiki for a full description of the configuration: // https://yalter.github.io/niri/Configuration:-Introduction +// Disable title bars +prefer-no-csd + // Input device configuration. // Find the full list of options on the wiki: // https://yalter.github.io/niri/Configuration:-Input @@ -10,6 +13,9 @@ input { keyboard { // Enable numlock on startup, omitting this setting disables it. numlock + + repeat-rate 35 + repeat-delay 200 } // Next sections include libinput settings. @@ -36,44 +42,11 @@ input { // You can configure outputs by their name, which you can find // by running `niri msg outputs` while inside a niri instance. -// The built-in laptop monitor is usually called "eDP-1". // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Outputs -// Remember to uncomment the node by removing "/-"! -/-output "eDP-1" { - // Uncomment this line to disable this output. - // off - - // Resolution and, optionally, refresh rate of the output. - // The format is "x" or "x@". - // If the refresh rate is omitted, niri will pick the highest refresh rate - // for the resolution. - // If the mode is omitted altogether or is invalid, niri will pick one automatically. - // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. - mode "1920x1080@120.030" - - // You can use integer or fractional scale, for example use 1.5 for 150% scale. - scale 2 - - // Transform allows to rotate the output counter-clockwise, valid values are: - // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. - transform "normal" - - // Position of the output in the global coordinate space. - // This affects directional monitor actions like "focus-monitor-left", and cursor movement. - // The cursor can only move between directly adjacent outputs. - // Output scale and rotation has to be taken into account for positioning: - // outputs are sized in logical, or scaled, pixels. - // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080, - // so to put another output directly adjacent to it on the right, set its x to 1920. - // If the position is unset or results in an overlap, the output is instead placed - // automatically. - position x=1280 y=0 -} - output "HDMI-A-1" { mode "1920x1080@60.00" - position x=0 y=-180 + position x=0 y=180 } output "DP-2" { @@ -83,7 +56,7 @@ output "DP-2" { output "DP-1" { mode "1680x1050@60.00" - position x=4480 y=-195 + position x=4480 y=195 } // Settings that influence how windows are positioned and sized. @@ -91,7 +64,7 @@ output "DP-1" { // https://yalter.github.io/niri/Configuration:-Layout layout { // Set gaps around windows in logical pixels. - gaps 16 + gaps 10 // When to center a column when changing focus, options are: // - "never", default behavior, focusing an off-screen column will keep at the left