Merge branch 'main' of ssh://gitea.xeovalyte.dev:2222/xeovalyte/nix
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
./theming/stylix.nix
|
||||
|
||||
./desktop-environments/hyprland/default.nix
|
||||
./desktop-environments/niri/default.nix
|
||||
|
||||
./containers/network.nix
|
||||
|
||||
|
@@ -15,7 +15,7 @@ in {
|
||||
};
|
||||
|
||||
imports = [
|
||||
./waybar.nix
|
||||
# ./waybar.nix
|
||||
./fixes.nix
|
||||
./dunst.nix
|
||||
./rofi.nix
|
||||
|
165
modules/home/desktop-environments/niri/default.nix
Normal file
165
modules/home/desktop-environments/niri/default.nix
Normal file
@@ -0,0 +1,165 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.desktop-environments.niri;
|
||||
in {
|
||||
options = {
|
||||
settings.desktop-environments.niri.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable niri window manager configuration
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.niri.homeModules.niri
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
fuzzel
|
||||
];
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window.decorations = "None";
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.unstable.niri;
|
||||
|
||||
programs.niri.settings.outputs = {
|
||||
"HDMI-A-1".position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
"DP-1".position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.settings.layout = {
|
||||
gaps = 8;
|
||||
focus-ring = {
|
||||
width = 2;
|
||||
};
|
||||
preset-column-widths = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
};
|
||||
|
||||
programs.niri.settings.workspaces = {
|
||||
"gen" = { open-on-output = "DP-1"; };
|
||||
"web" = { open-on-output = "HDMI-A-1"; };
|
||||
"com" = { open-on-output = "HDMI-A-1"; };
|
||||
"dev" = { open-on-output = "DP-1"; };
|
||||
"mus" = { open-on-output = "HDMI-A-1"; };
|
||||
};
|
||||
|
||||
programs.niri.settings.binds = with config.lib.niri.actions; {
|
||||
"Mod+Shift+Slash".action = show-hotkey-overlay;
|
||||
|
||||
# Spawn applications
|
||||
"Mod+Space".action = spawn "fuzzel";
|
||||
"Mod+T".action = spawn "alacritty";
|
||||
"Mod+B".action = spawn "firefox";
|
||||
|
||||
# Volume controls
|
||||
"XF86AudioRaiseVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
|
||||
"XF86AudioLowerVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
|
||||
"XF86AudioMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK" "toggle";
|
||||
|
||||
# Media controls
|
||||
"XF86AudioPlay".action = spawn "playerctl" "play-pause";
|
||||
"XF86AudioNext".action = spawn "playerctl" "next";
|
||||
"XF86AudioPrev".action = spawn "playerctl" "previous";
|
||||
|
||||
"Mod+O".action = toggle-overview;
|
||||
"Mod+Q".action = close-window;
|
||||
"Mod+C".action = center-column;
|
||||
"Mod+R".action = switch-preset-column-width;
|
||||
"Mod+Escape".action = quit;
|
||||
|
||||
# Sizing
|
||||
"Mod+Minus".action = set-column-width "-10%";
|
||||
"Mod+Equal".action = set-column-width "+10%";
|
||||
|
||||
# Full screen
|
||||
"Mod+F".action = maximize-column;
|
||||
"Mod+Shift+F".action = fullscreen-window;
|
||||
"Mod+Ctrl+F".action = expand-column-to-available-width;
|
||||
|
||||
# Toggle floating
|
||||
"Mod+V".action = toggle-window-floating;
|
||||
"Mod+Shift+V".action = switch-focus-between-floating-and-tiling;
|
||||
|
||||
# Print screen
|
||||
"Print".action = screenshot { show-pointer=false; };
|
||||
|
||||
# Window focus
|
||||
"Mod+H".action = focus-column-left;
|
||||
"Mod+J".action = focus-window-down;
|
||||
"Mod+K".action = focus-window-up;
|
||||
"Mod+L".action = focus-column-right;
|
||||
|
||||
# Window moving
|
||||
"Mod+Ctrl+H".action = move-column-left;
|
||||
"Mod+Ctrl+J".action = move-window-down;
|
||||
"Mod+Ctrl+K".action = move-window-up;
|
||||
"Mod+Ctrl+L".action = move-column-right;
|
||||
|
||||
# Focus to different monitor
|
||||
"Mod+Shift+H".action = focus-monitor-left;
|
||||
"Mod+Shift+J".action = focus-monitor-down;
|
||||
"Mod+Shift+K".action = focus-monitor-up;
|
||||
"Mod+Shift+L".action = focus-monitor-right;
|
||||
|
||||
# Move to different monitor
|
||||
"Mod+Ctrl+Shift+H".action = move-column-to-monitor-left;
|
||||
"Mod+Ctrl+Shift+J".action = move-column-to-monitor-down;
|
||||
"Mod+Ctrl+Shift+K".action = move-column-to-monitor-up;
|
||||
"Mod+Ctrl+Shift+L".action = move-column-to-monitor-right;
|
||||
|
||||
# Switch workspaces
|
||||
"Mod+Page_Down".action = focus-workspace-down;
|
||||
"Mod+Page_Up".action = focus-workspace-up;
|
||||
"Mod+U".action = focus-workspace-down;
|
||||
"Mod+I".action = focus-workspace-up;
|
||||
|
||||
# Move workspaces
|
||||
"Mod+Ctrl+Page_Down".action = move-column-to-workspace-down;
|
||||
"Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
|
||||
"Mod+Ctrl+U".action = move-column-to-workspace-down;
|
||||
"Mod+Ctrl+I".action = move-column-to-workspace-up;
|
||||
|
||||
# Workspace scrolling
|
||||
"Mod+WheelScrollDown" = {
|
||||
action = focus-workspace-down;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
action = focus-workspace-up;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Shift+WheelScrollDown" = {
|
||||
action = focus-column-left;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Shift+WheelScrollUp" = {
|
||||
action = focus-column-right;
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
49
modules/home/desktop-environments/niri/waybar.nix
Normal file
49
modules/home/desktop-environments/niri/waybar.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.desktop-environments.niri.waybar;
|
||||
in {
|
||||
options = {
|
||||
settings.desktop-environments.niri.waybar.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable waybar configuration for configuration
|
||||
'';
|
||||
default = config.settings.desktop-environments.niri.enable;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
stylix.targets.waybar.addCss = false;
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
programs.waybar.settings = {
|
||||
main = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-left = [
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
"pulseaudio"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar.style = ''
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
@@ -24,6 +24,7 @@
|
||||
./desktop-environments/cosmic.nix
|
||||
./desktop-environments/hyprland.nix
|
||||
./desktop-environments/gnome.nix
|
||||
./desktop-environments/niri.nix
|
||||
|
||||
./display-managers/default.nix
|
||||
];
|
||||
|
49
modules/system/desktop-environments/niri.nix
Normal file
49
modules/system/desktop-environments/niri.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ lib, config, inputs, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.desktop-environments.niri;
|
||||
in {
|
||||
options = {
|
||||
settings.desktop-environments.niri.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable niri desktop environment
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://niri.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.unstable.niri;
|
||||
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||
environment.variables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wayland-utils
|
||||
libsecret
|
||||
cage
|
||||
gamescope
|
||||
xwayland-satellite-unstable
|
||||
swaybg
|
||||
];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user