This commit is contained in:
@@ -141,7 +141,7 @@
|
|||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = pkgs.nixfmt;
|
||||||
|
|
||||||
legacyPackages = pkgs.lib.packagesFromDirectoryRecursive {
|
legacyPackages = pkgs.lib.packagesFromDirectoryRecursive {
|
||||||
callPackage = pkgs.callPackage;
|
callPackage = pkgs.callPackage;
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
no-lambda-arg = true;
|
no-lambda-arg = true;
|
||||||
};
|
};
|
||||||
mdformat.enable = true;
|
mdformat.enable = true;
|
||||||
nixfmt-rfc-style.enable = true;
|
nixfmt.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.agenix.overlays.default
|
inputs.agenix.overlays.default
|
||||||
|
inputs.niri.overlays.niri
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -83,6 +83,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We actually use the home-manager module to add the actual portal config,
|
||||||
|
# but need this so relevant implementations are found
|
||||||
|
environment.pathsToLink = [
|
||||||
|
"/share/xdg-desktop-portal"
|
||||||
|
];
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
hardware.presonus-studio.enable = true;
|
hardware.presonus-studio.enable = true;
|
||||||
services = {
|
services = {
|
||||||
@@ -102,7 +108,7 @@
|
|||||||
};
|
};
|
||||||
system.desktop = {
|
system.desktop = {
|
||||||
gnome.enable = lib.mkForce false;
|
gnome.enable = lib.mkForce false;
|
||||||
hyprland.enable = true;
|
hyprland.enable = lib.mkForce false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
322
users/jordan/common/optional/graphical/niri.nix
Normal file
322
users/jordan/common/optional/graphical/niri.nix
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
getExe
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.niri.homeModules.niri
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gnome-keyring.enable = true;
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
|
config.niri = {
|
||||||
|
default = [
|
||||||
|
"gtk"
|
||||||
|
"gnome"
|
||||||
|
];
|
||||||
|
"org.freedesktop.impl.portal.Access" = [ "gtk" ];
|
||||||
|
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
||||||
|
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||||
|
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||||
|
"org.freedesktop.impl.portal.ScreenCast" = [ "xdg-desktop-portal-gnome" ];
|
||||||
|
"org.freedesktop.impl.portal.Screenshot" = [ "xdg-desktop-portal-gnome" ];
|
||||||
|
};
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.gnome-keyring
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
pkgs.xdg-desktop-portal-gnome
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.initContent = lib.mkOrder 9999 ''
|
||||||
|
if [[ -t 0 && "$(tty || true)" == /dev/tty1 && -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" ]]; then
|
||||||
|
echo "Login shell detected. Starting wayland..."
|
||||||
|
niri-session
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
programs.niri = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.niri-unstable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
xwayland-satellite.path = getExe pkgs.xwayland-satellite-stable;
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
"QT_QPA_PLATFORM" = "wayland";
|
||||||
|
"XDG_SESSION_TYPE" = "wayland";
|
||||||
|
"NIXOS_OZONE_WL" = "1";
|
||||||
|
"MOZ_ENABLE_WAYLAND" = "1";
|
||||||
|
"MOZ_WEBRENDER" = "1";
|
||||||
|
"_JAVA_AWT_WM_NONREPARENTING" = "1";
|
||||||
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION" = "1";
|
||||||
|
"GDK_BACKEND" = "wayland";
|
||||||
|
"GBM_BACKEND" = "nvidia-drm";
|
||||||
|
"GSK_RENDERER" = "vulkan";
|
||||||
|
"LIBVA_DRIVER_NAME" = "nvidia";
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
keyboard = {
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "intl";
|
||||||
|
};
|
||||||
|
|
||||||
|
repeat-delay = 235;
|
||||||
|
repeat-rate = 60;
|
||||||
|
};
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
tap = true;
|
||||||
|
dwt = true;
|
||||||
|
dwtp = true;
|
||||||
|
natural-scroll = true;
|
||||||
|
accel-profile = "flat";
|
||||||
|
};
|
||||||
|
|
||||||
|
mouse = {
|
||||||
|
accel-speed = 0.2;
|
||||||
|
accel-profile = "flat";
|
||||||
|
};
|
||||||
|
|
||||||
|
power-key-handling.enable = false;
|
||||||
|
workspace-auto-back-and-forth = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gestures.hot-corners.enable = false;
|
||||||
|
debug.honor-xdg-activation-with-invalid-serial = true;
|
||||||
|
|
||||||
|
binds = with config.lib.niri.actions; {
|
||||||
|
"Mod+T".action = spawn "kitty";
|
||||||
|
"Mod+b".action = spawn "firefox";
|
||||||
|
"Super+Alt+L".action = spawn "systemctl suspend";
|
||||||
|
XF86AudioRaiseVolume = {
|
||||||
|
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
|
||||||
|
allow-when-locked = true;
|
||||||
|
};
|
||||||
|
XF86AudioLowerVolume = {
|
||||||
|
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
|
||||||
|
allow-when-locked = true;
|
||||||
|
};
|
||||||
|
XF86AudioMute = {
|
||||||
|
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
|
||||||
|
allow-when-locked = true;
|
||||||
|
};
|
||||||
|
XF86AudioMicMute = {
|
||||||
|
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
|
||||||
|
allow-when-locked = true;
|
||||||
|
};
|
||||||
|
"Mod+Q".action = close-window;
|
||||||
|
|
||||||
|
"Mod+n".action = focus-column-left;
|
||||||
|
"Mod+left".action = focus-column-left;
|
||||||
|
"Mod+Shift+n".action = move-column-left;
|
||||||
|
"Mod+Shift+left".action = move-column-left;
|
||||||
|
|
||||||
|
"Mod+r".action = focus-window-or-workspace-down;
|
||||||
|
"Mod+down".action = focus-window-or-workspace-down;
|
||||||
|
"Mod+Shift+r".action = move-window-down;
|
||||||
|
"Mod+Shift+down".action = move-window-down;
|
||||||
|
|
||||||
|
"Mod+l".action = focus-window-or-workspace-up;
|
||||||
|
"Mod+up".action = focus-window-or-workspace-up;
|
||||||
|
"Mod+Shift+l".action = move-window-up;
|
||||||
|
"Mod+Shift+up".action = move-window-up;
|
||||||
|
|
||||||
|
"Mod+s".action = focus-column-right;
|
||||||
|
"Mod+right".action = focus-column-right;
|
||||||
|
"Mod+Shift+s".action = move-column-right;
|
||||||
|
"Mod+Shift+right".action = move-column-right;
|
||||||
|
|
||||||
|
"Mod+h".action = focus-column-first;
|
||||||
|
"Mod+Shift+h".action = consume-or-expel-window-left;
|
||||||
|
"Mod+m".action = focus-column-last;
|
||||||
|
"Mod+Shift+m".action = consume-or-expel-window-right;
|
||||||
|
|
||||||
|
"Mod+Ctrl+n".action = focus-monitor-left;
|
||||||
|
"Mod+Shift+Ctrl+n".action = move-column-to-monitor-left;
|
||||||
|
"Mod+Ctrl+r".action = focus-monitor-down;
|
||||||
|
"Mod+Shift+Ctrl+r".action = move-column-to-monitor-down;
|
||||||
|
"Mod+Ctrl+l".action = focus-monitor-up;
|
||||||
|
"Mod+Shift+Ctrl+l".action = move-column-to-monitor-up;
|
||||||
|
"Mod+Ctrl+s".action = focus-monitor-right;
|
||||||
|
"Mod+Shift+Ctrl+s".action = move-column-to-monitor-right;
|
||||||
|
|
||||||
|
"Mod+Period".action = focus-workspace-down;
|
||||||
|
"Mod+Shift+Period".action = move-column-to-workspace-down;
|
||||||
|
"Mod+Ctrl+Period".action = move-workspace-down;
|
||||||
|
"Mod+comma".action = focus-workspace-up;
|
||||||
|
"Mod+Shift+comma".action = move-column-to-workspace-up;
|
||||||
|
"Mod+Ctrl+comma".action = move-workspace-up;
|
||||||
|
|
||||||
|
"Mod+WheelScrollDown" = {
|
||||||
|
action = focus-workspace-down;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
"Mod+WheelScrollUp" = {
|
||||||
|
action = focus-workspace-up;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+WheelScrollDown" = {
|
||||||
|
action = move-column-to-workspace-down;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
"Mod+Ctrl+WheelScrollUp" = {
|
||||||
|
action = move-column-to-workspace-up;
|
||||||
|
cooldown-ms = 150;
|
||||||
|
};
|
||||||
|
"Mod+WheelScrollRight".action = focus-column-right;
|
||||||
|
"Mod+WheelScrollLeft".action = focus-column-left;
|
||||||
|
"Mod+Ctrl+WheelScrollRight".action = move-column-right;
|
||||||
|
"Mod+Ctrl+WheelScrollLeft".action = move-column-left;
|
||||||
|
"Mod+Shift+WheelScrollDown".action = focus-column-right;
|
||||||
|
"Mod+Shift+WheelScrollUp".action = focus-column-left;
|
||||||
|
"Mod+Ctrl+Shift+WheelScrollDown".action = move-column-right;
|
||||||
|
"Mod+Ctrl+Shift+WheelScrollUp".action = move-column-left;
|
||||||
|
|
||||||
|
"Mod+V".action = maximize-column;
|
||||||
|
"Mod+Ctrl+V".action = expand-column-to-available-width;
|
||||||
|
"Mod+return".action = fullscreen-window;
|
||||||
|
"Mod+Minus".action = set-column-width "-10%";
|
||||||
|
"Mod+Shift+0".action = set-column-width "+10%";
|
||||||
|
|
||||||
|
"Mod+F".action = toggle-window-floating;
|
||||||
|
"Mod+Ctrl+F".action = switch-focus-between-floating-and-tiling;
|
||||||
|
|
||||||
|
"Mod+y".action = toggle-column-tabbed-display;
|
||||||
|
|
||||||
|
"Print".action = screenshot;
|
||||||
|
"Ctrl+Print".action = screenshot-screen { };
|
||||||
|
"Alt+Print".action = screenshot-window;
|
||||||
|
|
||||||
|
"Mod+Escape" = {
|
||||||
|
action = toggle-keyboard-shortcuts-inhibit;
|
||||||
|
allow-inhibiting = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"Mod+Ctrl+Escape".action = quit;
|
||||||
|
"Mod+Shift+P".action = power-off-monitors;
|
||||||
|
};
|
||||||
|
|
||||||
|
spawn-at-startup = [
|
||||||
|
{ command = [ "firefox" ]; }
|
||||||
|
];
|
||||||
|
|
||||||
|
prefer-no-csd = true;
|
||||||
|
hotkey-overlay = {
|
||||||
|
skip-at-startup = true;
|
||||||
|
};
|
||||||
|
layout = {
|
||||||
|
gaps = 1;
|
||||||
|
center-focused-column = "never";
|
||||||
|
empty-workspace-above-first = true;
|
||||||
|
preset-column-widths = [
|
||||||
|
{ proportion = 0.33333; }
|
||||||
|
{ proportion = 0.5; }
|
||||||
|
{ proportion = 0.66667; }
|
||||||
|
];
|
||||||
|
default-column-width = {
|
||||||
|
proportion = 0.5;
|
||||||
|
};
|
||||||
|
preset-window-heights = [
|
||||||
|
{ proportion = 0.33333; }
|
||||||
|
{ proportion = 0.5; }
|
||||||
|
{ proportion = 0.66667; }
|
||||||
|
];
|
||||||
|
focus-ring = {
|
||||||
|
enable = true;
|
||||||
|
width = 2;
|
||||||
|
active.color = "#7fc8ff";
|
||||||
|
inactive.color = "#505050";
|
||||||
|
};
|
||||||
|
border = {
|
||||||
|
enable = false;
|
||||||
|
width = 2;
|
||||||
|
active.color = "#ffc87f";
|
||||||
|
inactive.color = "#505050";
|
||||||
|
};
|
||||||
|
shadow = {
|
||||||
|
softness = 30;
|
||||||
|
spread = 5;
|
||||||
|
offset = {
|
||||||
|
x = 0;
|
||||||
|
y = 5;
|
||||||
|
};
|
||||||
|
draw-behind-window = true;
|
||||||
|
color = "#00000070";
|
||||||
|
};
|
||||||
|
tab-indicator = {
|
||||||
|
hide-when-single-tab = true;
|
||||||
|
place-within-column = true;
|
||||||
|
gap = 5;
|
||||||
|
width = 4;
|
||||||
|
length = {
|
||||||
|
total-proportion = 1.0;
|
||||||
|
};
|
||||||
|
position = "right";
|
||||||
|
gaps-between-tabs = 2;
|
||||||
|
corner-radius = 8;
|
||||||
|
active.color = "red";
|
||||||
|
inactive.color = "gray";
|
||||||
|
};
|
||||||
|
insert-hint = {
|
||||||
|
display.color = "#ffc87f80";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.dconf
|
||||||
|
];
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
|
name = "macOS";
|
||||||
|
package = pkgs.apple-cursor;
|
||||||
|
size = 28;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
iconTheme = {
|
||||||
|
name = "MoreWaita";
|
||||||
|
package = pkgs.unstable.morewaita-icon-theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = {
|
||||||
|
sansSerif = [
|
||||||
|
"Adwaita Sans"
|
||||||
|
];
|
||||||
|
emoji = [
|
||||||
|
"Apple Color Emoji"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = "#000000";
|
||||||
|
background_opacity = 0.8;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent.pinentry.package = pkgs.pinentry-gnome3;
|
||||||
|
}
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./common/optional/graphical/firefox.nix
|
./common/optional/graphical/firefox.nix
|
||||||
./common/optional/graphical/fonts.nix
|
./common/optional/graphical/fonts.nix
|
||||||
./common/optional/graphical/hyprland
|
|
||||||
./common/optional/graphical/libreoffice.nix
|
./common/optional/graphical/libreoffice.nix
|
||||||
./common/optional/graphical/mimeapps.nix
|
./common/optional/graphical/mimeapps.nix
|
||||||
|
./common/optional/graphical/niri.nix
|
||||||
./common/optional/graphical/thunderbird.nix
|
./common/optional/graphical/thunderbird.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user