Compare commits
3 Commits
b2b99f12cc
...
828aaa5d40
| Author | SHA1 | Date | |
|---|---|---|---|
| 828aaa5d40 | |||
| 1afddefdbf | |||
| 8533f0c9cc |
@@ -15,4 +15,20 @@
|
|||||||
# WoW addon updater
|
# WoW addon updater
|
||||||
wowup-cf
|
wowup-cf
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.desktopEntries = {
|
||||||
|
# wowup needs options to work under wayland.
|
||||||
|
wowup-cf = {
|
||||||
|
name = "WowUp";
|
||||||
|
# Custom options to reduce flickering under wayland.
|
||||||
|
exec = "wowup-cf --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu %U";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
icon = "wowup-cf";
|
||||||
|
comment = "World of Warcraft addon updater";
|
||||||
|
categories = [
|
||||||
|
"Game"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
hyprlock # lock screen
|
||||||
|
swayidle # lock on idle
|
||||||
|
swayosd # volume pop-up
|
||||||
|
swaynotificationcenter # notifications
|
||||||
|
hyprpolkitagent # Privilege managent
|
||||||
|
hyprshot # Screenshot utility
|
||||||
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
@@ -17,7 +26,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
"$terminal" = "wezterm";
|
"$terminal" = "wezterm";
|
||||||
"$fileManager" = "dolphin";
|
|
||||||
"$menu" = "rofi -show combi -combi-modes drun,ssh,run -theme ~/.config/rofi/launcher/style.rasi";
|
"$menu" = "rofi -show combi -combi-modes drun,ssh,run -theme ~/.config/rofi/launcher/style.rasi";
|
||||||
"$browser" = "firefox";
|
"$browser" = "firefox";
|
||||||
|
|
||||||
@@ -286,7 +294,6 @@
|
|||||||
"$mainMod, T, exec, $terminal"
|
"$mainMod, T, exec, $terminal"
|
||||||
"$mainMod, B, exec, $browser"
|
"$mainMod, B, exec, $browser"
|
||||||
"$mainMod, D, exec, $menu"
|
"$mainMod, D, exec, $menu"
|
||||||
"$mainMod, E, exec, $fileManager"
|
|
||||||
"$mainMod + SHIFT, S, exec, hyprshot -m region --clipboard-only"
|
"$mainMod + SHIFT, S, exec, hyprshot -m region --clipboard-only"
|
||||||
"$mainMod, C, exec, swaync-client -t"
|
"$mainMod, C, exec, swaync-client -t"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
|
||||||
./audio.nix
|
./audio.nix
|
||||||
|
./hyprland.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./rofi/rofi.nix
|
./rofi/rofi.nix
|
||||||
|
./sway.nix
|
||||||
../apps/element.nix
|
../apps/element.nix
|
||||||
../apps/discord.nix
|
../apps/discord.nix
|
||||||
./terminal.nix
|
./terminal.nix
|
||||||
@@ -18,25 +19,26 @@
|
|||||||
# Common utilities
|
# Common utilities
|
||||||
feh
|
feh
|
||||||
networkmanagerapplet # network control
|
networkmanagerapplet # network control
|
||||||
hyprlock # lock screen
|
|
||||||
swayidle # lock on idle
|
|
||||||
swayosd # volume pop-up
|
|
||||||
swaynotificationcenter # notifications
|
|
||||||
hyprpolkitagent # Privilege managent
|
|
||||||
gnome-keyring # Secret management
|
gnome-keyring # Secret management
|
||||||
glib # for Gnome/GTK settings
|
glib # for Gnome/GTK settings
|
||||||
gsettings-desktop-schemas # So that we can access gnome settings
|
gsettings-desktop-schemas # So that we can access gnome settings
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
xdg-desktop-portal-gtk # GTK backend for XDG components like pickers
|
xdg-desktop-portal-gtk # GTK backend for XDG components like pickers
|
||||||
grim # Screenshot provider
|
grim # Screenshot provider
|
||||||
hyprshot # Screenshot utility
|
|
||||||
nwg-look # GTK settings editor
|
nwg-look # GTK settings editor
|
||||||
playerctl # for universal play/pause etc
|
playerctl # for universal play/pause etc
|
||||||
wirelesstools
|
wirelesstools
|
||||||
waypaper # Wallpaper switcher
|
waypaper # Wallpaper switcher
|
||||||
phinger-cursors # Mouse cursors
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
|
name = "phinger-cursors";
|
||||||
|
size = 16;
|
||||||
|
package = pkgs.phinger-cursors;
|
||||||
|
};
|
||||||
|
|
||||||
# Hint for electron apps to use wayland
|
# Hint for electron apps to use wayland
|
||||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
|
|||||||
173
home-manager/features/sway.nix
Normal file
173
home-manager/features/sway.nix
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./swaync.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
hyprlock # lock screen
|
||||||
|
# swayidle # lock on idle
|
||||||
|
# swayosd # volume pop-up
|
||||||
|
# swaynotificationcenter # notifications
|
||||||
|
# hyprpolkitagent # Privilege managent
|
||||||
|
# hyprshot # Screenshot utility
|
||||||
|
];
|
||||||
|
|
||||||
|
services.swayosd = {
|
||||||
|
enable = true;
|
||||||
|
topMargin = 0.7;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "hyprlock";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable sway config generation for home.pointerCursor
|
||||||
|
home.pointerCursor.sway.enable = true;
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
extraOptions = [
|
||||||
|
# Required for NVIDIA GPUs
|
||||||
|
"--unsupported-gpu"
|
||||||
|
];
|
||||||
|
checkConfig = true;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
xdgAutostart = true;
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
# Workspace assignments
|
||||||
|
# Example:
|
||||||
|
# {
|
||||||
|
# "1: web" = [{ class = "^Firefox$"; }];
|
||||||
|
# "0: extra" = [{ class = "^Firefox$"; window_role = "About"; }];
|
||||||
|
# }
|
||||||
|
assigns = { };
|
||||||
|
colors = {
|
||||||
|
background = "#333333";
|
||||||
|
focused = {
|
||||||
|
background = "#285577";
|
||||||
|
border = "#4c7899";
|
||||||
|
childBorder = "#285577";
|
||||||
|
indicator = "#2e9ef4";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
background = "#5f676a";
|
||||||
|
border = "#333333";
|
||||||
|
childBorder = "#5f676a";
|
||||||
|
indicator = "#484e50";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
placeholder = {
|
||||||
|
background = "#0c0c0c";
|
||||||
|
border = "#000000";
|
||||||
|
childBorder = "#0c0c0c";
|
||||||
|
indicator = "#000000";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
background = "#222222";
|
||||||
|
border = "#333333";
|
||||||
|
childBorder = "#222222";
|
||||||
|
indicator = "#292d2e";
|
||||||
|
text = "#888888";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
background = "#900000";
|
||||||
|
border = "#2f343a";
|
||||||
|
childBorder = "#900000";
|
||||||
|
indicator = "#900000";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modifier = "Mod4"; # Super key
|
||||||
|
keybindings =
|
||||||
|
let
|
||||||
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
terminal = "wezterm";
|
||||||
|
browser = "firefox";
|
||||||
|
menu = "rofi -show drun";
|
||||||
|
in
|
||||||
|
lib.mkOptionDefault {
|
||||||
|
"${modifier}+t" = "exec ${terminal}";
|
||||||
|
"${modifier}+b" = "exec ${browser}";
|
||||||
|
"${modifier}+d" = "exec ${menu}";
|
||||||
|
"${modifier}+Shift+s" = "exec hyprshot -m region --clipboard-only";
|
||||||
|
"${modifier}+c" = "exec swaync-client -t";
|
||||||
|
"${modifier}+Control+q" = "exec /home/drew/.config/rofi/powermenu/powermenu.sh";
|
||||||
|
"${modifier}+x" = "exec /home/drew/.config/rofi/powermenu/powermenu.sh";
|
||||||
|
|
||||||
|
"${modifier}+f" = "floating toggle";
|
||||||
|
"${modifier}+Shift+f" = "fullscreen toggle";
|
||||||
|
|
||||||
|
"${modifier}+r" = "focus output right"; # sway does not have `focusmonitor next`
|
||||||
|
"${modifier}+Control+r" = "move workspace to output left";
|
||||||
|
"${modifier}+Control+s" = "move workspace to output right";
|
||||||
|
|
||||||
|
"${modifier}+q" = "kill";
|
||||||
|
|
||||||
|
"${modifier}+Left" = "focus left";
|
||||||
|
"${modifier}+Right" = "focus right";
|
||||||
|
"${modifier}+Up" = "focus up";
|
||||||
|
"${modifier}+Down" = "focus down";
|
||||||
|
|
||||||
|
"${modifier}+Shift+Left" = "move left";
|
||||||
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
"${modifier}+Shift+Up" = "move up";
|
||||||
|
"${modifier}+Shift+Down" = "move down";
|
||||||
|
|
||||||
|
# Workspace switching
|
||||||
|
"${modifier}+1" = "workspace number 1";
|
||||||
|
"${modifier}+2" = "workspace number 2";
|
||||||
|
"${modifier}+3" = "workspace number 3";
|
||||||
|
"${modifier}+4" = "workspace number 4";
|
||||||
|
"${modifier}+5" = "workspace number 5";
|
||||||
|
"${modifier}+6" = "workspace number 6";
|
||||||
|
"${modifier}+7" = "workspace number 7";
|
||||||
|
"${modifier}+8" = "workspace number 8";
|
||||||
|
"${modifier}+9" = "workspace number 9";
|
||||||
|
"${modifier}+0" = "workspace number 10";
|
||||||
|
|
||||||
|
"${modifier}+Shift+1" = "move container to workspace number 1; workspace number 1";
|
||||||
|
"${modifier}+Shift+2" = "move container to workspace number 2; workspace number 2";
|
||||||
|
"${modifier}+Shift+3" = "move container to workspace number 3; workspace number 3";
|
||||||
|
"${modifier}+Shift+4" = "move container to workspace number 4; workspace number 4";
|
||||||
|
"${modifier}+Shift+5" = "move container to workspace number 5; workspace number 5";
|
||||||
|
"${modifier}+Shift+6" = "move container to workspace number 6; workspace number 6";
|
||||||
|
"${modifier}+Shift+7" = "move container to workspace number 7; workspace number 7";
|
||||||
|
"${modifier}+Shift+8" = "move container to workspace number 8; workspace number 8";
|
||||||
|
"${modifier}+Shift+9" = "move container to workspace number 9; workspace number 9";
|
||||||
|
"${modifier}+Shift+0" = "move container to workspace number 10; workspace number 10";
|
||||||
|
|
||||||
|
"${modifier}+Shift+r" = "move container to output left"; # approximating hyprland\u2019s split-changemonitor
|
||||||
|
|
||||||
|
"${modifier}+button1" = "move";
|
||||||
|
"${modifier}+button2" = "resize";
|
||||||
|
|
||||||
|
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
|
||||||
|
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
|
||||||
|
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
||||||
|
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
|
||||||
|
|
||||||
|
"XF86AudioNext" = "exec playerctl next";
|
||||||
|
"XF86AudioPause" = "exec playerctl play-pause";
|
||||||
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||||
|
"XF86AudioPrev" = "exec playerctl previous";
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
98
home-manager/features/swaync.nix
Normal file
98
home-manager/features/swaync.nix
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
services.swaync = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"positionX" = "right";
|
||||||
|
"positionY" = "top";
|
||||||
|
"layer" = "overlay";
|
||||||
|
"control-center-layer" = "top";
|
||||||
|
"layer-shell" = true;
|
||||||
|
"cssPriority" = "application";
|
||||||
|
"control-center-margin-top" = 0;
|
||||||
|
"control-center-margin-bottom" = 0;
|
||||||
|
"control-center-margin-right" = 0;
|
||||||
|
"control-center-margin-left" = 0;
|
||||||
|
"notification-2fa-action" = true;
|
||||||
|
"notification-inline-replies" = false;
|
||||||
|
"notification-icon-size" = 64;
|
||||||
|
"notification-body-image-height" = 100;
|
||||||
|
"notification-body-image-width" = 200;
|
||||||
|
"timeout" = 10;
|
||||||
|
"timeout-low" = 5;
|
||||||
|
"timeout-critical" = 0;
|
||||||
|
"fit-to-screen" = true;
|
||||||
|
"relative-timestamps" = true;
|
||||||
|
"control-center-width" = 500;
|
||||||
|
"control-center-height" = 600;
|
||||||
|
"notification-window-width" = 500;
|
||||||
|
"keyboard-shortcuts" = true;
|
||||||
|
"image-visibility" = "when-available";
|
||||||
|
"transition-time" = 200;
|
||||||
|
"hide-on-clear" = false;
|
||||||
|
"hide-on-action" = true;
|
||||||
|
"script-fail-notify" = true;
|
||||||
|
"scripts" = {
|
||||||
|
"example-script" = {
|
||||||
|
"exec" = "echo 'Do something...'";
|
||||||
|
"urgency" = "Normal";
|
||||||
|
};
|
||||||
|
"example-action-script" = {
|
||||||
|
"exec" = "echo 'Do something actionable!'";
|
||||||
|
"urgency" = "Normal";
|
||||||
|
"run-on" = "action";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"notification-visibility" = {
|
||||||
|
"example-name" = {
|
||||||
|
"state" = "muted";
|
||||||
|
"urgency" = "Low";
|
||||||
|
"app-name" = "Spotify";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"widgets" = [
|
||||||
|
"inhibitors"
|
||||||
|
"title"
|
||||||
|
"dnd"
|
||||||
|
"notifications"
|
||||||
|
];
|
||||||
|
"widget-config" = {
|
||||||
|
"inhibitors" = {
|
||||||
|
"text" = "Inhibitors";
|
||||||
|
"button-text" = "Clear All";
|
||||||
|
"clear-all-button" = true;
|
||||||
|
};
|
||||||
|
"title" = {
|
||||||
|
"text" = "Notifications";
|
||||||
|
"clear-all-button" = true;
|
||||||
|
"button-text" = "Clear All";
|
||||||
|
};
|
||||||
|
"dnd" = {
|
||||||
|
"text" = "Do Not Disturb";
|
||||||
|
};
|
||||||
|
"label" = {
|
||||||
|
"max-lines" = 5;
|
||||||
|
"text" = "Label Text";
|
||||||
|
};
|
||||||
|
"mpris" = {
|
||||||
|
"image-size" = 96;
|
||||||
|
"image-radius" = 12;
|
||||||
|
};
|
||||||
|
"buttons-grid" = {
|
||||||
|
"actions" = [
|
||||||
|
{
|
||||||
|
"label" = "直";
|
||||||
|
"type" = "toggle";
|
||||||
|
"active" = true;
|
||||||
|
"command" =
|
||||||
|
"sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'";
|
||||||
|
"update_command" = "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -42,15 +42,9 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable Ozone Wayland support in chromium and electron apps.
|
||||||
# You can disable this if you're only using the Wayland session.
|
# https://nixos.wiki/wiki/Wayland
|
||||||
services.xserver.enable = true;
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
theme = "sddm-astronaut-theme";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Unlock the default keyring on login to hyprland
|
# Unlock the default keyring on login to hyprland
|
||||||
security.pam.services.hyprland.enableGnomeKeyring = true;
|
security.pam.services.hyprland.enableGnomeKeyring = true;
|
||||||
@@ -63,6 +57,20 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system and a display manager
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.gdm = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
# displayManager.sddm = {
|
||||||
|
# enable = true;
|
||||||
|
# wayland.enable = true;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
# services.displayManager.ly.enable = true;
|
||||||
|
|
||||||
# Enable Hyprland so it shows up in the menu
|
# Enable Hyprland so it shows up in the menu
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -70,6 +78,7 @@
|
|||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
portalPackage =
|
portalPackage =
|
||||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
@@ -123,7 +132,6 @@
|
|||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
sddm-astronaut
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
|||||||
Reference in New Issue
Block a user