feat: add niri feature
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
141
features/niri.nix
Normal file
141
features/niri.nix
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
nixos =
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.niri.nixosModules.niri ];
|
||||
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||
|
||||
programs.niri.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
swayidle
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
brightnessctl
|
||||
playerctl
|
||||
pamixer
|
||||
pulseaudio
|
||||
cliphist
|
||||
satty
|
||||
wlsunset
|
||||
wayland-pipewire-idle-inhibit
|
||||
foot
|
||||
jq
|
||||
zenity
|
||||
];
|
||||
};
|
||||
|
||||
home =
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.noctalia.homeModules.default ];
|
||||
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
colorSchemes.predefinedScheme = "gruvbox";
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.settings = {
|
||||
environment = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
{ argv = [ "swayidle" "-w" ]; }
|
||||
{ argv = [ "wlsunset" ]; }
|
||||
{ argv = [ "wl-paste" "--watch" "cliphist" "store" ]; }
|
||||
];
|
||||
|
||||
input.keyboard.xkb = { };
|
||||
|
||||
binds = {
|
||||
# apps
|
||||
"Mod+Return".action.spawn = "ghostty";
|
||||
"Mod+Space".action.spawn = [ "sh" "-c" "qs -c noctalia-shell ipc call launcher toggle" ];
|
||||
"Mod+S".action.spawn = [ "sh" "-c" "qs -c noctalia-shell ipc call controlcenter toggle" ];
|
||||
|
||||
# window management
|
||||
"Mod+Shift+Q".action.close-window = [ ];
|
||||
"Mod+H".action.focus-column-left = [ ];
|
||||
"Mod+J".action.focus-window-down = [ ];
|
||||
"Mod+K".action.focus-window-up = [ ];
|
||||
"Mod+L".action.focus-column-right = [ ];
|
||||
"Mod+Shift+H".action.move-column-left = [ ];
|
||||
"Mod+Shift+J".action.move-window-down = [ ];
|
||||
"Mod+Shift+K".action.move-window-up = [ ];
|
||||
"Mod+Shift+L".action.move-column-right = [ ];
|
||||
"Mod+F".action.maximize-column = [ ];
|
||||
"Mod+Shift+F".action.fullscreen-window = [ ];
|
||||
|
||||
# workspaces
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+0".action.focus-workspace = 10;
|
||||
"Mod+Shift+1".action.move-window-to-workspace = 1;
|
||||
"Mod+Shift+2".action.move-window-to-workspace = 2;
|
||||
"Mod+Shift+3".action.move-window-to-workspace = 3;
|
||||
"Mod+Shift+4".action.move-window-to-workspace = 4;
|
||||
"Mod+Shift+5".action.move-window-to-workspace = 5;
|
||||
"Mod+Shift+6".action.move-window-to-workspace = 6;
|
||||
"Mod+Shift+7".action.move-window-to-workspace = 7;
|
||||
"Mod+Shift+8".action.move-window-to-workspace = 8;
|
||||
"Mod+Shift+9".action.move-window-to-workspace = 9;
|
||||
"Mod+Shift+0".action.move-window-to-workspace = 10;
|
||||
|
||||
# media (allow-when-locked for use on lock screen)
|
||||
"XF86AudioRaiseVolume" = {
|
||||
action.spawn = [ "pamixer" "-i" "5" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
action.spawn = [ "pamixer" "-d" "5" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
action.spawn = [ "pamixer" "-t" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessUp" = {
|
||||
action.spawn = [ "brightnessctl" "set" "+5%" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
action.spawn = [ "brightnessctl" "set" "5%-" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioPlay" = {
|
||||
action.spawn = [ "playerctl" "play-pause" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioNext" = {
|
||||
action.spawn = [ "playerctl" "next" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioPrev" = {
|
||||
action.spawn = [ "playerctl" "previous" ];
|
||||
allow-when-locked = true;
|
||||
};
|
||||
|
||||
# screenshot
|
||||
"Print".action.screenshot = { };
|
||||
"Shift+Print".action.screenshot-screen = { };
|
||||
|
||||
# session
|
||||
"Mod+Shift+E".action.quit = { };
|
||||
"Mod+Shift+P".action.power-off-monitors = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -12,6 +12,8 @@
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar
|
||||
mako
|
||||
|
||||
Reference in New Issue
Block a user