refactor: inputs/ --> {sys,home}/
This commit is contained in:
parent
8f22a24963
commit
f77c627980
225 changed files with 77 additions and 88 deletions
16
home/modules/desktop/wayland/bar/ags/default.nix
Normal file
16
home/modules/desktop/wayland/bar/ags/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, config, inputs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.bar.ags;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
21
home/modules/desktop/wayland/bar/default.nix
Normal file
21
home/modules/desktop/wayland/bar/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
#./eww
|
||||
# ./ags
|
||||
./waybar
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.bar = {
|
||||
eww = {
|
||||
enable = lib.mkEnableOption "Enable Eww bar";
|
||||
};
|
||||
ags = {
|
||||
enable = lib.mkEnableOption "Enable ags bar";
|
||||
};
|
||||
waybar = {
|
||||
enable = lib.mkEnableOption "Enable waybar bar";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
0
home/modules/desktop/wayland/bar/eww/default.nix
Normal file
0
home/modules/desktop/wayland/bar/eww/default.nix
Normal file
153
home/modules/desktop/wayland/bar/waybar/default.nix
Normal file
153
home/modules/desktop/wayland/bar/waybar/default.nix
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
cfg = config.homeModules.desktop.wayland.bar.waybar;
|
||||
monitorWidth = (lib.head config.monitors).width - 20;
|
||||
inherit (config.colorscheme) palette;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
package = pkgs.waybar;
|
||||
|
||||
settings.mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
width = monitorWidth;
|
||||
exclusive = true;
|
||||
margin-top = 10;
|
||||
margin-bottom = -12;
|
||||
|
||||
modules-left = [ "clock" "battery" "hyprland/workspaces" ];
|
||||
modules-center = [];
|
||||
modules-right = [ "custom/hyprrecord" "tray" ];
|
||||
|
||||
"hyprland/workspaces" = let
|
||||
hyprctl = config.wayland.windowManager.hyprland.package + "/bin/hyprctl";
|
||||
in {
|
||||
on-click = "activate";
|
||||
on-scroll-up = "${hyprctl} dispatch workspace m+1";
|
||||
on-scroll-down = "${hyprctl} dispatch workspace m-1";
|
||||
format = "{icon}";
|
||||
active-only = false;
|
||||
persistent-workspaces = {
|
||||
"*" = 5;
|
||||
};
|
||||
format-icons = {
|
||||
active = "";
|
||||
default = "";
|
||||
urgent = "";
|
||||
};
|
||||
all-outputs = false;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
format-alt = "{:%Y-%m-%d}";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 100;
|
||||
warning = 35;
|
||||
critical = 15;
|
||||
};
|
||||
bat = "BAT0";
|
||||
interval = 10;
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = "{icon} {capacity}%";
|
||||
tooltip-format = "{timeTo} {power}W";
|
||||
};
|
||||
tray = {
|
||||
icon-size = 21;
|
||||
spacing = 5;
|
||||
};
|
||||
"custom/hyprrecord" = {
|
||||
format = "{}";
|
||||
interval = "once";
|
||||
exec = "echo ";
|
||||
tooltip = "false";
|
||||
exec-if = "pgrep wl-screenrec";
|
||||
on-click = "exec hyprrecord -a --waybar screen copysave video";
|
||||
signal = 12;
|
||||
};
|
||||
};
|
||||
style = /* css */ ''
|
||||
* {
|
||||
font-family: "${fonts.monospace.family}";
|
||||
font-size: 19px;
|
||||
border: solid #${palette.base05};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#workspaces {
|
||||
background-color: #${palette.base00};
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 10px;
|
||||
border: 2px solid #${palette.base05};
|
||||
border-right: 0px;
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
padding-left: 10px;
|
||||
border-top: 2px solid #${palette.base05};
|
||||
border-bottom: 2px solid #${palette.base05};
|
||||
border-left: 0px;
|
||||
}
|
||||
|
||||
#battery.good {
|
||||
color: #${palette.base0B};
|
||||
}
|
||||
#battery.warning {
|
||||
color: #${palette.base0A};
|
||||
}
|
||||
#battery.critical {
|
||||
color: #${palette.base08};
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
border: 2px solid #${palette.base05};
|
||||
border-left: 0;
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
|
||||
#workspace button,
|
||||
#workspaces button.active,
|
||||
#workspaces button.visible {
|
||||
color: #${palette.base0B};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #${palette.base08};
|
||||
}
|
||||
|
||||
#custom-hyprrecord {
|
||||
color: #${palette.base08};
|
||||
padding-right: 20px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
43
home/modules/desktop/wayland/default.nix
Normal file
43
home/modules/desktop/wayland/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./bar
|
||||
./lockscreen
|
||||
./notification
|
||||
./utility
|
||||
./windowManager
|
||||
./launcher
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland = {
|
||||
enable = lib.mkEnableOption "Enable wayland specific confurations";
|
||||
nvidia = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable nvidia wayland configuration";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables = {
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_DBUS_REMOTE = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
} // lib.mkIf cfg.nvidia {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
34
home/modules/desktop/wayland/launcher/anyrun/default.nix
Normal file
34
home/modules/desktop/wayland/launcher/anyrun/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, lib, inputs, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.launcher.anyrun;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||
applications
|
||||
randr
|
||||
shell
|
||||
rink
|
||||
symbols
|
||||
];
|
||||
};
|
||||
extraCss = /* css */ ''
|
||||
|
||||
* {
|
||||
font-family: JetBrains Mono Nerd Font;
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
21
home/modules/desktop/wayland/launcher/default.nix
Normal file
21
home/modules/desktop/wayland/launcher/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# ./anyrun
|
||||
./rofi
|
||||
./tofi
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.launcher = {
|
||||
anyrun = {
|
||||
enable = lib.mkEnableOption "enable anyrun launcher module";
|
||||
};
|
||||
rofi = {
|
||||
enable = lib.mkEnableOption "enable rofi launcher module";
|
||||
};
|
||||
tofi = {
|
||||
enable = lib.mkEnableOption "enable tofi launcher module";
|
||||
};
|
||||
};
|
||||
}
|
||||
80
home/modules/desktop/wayland/launcher/rofi/default.nix
Normal file
80
home/modules/desktop/wayland/launcher/rofi/default.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
cfg = config.homeModules.desktop.wayland.launcher.rofi;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "${fonts.monospace.family}";
|
||||
package = pkgs.rofi-wayland;
|
||||
terminal = "${config.home.sessionVariables.TERMINAL}";
|
||||
theme = let
|
||||
inherit (config.colorscheme ) palette;
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background = mkLiteral "#${palette.base00}";
|
||||
foreground = mkLiteral "#${palette.base05}";
|
||||
selected = mkLiteral "#${palette.base0B}";
|
||||
message = mkLiteral "#${palette.base0D}";
|
||||
|
||||
background-color = mkLiteral "@background";
|
||||
border-color = mkLiteral "@foreground";
|
||||
text-color = mkLiteral "@foreground";
|
||||
font = mkLiteral "'${fonts.monospace.family} 14'";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
width = mkLiteral "15%";
|
||||
border = mkLiteral "2";
|
||||
padding = mkLiteral "10";
|
||||
children = mkLiteral "[message,listview,inputbar]";
|
||||
};
|
||||
|
||||
"message" = {
|
||||
children = mkLiteral "[textbox]";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
text-color = mkLiteral "@message";
|
||||
horizontal-align = mkLiteral "0.50";
|
||||
};
|
||||
|
||||
"inputbar" = {
|
||||
cursor = mkLiteral "pointer";
|
||||
border = mkLiteral "2";
|
||||
children = mkLiteral "[textbox-prompt-colon,entry]";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
cursor = mkLiteral "false";
|
||||
};
|
||||
|
||||
"textbox-prompt-colon" = {
|
||||
text-color = mkLiteral "@selected";
|
||||
expand = mkLiteral "false";
|
||||
margin = mkLiteral "0 0.3em 0em 0em";
|
||||
str = mkLiteral "' '";
|
||||
};
|
||||
|
||||
"listview" = {
|
||||
scrollbar = mkLiteral "true";
|
||||
fixed-height = mkLiteral "false";
|
||||
dynamic = mkLiteral "true";
|
||||
};
|
||||
|
||||
"element-text" = {
|
||||
horizontal-align = mkLiteral "0.50";
|
||||
};
|
||||
|
||||
"element-text selected" = {
|
||||
text-color = mkLiteral "@selected";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
42
home/modules/desktop/wayland/launcher/tofi/default.nix
Normal file
42
home/modules/desktop/wayland/launcher/tofi/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.launcher.tofi;
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
inherit (config.colorscheme) palette;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [pkgs.tofi];
|
||||
xdg.configFile."tofi/config".text = /* config */ ''
|
||||
history = false
|
||||
clip-to-padding = false
|
||||
horizontal = true
|
||||
width = 40%
|
||||
height = 35
|
||||
anchor = top-left
|
||||
margin-top = 5
|
||||
margin-left = 25%
|
||||
num-results = 1
|
||||
border-width = 0
|
||||
outline-width = 0
|
||||
result-spacing = 10
|
||||
selection-background-padding = 30
|
||||
prompt-padding = 10
|
||||
font = "${fonts.monospace.family}"
|
||||
font-size = 14
|
||||
prompt-text = " "
|
||||
background-color = #0000
|
||||
prompt-background = #0000
|
||||
prompt-color = ${palette.base0B}
|
||||
input-color = ${palette.base05}
|
||||
placeholder-color = ${palette.base03}
|
||||
default-result-color = ${palette.base03}
|
||||
selection-color = ${palette.base04}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
21
home/modules/desktop/wayland/lockscreen/default.nix
Normal file
21
home/modules/desktop/wayland/lockscreen/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
#./gtkLock --- still needs to be implemented
|
||||
./swaylock
|
||||
./hyprlock
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.lockscreen = {
|
||||
swaylock = {
|
||||
enable = lib.mkEnableOption "Enable Swaylock screen";
|
||||
};
|
||||
hyprlock = {
|
||||
enable = lib.mkEnableOption "Enable hyprlock screen";
|
||||
};
|
||||
};
|
||||
|
||||
#TODO: make assertion to prevent 2 lockscreens
|
||||
}
|
||||
|
||||
77
home/modules/desktop/wayland/lockscreen/hyprlock/default.nix
Normal file
77
home/modules/desktop/wayland/lockscreen/hyprlock/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, config, inputs, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.lockscreen.hyprlock;
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
inherit (config.colorscheme) palette;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
# inputs.hyprlock.homeManagerModules.default
|
||||
# inputs.hypridle.homeManagerModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables.LOCKER = "hyprlock";
|
||||
programs.hyprlock = {
|
||||
settings = {
|
||||
enable = true;
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
no_fade_in = true;
|
||||
};
|
||||
backgrounds = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "";
|
||||
color = "0xff${palette.base01}";
|
||||
}
|
||||
];
|
||||
input-fields = [
|
||||
{
|
||||
size = {
|
||||
width = 300;
|
||||
height = 40;
|
||||
};
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
outline_thickness = 2;
|
||||
dots_spacing = 0.2;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "";
|
||||
outer_color = "0xff${palette.base02}";
|
||||
inner_color = "0xff${palette.base00}";
|
||||
font_color = "0xff${palette.base05}";
|
||||
}
|
||||
];
|
||||
labels = [
|
||||
{
|
||||
monitor = "";
|
||||
text = " ";
|
||||
position = {
|
||||
x = 0;
|
||||
y = 80;
|
||||
};
|
||||
color = "0xff${palette.base08}";
|
||||
font_size = 30;
|
||||
font_family = "${fonts.monospace.family}";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
position = {
|
||||
x = 0;
|
||||
y = -80;
|
||||
};
|
||||
color = "0xff${palette.base0B}";
|
||||
font_size = 20;
|
||||
font_family = "${fonts.monospace.family}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
39
home/modules/desktop/wayland/lockscreen/swaylock/default.nix
Normal file
39
home/modules/desktop/wayland/lockscreen/swaylock/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (config.colorscheme) palette;
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
wallpaperPath = config.homeModules.theme.wallpaper.path;
|
||||
cfg = config.homeModules.desktop.wayland.lockscreen.swaylock;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables.LOCKER = "swaylock";
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
image = "${wallpaperPath}";
|
||||
font = fonts.monospace.family;
|
||||
color = "#${palette.base01}";
|
||||
ring-color = "#${palette.base02}";
|
||||
inside-wrong-color = "#${palette.base08}";
|
||||
ring-wrong-color = "#${palette.base08}";
|
||||
key-hl-color = "#${palette.base0B}";
|
||||
bs-hl-color = "#${palette.base08}";
|
||||
ring-ver-color = "#${palette.base09}";
|
||||
inside-ver-color = "#${palette.base09}";
|
||||
inside-color = "#${palette.base01}";
|
||||
text-color = "#${palette.base07}";
|
||||
text-clear-color = "#${palette.base01}";
|
||||
text-ver-color = "#${palette.base01}";
|
||||
text-wrong-color = "#${palette.base01}";
|
||||
text-caps-lock-color = "#${palette.base07}";
|
||||
inside-clear-color = "#${palette.base0C}";
|
||||
ring-clear-color = "#${palette.base0C}";
|
||||
inside-caps-lock-color = "#${palette.base09}";
|
||||
ring-caps-lock-color = "#${palette.base02}";
|
||||
separator-color = "#${palette.base02}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
home/modules/desktop/wayland/notification/default.nix
Normal file
14
home/modules/desktop/wayland/notification/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./mako
|
||||
#./dunst -- still needs to be implemented
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.notification = {
|
||||
mako = {
|
||||
enable = lib.mkEnableOption "Enable mako notification daemon";
|
||||
};
|
||||
};
|
||||
}
|
||||
40
home/modules/desktop/wayland/notification/mako/default.nix
Normal file
40
home/modules/desktop/wayland/notification/mako/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.colorscheme) palette variant;
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
cfg = config.homeModules.desktop.wayland.notification.mako;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
iconPath =
|
||||
if variant == "dark" then
|
||||
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
|
||||
else
|
||||
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
|
||||
font = "${fonts.regular.family} 12";
|
||||
padding = "10,10";
|
||||
anchor = "top-right";
|
||||
width = 300;
|
||||
height = 100;
|
||||
borderSize = 2;
|
||||
defaultTimeout = 3000;
|
||||
backgroundColor = "#${palette.base00}dd";
|
||||
borderColor = "#${palette.base05}dd";
|
||||
textColor = "#${palette.base05}dd";
|
||||
extraConfig = ''
|
||||
[app-name="system-notify"]
|
||||
padding=3,3
|
||||
width=100
|
||||
height=100
|
||||
[urgency=critical]
|
||||
padding=3,3
|
||||
width=100
|
||||
height=100
|
||||
anchor=top-center
|
||||
border-color=#${palette.base08}dd
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
home/modules/desktop/wayland/utility/default.nix
Normal file
17
home/modules/desktop/wayland/utility/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gammastep
|
||||
./tools
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.utility = {
|
||||
tools = {
|
||||
enable = lib.mkEnableOption "Enable wayland specific tools";
|
||||
};
|
||||
gammastep = {
|
||||
enable = lib.mkEnableOption "Enable gammastep module";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
home/modules/desktop/wayland/utility/gammastep/default.nix
Normal file
20
home/modules/desktop/wayland/utility/gammastep/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.utility.gammastep;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
enableVerboseLogging = true;
|
||||
provider = "geoclue2";
|
||||
temperature = {
|
||||
day = 6000;
|
||||
night = 4000;
|
||||
};
|
||||
settings.general.adjustment-method = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
||||
27
home/modules/desktop/wayland/utility/tools/default.nix
Normal file
27
home/modules/desktop/wayland/utility/tools/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.utility.tools;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
libnotify
|
||||
wl-screenrec
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = ["graphical-session-pre.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
home/modules/desktop/wayland/windowManager/default.nix
Normal file
14
home/modules/desktop/wayland/windowManager/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.windowManager = {
|
||||
hyprland = {
|
||||
enable = lib.mkEnableOption "Enable Hyprland window-manager";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
inherit (import ./pkgs {inherit pkgs;}) hyprbrightness hyprvolume;
|
||||
inherit (inputs.ooks-scripts.packages.${pkgs.system}) powermenu zellijmenu;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
./settings
|
||||
./extras
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.hyprpicker
|
||||
hyprvolume
|
||||
hyprbrightness
|
||||
|
||||
# Personal scripts
|
||||
powermenu
|
||||
zellijmenu #TODO: only add if zellij enabled
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprcapture
|
||||
./hyprshade
|
||||
];
|
||||
|
||||
options.homeModules.desktop.wayland.windowManager.hyprland.extras = {
|
||||
hyprcapture = {
|
||||
enable = lib.mkEnableOption "Enable hyprcapture screenshot/recording module";
|
||||
};
|
||||
hyprshade = {
|
||||
enable = lib.mkEnableOption "Enable hyprshade tool module";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland.extras.hyprcapture;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
home.packages = with inputs; [
|
||||
# Screenshot tool
|
||||
hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||
# Screen recording tool
|
||||
ooks-scripts.packages.${pkgs.system}.hyprrecord
|
||||
];
|
||||
|
||||
# Add XDG user directories that the scripts use
|
||||
xdg.userDirs.extraConfig = {
|
||||
XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings";
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
# Screenshot binds
|
||||
", Print, exec, grimblast --notify --cursor copysave area"
|
||||
"SUPER, Print, exec, grimblast --notify --cursor copysave screen"
|
||||
# Recording binds
|
||||
"SUPER, r, exec, hyprrecord -a -w video screen copysave"
|
||||
"SUPER CTRL, r, exec, hyprrecord -a -w video area copysave"
|
||||
"SUPER ALT, r, exec, hyprrecord -w gif area copysave"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland.extras.hyprshade;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.hyprshade ];
|
||||
# TODO: implement hyprshade configuration
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
packages = {
|
||||
hyprvolume = pkgs.callPackage ./hyprvolume.nix {};
|
||||
hyprbrightness = pkgs.callPackage ./hyprbrightness.nix {};
|
||||
};
|
||||
in
|
||||
packages
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "hyprbrightness";
|
||||
runtimeInputs = with pkgs; [brillo libnotify];
|
||||
text = ''
|
||||
if [ "$1" == "up" ]; then
|
||||
brillo -q -u 30000 -A 5
|
||||
elif [ "$1" == "down" ]; then
|
||||
brillo -q -u 30000 -U 5
|
||||
else
|
||||
echo "Invalid argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}')
|
||||
|
||||
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $BRIGHTNESS%"
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "hyprvolume";
|
||||
runtimeInputs = with pkgs; [pamixer libnotify];
|
||||
text = ''
|
||||
if [ "$1" == "up" ]; then
|
||||
pamixer --increase 5
|
||||
elif [ "$1" == "down" ]; then
|
||||
pamixer --decrease 5
|
||||
elif [ "$1" == "mute" ]; then
|
||||
pamixer --toggle-mute
|
||||
fi
|
||||
|
||||
VOLUME=$(pamixer --get-volume-human)
|
||||
|
||||
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $VOLUME"
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
pointer = config.home.pointerCursor;
|
||||
inherit (config.colorscheme) palette;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
cursor = {
|
||||
inactive_timeout = 4;
|
||||
};
|
||||
general = {
|
||||
gaps_in = 10;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
"col.active_border" = "0xff${palette.base05}";
|
||||
"col.inactive_border" = "0xff${palette.base02}";
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor ${pointer.name} ${toString pointer.size}"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
fullscreen_opacity = 1.0;
|
||||
|
||||
rounding = 0;
|
||||
|
||||
blur = {
|
||||
enabled = false;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 12;
|
||||
shadow_offset = "3 3";
|
||||
"col.shadow" = "0x44000000";
|
||||
"col.shadow_inactive" = "0x66000000";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
|
||||
bind = let
|
||||
terminal = config.home.sessionVariables.TERMINAL;
|
||||
browser = config.home.sessionVariables.BROWSER;
|
||||
editor = config.home.sessionVariables.EDITOR;
|
||||
locker = config.home.sessionVariables.LOCKER;
|
||||
|
||||
spotifyctl = "${pkgs.spotify-player}/bin/spotify_player";
|
||||
discord = "${pkgs.vesktop}/bin/vesktop";
|
||||
|
||||
explorer = "${pkgs.cinnamon.nemo-with-extensions}/bin/nemo";
|
||||
|
||||
password = "${pkgs._1password-gui}/bin/1password";
|
||||
in [
|
||||
|
||||
# Program Launch
|
||||
"SUPER, b, exec, ${browser}"
|
||||
"SUPER, return, exec, ${terminal}"
|
||||
"SUPER, e, exec, ${terminal} ${editor}"
|
||||
"SUPERSHIFT, P, exec, ${password}"
|
||||
"SUPER, d, exec, ${discord}"
|
||||
"SUPERSHIFT, e, exec, ${explorer}"
|
||||
"SUPERSHIFT, S, exec, steam"
|
||||
"SUPER, escape, exec, ${terminal} --title=BTOP btop"
|
||||
"SUPER CTRL, return, exec, zellijmenu -n"
|
||||
|
||||
"SUPER, delete, exec, powermenu -c dmenu"
|
||||
|
||||
|
||||
|
||||
# Spotify PLayer Controls
|
||||
|
||||
"SUPER, bracketright, exec, ${spotifyctl} playback next"
|
||||
"SUPER, bracketleft, exec, ${spotifyctl} playback previous"
|
||||
"SUPER, backslash, exec, ${spotifyctl} playback play-pause"
|
||||
|
||||
# Brightness
|
||||
|
||||
",XF86MonBrightnessUp, exec, hyprbrightness up"
|
||||
",XF86MonBrightnessDown, exec, hyprbrightness down"
|
||||
|
||||
# Volume
|
||||
|
||||
",XF86AudioRaiseVolume, exec, hyprvolume up"
|
||||
",XF86AudioLowerVolume, exec, hyprvolume down"
|
||||
",XF86AudioMute, exec, hyprvolume mute"
|
||||
|
||||
# Window Management
|
||||
|
||||
"SUPER, Q, killactive"
|
||||
"SUPER CTRL, backspace, killactive"
|
||||
"SUPERSHIFT ALT, delete, exec, hyprkillsession"
|
||||
"SUPER, F, fullscreen"
|
||||
"SUPER CTRL, F, fakefullscreen"
|
||||
"SUPER, Space, togglefloating"
|
||||
"SUPER, P, pseudo" # dwindle
|
||||
"SUPER, S, togglesplit" # dwindle
|
||||
|
||||
# Focus
|
||||
|
||||
"SUPER, left, movefocus,l"
|
||||
"SUPER, right, movefocus,r"
|
||||
"SUPER, up, movefocus,u"
|
||||
"SUPER, down, movefocus,d"
|
||||
|
||||
# Move
|
||||
|
||||
"SUPERSHIFT, left, movewindow,l"
|
||||
"SUPERSHIFT, right, movewindow,r"
|
||||
"SUPERSHIFT, up, movewindow,u"
|
||||
"SUPERSHIFT, down, movewindow,d"
|
||||
|
||||
#Resize
|
||||
|
||||
"SUPER CTRL, left, resizeactive,-20 0"
|
||||
"SUPERCTRL, right, resizeactive,20 0"
|
||||
"SUPER CTRL, up, resizeactive,0 -20"
|
||||
"SUPERCTRL, down, resizeactive,0 20"
|
||||
|
||||
# Switch workspace
|
||||
|
||||
"SUPER, 1, workspace,1"
|
||||
"SUPER, 2, workspace,2"
|
||||
"SUPER, 3, workspace,3"
|
||||
"SUPER, 4, workspace,4"
|
||||
"SUPER, 5, workspace,5"
|
||||
"SUPER, 6, workspace,6"
|
||||
"SUPER, 7, workspace,7"
|
||||
"SUPER, 8, workspace,8"
|
||||
"SUPER, 9, workspace,9"
|
||||
"SUPER, 0, workspace,10"
|
||||
"SUPER, comma, workspace,e+1"
|
||||
"SUPER, period, workspace,e-1"
|
||||
"SUPER, tab, focusCurrentOrLast"
|
||||
|
||||
# Move workspace
|
||||
|
||||
"SUPERSHIFT, 1, movetoworkspace,1"
|
||||
"SUPERSHIFT, 2, movetoworkspace,2"
|
||||
"SUPERSHIFT, 3, movetoworkspace,3"
|
||||
"SUPERSHIFT, 4, movetoworkspace,4"
|
||||
"SUPERSHIFT, 5, movetoworkspace,5"
|
||||
"SUPERSHIFT, 6, movetoworkspace,6"
|
||||
"SUPERSHIFT, 7, movetoworkspace,7"
|
||||
"SUPERSHIFT, 8, movetoworkspace,8"
|
||||
"SUPERSHIFT, 9, movetoworkspace,9"
|
||||
"SUPERSHIFT, 0, movetoworkspace,10"
|
||||
|
||||
# Lock Screen
|
||||
"SUPER, Backspace, exec, ${locker}"
|
||||
];
|
||||
# Mouse
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
# bindr = [
|
||||
# "SUPER, SUPER_L, exec, killall rofi || rofi -show drun"
|
||||
# ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
imports = [
|
||||
./appearance.nix
|
||||
./binds.nix
|
||||
./rules.nix
|
||||
./exec.nix
|
||||
./env.nix
|
||||
./inputs.nix
|
||||
./misc.nix
|
||||
./monitor.nix
|
||||
./gestures.nix
|
||||
./hyprpaper.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings.env = [
|
||||
"XDG_SESSION_DESKTOP,hyprland"
|
||||
"XDG_CURRENT_DESKTOP,hyprland"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec = [
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
];
|
||||
exec-once = [
|
||||
"${pkgs._1password-gui}/bin/1password --silent"
|
||||
# "${pkgs.live-buds-cli}/bin/earbuds -d"
|
||||
# "waybar"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings.gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, inputs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
wallpaperPath = config.homeModules.theme.wallpaper.path;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ${wallpaperPath}
|
||||
wallpaper = , ${wallpaperPath}
|
||||
splash = false
|
||||
ipc = off
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings.input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
touchpad.natural_scroll = "no";
|
||||
mouse_refocus = false;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings.misc = {
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
|
||||
enable_swallow = true;
|
||||
swallow_regex = "foot|nemo";
|
||||
|
||||
focus_on_activate = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = lib.concatMap (m: let
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
|
||||
position = "${toString m.x}x${toString m.y}";
|
||||
basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}";
|
||||
in
|
||||
[ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else [])
|
||||
) (config.monitors);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
|
||||
windowrulev2 = [
|
||||
"float,move 191 15,size 924 396,class:^(1Password)$"
|
||||
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
|
||||
"workspace 4, title:^(Vesktop)$"
|
||||
|
||||
# Floating BTOP
|
||||
"float,title:^(BTOP)$"
|
||||
"size 85%,title:^(BTOP)$"
|
||||
"pin,title:^(BTOP)$"
|
||||
"center,title:^(BTOP)$"
|
||||
"stayfocused,title:^(BTOP)$"
|
||||
|
||||
# Tearing
|
||||
"immediate, title:^(TEKKEN™8)$"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue