144 lines
3.8 KiB
Nix
144 lines
3.8 KiB
Nix
{
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
kanagawa = import ../_kanagawa.nix;
|
|
hmModules = config.flake.modules.homeManager;
|
|
in
|
|
{
|
|
flake.modules.nixos.niri =
|
|
{ ... }:
|
|
{
|
|
home-manager.sharedModules = [ hmModules.niri ];
|
|
|
|
programs.niri.enable = true;
|
|
|
|
services = {
|
|
gvfs.enable = true;
|
|
udisks2.enable = true;
|
|
};
|
|
};
|
|
|
|
flake.modules.homeManager.niri =
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
palette = kanagawa.palette;
|
|
swapMonitorWorkspaces = import ./_shortcuts.nix { inherit pkgs; };
|
|
machine = config.facts.machine;
|
|
in
|
|
{
|
|
home = {
|
|
sessionVariables.NIXOS_OZONE_WL = "1";
|
|
packages =
|
|
with pkgs;
|
|
[
|
|
playerctl
|
|
brightnessctl
|
|
wireplumber
|
|
]
|
|
++ [ swapMonitorWorkspaces ];
|
|
};
|
|
|
|
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
|
|
|
wayland.windowManager.niri = {
|
|
enable = true;
|
|
settings = {
|
|
_children =
|
|
lib.mapAttrsToList (name: display: {
|
|
output = {
|
|
_args = [ name ];
|
|
position._props = {
|
|
inherit (display) x y;
|
|
};
|
|
}
|
|
// lib.optionalAttrs display.primary {
|
|
"focus-at-startup" = { };
|
|
}
|
|
// lib.optionalAttrs (display.scale != null) {
|
|
inherit (display) scale;
|
|
}
|
|
// lib.optionalAttrs (display.width != null) {
|
|
mode = "${toString display.width}x${toString display.height}@${toString display.refresh}";
|
|
};
|
|
}) machine.displays
|
|
++ map (command: { spawn-at-startup = command; }) config.desktop.autostart
|
|
++ [
|
|
{
|
|
window-rule = {
|
|
geometry-corner-radius = [
|
|
10.0
|
|
10.0
|
|
10.0
|
|
10.0
|
|
];
|
|
clip-to-geometry = true;
|
|
};
|
|
}
|
|
];
|
|
|
|
environment.DISPLAY = ":0";
|
|
prefer-no-csd = { };
|
|
hotkey-overlay.skip-at-startup = { };
|
|
screenshot-path = "${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%dT%H:%M:%S.png";
|
|
|
|
animations.slowdown = 0.6;
|
|
|
|
cursor = lib.mkIf config.home.pointerCursor.enable {
|
|
xcursor-size = config.home.pointerCursor.size;
|
|
xcursor-theme = config.home.pointerCursor.name;
|
|
hide-after-inactive-ms = 3000;
|
|
hide-when-typing = { };
|
|
};
|
|
|
|
layout = {
|
|
always-center-single-column = { };
|
|
gaps = 14;
|
|
focus-ring.off = { };
|
|
default-column-width.proportion = 1. / 2.;
|
|
|
|
border = {
|
|
width = 3;
|
|
active-color = palette.accents.blue;
|
|
inactive-color = palette.subtleBorder;
|
|
urgent-color = palette.accents.red;
|
|
};
|
|
};
|
|
|
|
debug.honor-xdg-activation-with-invalid-serial = true;
|
|
gestures.hot-corners.off = { };
|
|
|
|
input = {
|
|
focus-follows-mouse = { };
|
|
mouse."accel-speed" = 0.4;
|
|
keyboard = {
|
|
repeat-delay = 300;
|
|
repeat-rate = 50;
|
|
xkb.options = "caps:escape";
|
|
};
|
|
touchpad = {
|
|
tap = { };
|
|
dwt = { };
|
|
natural-scroll = { };
|
|
};
|
|
};
|
|
|
|
binds = import ./_bindings.nix {
|
|
inherit (config.desktop.commands)
|
|
browser
|
|
launcher
|
|
terminal
|
|
;
|
|
swapMonitorWorkspaces = lib.getExe swapMonitorWorkspaces;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|