mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 15:45:39 +00:00
feat: refactor home-manager configuration for multi-host support
This commit is contained in:
parent
f20c875a48
commit
6d1fd47bea
47 changed files with 51 additions and 14 deletions
9
home/modules/graphical/btop.nix
Normal file
9
home/modules/graphical/btop.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "Default";
|
||||
vim_keys = true;
|
||||
};
|
||||
};
|
||||
}
|
27
home/modules/graphical/dunst.nix
Normal file
27
home/modules/graphical/dunst.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
follow = "mouse";
|
||||
frame_width = 1;
|
||||
icon_position = "off";
|
||||
corner_radius = 4;
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#1e1e1e";
|
||||
foreground = "#fefefe";
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#0c0c00";
|
||||
foreground = "#fcfcff";
|
||||
};
|
||||
urgency_critical = {
|
||||
background = "#300e00";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ce1f00";
|
||||
frame_width = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
45
home/modules/graphical/firefox.nix
Normal file
45
home/modules/graphical/firefox.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
OfferToSaveLogins = false;
|
||||
PasswordManagerEnabled = false;
|
||||
ExtensionSettings = {
|
||||
# KeePassXC-Browser
|
||||
"keepassxc-browser@keepassxc.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
# Vimium C
|
||||
"vimium-c@gdh1995.cn" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/vimium-c/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
# uBlock Origin
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
# RoGold
|
||||
"{048bba8c-c62d-4967-963d-d663cae75d3f}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/rogold/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
# RoSeal
|
||||
"{f4f4223a-ff30-4961-b9c0-6a71b7a32aaf}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/roseal/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
# Raindrop.io
|
||||
"jid0-adyhmvsP91nUO8pRv0Mn2VKeB84@jetpack" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/raindropio/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
home/modules/graphical/fonts.nix
Normal file
21
home/modules/graphical/fonts.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
fira-code
|
||||
font-awesome
|
||||
liberation_ttf
|
||||
xorg.fontutil
|
||||
xorg.fontbh100dpi
|
||||
xorg.fontbh75dpi
|
||||
|
||||
xorg.mkfontscale
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
}
|
17
home/modules/graphical/hypridle.nix
Normal file
17
home/modules/graphical/hypridle.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [{
|
||||
timeout = 5 * 60;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
191
home/modules/graphical/hyprland.nix
Normal file
191
home/modules/graphical/hyprland.nix
Normal file
|
@ -0,0 +1,191 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = [
|
||||
pkgs.playerctl
|
||||
pkgs.hyprshot
|
||||
pkgs.tofi
|
||||
];
|
||||
|
||||
programs.mouse-actions.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
systemd.enable = false;
|
||||
settings = {
|
||||
exec-once = [ "waybar" "uwsm app -- keepassxc" "uwsm app -- firefox" ];
|
||||
|
||||
"$terminal" = "uwsm app -- kitty";
|
||||
"$fileManager" = "uwsm app -- thunar";
|
||||
"$menu" = "uwsm app -- $(tofi-drun)";
|
||||
"$mod" = "SUPER";
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"GTK_IM_MODULE,kime"
|
||||
"QT_IM_MODULE,kime"
|
||||
"XMODIFIERS,@im=kime"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Q, exec, $terminal"
|
||||
"$mod, C, killactive"
|
||||
"$mod, M, exit"
|
||||
"$mod, E, exec, $fileManager"
|
||||
"$mod, R, exec, $menu"
|
||||
"$mod, Y, togglesplit"
|
||||
"$mod, F, fullscreen"
|
||||
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, J, movefocus, d"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, L, movefocus, r"
|
||||
|
||||
"$mod SHIFT, H, movewindow, l"
|
||||
"$mod SHIFT, J, movewindow, d"
|
||||
"$mod SHIFT, K, movewindow, u"
|
||||
"$mod SHIFT, L, movewindow, r"
|
||||
|
||||
"$mod ALT, H, resizeactive, -50 0"
|
||||
"$mod ALT, J, resizeactive, 0 50"
|
||||
"$mod ALT, K, resizeactive, 0 -50"
|
||||
"$mod ALT, L, resizeactive, 50 0"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
"$mod SHIFT, S, exec, env HYPRSHOT_DIR=/data/Backup/Screenshots hyprshot -m region"
|
||||
"$mod SHIFT, E, exec, powermenu"
|
||||
|
||||
"$mod, mouse:277, exec, cycle-mouse-action"
|
||||
", mouse:277, exec, run-mouse-action"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86Tools, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(ffffffaa)";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
resize_on_border = false;
|
||||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
rounding_power = 2;
|
||||
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
first_launch_animation = false;
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"easeInOutCubic,0.65,0.05,0.36,1"
|
||||
"linear,0,0,1,1"
|
||||
"almostLinear,0.5,0.5,0.75,1.0"
|
||||
"quick,0.15,0,0.1,1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"global,1,10,default"
|
||||
"border,1,5.39,easeOutQuint"
|
||||
"windows,1,4.79,easeOutQuint"
|
||||
"windowsIn,1,4.1,easeOutQuint,popin 87%"
|
||||
"windowsOut,1,1.49,linear,popin 87%"
|
||||
"fadeIn,1,1.73,almostLinear"
|
||||
"fadeOut,1,1.46,almostLinear"
|
||||
"fade,1,3.03,quick"
|
||||
"layers,1,3.81,easeOutQuint"
|
||||
"layersIn,1,4,easeOutQuint,fade"
|
||||
"layersOut,1,1.5,linear,fade"
|
||||
"fadeLayersIn,1,1.79,almostLinear"
|
||||
"fadeLayersOut,1,1.39,almostLinear"
|
||||
"workspaces,1,1.94,almostLinear,fade"
|
||||
"workspacesIn,1,1.21,almostLinear,fade"
|
||||
"workspacesOut,1,1.94,almostLinear,fade"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,kr";
|
||||
kb_options = "grp:alt_shift_toggle";
|
||||
sensitivity = -0.6;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"suppressevent maximize, class:.*"
|
||||
"nofocus,class:^%,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
package = pkgs.rose-pine-cursor;
|
||||
name = "BreezeX-RosePine-Linux";
|
||||
size = 24;
|
||||
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
}
|
19
home/modules/graphical/keepassxc.nix
Normal file
19
home/modules/graphical/keepassxc.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
programs.keepassxc = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Browser = {
|
||||
Enabled = true;
|
||||
UpdateBinaryPath = false;
|
||||
AllowLocalhostWithPasskeys = true;
|
||||
};
|
||||
SSHAgent.Enabled = true;
|
||||
GUI = {
|
||||
MinimizeToTray = true;
|
||||
MinimizeOnStartup = true;
|
||||
MinimizeOnClose = true;
|
||||
ShowTrayIcon = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
home/modules/graphical/kitty.nix
Normal file
6
home/modules/graphical/kitty.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "FiraCode";
|
||||
};
|
||||
}
|
40
home/modules/graphical/mouse-actions/actions/autoclick.nix
Normal file
40
home/modules/graphical/mouse-actions/actions/autoclick.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "autoclick-action" ''
|
||||
if ! command -v ydotool >/dev/null 2>&1; then
|
||||
notify-send -r 120000 "Autoclicker" "This tool requires ydotool to be installed on your system."
|
||||
fi
|
||||
|
||||
AUTOCLICK_FILE="/run/user/$(id -u)/autoclick"
|
||||
|
||||
if [ ! -f "$AUTOCLICK_FILE" ]; then
|
||||
echo "1" > "$AUTOCLICK_FILE"
|
||||
fi
|
||||
|
||||
current=$(cat "$AUTOCLICK_FILE")
|
||||
if [ "$current" = "0" ]; then
|
||||
echo "1" > "$AUTOCLICK_FILE"
|
||||
notify-send -r 120000 "Autoclicker" "Stopped"
|
||||
exit 0
|
||||
else
|
||||
echo "0" > "$AUTOCLICK_FILE"
|
||||
notify-send -r 120000 "Autoclicker" "Started"
|
||||
fi
|
||||
|
||||
while :; do
|
||||
line=$(cat "$AUTOCLICK_FILE")
|
||||
if [ "$line" = "0" ]; then
|
||||
ydotool click --next-delay 25 0xC0 > /dev/null 2>&1
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "autoclick-action";
|
||||
paths = [ script pkgs.libnotify ];
|
||||
};
|
||||
}
|
13
home/modules/graphical/mouse-actions/actions/deafen.nix
Normal file
13
home/modules/graphical/mouse-actions/actions/deafen.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "deafen-action" ''
|
||||
hyprctl dispatch sendshortcut CTRL+SHIFT, D, 'class:^(vesktop)$'
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "deafen-action";
|
||||
paths = [ script pkgs.hyprland ];
|
||||
};
|
||||
}
|
7
home/modules/graphical/mouse-actions/actions/default.nix
Normal file
7
home/modules/graphical/mouse-actions/actions/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs }:
|
||||
|
||||
{
|
||||
autoclick = import ./autoclick.nix { inherit pkgs; };
|
||||
deafen = import ./deafen.nix { inherit pkgs; };
|
||||
sober-lag = import ./sober-lag.nix { inherit pkgs; };
|
||||
}
|
27
home/modules/graphical/mouse-actions/actions/sober-lag.nix
Normal file
27
home/modules/graphical/mouse-actions/actions/sober-lag.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "sober-lag-action" ''
|
||||
roblox_pid=$(ps aux | grep "[s]ober --" | sort -k3 -nr | head -n 1 | awk '{print $2}')
|
||||
if [ -z "$roblox_pid" ]; then
|
||||
notify-send "sober-lag.sh" "Sober is not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pgid=$(ps -o pgid= -p "$roblox_pid" | xargs)
|
||||
if [ -z "$pgid" ]; then
|
||||
notify-send "sober-lag.sh" "Could not find PGID for PID $roblox_pid."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kill -STOP -- "-$pgid"
|
||||
sleep 0.2
|
||||
kill -CONT -- "-$pgid"
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "sober-lag-action";
|
||||
paths = [ script pkgs.procps pkgs.gawk pkgs.gnugrep pkgs.gnused pkgs.coreutils pkgs.libnotify ];
|
||||
};
|
||||
}
|
29
home/modules/graphical/mouse-actions/cycle.nix
Normal file
29
home/modules/graphical/mouse-actions/cycle.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "cycle-mouse-action" ''
|
||||
STATE_FILE="$HOME/.config/mouse-actions/state"
|
||||
mkdir -p "$(dirname "$STATE_FILE")"
|
||||
|
||||
if [ -f "$STATE_FILE" ]; then
|
||||
CURRENT_ACTION=$(cat "$STATE_FILE")
|
||||
else
|
||||
CURRENT_ACTION="deafen"
|
||||
fi
|
||||
|
||||
case "$CURRENT_ACTION" in
|
||||
"deafen") NEW_ACTION="sober-lag" ;;
|
||||
"sober-lag") NEW_ACTION="autoclick" ;;
|
||||
*) NEW_ACTION="deafen"
|
||||
esac
|
||||
|
||||
echo "$NEW_ACTION" > "$STATE_FILE.tmp"
|
||||
mv "$STATE_FILE.tmp" "$STATE_FILE"
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "cycle-mouse-action";
|
||||
paths = [ script pkgs.libnotify ];
|
||||
};
|
||||
}
|
18
home/modules/graphical/mouse-actions/default.nix
Normal file
18
home/modules/graphical/mouse-actions/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
options.programs.mouse-actions.enable = lib.mkEnableOption "mouse-actions";
|
||||
config = lib.mkIf config.programs.mouse-actions.enable
|
||||
(let
|
||||
cfg = config.programs.mouse-actions;
|
||||
actions = import ./actions { inherit pkgs; };
|
||||
|
||||
cycle-script = import ./cycle.nix { inherit pkgs; };
|
||||
run-script = import ./run.nix { inherit pkgs; actions = actions; };
|
||||
in {
|
||||
home.packages = [
|
||||
cycle-script.package
|
||||
run-script.package
|
||||
];
|
||||
});
|
||||
}
|
31
home/modules/graphical/mouse-actions/run.nix
Normal file
31
home/modules/graphical/mouse-actions/run.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, actions }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "run-mouse-action" ''
|
||||
STATE_FILE="$HOME/.config/mouse-actions/state"
|
||||
|
||||
if [ ! -f "$STATE_FILE" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ACTION_NAME=$(<"$STATE_FILE")
|
||||
|
||||
case "$ACTION_NAME" in
|
||||
"deafen")
|
||||
systemd-run --user ${actions.deafen.package}/bin/deafen-action
|
||||
;;
|
||||
"sober-lag")
|
||||
systemd-run --user ${actions.sober-lag.package}/bin/sober-lag-action
|
||||
;;
|
||||
"autoclick")
|
||||
systemd-run --user ${actions.autoclick.package}/bin/autoclick-action
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "run-mouse-action";
|
||||
paths = [ script pkgs.systemd ];
|
||||
};
|
||||
}
|
34
home/modules/graphical/nixcord.nix
Normal file
34
home/modules/graphical/nixcord.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
programs.nixcord = {
|
||||
enable = true;
|
||||
discord.enable = false;
|
||||
vesktop.enable = true;
|
||||
config = {
|
||||
plugins = {
|
||||
biggerStreamPreview.enable = true;
|
||||
callTimer.enable = true;
|
||||
experiments.enable = true;
|
||||
fixSpotifyEmbeds.enable = true;
|
||||
fixYoutubeEmbeds.enable = true;
|
||||
forceOwnerCrown.enable = true;
|
||||
friendsSince.enable = true;
|
||||
gameActivityToggle.enable = true;
|
||||
permissionsViewer.enable = true;
|
||||
serverInfo.enable = true;
|
||||
silentTyping.enable = true;
|
||||
spotifyControls.enable = true;
|
||||
spotifyCrack.enable = true;
|
||||
summaries.enable = true;
|
||||
typingIndicator.enable = true;
|
||||
validReply.enable = true;
|
||||
validUser.enable = true;
|
||||
voiceChatDoubleClick.enable = true;
|
||||
voiceMessages.enable = true;
|
||||
volumeBooster.enable = true;
|
||||
webKeybinds.enable = true;
|
||||
webScreenShareFixes.enable = true;
|
||||
youtubeAdblock.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
8
home/modules/graphical/obsidian.nix
Normal file
8
home/modules/graphical/obsidian.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
vaults."Obsidian" = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
24
home/modules/graphical/powermenu.nix
Executable file
24
home/modules/graphical/powermenu.nix
Executable file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "powermenu" ''
|
||||
choice=$(printf """
|
||||
Logout
|
||||
⏻ Shutdown
|
||||
Reboot
|
||||
Suspend
|
||||
Hibernate
|
||||
""" | ${pkgs.tofi}/bin/tofi)
|
||||
|
||||
case "$choice" in
|
||||
" Logout") ${pkgs.uwsm}/bin/uwsm stop ;;
|
||||
"⏻ Shutdown") ${pkgs.systemd}/bin/systemctl poweroff ;;
|
||||
" Reboot") ${pkgs.systemd}/bin/systemctl reboot ;;
|
||||
" Suspend") ${pkgs.systemd}/bin/systemctl suspend ;;
|
||||
" Hibernate") ${pkgs.systemd}/bin/systemctl hibernate ;;
|
||||
esac
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
7
home/modules/graphical/prismlauncher.nix
Normal file
7
home/modules/graphical/prismlauncher.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
prismlauncher
|
||||
];
|
||||
}
|
25
home/modules/graphical/tofi.nix
Normal file
25
home/modules/graphical/tofi.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
programs.tofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = "monospace";
|
||||
font-size = 24;
|
||||
background-color="000000D0";
|
||||
text-color = "FFFFFF";
|
||||
prompt-text = "run: ";
|
||||
num-results = 7;
|
||||
selection-color = "FF005F";
|
||||
border-width = 0;
|
||||
outline-width = 0;
|
||||
result-spacing = 8;
|
||||
anchor = "center";
|
||||
width = "50%";
|
||||
height = "50%";
|
||||
padding-top = 32;
|
||||
padding-bottom = 32;
|
||||
padding-left = 32;
|
||||
padding-right = 32;
|
||||
terminal = "kitty";
|
||||
};
|
||||
};
|
||||
}
|
75
home/modules/graphical/waybar/default.nix
Normal file
75
home/modules/graphical/waybar/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = builtins.readFile ./style.css;
|
||||
settings = [{
|
||||
position = "top";
|
||||
height = 5;
|
||||
output = "HDMI-A-1";
|
||||
modules-left = [ "custom/mouse-actions" ];
|
||||
modules-center = [ ];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"systemd-failed-units"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
tray.spacing = 10;
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M }";
|
||||
format-alt = "{:%Y-%m-%d}";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
on-click = "kitty btop";
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = "{}% ";
|
||||
on-click = "kitty btop";
|
||||
};
|
||||
|
||||
network = {
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {format_source}";
|
||||
format-bluetooth-muted = " {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
|
||||
systemd-failed-units = {
|
||||
hide-on-ok = false;
|
||||
format = "✗ {nr_failed}";
|
||||
format-ok = "✓";
|
||||
system = true;
|
||||
user = false;
|
||||
};
|
||||
|
||||
"custom/mouse-actions" = {
|
||||
format = " {}";
|
||||
exec = "tail -n 1 -F ~/.config/mouse-actions/state 2>/dev/null";
|
||||
on-click = "run-mouse-action";
|
||||
on-scroll-down = "cycle-mouse-action";
|
||||
return-type = "text";
|
||||
restart-interval = false;
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
199
home/modules/graphical/waybar/style.css
Normal file
199
home/modules/graphical/waybar/style.css
Normal file
|
@ -0,0 +1,199 @@
|
|||
/* https://github.com/kamlendras/waybar-macos-sequoia/tree/259ecb4b5a65a52ece0708fb4c65db4f57268329?tab=readme-ov-file */
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
/* `ttf-font-awesome` is required to be installed for icons */
|
||||
font-family: "Roboto Mono Medium", Helvetica, Arial, sans-serif;
|
||||
|
||||
/* adjust font-size value to your liking: */
|
||||
font-size: 10px;
|
||||
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: #ffffff;
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727d;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727d;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
margin: 6px 3px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #ffffff;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #bbccdd;
|
||||
color: #333333;
|
||||
padding: 0 5px;
|
||||
margin: 6px 3px;
|
||||
min-width: 16px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue