bit more ricing
Some checks are pending
Lint / lint (push) Waiting to run

This commit is contained in:
Vivian 2024-12-27 12:04:38 +01:00
parent a24394ecf6
commit c9fb02840b
11 changed files with 662 additions and 395 deletions

View file

@ -29,10 +29,7 @@
# Bootloader.
boot = {
kernelParams = [
# "amdgpu.sg_display=0" # did not fix the flickering
# "amdgpu.ppfeaturemask=0xffffffff" # did not fix flicker
# "amdgpu.graphics_sg=0"
"amdgpu.dcdebugmask=0x10"
"amdgpu.dcdebugmask=0x10" # Disables partial screen refresh, fixes flicker
];
bootspec.enable = true;
initrd.kernelModules = [ "amdgpu" ];
@ -59,7 +56,10 @@
# here, NOT in environment.systemPackages
];
programs.hyprland.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
};
services.gnome.gnome-keyring.enable = true;

View file

@ -15,13 +15,9 @@
'';
home.packages = with pkgs; [
jetbrains.rust-rover
jetbrains.clion
# jetbrains.idea-ultimate
eduvpn-client
localsend
typst
zed-editor
];

View file

@ -2,110 +2,63 @@
pkgs,
config,
inputs,
lib,
...
}:
let
terminal = "${config.programs.kitty.package}/bin/kitty -1";
in
{
imports = [
./waybar.nix
];
home.packages = with pkgs; [
v.hyprland-workspaces
hyprland-workspaces
inputs.gnome-autounlock-keyring.packages.${pkgs.system}.default
inputs.hyprland-qtutils.packages.${pkgs.system}.default
];
services = {
mako.enable = true;
mako = {
enable = true;
defaultTimeout = 5000;
};
};
programs = {
wofi = {
rofi = {
enable = true;
package = pkgs.rofi-wayland;
};
# eww = {
# enable = true;
# configDir = ./eww;
# enable = true;
# configDir = ./eww;
# };
};
# Hack to ensure graphical dependent services start _after_ hyprland starts
# Needed as these services normally start after graphical-session-pre
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
systemd.user.services.waybar.Unit.After = lib.mkForce "graphical-session.target";
waybar = {
enable = true;
style = ./waybar.css;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"wireplumber"
"power-profiles-daemon"
"network"
"battery"
];
services = {
gnome-keyring.enable = true;
hyprpaper =
let
wallpaper = ../../../../assets/wallpaper-nix-pink.png;
in
{
enable = true;
settings = {
preload = [ "${wallpaper}" ];
wallpaper = [ "eDP-1,${wallpaper}" ];
wireplumber = {
format = "󰕾 {volume}%";
format-muted = "󰖁";
on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle";
};
network =
let
nmtui = pkgs.writeScriptBin "nmtui.sh" ''
#!${pkgs.stdenv.shell}
unset COLORTERM
TERM=xterm-old ${pkgs.networkmanager}/bin/nmtui
'';
in
{
format-wifi = "󰖩 {essid} ({signalStrength}%)";
format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}";
format-disconnected = "󰌙 ";
tooltip-format = "{ifname}: {ipaddr}";
on-click = "touch ~/a && ${terminal} --execute ${nmtui}/bin/nmtui.sh";
};
power-profiles-daemon = {
format = "{icon}";
format-icons = {
performance = "󰓅";
balanced = "󰾅";
power-saver = "󰾆";
};
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "󱐋 {capacity}%";
format-discharging = "{icon} {capacity}%";
format-icons = [
"󰂎"
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
};
splash = false;
ipc = "off";
};
};
systemd = {
enable = true;
target = "hyprland-session.target";
};
};
};
wayland.windowManager.hyprland =
@ -118,44 +71,31 @@ in
hyprctl keyword monitor ",preferred,auto,1,mirror,eDP-1"
fi
'';
# Autostart now handled by xdg.autoStart
startup = pkgs.writeScriptBin "startup.sh" ''
#!${pkgs.stdenv.shell}
firefox &
discord &
# start keyring, then unlock it, then start Element
gnome-keyring-daemon -r -d && ${
inputs.gnome-autounlock-keyring.packages.${pkgs.system}.default
}/bin/gnome-autounlock-keyring unlock && element-desktop &
echo "Starting up"
'';
hyprpaper-conf =
let
wallpaper = ../../../../assets/wallpaper-nix-pink.png;
in
pkgs.writeText "hyprpaper.conf" ''
preload = ${wallpaper}
wallpaper = eDP-1,${wallpaper}
splash = false
ipc = off
'';
in
{
enable = true;
systemd.enable = true;
systemd.enable = false; # using UWSM
plugins = with pkgs.hyprlandPlugins; [
hyprexpo
];
settings =
let
inherit (builtins) genList concatLists toString;
wpctl = "${pkgs.wireplumber}/bin/wpctl";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
menu = "${config.programs.wofi.package}/bin/wofi --show run,drun";
menu = "${config.programs.rofi.package}/bin/rofi -show combi -modes combi -combi-modes \"window,drun,run\"";
fileManager = "${pkgs.nautilus}/bin/nautilus";
in
{
"$mod" = "SUPER";
exec-once = [
"${pkgs.hyprpaper}/bin/hyprpaper -c ${hyprpaper-conf}"
"${startup}/bin/startup.sh"
];
monitor = [
@ -169,11 +109,11 @@ in
gaps_in = 5;
gaps_out = 10;
border_size = 2;
"col.active_border" = "rgba(8caaeeee) rgba(a6d189ee) 45deg";
"col.active_border" = "rgba(babbf1ee) rgba(f4b8e4ee) 45deg";
"col.inactive_border" = "rgba(303446aa)";
layout = "dwindle";
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
allow_tearing = true;
};
group = {
"col.border_active" = "rgba(babbf1ee) rgba(f4b8e4ee) 45deg";
@ -187,6 +127,14 @@ in
text_color = "rgba(ffffffee)";
};
};
plugin.hyprexpo = {
workspace_method = "first 1";
enable_gesture = true;
gesture_positive = false;
gesture_fingers = 3;
};
decoration = {
rounding = 10;
@ -213,8 +161,8 @@ in
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
"fade, 1, 4, default"
"workspaces, 1, 4, default"
];
};
dwindle = {
@ -254,7 +202,7 @@ in
[
"$mod, RETURN, exec, ${terminal}"
"$mod, Q, killactive,"
"$mod SHIFT, escape, exit,"
"$mod SHIFT, Q, exec, uwsm stop,"
"$mod, E, exec, ${fileManager}"
"$mod, V, togglefloating,"
"$mod, D, exec, ${menu}"
@ -262,6 +210,8 @@ in
"$mod, J, togglesplit, # dwindle"
"$mod,m,fullscreen"
"$mod, space, hyprexpo:expo, toggle"
# Move focus with arrow keys
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
@ -271,6 +221,7 @@ in
# Scratch workspace
"$mod, S, togglespecialworkspace, magic"
"$mod SHIFT, S, movetoworkspace, special:magic"
# Groups aka Tabs
"$mod,g,togglegroup"
"$mod,tab,changegroupactive"

View file

@ -0,0 +1,84 @@
{ pkgs, config, ... }:
let
terminal = "${config.programs.kitty.package}/bin/kitty -1";
in
{
programs.waybar = {
enable = true;
systemd = {
enable = true;
# target = "wayland-session@Hyprland.target";
};
style = ./waybar.css;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"wireplumber"
"power-profiles-daemon"
"network"
"battery"
];
wireplumber = {
format = "󰕾 {volume}%";
format-muted = "󰖁";
on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle";
};
network =
let
nmtui = pkgs.writeScriptBin "nmtui.sh" ''
#!${pkgs.stdenv.shell}
unset COLORTERM
TERM=xterm-old ${pkgs.networkmanager}/bin/nmtui
'';
in
{
format-wifi = "󰖩 {essid} ({signalStrength}%)";
format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}";
format-disconnected = "󰌙 ";
tooltip-format = "{ifname}: {ipaddr}";
on-click = "touch ~/a && ${terminal} --execute ${nmtui}/bin/nmtui.sh";
};
power-profiles-daemon = {
format = "{icon}";
format-icons = {
performance = "󰓅";
balanced = "󰾅";
power-saver = "󰾆";
};
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "󱐋 {capacity}%";
format-discharging = "{icon} {capacity}%";
format-icons = [
"󰂎"
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
};
};
};
};
}