move overrides to overlay.nix

This commit is contained in:
Kopatz
2024-05-20 12:27:28 +02:00
parent effdbf8ac5
commit e9c3f0871c
8 changed files with 350 additions and 368 deletions

View File

@@ -1 +1,9 @@
My NixOS setup My NixOS setup
## options
I put my options under the `custom` key.
For example: `custom.graphical.plasma.enable = true;`
## pkgs
To build some of the custom pkgs you need a ssh key linked to github with access to my repos.

View File

@@ -1,9 +1,7 @@
{ config, osConfig, pkgs, inputs, lib, ... }: { config, osConfig, pkgs, inputs, lib, ... }:
with lib; with lib;
let let cfg = osConfig.custom.graphical.hyprland;
cfg = osConfig.custom.graphical.hyprland; in {
in
{
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.swaylock.enable = true; programs.swaylock.enable = true;
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
@@ -16,144 +14,141 @@ in
# Please note not all available settings / options are set here. # Please note not all available settings / options are set here.
# For a full list, see the wiki # For a full list, see the wiki
# #
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor = if osConfig.networking.hostName == "kop-pc" then [ monitor = if osConfig.networking.hostName == "kop-pc" then [
# PC # PC
"HDMI-A-1,1920x1080@60,0x0,1" "HDMI-A-1,1920x1080@60,0x0,1"
"DP-1,2560x1440@165,1920x0,1" "DP-1,2560x1440@165,1920x0,1"
"Unknown-1,disable" "Unknown-1,disable"
] else if osConfig.networking.hostName == "nix-laptop" then [ ] else if osConfig.networking.hostName == "nix-laptop" then [
# laptop # laptop
"eDP-1,3840x2160@60,0x0,2" "eDP-1,3840x2160@60,0x0,2"
"DP-3,1920x1080@60,1920x0,1" "DP-3,1920x1080@60,1920x0,1"
] else [ ] else
# Default [
",preferred,auto,auto" # Default
]; ",preferred,auto,auto"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs) # Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
# Some default env vars. # Some default env vars.
env = [ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" ]; env = [ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" ];
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = { input = {
kb_layout = osConfig.mainUser.layout; kb_layout = osConfig.mainUser.layout;
kb_variant = osConfig.mainUser.variant; kb_variant = osConfig.mainUser.variant;
kb_model = ""; kb_model = "";
kb_options = ""; kb_options = "";
kb_rules = ""; kb_rules = "";
follow_mouse = 1; follow_mouse = 1;
touchpad = { touchpad = { natural_scroll = true; };
natural_scroll = true;
}; sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
}; };
general = { general = {
# See https://wiki.hyprland.org/Configuring/Variables # See https://wiki.hyprland.org/Configuring/Variables
gaps_in = 5; gaps_in = 5;
gaps_out = 5; gaps_out = 5;
border_size = 2; border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)"; "col.inactive_border" = "rgba(595959aa)";
layout = "dwindle"; layout = "dwindle";
#allow_tearing = true; #allow_tearing = true;
}; };
decoration = { decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10; rounding = 10;
#blur = yes #blur = yes
#blur_size = 3 #blur_size = 3
#blur_passes = 1 #blur_passes = 1
#blur_new_optimizations = on #blur_new_optimizations = on
drop_shadow = true; drop_shadow = true;
shadow_range = 4; shadow_range = 4;
shadow_render_power = 3; shadow_render_power = 3;
"col.shadow" = "rgba(1a1a1aee)"; "col.shadow" = "rgba(1a1a1aee)";
}; };
animations = { animations = {
enabled = true; enabled = true;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
#bezier = myBezier, 0.05, 0.9, 0.1, 1.05 #bezier = myBezier, 0.05, 0.9, 0.1, 1.05
#animation = windows, 1, 7, myBezier #animation = windows, 1, 7, myBezier
#animation = windowsOut, 1, 7, default, popin 80% #animation = windowsOut, 1, 7, default, popin 80%
#animation = border, 1, 10, default #animation = border, 1, 10, default
#animation = borderangle, 1, 8, default #animation = borderangle, 1, 8, default
#animation = fade, 1, 7, default #animation = fade, 1, 7, default
animation = [ animation = [ "workspaces, 0" ];
"workspaces, 0"
];
}; };
dwindle = { dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below pseudotile =
preserve_split = true; # you probably want this true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
}; };
master = { master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true; new_is_master = true;
}; };
gestures = { gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true; workspace_swipe = true;
}; };
# Example per-device config # Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#"device:epic-mouse-v1" = { #"device:epic-mouse-v1" = {
# sensitivity = -0.5; # sensitivity = -0.5;
#}; #};
# Example windowrule v1 # Example windowrule v1
# windowrule = float, ^(kitty)$ # windowrule = float, ^(kitty)$
# Example windowrule v2 # Example windowrule v2
# float,class:^(kitty)$,title:^(kitty)$ # float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = let bind = let
rofi = "${pkgs.rofi-wayland}/bin/rofi"; rofi = "${pkgs.rofi-wayland}/bin/rofi";
kitty = "${pkgs.kitty}/bin/kitty"; kitty = "${pkgs.kitty}/bin/kitty";
#dolphin = "${pkgs.dolphin}/bin/dolphin"; #dolphin = "${pkgs.dolphin}/bin/dolphin";
thunar = "${pkgs.xfce.thunar}/bin/thunar"; thunar = "${pkgs.xfce.thunar}/bin/thunar";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste"; wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
grim = "${pkgs.grim}/bin/grim"; grim = "${pkgs.grim}/bin/grim";
slurp = "${pkgs.slurp}/bin/slurp"; slurp = "${pkgs.slurp}/bin/slurp";
swww = "${pkgs.swww}/bin/swww"; swww = "${pkgs.swww}/bin/swww";
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep"; pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
swaylock = "${pkgs.swaylock}/bin/swaylock"; swaylock = "${pkgs.swaylock}/bin/swaylock";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
in [ in [
"$mainMod, Q, exec, ${kitty}" "$mainMod, Q, exec, ${kitty}"
"$mainMod, C, killactive" "$mainMod, C, killactive"
"$mainMod, L, exec, ${swaylock} -f -c 000000" "$mainMod, L, exec, ${swaylock} -f -c 000000"
"$mainMod, M, exit," "$mainMod, M, exit,"
@@ -161,7 +156,8 @@ in
"$mainMod, F, fullscreen" "$mainMod, F, fullscreen"
"$mainMod, V, togglefloating" "$mainMod, V, togglefloating"
"$mainMod, I, exec, ${rofi} -show drun -show-icons" "$mainMod, I, exec, ${rofi} -show drun -show-icons"
"$mainMod, S, exec, cat ~/songs | shuf -n 1 | sed \"s/^/b\.p /g\" | ${wl-copy}" ''
$mainMod, S, exec, cat ~/songs | shuf -n 1 | sed "s/^/b.p /g" | ${wl-copy}''
"$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "$mainMod, R, exec, ${swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)"
" , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}" " , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}"
"ALT, SPACE, exec, ${rofi} -show combi" "ALT, SPACE, exec, ${rofi} -show combi"
@@ -177,7 +173,7 @@ in
"$mainMod, right, movefocus, r" "$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u" "$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d" "$mainMod, down, movefocus, d"
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1" "$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2" "$mainMod, 2, workspace, 2"
@@ -189,7 +185,7 @@ in
"$mainMod, 8, workspace, 8" "$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9" "$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10" "$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9] # Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspace, 1" "$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2" "$mainMod SHIFT, 2, movetoworkspace, 2"
@@ -201,20 +197,20 @@ in
"$mainMod SHIFT, 8, movetoworkspace, 8" "$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9" "$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10" "$mainMod SHIFT, 0, movetoworkspace, 10"
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1" "$mainMod, mouse_up, workspace, e-1"
# "ALT, Tab, cyclenext," # "ALT, Tab, cyclenext,"
# "ALT, Tab, bringactivetotop," # "ALT, Tab, bringactivetotop,"
]; ];
bindm = [ bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow" "$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow" "$mainMod, mouse:273, resizewindow"
]; ];
windowrulev2 = [ windowrulev2 = [
# -- Fix odd behaviors in IntelliJ IDEs -- # -- Fix odd behaviors in IntelliJ IDEs --
@@ -224,7 +220,7 @@ in
"center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" "center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
"nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" "nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
"noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" "noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
#! Center popups/find windows #! Center popups/find windows
"center,class:^(jetbrains-.*)$,title:^( )$,floating:1" "center,class:^(jetbrains-.*)$,title:^( )$,floating:1"
"stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1" "stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1"
@@ -233,14 +229,13 @@ in
"nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1" "nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1"
#"immediate, class:^(Risk.*)$" #"immediate, class:^(Risk.*)$"
]; ];
exec-once = [
exec-once = [
"${pkgs.swww}/bin/swww init; sleep 1;" "${pkgs.swww}/bin/swww init; sleep 1;"
"${pkgs.swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)" "${pkgs.swww} img $(ls -d /synced/default/dinge/Bg/* | shuf -n 1)"
"${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &" "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &"
"${pkgs.waybar}/bin/waybar &" "${pkgs.waybar}/bin/waybar &"
#"${pkgs.dunst}/bin/dunst &" #"${pkgs.dunst}/bin/dunst &"
]; ];
}; };
extraConfig = let extraConfig = let
@@ -284,16 +279,16 @@ in
enable = true; enable = true;
settings = { settings = {
global = { global = {
width = "(0,1000)"; width = "(0,1000)";
height = "1000"; height = "1000";
offset = "0x0"; offset = "0x0";
origin = "bottom-center"; origin = "bottom-center";
transparency = -1; transparency = -1;
frame_color = "#1a1c1b"; frame_color = "#1a1c1b";
font = "Monospace 8"; font = "Monospace 8";
}; };
urgency_normal = { urgency_normal = {
background = "#1a1c1b"; background = "#1a1c1b";
foreground = "#eceff1"; foreground = "#eceff1";
timeout = 10; timeout = 10;

View File

@@ -1,9 +1,7 @@
{ config, osConfig, pkgs, inputs, lib, ... }: { config, osConfig, pkgs, inputs, lib, ... }:
with lib; with lib;
let let cfg = osConfig.custom.graphical.hyprland;
cfg = osConfig.custom.graphical.hyprland; in {
in
{
config = let config = let
# styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix # styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix
theme = builtins.readFile ./styles/catppuccin.css; theme = builtins.readFile ./styles/catppuccin.css;
@@ -18,189 +16,171 @@ in
#systemd.enable = true; #systemd.enable = true;
#systemd.target = "sway-session.target"; #systemd.target = "sway-session.target";
settings.main = { settings.main = {
layer = "top"; layer = "top";
position = "top"; position = "top";
#output = lib.mapAttrsToList (n: v: v.monitor) outputs; #output = lib.mapAttrsToList (n: v: v.monitor) outputs;
height = 25; height = 25;
spacing = 4; spacing = 4;
modules-left = [ modules-left = [
"hyprland/workspaces" "hyprland/workspaces"
#"hyprland/window" #"hyprland/window"
]; ];
modules-center = []; modules-center = [ ];
modules-right = [ modules-right = [ "group/stats" "group/other" ];
"group/stats" "cpu" = {
"group/other" "format" = " {usage}%";
]; "tooltip" = true;
"cpu" = { };
"format" = " {usage}%"; "disk" = { "format" = " {percentage_used}%"; };
"tooltip" = true; "memory" = { "format" = "󰍛 {}%"; };
};
"disk" = {
"format" = " {percentage_used}%";
};
"memory" = {
"format" = "󰍛 {}%";
};
"idle_inhibitor" = { "idle_inhibitor" = {
"format" = "{icon} "; "format" = "{icon} ";
"format-icons" = { "format-icons" = {
"activated" = ""; "activated" = "";
"deactivated" = ""; "deactivated" = "";
}; };
}; };
"keyboard-state" = { "keyboard-state" = {
"numlock" = true; "numlock" = true;
"capslock" = true; "capslock" = true;
"format" = "{icon} {name}"; "format" = "{icon} {name}";
"format-icons" = { "format-icons" = {
"locked" = ""; "locked" = "";
"unlocked" = ""; "unlocked" = "";
}; };
}; };
"network" = { "network" = {
"interval" = 2; "interval" = 2;
"format-wifi" = " 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}"; "format-wifi" = " 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}";
"format-ethernet" = "󰈀 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}"; "format-ethernet" = "󰈀 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}";
"tooltip-format" = " {ifname} via {gwaddr}"; "tooltip-format" = " {ifname} via {gwaddr}";
"format-linked" = "󰈁 {ifname} (No IP)"; "format-linked" = "󰈁 {ifname} (No IP)";
"format-disconnected" = " Disconnected"; "format-disconnected" = " Disconnected";
"format-alt" = "{ifname}: {ipaddr}/{cidr}"; "format-alt" = "{ifname}: {ipaddr}/{cidr}";
}; };
"pulseaudio" = { "pulseaudio" = {
"format" = "{volume}% {icon}"; "format" = "{volume}% {icon}";
"format-bluetooth" = "{volume}% {icon}"; "format-bluetooth" = "{volume}% {icon}";
"format-muted" = "🚫"; "format-muted" = "🚫";
"format-icons" = { "format-icons" = {
"headphone" = ""; "headphone" = "";
"hands-free" = ""; "hands-free" = "";
"headset" = ""; "headset" = "";
"phone" = ""; "phone" = "";
"portable" = ""; "portable" = "";
"car" = ""; "car" = "";
"default" = [ "default" = [ "" "" ];
"" };
"" "scroll-step" = 1;
]; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
}; "ignored-sinks" = [ "Easy Effects Sink" ];
"scroll-step" = 1; };
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
"ignored-sinks" = [ "Easy Effects Sink" ];
};
"pulseaudio/slider" = { "pulseaudio/slider" = {
"min" = 0; "min" = 0;
"max" = 100; "max" = 100;
"orientation" = "horizontal"; "orientation" = "horizontal";
}; };
"temperature".critical-threshold = 80; "temperature".critical-threshold = 80;
"temperature".format = "{temperatureC}°C "; "temperature".format = "{temperatureC}°C ";
"temperature".interval = 5; "temperature".interval = 5;
"temperature".hwmon-path = lib.mkIf (osConfig.networking.hostName == "nix-laptop") "/sys/class/hwmon/hwmon6/temp1_input"; "temperature".hwmon-path =
"backlight".format = "{percent}% {icon}"; lib.mkIf (osConfig.networking.hostName == "nix-laptop")
"backlight".states = [0 50]; "/sys/class/hwmon/hwmon6/temp1_input";
"backlight".format-icons = ["" ""]; "backlight".format = "{percent}% {icon}";
"battery".states.good = 95; "backlight".states = [ 0 50 ];
"battery".states.warning = 30; "backlight".format-icons = [ "" "" ];
"battery".states.critical = 15; "battery".states.good = 95;
"battery".format = "{capacity}% / {power:.2}W {icon}"; "battery".states.warning = 30;
"battery".format-icons = ["" "" "" "" ""]; "battery".states.critical = 15;
"clock".format = "{:%F %H:%M}"; "battery".format = "{capacity}% / {power:.2}W {icon}";
"clock".tooltip-format = "<tt><small>{calendar}</small></tt>"; "battery".format-icons = [ "" "" "" "" "" ];
"tray".icon-size = 21; "clock".format = "{:%F %H:%M}";
"tray".spacing = 10; "clock".tooltip-format = "<tt><small>{calendar}</small></tt>";
"tray".icon-size = 21;
"tray".spacing = 10;
"group/stats" = { "group/stats" = {
"orientation" = "horizontal"; "orientation" = "horizontal";
"modules" = [ "modules" = [ "network" "cpu" "memory" "disk" "temperature" ];
"network"
"cpu"
"memory"
"disk"
"temperature"
];
}; };
"group/other" = { "group/other" = {
"orientation" = "horizontal"; "orientation" = "horizontal";
"modules" = [ "modules" = [ "tray" "backlight" "pulseaudio" "battery" "clock" ];
"tray" };
"backlight" "hyprland/window" = {
"pulseaudio" "format" = "{}";
"battery" "separate-outputs" = true;
"clock"
];
}; };
"hyprland/window" = {
"format" = "{}";
"separate-outputs" = true;
};
"hyprland/workspaces" = { "hyprland/workspaces" = {
"disable-scroll" = true; "disable-scroll" = true;
"all-outputs" = true; "all-outputs" = true;
"active-only" = false; "active-only" = false;
"on-click" = "activate"; "on-click" = "activate";
"format" = "{icon} {windows}"; "format" = "{icon} {windows}";
"format-icons" = { "format-icons" = {
"1" = "󰎤"; "1" = "󰎤";
"2" = "󰎧"; "2" = "󰎧";
"3" = "󰎪"; "3" = "󰎪";
"4" = "󰎭"; "4" = "󰎭";
"5" = "󰎱"; "5" = "󰎱";
"6" = "󰎳"; "6" = "󰎳";
"7" = "󰎶"; "7" = "󰎶";
"8" = "󰎹"; "8" = "󰎹";
"9" = "󰎼"; "9" = "󰎼";
"10" = "󰽽"; "10" = "󰽽";
"urgent" = "󱨇"; "urgent" = "󱨇";
"default" = ""; "default" = "";
"empty" = "󱓼"; "empty" = "󱓼";
}; };
# "format-window-separator" = "->"; # "format-window-separator" = "->";
"window-rewrite-default" = ""; "window-rewrite-default" = "";
"window-rewrite" = { "window-rewrite" = {
"class<org.keepassxc.KeePassXC>" = "󰢁"; "class<org.keepassxc.KeePassXC>" = "󰢁";
"class<Caprine>" = "󰈎"; "class<Caprine>" = "󰈎";
"class<Github Desktop>" = "󰊤"; "class<Github Desktop>" = "󰊤";
"class<Godot>" = ""; "class<Godot>" = "";
"class<Mysql-workbench-bin>" = ""; "class<Mysql-workbench-bin>" = "";
"class<Slack>" = "󰒱"; "class<Slack>" = "󰒱";
"class<code>" = "󰨞"; "class<code>" = "󰨞";
"code-url-handler" = "󰨞"; "code-url-handler" = "󰨞";
"class<discord>" = "󰙯"; "class<discord>" = "󰙯";
"class<firefox>" = ""; "class<firefox>" = "";
"class<firefox-beta>" = ""; "class<firefox-beta>" = "";
"class<firefox-developer-edition>" = ""; "class<firefox-developer-edition>" = "";
"class<firefox> title<.*github.*>" = ""; "class<firefox> title<.*github.*>" = "";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = ""; "class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" =
"class<kitty>" = ""; "";
"class<org.wezfurlong.wezterm>" = ""; "class<kitty>" = "";
"class<mediainfo-gui>" = "󱂷"; "class<org.wezfurlong.wezterm>" = "";
"class<org.kde.digikam>" = "󰄄"; "class<mediainfo-gui>" = "󱂷";
"class<org.telegram.desktop>" = ""; "class<org.kde.digikam>" = "󰄄";
"class<.pitivi-wrapped>" = "󱄢"; "class<org.telegram.desktop>" = "";
"class<steam>" = ""; "class<.pitivi-wrapped>" = "󱄢";
"class<thunderbird>" = ""; "class<steam>" = "";
"class<virt-manager>" = "󰢹"; "class<thunderbird>" = "";
"class<vlc>" = "󰕼"; "class<virt-manager>" = "󰢹";
"class<thunar>" = "󰉋"; "class<vlc>" = "󰕼";
"class<org.gnome.Nautilus>" = "󰉋"; "class<thunar>" = "󰉋";
"class<Spotify>" = ""; "class<org.gnome.Nautilus>" = "󰉋";
"title<Spotify Free>" = ""; "class<Spotify>" = "";
"class<libreoffice-draw>" = "󰽉"; "title<Spotify Free>" = "";
"class<libreoffice-writer>" = ""; "class<libreoffice-draw>" = "󰽉";
"class<libreoffice-calc>" = "󱎏"; "class<libreoffice-writer>" = "";
"class<libreoffice-impress>" = "󱎐"; "class<libreoffice-calc>" = "󱎏";
"class<teams-for-linux>" = "󰊻"; "class<libreoffice-impress>" = "󱎐";
"class<org.prismlauncher.PrismLauncher>" = "󰍳"; "class<teams-for-linux>" = "󰊻";
"class<minecraft-launcher>" = "󰍳"; "class<org.prismlauncher.PrismLauncher>" = "󰍳";
"class<Postman>" = "󰛮"; "class<minecraft-launcher>" = "󰍳";
}; "class<Postman>" = "󰛮";
}; };
};
}; };
style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}"; style =
"${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
}; };
}; };
} }

View File

@@ -1,85 +1,81 @@
{config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
with lib; with lib;
let let cfg = config.custom.graphical.hyprland;
cfg = config.custom.graphical.hyprland; in {
in
{
options.custom.graphical.hyprland = { options.custom.graphical.hyprland = {
enable = mkEnableOption "Enables hyprland"; enable = mkEnableOption "Enables hyprland";
}; };
options.custom.graphical.hyprland.videobridge = { options.custom.graphical.hyprland.videobridge = {
enable = mkEnableOption "Enables xwaylandvideobridge for hyprland"; enable = mkEnableOption "Enables xwaylandvideobridge for hyprland";
}; };
config = let config = mkIf cfg.enable {
patchedWaybar = pkgs.unstable.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); services.xserver = {
in mkIf cfg.enable { xkb.layout = config.mainUser.layout;
services.xserver = { xkb.variant = config.mainUser.variant;
xkb.layout = config.mainUser.layout; enable = true;
xkb.variant = config.mainUser.variant; displayManager =
enable = true; mkIf (!config.services.xserver.displayManager.sddm.enable) {
displayManager = mkIf (!config.services.xserver.displayManager.sddm.enable) {
gdm.enable = true; gdm.enable = true;
}; };
};
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
#WLR_DRM_NO_ATOMIC="1";
#WLR_DRM_DEVICES = "/dev/dri/card0";
LIBVA_DRIVER_NAME = "nvidia";
# black screen :(
#XDG_SESSION_TYPE = "wayland";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_RENDERER_ALLOW_SOFTWARE = "1";
};
hardware = {
# Opengl
opengl.enable = true;
# Most wayland compositors need this
nvidia.modesetting.enable = true;
};
xdg.portal.enable = true;
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
};
security.pam.services = {
swaylock = {
fprintAuth = false;
text = ''
auth include login
'';
}; };
};
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS="1"; # List packages installed in system profile. To search, run:
#WLR_DRM_NO_ATOMIC="1"; # $ nix search wget
#WLR_DRM_DEVICES = "/dev/dri/card0"; environment.systemPackages = with pkgs; [
LIBVA_DRIVER_NAME="nvidia"; # hyprland stuff
# black screen :( dunst
#XDG_SESSION_TYPE = "wayland"; swww
GBM_BACKEND = "nvidia-drm"; rofi-wayland
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; libnotify
WLR_RENDERER_ALLOW_SOFTWARE="1"; networkmanagerapplet
}; wayland
wl-clipboard
hardware = { #qt5.qtwayland
# Opengl #qt6.qmake
opengl.enable = true; #qt6.qtwayland
#waybar
# Most wayland compositors need this #xdg-desktop-portal-hyprland
nvidia.modesetting.enable = true; #xdg-desktop-portal-gtk
}; #xdg-utils
#xwayland
xdg.portal.enable = true; ];
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
};
security.pam.services = {
swaylock = {
fprintAuth = false;
text = ''
auth include login
'';
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# hyprland stuff
patchedWaybar
dunst
swww
rofi-wayland
libnotify
networkmanagerapplet
wayland
wl-clipboard
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland
#waybar
#xdg-desktop-portal-hyprland
#xdg-desktop-portal-gtk
#xdg-utils
#xwayland
];
}; };
} }

View File

@@ -20,7 +20,7 @@ in
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
#uw-ttyp0 #uw-ttyp0
corefonts corefonts
(nerdfonts.override { fonts = ["Hack" "Noto"]; }) nerdfonts
#noto-fonts #noto-fonts
#noto-fonts-emoji #noto-fonts-emoji
noto-fonts-cjk noto-fonts-cjk

View File

@@ -34,7 +34,7 @@ in {
let nerdfonts = pkgs.nerdfonts.override { fonts = [ "Hack" "Noto" ]; }; let nerdfonts = pkgs.nerdfonts.override { fonts = [ "Hack" "Noto" ]; };
in mkIf cfg.enable { in mkIf cfg.enable {
stylix = { stylix = {
autoEnable = true; autoEnable = mkForce true;
polarity = "dark"; polarity = "dark";
image = cfg.image; image = cfg.image;
override = cfg.override; override = cfg.override;

View File

@@ -7,6 +7,9 @@
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays # https://nixos.wiki/wiki/Overlays
modifications = final: prev: { modifications = final: prev: {
discord = prev.discord.override { withVencord = true; };
nerdfonts = prev.nerdfonts.override { fonts = ["Hack" "Noto"]; };
waybar = prev.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; });
# example = prev.example.overrideAttrs (oldAttrs: rec { # example = prev.example.overrideAttrs (oldAttrs: rec {
# ... # ...
# }); # });

View File

@@ -24,7 +24,7 @@
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" ]; extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [ packages = with pkgs; [
(discord.override { withVencord = true; }) discord
brave brave
]; ];
openssh.authorizedKeys.keys = [ config.mainUser.sshKey ]; openssh.authorizedKeys.keys = [ config.mainUser.sshKey ];