From 2e6e28ef325d3f0ddc6a6d9257717039baa5d8f1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 6 Feb 2025 00:33:06 +0200 Subject: [PATCH] initial --- .envrc | 11 + .gitignore | 7 + flake.lock | 985 ++++++++++ flake.nix | 33 + hosts/dunamis/configuration.nix | 80 + hosts/dunamis/hardware-conf.nix | 56 + hosts/dunamis/programs.nix | 17 + hosts/dunamis/system/main.nix | 9 + hosts/dunamis/system/misc/locale.nix | 29 + hosts/dunamis/system/misc/main.nix | 7 + hosts/dunamis/system/misc/mullvad-vpn.nix | 6 + .../dunamis/system/misc/opentabletdriver.nix | 20 + hosts/dunamis/system/misc/qmk-vial.nix | 17 + hosts/dunamis/system/security/basic.nix | 90 + .../system/security/dnscrypt-proxy.nix | 49 + hosts/dunamis/system/security/extensive.nix | 66 + hosts/dunamis/system/security/main.nix | 7 + hosts/dunamis/system/stylix.nix | 53 + hosts/dunamis/system/virtual/docker.nix | 29 + hosts/dunamis/system/virtual/libvirt.nix | 35 + hosts/dunamis/system/virtual/main.nix | 7 + hosts/dunamis/system/virtual/podman.nix | 28 + hosts/dunamis/system/wireless/bluetooth.nix | 21 + hosts/dunamis/system/wireless/main.nix | 6 + hosts/dunamis/system/wireless/wifi.nix | 29 + hosts/dunamis/users.nix | 15 + .../dunamis/users/user/desktop/gnome/main.nix | 176 ++ .../user/desktop/jay/i3status-rust-0-33-2.nix | 68 + hosts/dunamis/users/user/desktop/jay/main.nix | 308 +++ .../users/user/desktop/plasma/main.nix | 28 + .../users/user/desktop/river/fuzzel.nix | 28 + .../dunamis/users/user/desktop/river/main.nix | 310 +++ .../users/user/desktop/river/swayidle.nix | 33 + .../users/user/desktop/river/swaylock.nix | 30 + .../users/user/desktop/river/udiskie.nix | 18 + .../users/user/desktop/river/waybar.nix | 418 ++++ .../users/user/desktop/river/wlsunset.nix | 22 + .../user/desktop/sway/chrome-backlight.nix | 10 + .../users/user/desktop/sway/fuzzel.nix | 28 + .../users/user/desktop/sway/hyprlock.nix | 104 + .../users/user/desktop/sway/main-scroller.nix | 917 +++++++++ .../dunamis/users/user/desktop/sway/main.nix | 922 +++++++++ .../user/desktop/theming/atelier-estuary.nix | 75 + .../theming/atelier-sulphurpool-light.nix | 75 + .../desktop/theming/atelier-sulphurpool.nix | 75 + .../users/user/desktop/theming/ayu-dark.nix | 76 + .../users/user/desktop/theming/ayu-mirage.nix | 76 + .../desktop/theming/catppuccin-macchiato.nix | 78 + .../users/user/desktop/theming/dracula.nix | 70 + .../users/user/desktop/theming/gruvbox.nix | 71 + .../users/user/desktop/theming/heetch.nix | 75 + .../users/user/desktop/theming/heetchduck.nix | 55 + .../user/desktop/theming/outrun-dark.nix | 76 + .../user/desktop/theming/rose-pine-moon.nix | 74 + .../user/desktop/theming/selenized-black.nix | 70 + .../users/user/desktop/theming/solarized.nix | 78 + .../dunamis/users/user/home-configuration.nix | 17 + hosts/dunamis/users/user/programs.nix | 45 + hosts/dunamis/users/user/programs/console.nix | 23 + .../users/user/programs/console/yazi.nix | 88 + .../users/user/programs/editor/helix.nix | 122 ++ .../users/user/programs/editor/main.nix | 8 + .../users/user/programs/editor/neve.nix | 28 + .../users/user/programs/editor/nixvim.nix | 270 +++ .../users/user/programs/editor/zed.nix | 114 ++ hosts/dunamis/users/user/programs/flatpak.nix | 110 ++ hosts/dunamis/users/user/programs/main.nix | 10 + .../users/user/programs/shell/main.nix | 3 + .../users/user/programs/shell/nushell.nix | 100 + .../users/user/programs/shell/oh-my-posh.nix | 106 + .../dunamis/users/user/programs/shell/zsh.nix | 75 + .../users/user/programs/terminal/ghostty.nix | 21 + .../users/user/programs/terminal/kitty.nix | 24 + .../users/user/programs/terminal/main.nix | 7 + .../users/user/programs/terminal/wezterm.nix | 90 + .../dunamis/users/work/desktop/gnome/main.nix | 176 ++ .../work/desktop/jay/i3status-rust-0-33-2.nix | 68 + hosts/dunamis/users/work/desktop/jay/main.nix | 308 +++ .../users/work/desktop/plasma/main.nix | 28 + .../users/work/desktop/river/fuzzel.nix | 28 + .../dunamis/users/work/desktop/river/main.nix | 310 +++ .../users/work/desktop/river/swayidle.nix | 33 + .../users/work/desktop/river/swaylock.nix | 30 + .../users/work/desktop/river/udiskie.nix | 18 + .../users/work/desktop/river/waybar.nix | 418 ++++ .../users/work/desktop/river/wlsunset.nix | 22 + .../work/desktop/sway/chrome-backlight.nix | 10 + .../users/work/desktop/sway/fuzzel.nix | 28 + .../users/work/desktop/sway/hyprlock.nix | 104 + .../users/work/desktop/sway/main-scroller.nix | 917 +++++++++ .../dunamis/users/work/desktop/sway/main.nix | 922 +++++++++ .../work/desktop/theming/atelier-estuary.nix | 75 + .../theming/atelier-sulphurpool-light.nix | 75 + .../desktop/theming/atelier-sulphurpool.nix | 75 + .../users/work/desktop/theming/ayu-dark.nix | 76 + .../users/work/desktop/theming/ayu-mirage.nix | 76 + .../desktop/theming/catppuccin-macchiato.nix | 78 + .../users/work/desktop/theming/dracula.nix | 70 + .../users/work/desktop/theming/gruvbox.nix | 71 + .../users/work/desktop/theming/heetch.nix | 75 + .../users/work/desktop/theming/heetchduck.nix | 55 + .../work/desktop/theming/outrun-dark.nix | 76 + .../work/desktop/theming/rose-pine-moon.nix | 74 + .../work/desktop/theming/selenized-black.nix | 70 + .../users/work/desktop/theming/solarized.nix | 78 + .../dunamis/users/work/home-configuration.nix | 17 + hosts/dunamis/users/work/programs.nix | 41 + hosts/dunamis/users/work/programs/console.nix | 23 + .../users/work/programs/console/yazi.nix | 88 + .../users/work/programs/editor/helix.nix | 122 ++ .../users/work/programs/editor/main.nix | 8 + .../users/work/programs/editor/neve.nix | 28 + .../users/work/programs/editor/nixvim.nix | 270 +++ .../users/work/programs/editor/zed.nix | 114 ++ hosts/dunamis/users/work/programs/flatpak.nix | 65 + hosts/dunamis/users/work/programs/main.nix | 10 + .../users/work/programs/shell/main.nix | 3 + .../users/work/programs/shell/nushell.nix | 100 + .../users/work/programs/shell/oh-my-posh.nix | 106 + .../dunamis/users/work/programs/shell/zsh.nix | 75 + .../users/work/programs/terminal/ghostty.nix | 18 + .../users/work/programs/terminal/kitty.nix | 24 + .../users/work/programs/terminal/main.nix | 7 + .../users/work/programs/terminal/wezterm.nix | 90 + hosts/sarien/configuration.nix | 82 + hosts/sarien/hardware-conf.nix | 102 + hosts/sarien/programs.nix | 17 + hosts/sarien/system/main.nix | 9 + hosts/sarien/system/misc/locale.nix | 29 + hosts/sarien/system/misc/main.nix | 7 + hosts/sarien/system/misc/mullvad-vpn.nix | 6 + hosts/sarien/system/misc/opentabletdriver.nix | 20 + hosts/sarien/system/misc/qmk-vial.nix | 17 + hosts/sarien/system/security/basic.nix | 90 + .../sarien/system/security/dnscrypt-proxy.nix | 49 + hosts/sarien/system/security/extensive.nix | 66 + hosts/sarien/system/security/main.nix | 7 + hosts/sarien/system/stylix.nix | 41 + hosts/sarien/system/virtual/docker.nix | 29 + hosts/sarien/system/virtual/libvirt.nix | 35 + hosts/sarien/system/virtual/main.nix | 7 + hosts/sarien/system/virtual/podman.nix | 28 + hosts/sarien/system/wireless/bluetooth.nix | 21 + hosts/sarien/system/wireless/main.nix | 6 + hosts/sarien/system/wireless/wifi.nix | 29 + hosts/sarien/users.nix | 15 + .../sarien/users/user/desktop/gnome/main.nix | 176 ++ .../user/desktop/jay/i3status-rust-0-33-2.nix | 68 + hosts/sarien/users/user/desktop/jay/main.nix | 308 +++ .../sarien/users/user/desktop/plasma/main.nix | 28 + .../users/user/desktop/river/fuzzel.nix | 28 + .../sarien/users/user/desktop/river/main.nix | 310 +++ .../users/user/desktop/river/swayidle.nix | 33 + .../users/user/desktop/river/swaylock.nix | 30 + .../users/user/desktop/river/udiskie.nix | 18 + .../users/user/desktop/river/waybar.nix | 418 ++++ .../users/user/desktop/river/wlsunset.nix | 22 + .../user/desktop/sway/chrome-backlight.nix | 10 + .../sarien/users/user/desktop/sway/fuzzel.nix | 28 + .../users/user/desktop/sway/hyprlock.nix | 104 + .../users/user/desktop/sway/main-scroller.nix | 917 +++++++++ hosts/sarien/users/user/desktop/sway/main.nix | 922 +++++++++ .../user/desktop/theming/atelier-estuary.nix | 75 + .../theming/atelier-sulphurpool-light.nix | 75 + .../desktop/theming/atelier-sulphurpool.nix | 75 + .../users/user/desktop/theming/ayu-dark.nix | 76 + .../users/user/desktop/theming/ayu-mirage.nix | 76 + .../desktop/theming/catppuccin-macchiato.nix | 78 + .../users/user/desktop/theming/dracula.nix | 70 + .../users/user/desktop/theming/gruvbox.nix | 71 + .../users/user/desktop/theming/heetch.nix | 75 + .../users/user/desktop/theming/heetchduck.nix | 55 + .../user/desktop/theming/outrun-dark.nix | 76 + .../user/desktop/theming/rose-pine-moon.nix | 74 + .../user/desktop/theming/selenized-black.nix | 70 + .../users/user/desktop/theming/solarized.nix | 78 + .../sarien/users/user/home-configuration.nix | 17 + hosts/sarien/users/user/programs.nix | 45 + hosts/sarien/users/user/programs/console.nix | 23 + .../users/user/programs/console/yazi.nix | 88 + .../users/user/programs/editor/helix.nix | 122 ++ .../users/user/programs/editor/main.nix | 8 + .../users/user/programs/editor/neve.nix | 28 + .../users/user/programs/editor/nixvim.nix | 270 +++ .../sarien/users/user/programs/editor/zed.nix | 114 ++ hosts/sarien/users/user/programs/flatpak.nix | 107 ++ hosts/sarien/users/user/programs/main.nix | 10 + .../sarien/users/user/programs/shell/main.nix | 3 + .../users/user/programs/shell/nushell.nix | 100 + .../users/user/programs/shell/oh-my-posh.nix | 106 + .../sarien/users/user/programs/shell/zsh.nix | 75 + .../users/user/programs/terminal/ghostty.nix | 21 + .../users/user/programs/terminal/kitty.nix | 24 + .../users/user/programs/terminal/main.nix | 7 + .../users/user/programs/terminal/wezterm.nix | 90 + hosts/sarien/work_user/desktop/gnome/main.nix | 176 ++ .../desktop/jay/i3status-rust-0-33-2.nix | 68 + hosts/sarien/work_user/desktop/jay/main.nix | 308 +++ .../sarien/work_user/desktop/plasma/main.nix | 28 + .../sarien/work_user/desktop/river/fuzzel.nix | 28 + hosts/sarien/work_user/desktop/river/main.nix | 310 +++ .../work_user/desktop/river/swayidle.nix | 33 + .../work_user/desktop/river/swaylock.nix | 30 + .../work_user/desktop/river/udiskie.nix | 18 + .../sarien/work_user/desktop/river/waybar.nix | 418 ++++ .../work_user/desktop/river/wlsunset.nix | 22 + .../desktop/sway/chrome-backlight.nix | 10 + .../sarien/work_user/desktop/sway/fuzzel.nix | 28 + .../work_user/desktop/sway/hyprlock.nix | 104 + .../work_user/desktop/sway/main-scroller.nix | 917 +++++++++ hosts/sarien/work_user/desktop/sway/main.nix | 922 +++++++++ .../desktop/theming/atelier-estuary.nix | 75 + .../theming/atelier-sulphurpool-light.nix | 75 + .../desktop/theming/atelier-sulphurpool.nix | 75 + .../work_user/desktop/theming/ayu-dark.nix | 76 + .../work_user/desktop/theming/ayu-mirage.nix | 76 + .../desktop/theming/catppuccin-macchiato.nix | 78 + .../work_user/desktop/theming/dracula.nix | 70 + .../work_user/desktop/theming/gruvbox.nix | 71 + .../work_user/desktop/theming/heetch.nix | 75 + .../work_user/desktop/theming/heetchduck.nix | 55 + .../work_user/desktop/theming/outrun-dark.nix | 76 + .../desktop/theming/rose-pine-moon.nix | 74 + .../desktop/theming/selenized-black.nix | 70 + .../work_user/desktop/theming/solarized.nix | 78 + hosts/sarien/work_user/home-configuration.nix | 17 + hosts/sarien/work_user/programs.nix | 41 + hosts/sarien/work_user/programs/console.nix | 23 + .../work_user/programs/console/yazi.nix | 88 + .../work_user/programs/editor/helix.nix | 122 ++ .../sarien/work_user/programs/editor/main.nix | 8 + .../sarien/work_user/programs/editor/neve.nix | 28 + .../work_user/programs/editor/nixvim.nix | 270 +++ .../sarien/work_user/programs/editor/zed.nix | 114 ++ hosts/sarien/work_user/programs/flatpak.nix | 65 + hosts/sarien/work_user/programs/main.nix | 10 + .../sarien/work_user/programs/shell/main.nix | 3 + .../work_user/programs/shell/nushell.nix | 100 + .../work_user/programs/shell/oh-my-posh.nix | 106 + hosts/sarien/work_user/programs/shell/zsh.nix | 75 + .../work_user/programs/terminal/ghostty.nix | 18 + .../work_user/programs/terminal/kitty.nix | 24 + .../work_user/programs/terminal/main.nix | 7 + .../work_user/programs/terminal/wezterm.nix | 90 + modules/home/desktop/default.nix | 7 + modules/home/desktop/hyprland/default.nix | 1712 +++++++++++++++++ modules/home/desktop/niri/default.nix | 1493 ++++++++++++++ modules/home/desktop/plasma/default.nix | 32 + modules/nixos/desktop/default.nix | 7 + modules/nixos/desktop/hyprland.nix | 56 + modules/nixos/desktop/misc/regreet.nix | 12 + modules/nixos/desktop/misc/sound.nix | 18 + modules/nixos/desktop/niri.nix | 60 + modules/nixos/desktop/plasma.nix | 28 + 254 files changed, 28562 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hosts/dunamis/configuration.nix create mode 100644 hosts/dunamis/hardware-conf.nix create mode 100644 hosts/dunamis/programs.nix create mode 100644 hosts/dunamis/system/main.nix create mode 100644 hosts/dunamis/system/misc/locale.nix create mode 100644 hosts/dunamis/system/misc/main.nix create mode 100644 hosts/dunamis/system/misc/mullvad-vpn.nix create mode 100644 hosts/dunamis/system/misc/opentabletdriver.nix create mode 100644 hosts/dunamis/system/misc/qmk-vial.nix create mode 100644 hosts/dunamis/system/security/basic.nix create mode 100644 hosts/dunamis/system/security/dnscrypt-proxy.nix create mode 100644 hosts/dunamis/system/security/extensive.nix create mode 100644 hosts/dunamis/system/security/main.nix create mode 100644 hosts/dunamis/system/stylix.nix create mode 100644 hosts/dunamis/system/virtual/docker.nix create mode 100644 hosts/dunamis/system/virtual/libvirt.nix create mode 100644 hosts/dunamis/system/virtual/main.nix create mode 100644 hosts/dunamis/system/virtual/podman.nix create mode 100644 hosts/dunamis/system/wireless/bluetooth.nix create mode 100644 hosts/dunamis/system/wireless/main.nix create mode 100644 hosts/dunamis/system/wireless/wifi.nix create mode 100644 hosts/dunamis/users.nix create mode 100644 hosts/dunamis/users/user/desktop/gnome/main.nix create mode 100644 hosts/dunamis/users/user/desktop/jay/i3status-rust-0-33-2.nix create mode 100644 hosts/dunamis/users/user/desktop/jay/main.nix create mode 100644 hosts/dunamis/users/user/desktop/plasma/main.nix create mode 100644 hosts/dunamis/users/user/desktop/river/fuzzel.nix create mode 100644 hosts/dunamis/users/user/desktop/river/main.nix create mode 100644 hosts/dunamis/users/user/desktop/river/swayidle.nix create mode 100644 hosts/dunamis/users/user/desktop/river/swaylock.nix create mode 100644 hosts/dunamis/users/user/desktop/river/udiskie.nix create mode 100644 hosts/dunamis/users/user/desktop/river/waybar.nix create mode 100644 hosts/dunamis/users/user/desktop/river/wlsunset.nix create mode 100644 hosts/dunamis/users/user/desktop/sway/chrome-backlight.nix create mode 100644 hosts/dunamis/users/user/desktop/sway/fuzzel.nix create mode 100644 hosts/dunamis/users/user/desktop/sway/hyprlock.nix create mode 100644 hosts/dunamis/users/user/desktop/sway/main-scroller.nix create mode 100644 hosts/dunamis/users/user/desktop/sway/main.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/atelier-estuary.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool-light.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/ayu-dark.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/ayu-mirage.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/catppuccin-macchiato.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/dracula.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/gruvbox.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/heetch.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/heetchduck.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/outrun-dark.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/rose-pine-moon.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/selenized-black.nix create mode 100644 hosts/dunamis/users/user/desktop/theming/solarized.nix create mode 100644 hosts/dunamis/users/user/home-configuration.nix create mode 100644 hosts/dunamis/users/user/programs.nix create mode 100644 hosts/dunamis/users/user/programs/console.nix create mode 100644 hosts/dunamis/users/user/programs/console/yazi.nix create mode 100644 hosts/dunamis/users/user/programs/editor/helix.nix create mode 100644 hosts/dunamis/users/user/programs/editor/main.nix create mode 100644 hosts/dunamis/users/user/programs/editor/neve.nix create mode 100644 hosts/dunamis/users/user/programs/editor/nixvim.nix create mode 100644 hosts/dunamis/users/user/programs/editor/zed.nix create mode 100644 hosts/dunamis/users/user/programs/flatpak.nix create mode 100644 hosts/dunamis/users/user/programs/main.nix create mode 100644 hosts/dunamis/users/user/programs/shell/main.nix create mode 100644 hosts/dunamis/users/user/programs/shell/nushell.nix create mode 100644 hosts/dunamis/users/user/programs/shell/oh-my-posh.nix create mode 100644 hosts/dunamis/users/user/programs/shell/zsh.nix create mode 100644 hosts/dunamis/users/user/programs/terminal/ghostty.nix create mode 100644 hosts/dunamis/users/user/programs/terminal/kitty.nix create mode 100644 hosts/dunamis/users/user/programs/terminal/main.nix create mode 100644 hosts/dunamis/users/user/programs/terminal/wezterm.nix create mode 100644 hosts/dunamis/users/work/desktop/gnome/main.nix create mode 100644 hosts/dunamis/users/work/desktop/jay/i3status-rust-0-33-2.nix create mode 100644 hosts/dunamis/users/work/desktop/jay/main.nix create mode 100644 hosts/dunamis/users/work/desktop/plasma/main.nix create mode 100644 hosts/dunamis/users/work/desktop/river/fuzzel.nix create mode 100644 hosts/dunamis/users/work/desktop/river/main.nix create mode 100644 hosts/dunamis/users/work/desktop/river/swayidle.nix create mode 100644 hosts/dunamis/users/work/desktop/river/swaylock.nix create mode 100644 hosts/dunamis/users/work/desktop/river/udiskie.nix create mode 100644 hosts/dunamis/users/work/desktop/river/waybar.nix create mode 100644 hosts/dunamis/users/work/desktop/river/wlsunset.nix create mode 100644 hosts/dunamis/users/work/desktop/sway/chrome-backlight.nix create mode 100644 hosts/dunamis/users/work/desktop/sway/fuzzel.nix create mode 100644 hosts/dunamis/users/work/desktop/sway/hyprlock.nix create mode 100644 hosts/dunamis/users/work/desktop/sway/main-scroller.nix create mode 100644 hosts/dunamis/users/work/desktop/sway/main.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/atelier-estuary.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool-light.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/ayu-dark.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/ayu-mirage.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/catppuccin-macchiato.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/dracula.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/gruvbox.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/heetch.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/heetchduck.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/outrun-dark.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/rose-pine-moon.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/selenized-black.nix create mode 100644 hosts/dunamis/users/work/desktop/theming/solarized.nix create mode 100644 hosts/dunamis/users/work/home-configuration.nix create mode 100644 hosts/dunamis/users/work/programs.nix create mode 100644 hosts/dunamis/users/work/programs/console.nix create mode 100644 hosts/dunamis/users/work/programs/console/yazi.nix create mode 100644 hosts/dunamis/users/work/programs/editor/helix.nix create mode 100644 hosts/dunamis/users/work/programs/editor/main.nix create mode 100644 hosts/dunamis/users/work/programs/editor/neve.nix create mode 100644 hosts/dunamis/users/work/programs/editor/nixvim.nix create mode 100644 hosts/dunamis/users/work/programs/editor/zed.nix create mode 100644 hosts/dunamis/users/work/programs/flatpak.nix create mode 100644 hosts/dunamis/users/work/programs/main.nix create mode 100644 hosts/dunamis/users/work/programs/shell/main.nix create mode 100644 hosts/dunamis/users/work/programs/shell/nushell.nix create mode 100644 hosts/dunamis/users/work/programs/shell/oh-my-posh.nix create mode 100644 hosts/dunamis/users/work/programs/shell/zsh.nix create mode 100644 hosts/dunamis/users/work/programs/terminal/ghostty.nix create mode 100644 hosts/dunamis/users/work/programs/terminal/kitty.nix create mode 100644 hosts/dunamis/users/work/programs/terminal/main.nix create mode 100644 hosts/dunamis/users/work/programs/terminal/wezterm.nix create mode 100644 hosts/sarien/configuration.nix create mode 100644 hosts/sarien/hardware-conf.nix create mode 100644 hosts/sarien/programs.nix create mode 100644 hosts/sarien/system/main.nix create mode 100644 hosts/sarien/system/misc/locale.nix create mode 100644 hosts/sarien/system/misc/main.nix create mode 100644 hosts/sarien/system/misc/mullvad-vpn.nix create mode 100644 hosts/sarien/system/misc/opentabletdriver.nix create mode 100644 hosts/sarien/system/misc/qmk-vial.nix create mode 100644 hosts/sarien/system/security/basic.nix create mode 100644 hosts/sarien/system/security/dnscrypt-proxy.nix create mode 100644 hosts/sarien/system/security/extensive.nix create mode 100644 hosts/sarien/system/security/main.nix create mode 100644 hosts/sarien/system/stylix.nix create mode 100644 hosts/sarien/system/virtual/docker.nix create mode 100644 hosts/sarien/system/virtual/libvirt.nix create mode 100644 hosts/sarien/system/virtual/main.nix create mode 100644 hosts/sarien/system/virtual/podman.nix create mode 100644 hosts/sarien/system/wireless/bluetooth.nix create mode 100644 hosts/sarien/system/wireless/main.nix create mode 100644 hosts/sarien/system/wireless/wifi.nix create mode 100644 hosts/sarien/users.nix create mode 100644 hosts/sarien/users/user/desktop/gnome/main.nix create mode 100644 hosts/sarien/users/user/desktop/jay/i3status-rust-0-33-2.nix create mode 100644 hosts/sarien/users/user/desktop/jay/main.nix create mode 100644 hosts/sarien/users/user/desktop/plasma/main.nix create mode 100644 hosts/sarien/users/user/desktop/river/fuzzel.nix create mode 100644 hosts/sarien/users/user/desktop/river/main.nix create mode 100644 hosts/sarien/users/user/desktop/river/swayidle.nix create mode 100644 hosts/sarien/users/user/desktop/river/swaylock.nix create mode 100644 hosts/sarien/users/user/desktop/river/udiskie.nix create mode 100644 hosts/sarien/users/user/desktop/river/waybar.nix create mode 100644 hosts/sarien/users/user/desktop/river/wlsunset.nix create mode 100644 hosts/sarien/users/user/desktop/sway/chrome-backlight.nix create mode 100644 hosts/sarien/users/user/desktop/sway/fuzzel.nix create mode 100644 hosts/sarien/users/user/desktop/sway/hyprlock.nix create mode 100644 hosts/sarien/users/user/desktop/sway/main-scroller.nix create mode 100644 hosts/sarien/users/user/desktop/sway/main.nix create mode 100644 hosts/sarien/users/user/desktop/theming/atelier-estuary.nix create mode 100644 hosts/sarien/users/user/desktop/theming/atelier-sulphurpool-light.nix create mode 100644 hosts/sarien/users/user/desktop/theming/atelier-sulphurpool.nix create mode 100644 hosts/sarien/users/user/desktop/theming/ayu-dark.nix create mode 100644 hosts/sarien/users/user/desktop/theming/ayu-mirage.nix create mode 100644 hosts/sarien/users/user/desktop/theming/catppuccin-macchiato.nix create mode 100644 hosts/sarien/users/user/desktop/theming/dracula.nix create mode 100644 hosts/sarien/users/user/desktop/theming/gruvbox.nix create mode 100644 hosts/sarien/users/user/desktop/theming/heetch.nix create mode 100644 hosts/sarien/users/user/desktop/theming/heetchduck.nix create mode 100644 hosts/sarien/users/user/desktop/theming/outrun-dark.nix create mode 100644 hosts/sarien/users/user/desktop/theming/rose-pine-moon.nix create mode 100644 hosts/sarien/users/user/desktop/theming/selenized-black.nix create mode 100644 hosts/sarien/users/user/desktop/theming/solarized.nix create mode 100644 hosts/sarien/users/user/home-configuration.nix create mode 100644 hosts/sarien/users/user/programs.nix create mode 100644 hosts/sarien/users/user/programs/console.nix create mode 100644 hosts/sarien/users/user/programs/console/yazi.nix create mode 100644 hosts/sarien/users/user/programs/editor/helix.nix create mode 100644 hosts/sarien/users/user/programs/editor/main.nix create mode 100644 hosts/sarien/users/user/programs/editor/neve.nix create mode 100644 hosts/sarien/users/user/programs/editor/nixvim.nix create mode 100644 hosts/sarien/users/user/programs/editor/zed.nix create mode 100644 hosts/sarien/users/user/programs/flatpak.nix create mode 100644 hosts/sarien/users/user/programs/main.nix create mode 100644 hosts/sarien/users/user/programs/shell/main.nix create mode 100644 hosts/sarien/users/user/programs/shell/nushell.nix create mode 100644 hosts/sarien/users/user/programs/shell/oh-my-posh.nix create mode 100644 hosts/sarien/users/user/programs/shell/zsh.nix create mode 100644 hosts/sarien/users/user/programs/terminal/ghostty.nix create mode 100644 hosts/sarien/users/user/programs/terminal/kitty.nix create mode 100644 hosts/sarien/users/user/programs/terminal/main.nix create mode 100644 hosts/sarien/users/user/programs/terminal/wezterm.nix create mode 100644 hosts/sarien/work_user/desktop/gnome/main.nix create mode 100644 hosts/sarien/work_user/desktop/jay/i3status-rust-0-33-2.nix create mode 100644 hosts/sarien/work_user/desktop/jay/main.nix create mode 100644 hosts/sarien/work_user/desktop/plasma/main.nix create mode 100644 hosts/sarien/work_user/desktop/river/fuzzel.nix create mode 100644 hosts/sarien/work_user/desktop/river/main.nix create mode 100644 hosts/sarien/work_user/desktop/river/swayidle.nix create mode 100644 hosts/sarien/work_user/desktop/river/swaylock.nix create mode 100644 hosts/sarien/work_user/desktop/river/udiskie.nix create mode 100644 hosts/sarien/work_user/desktop/river/waybar.nix create mode 100644 hosts/sarien/work_user/desktop/river/wlsunset.nix create mode 100644 hosts/sarien/work_user/desktop/sway/chrome-backlight.nix create mode 100644 hosts/sarien/work_user/desktop/sway/fuzzel.nix create mode 100644 hosts/sarien/work_user/desktop/sway/hyprlock.nix create mode 100644 hosts/sarien/work_user/desktop/sway/main-scroller.nix create mode 100644 hosts/sarien/work_user/desktop/sway/main.nix create mode 100644 hosts/sarien/work_user/desktop/theming/atelier-estuary.nix create mode 100644 hosts/sarien/work_user/desktop/theming/atelier-sulphurpool-light.nix create mode 100644 hosts/sarien/work_user/desktop/theming/atelier-sulphurpool.nix create mode 100644 hosts/sarien/work_user/desktop/theming/ayu-dark.nix create mode 100644 hosts/sarien/work_user/desktop/theming/ayu-mirage.nix create mode 100644 hosts/sarien/work_user/desktop/theming/catppuccin-macchiato.nix create mode 100644 hosts/sarien/work_user/desktop/theming/dracula.nix create mode 100644 hosts/sarien/work_user/desktop/theming/gruvbox.nix create mode 100644 hosts/sarien/work_user/desktop/theming/heetch.nix create mode 100644 hosts/sarien/work_user/desktop/theming/heetchduck.nix create mode 100644 hosts/sarien/work_user/desktop/theming/outrun-dark.nix create mode 100644 hosts/sarien/work_user/desktop/theming/rose-pine-moon.nix create mode 100644 hosts/sarien/work_user/desktop/theming/selenized-black.nix create mode 100644 hosts/sarien/work_user/desktop/theming/solarized.nix create mode 100644 hosts/sarien/work_user/home-configuration.nix create mode 100644 hosts/sarien/work_user/programs.nix create mode 100644 hosts/sarien/work_user/programs/console.nix create mode 100644 hosts/sarien/work_user/programs/console/yazi.nix create mode 100644 hosts/sarien/work_user/programs/editor/helix.nix create mode 100644 hosts/sarien/work_user/programs/editor/main.nix create mode 100644 hosts/sarien/work_user/programs/editor/neve.nix create mode 100644 hosts/sarien/work_user/programs/editor/nixvim.nix create mode 100644 hosts/sarien/work_user/programs/editor/zed.nix create mode 100644 hosts/sarien/work_user/programs/flatpak.nix create mode 100644 hosts/sarien/work_user/programs/main.nix create mode 100644 hosts/sarien/work_user/programs/shell/main.nix create mode 100644 hosts/sarien/work_user/programs/shell/nushell.nix create mode 100644 hosts/sarien/work_user/programs/shell/oh-my-posh.nix create mode 100644 hosts/sarien/work_user/programs/shell/zsh.nix create mode 100644 hosts/sarien/work_user/programs/terminal/ghostty.nix create mode 100644 hosts/sarien/work_user/programs/terminal/kitty.nix create mode 100644 hosts/sarien/work_user/programs/terminal/main.nix create mode 100644 hosts/sarien/work_user/programs/terminal/wezterm.nix create mode 100644 modules/home/desktop/default.nix create mode 100644 modules/home/desktop/hyprland/default.nix create mode 100644 modules/home/desktop/niri/default.nix create mode 100644 modules/home/desktop/plasma/default.nix create mode 100644 modules/nixos/desktop/default.nix create mode 100644 modules/nixos/desktop/hyprland.nix create mode 100644 modules/nixos/desktop/misc/regreet.nix create mode 100644 modules/nixos/desktop/misc/sound.nix create mode 100644 modules/nixos/desktop/niri.nix create mode 100644 modules/nixos/desktop/plasma.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..9978ef0 --- /dev/null +++ b/.envrc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Used by https://direnv.net + +# Automatically reload when this file changes +watch_file devshell.nix + +# Load `nix develop` +use flake + +# Extend the environment with per-user overrides +source_env_if_exists .envrc.local diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a65a55 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +wallpapers +# direnv +.direnv/ + +# nix +result +result-* diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5a76adb --- /dev/null +++ b/flake.lock @@ -0,0 +1,985 @@ +{ + "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1736852337, + "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "blueprint": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1738618197, + "narHash": "sha256-7YnBFwUc+86BLzeZsGufS2M3on9aiBS/h+iKtOdIv7Q=", + "owner": "numtide", + "repo": "blueprint", + "rev": "8853ea68f376237e9d9b896a8bb7e0c6ae980901", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "blueprint", + "type": "github" + } + }, + "chaotic": { + "inputs": { + "fenix": "fenix", + "flake-schemas": "flake-schemas", + "home-manager": "home-manager", + "jovian": "jovian", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738707394, + "narHash": "sha256-XXrOqNs9a4L6p6/KXxIGotHOxzjPxva1queN3JK0E4c=", + "owner": "chaotic-cx", + "repo": "nyx", + "rev": "236da2b18bfbddf782f85ee664fdfb9d50606229", + "type": "github" + }, + "original": { + "owner": "chaotic-cx", + "ref": "nyxpkgs-unstable", + "repo": "nyx", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735644329, + "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=", + "owner": "numtide", + "repo": "devshell", + "rev": "f7795ede5b02664b57035b3b757876703e2c3eac", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "chaotic", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1738477724, + "narHash": "sha256-S1x0F7q9cJ6EEmZsakse2Ps6Adi7NadxRtGiuWUlwT0=", + "owner": "nix-community", + "repo": "fenix", + "rev": "1936bb37b1d8597273e3611873dc09dd61b09818", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1736899990, + "narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-schemas": { + "locked": { + "lastModified": 1721999734, + "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", + "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", + "revCount": 75, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737465171, + "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "git-hooks_2": { + "inputs": { + "flake-compat": [ + "stylix", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735882644, + "narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "47.2", + "repo": "gnome-shell", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "chaotic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738448366, + "narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738667255, + "narHash": "sha256-sMMQb9NydZqQ/MvvtPp+Ny0W9P0Jk0moU7SrTBlO5Vo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7abcf59a365430b36f84eaa452a466b11e469e33", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738448366, + "narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_4": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1736785676, + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "chaotic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738478597, + "narHash": "sha256-it7lc+HRSQiLV+3CcA+c6fkr2355HyT2GGUowHdfa/E=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "77fb0818cb42ca0db98839d47bbc6a317c286282", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, + "neve": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "nixvim": [ + "nixvim" + ] + }, + "locked": { + "lastModified": 1738412721, + "narHash": "sha256-CNNmi10GcHXwYNa7KvQkfmDfSit/McqPdG0vIowBFtk=", + "path": "/home/user/.config/Neve", + "type": "path" + }, + "original": { + "path": "/home/user/.config/Neve", + "type": "path" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738277753, + "narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-flatpak": { + "locked": { + "lastModified": 1738175805, + "narHash": "sha256-fPjaARmK522JLJ7wxFebxG4eE/3HHSmuAA78iAZ+A7g=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "d4c75a33c4a7a16bf87cfd804fb5444a1ec53d49", + "type": "github" + }, + "original": { + "owner": "gmodena", + "repo": "nix-flatpak", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "chaotic", + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729697500, + "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1738422722, + "narHash": "sha256-Q4vhtbLYWBUnjWD4iQb003Lt+N5PuURDad1BngGKdUs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "102a39bfee444533e6b4e8611d7e92aa39b7bec1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1736798957, + "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_3", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_2", + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1738622717, + "narHash": "sha256-XSFbbhN8xdr4qKRFbubXJ3vkSusKSnALf69G9fdGPXE=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "6288354d43ada972480cbd10dc7102637eeafc1e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_2", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738508923, + "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", + "owner": "NuschtOS", + "repo": "search", + "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "root": { + "inputs": { + "blueprint": "blueprint", + "chaotic": "chaotic", + "home-manager": "home-manager_2", + "neve": "neve", + "nix-flatpak": "nix-flatpak", + "nixpkgs": "nixpkgs", + "nixvim": "nixvim", + "stylix": "stylix", + "walker": "walker" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1738433753, + "narHash": "sha256-lyhEsEf5FQzV+KHVkfxIApMOFWHqyls5+llcQ/uhV6Y=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "88b901878e684e4f68f104fdbc48749f41bcccd3", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_3", + "git-hooks": "git-hooks_2", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_4", + "nixpkgs": "nixpkgs_3", + "systems": "systems_4", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1738611626, + "narHash": "sha256-IgjqlYPaS8Bg+jc6a691w27XDFhBeM7gkP4eDcR2EBs=", + "owner": "danth", + "repo": "stylix", + "rev": "d513f59da5856978c363d2f82103f708f4a6024d", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1735737224, + "narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1725758778, + "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738070913, + "narHash": "sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "bebf27d00f7d10ba75332a0541ac43676985dea3", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "walker": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_5" + }, + "locked": { + "lastModified": 1738684748, + "narHash": "sha256-Gv/NbrmXUaE3sYjrp/WtL1p7LtzochUV2Kb/qgUrUgo=", + "owner": "abenz1267", + "repo": "walker", + "rev": "e44cb0e7e6fa86f0a05d710bb6ed9dcd1222b85d", + "type": "github" + }, + "original": { + "owner": "abenz1267", + "repo": "walker", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..12fa6d3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "unexplrd's personal configuration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + nix-flatpak.url = "github:gmodena/nix-flatpak"; + stylix.url = "github:danth/stylix"; + nixvim.url = "github:nix-community/nixvim"; + blueprint = { + url = "github:numtide/blueprint"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + chaotic = { + url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + neve = { + url = "path:/home/user/.config/Neve"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixvim.follows = "nixvim"; + }; + walker = { + url = "github:abenz1267/walker"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs: inputs.blueprint {inherit inputs;}; +} diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix new file mode 100644 index 0000000..ecd27a7 --- /dev/null +++ b/hosts/dunamis/configuration.nix @@ -0,0 +1,80 @@ +# device-specific setup +{ + pkgs, + inputs, + ... +}: { + imports = with inputs; [ + ./hardware-conf.nix + ./users.nix + ./programs.nix + ./system/main.nix + chaotic.nixosModules.default + stylix.nixosModules.stylix + self.nixosModules.desktop + ]; + desktop = { + niri.enable = true; + plasma.enable = true; + }; + services.logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; + }; + + nix.settings.experimental-features = ["nix-command" "flakes"]; + system.stateVersion = "unstable"; + + time.timeZone = "Europe/Kyiv"; + locale.ukrainian.enable = true; + + networking.hostName = "dunamis"; + networking.networkmanager.enable = true; + + # required for syncthing + networking.firewall = { + allowedTCPPorts = [22000]; + allowedUDPPorts = [21027 22000]; + }; + + boot = { + # kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_cachyos; + plymouth.enable = true; + loader.efi.canTouchEfiVariables = true; + loader.systemd-boot = { + enable = true; + consoleMode = "auto"; + }; + }; + + console = { + earlySetup = true; + packages = [pkgs.terminus_font]; + font = "${pkgs.terminus_font}/share/consolefonts/ter-c18n.psf.gz"; + }; + + services = { + hardware.openrgb.enable = true; + flatpak.enable = true; + fstrim.enable = true; + fwupd.enable = true; + openssh.enable = true; + }; + services.scx = { + enable = true; + scheduler = "scx_flash"; + }; + + security.basic.enable = true; + + virtual = { + libvirt.enable = true; + podman.enable = false; + }; + + wireless.bluetooth.enableBlueman = true; + + opentabletdriver.enable = false; + qmk-vial.enable = true; +} diff --git a/hosts/dunamis/hardware-conf.nix b/hosts/dunamis/hardware-conf.nix new file mode 100644 index 0000000..2e73177 --- /dev/null +++ b/hosts/dunamis/hardware-conf.nix @@ -0,0 +1,56 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + wireless.bluetooth.enable = true; + + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = [ + "i915" + ]; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + boot.initrd.systemd.enable = true; + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + vpl-gpu-rt + ]; + }; + + boot.initrd.luks.devices."luks-fe586da4-b164-4362-bcdf-9c5dd6c69a2b".device = "/dev/disk/by-uuid/fe586da4-b164-4362-bcdf-9c5dd6c69a2b"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/79ce18b8-3a9e-4cd0-be62-60972686f44a"; + fsType = "btrfs"; + options = ["compress=zstd,subvol=@nixos-root"]; + }; + "/home" = { + device = "/dev/disk/by-uuid/79ce18b8-3a9e-4cd0-be62-60972686f44a"; + fsType = "btrfs"; + options = ["compress=zstd,subvol=@home"]; + }; + "/storage" = { + device = "/dev/disk/by-uuid/79ce18b8-3a9e-4cd0-be62-60972686f44a"; + fsType = "btrfs"; + options = ["compress=zstd,subvol=@storage"]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/976C-7EE6"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + }; + + swapDevices = []; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/dunamis/programs.nix b/hosts/dunamis/programs.nix new file mode 100644 index 0000000..3abc859 --- /dev/null +++ b/hosts/dunamis/programs.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + programs.neovim = { + enable = false; + viAlias = true; + vimAlias = true; + }; + programs.nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 7d --keep 3"; + flake = "/home/user/.config/nixos"; + }; + environment.systemPackages = with pkgs; [ + helix + nushell + ]; +} diff --git a/hosts/dunamis/system/main.nix b/hosts/dunamis/system/main.nix new file mode 100644 index 0000000..aa8213d --- /dev/null +++ b/hosts/dunamis/system/main.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./misc/main.nix + ./security/main.nix + ./virtual/main.nix + ./wireless/main.nix + ./stylix.nix + ]; +} diff --git a/hosts/dunamis/system/misc/locale.nix b/hosts/dunamis/system/misc/locale.nix new file mode 100644 index 0000000..89209a9 --- /dev/null +++ b/hosts/dunamis/system/misc/locale.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + ... +}: { + options = { + locale.ukrainian.enable = + lib.mkEnableOption "enables ukrainian locale"; + }; + config = lib.mkIf config.locale.ukrainian.enable { + i18n = { + defaultLocale = "uk_UA.UTF-8"; + extraLocaleSettings = { + LC_CTYPE = "uk_UA.UTF-8"; + LC_NUMERIC = "uk_UA.UTF-8"; + LC_TIME = "uk_UA.UTF-8"; + LC_COLLATE = "en_US.UTF-8"; + LC_MONETARY = "uk_UA.UTF-8"; + LC_MESSAGES = "uk_UA.UTF-8"; + LC_PAPER = "uk_UA.UTF-8"; + LC_NAME = "uk_UA.UTF-8"; + LC_ADDRESS = "uk_UA.UTF-8"; + LC_TELEPHONE = "uk_UA.UTF-8"; + LC_MEASUREMENT = "uk_UA.UTF-8"; + LC_IDENTIFICATION = "uk_UA.UTF-8"; + }; + }; + }; +} diff --git a/hosts/dunamis/system/misc/main.nix b/hosts/dunamis/system/misc/main.nix new file mode 100644 index 0000000..4c4bc47 --- /dev/null +++ b/hosts/dunamis/system/misc/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./opentabletdriver.nix + ./qmk-vial.nix + ./locale.nix + ]; +} diff --git a/hosts/dunamis/system/misc/mullvad-vpn.nix b/hosts/dunamis/system/misc/mullvad-vpn.nix new file mode 100644 index 0000000..31d3c05 --- /dev/null +++ b/hosts/dunamis/system/misc/mullvad-vpn.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + services.mullvad-vpn = { + enable = true; + package = pkgs.mullvad-vpn; + }; +} diff --git a/hosts/dunamis/system/misc/opentabletdriver.nix b/hosts/dunamis/system/misc/opentabletdriver.nix new file mode 100644 index 0000000..8951ff9 --- /dev/null +++ b/hosts/dunamis/system/misc/opentabletdriver.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: { + options = { + opentabletdriver.enable = + lib.mkEnableOption "enables opentabletdriver"; + }; + config = lib.mkIf config.opentabletdriver.enable { + hardware.opentabletdriver = { + enable = true; + daemon.enable = true; + blacklistedKernelModules = [ + "hid-uclogic" + "wacom" + ]; + }; + }; +} diff --git a/hosts/dunamis/system/misc/qmk-vial.nix b/hosts/dunamis/system/misc/qmk-vial.nix new file mode 100644 index 0000000..0fd5732 --- /dev/null +++ b/hosts/dunamis/system/misc/qmk-vial.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + config, + ... +}: { + options = { + qmk-vial.enable = + lib.mkEnableOption "adds a udev rule for vial keyboards"; + }; + config = lib.mkIf config.qmk-vial.enable { + services.udev.extraRules = '' + #vial rule + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + }; +} diff --git a/hosts/dunamis/system/security/basic.nix b/hosts/dunamis/system/security/basic.nix new file mode 100644 index 0000000..bcb4cdc --- /dev/null +++ b/hosts/dunamis/system/security/basic.nix @@ -0,0 +1,90 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.security.basic; +in { + options = { + security.basic.enable = + lib.mkEnableOption "enable basic security"; + }; + config = lib.mkIf cfg.enable { + security = { + sudo.enable = false; + # doas.enable = true; + sudo-rs = { + enable = true; + execWheelOnly = true; + }; + polkit.enable = true; + polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if ( + subject.isInGroup("users") + && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + ) + ) + { + return polkit.Result.YES; + } + }); + ''; + apparmor.enable = lib.mkDefault true; + }; + + environment.systemPackages = with pkgs; [ + (mkIf (config.security.doas.enable == true) doas-sudo-shim) # if doas install doas sudo shim + ]; + + services.dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + services.ntpd-rs = { + enable = true; + #settings = { + # server = { + # require-nts = true; + # }; + #}; + }; + + boot.blacklistedKernelModules = [ + # Obscure network protocols + "ax25" + "netrom" + "rose" + # Old or rare or insufficiently audited filesystems + "adfs" + "affs" + "bfs" + "befs" + "cramfs" + "efs" + "erofs" + "exofs" + "freevxfs" + "f2fs" + "hfs" + "hpfs" + "jfs" + "minix" + "nilfs2" + "ntfs" + "omfs" + "qnx4" + "qnx6" + "sysv" + "ufs" + ]; + + nix.settings.allowed-users = lib.mkDefault ["@users"]; + }; +} diff --git a/hosts/dunamis/system/security/dnscrypt-proxy.nix b/hosts/dunamis/system/security/dnscrypt-proxy.nix new file mode 100644 index 0000000..4dd9aa9 --- /dev/null +++ b/hosts/dunamis/system/security/dnscrypt-proxy.nix @@ -0,0 +1,49 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; { + options = { + security.dnscrypt-proxy.enable = + mkEnableOption "enable dnscrypt-proxy"; + }; + config = mkIf config.security.dnscrypt-proxy.enable { + networking = { + nameservers = ["127.0.0.1" "::1"]; + # If using dhcpcd: + dhcpcd.extraConfig = "nohook resolv.conf"; + # If using NetworkManager: + networkmanager.dns = "none"; + }; + + # Make sure you don't have services.resolved.enable on. + services.dnscrypt-proxy2 = { + enable = true; + settings = { + ipv6_servers = false; + require_dnssec = true; + + sources.public-resolvers = { + urls = [ + "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" + "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" + ]; + cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; + minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + }; + + # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md + server_names = [ + #"quad9-dnscrypt-ip4-filter-pri" + "cloudflare" + ]; + }; + }; + + systemd.services.dnscrypt-proxy2.serviceConfig = { + StateDirectory = "dnscrypt-proxy"; + }; + }; +} diff --git a/hosts/dunamis/system/security/extensive.nix b/hosts/dunamis/system/security/extensive.nix new file mode 100644 index 0000000..bc14ba3 --- /dev/null +++ b/hosts/dunamis/system/security/extensive.nix @@ -0,0 +1,66 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.security.extensive; +in { + options = { + security.extensive.enable = + mkEnableOption "enable extensive security"; + }; + config = mkIf cfg.enable { + security.basic.enable = true; + + environment.memoryAllocator.provider = mkDefault "scudo"; + environment.variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1"; + + security = { + lockKernelModules = mkDefault false; + protectKernelImage = mkDefault true; + # allowSimultaneousMultithreading = mkDefault false; + forcePageTableIsolation = mkDefault true; + unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable; + virtualisation.flushL1DataCache = mkDefault "always"; + apparmor.enable = mkDefault true; + apparmor.killUnconfinedConfinables = mkDefault true; + }; + + boot.kernel.sysctl = { + # Hide kptrs even for processes with CAP_SYSLOG + "kernel.kptr_restrict" = mkOverride 500 2; + # Disable bpf() JIT (to eliminate spray attacks) + "net.core.bpf_jit_enable" = mkDefault false; + # Disable ftrace debugging + "kernel.ftrace_enabled" = mkDefault false; + }; + + boot.kernel.sysctl = { + # Enable strict reverse path filtering (that is, do not attempt to route + # packets that "obviously" do not belong to the iface's network; dropped + # packets are logged as martians). + "net.ipv4.conf.all.log_martians" = mkDefault true; + "net.ipv4.conf.all.rp_filter" = mkDefault "1"; + "net.ipv4.conf.default.log_martians" = mkDefault true; + "net.ipv4.conf.default.rp_filter" = mkDefault "1"; + + # Ignore broadcast ICMP (mitigate SMURF) + "net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault true; + + # Ignore incoming ICMP redirects (note: default is needed to ensure that the + # setting is applied to interfaces added after the sysctls are set) + "net.ipv4.conf.all.accept_redirects" = mkDefault false; + "net.ipv4.conf.all.secure_redirects" = mkDefault false; + "net.ipv4.conf.default.accept_redirects" = mkDefault false; + "net.ipv4.conf.default.secure_redirects" = mkDefault false; + "net.ipv6.conf.all.accept_redirects" = mkDefault false; + "net.ipv6.conf.default.accept_redirects" = mkDefault false; + + # Ignore outgoing ICMP redirects (this is ipv4 only) + "net.ipv4.conf.all.send_redirects" = mkDefault false; + "net.ipv4.conf.default.send_redirects" = mkDefault false; + }; + }; +} diff --git a/hosts/dunamis/system/security/main.nix b/hosts/dunamis/system/security/main.nix new file mode 100644 index 0000000..aee351c --- /dev/null +++ b/hosts/dunamis/system/security/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./basic.nix + ./extensive.nix + ./dnscrypt-proxy.nix + ]; +} diff --git a/hosts/dunamis/system/stylix.nix b/hosts/dunamis/system/stylix.nix new file mode 100644 index 0000000..660df01 --- /dev/null +++ b/hosts/dunamis/system/stylix.nix @@ -0,0 +1,53 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../../../wallpapers/wallhaven-o5p5ql.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + base08 = "e33400"; + base09 = "e39400"; + base0A = "f2ce00"; + base0B = "5ccc96"; + base0C = "00a3cc"; + base0D = "7a5ccc"; + base0E = "b3a1e6"; + base0F = "ce6f8f"; + }; +} diff --git a/hosts/dunamis/system/virtual/docker.nix b/hosts/dunamis/system/virtual/docker.nix new file mode 100644 index 0000000..f35dce2 --- /dev/null +++ b/hosts/dunamis/system/virtual/docker.nix @@ -0,0 +1,29 @@ +{ + # pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.docker; +in { + options = { + virtual.docker.enable = + mkEnableOption "enable docker"; + }; + config = mkIf cfg.enable { + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + storageDriver = "btrfs"; + autoPrune.enable = true; + #defaultNetwork.settings = { + # dns_enabled = true; + #}; + }; + virtualisation.oci-containers.backend = "docker"; + }; +} diff --git a/hosts/dunamis/system/virtual/libvirt.nix b/hosts/dunamis/system/virtual/libvirt.nix new file mode 100644 index 0000000..2270b99 --- /dev/null +++ b/hosts/dunamis/system/virtual/libvirt.nix @@ -0,0 +1,35 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.libvirt; +in { + options = { + virtual.libvirt.enable = + mkEnableOption "enables virtualisation"; + }; + config = mkIf cfg.enable { + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = false; + swtpm.enable = true; + vhostUserPackages = [pkgs.virtiofsd]; + ovmf = { + enable = true; + packages = [ + (pkgs.OVMF.override { + secureBoot = true; + tpmSupport = true; + }) + .fd + ]; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/system/virtual/main.nix b/hosts/dunamis/system/virtual/main.nix new file mode 100644 index 0000000..f2229d6 --- /dev/null +++ b/hosts/dunamis/system/virtual/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./libvirt.nix + ./podman.nix + ./docker.nix + ]; +} diff --git a/hosts/dunamis/system/virtual/podman.nix b/hosts/dunamis/system/virtual/podman.nix new file mode 100644 index 0000000..de5edac --- /dev/null +++ b/hosts/dunamis/system/virtual/podman.nix @@ -0,0 +1,28 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.podman; +in { + options = { + virtual.podman.enable = + mkEnableOption "enables podman"; + }; + config = mkIf cfg.enable { + virtualisation = { + containers.enable = true; + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; + environment.systemPackages = with pkgs; [ + podman-tui + podman-compose + ]; + }; +} diff --git a/hosts/dunamis/system/wireless/bluetooth.nix b/hosts/dunamis/system/wireless/bluetooth.nix new file mode 100644 index 0000000..354884a --- /dev/null +++ b/hosts/dunamis/system/wireless/bluetooth.nix @@ -0,0 +1,21 @@ +{ + # pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.wireless.bluetooth; +in { + options = { + wireless.bluetooth = { + enable = mkEnableOption "enable bluetooth"; + enableBlueman = mkEnableOption "enable bluetooth manager"; + }; + }; + config = mkIf cfg.enable { + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.blueman.enable = cfg.enableBlueman; + }; +} diff --git a/hosts/dunamis/system/wireless/main.nix b/hosts/dunamis/system/wireless/main.nix new file mode 100644 index 0000000..412300c --- /dev/null +++ b/hosts/dunamis/system/wireless/main.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bluetooth.nix + ./wifi.nix + ]; +} diff --git a/hosts/dunamis/system/wireless/wifi.nix b/hosts/dunamis/system/wireless/wifi.nix new file mode 100644 index 0000000..7f7e6b5 --- /dev/null +++ b/hosts/dunamis/system/wireless/wifi.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.wireless.wifi; +in { + options = { + wireless.wifi.enable = + mkEnableOption "enables wifi with iwd and MAC address randomisation"; + }; + config = mkIf cfg.enable { + networking = { + networkmanager.wifi.backend = "iwd"; + wireless.iwd = { + enable = true; + settings = { + General = { + AddressRandomization = "network"; + }; + Settings = { + AlwaysRandomizeAddress = true; + }; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users.nix b/hosts/dunamis/users.nix new file mode 100644 index 0000000..d948082 --- /dev/null +++ b/hosts/dunamis/users.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + nix.settings.trusted-users = ["user"]; + users.users = { + user = { + isNormalUser = true; + extraGroups = ["wheel" "video" "libvirtd" "dialout"]; + shell = pkgs.nushell; + }; + work = { + isNormalUser = true; + extraGroups = ["video"]; + shell = pkgs.nushell; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/gnome/main.nix b/hosts/dunamis/users/user/desktop/gnome/main.nix new file mode 100644 index 0000000..36deffe --- /dev/null +++ b/hosts/dunamis/users/user/desktop/gnome/main.nix @@ -0,0 +1,176 @@ +{ + config, + pkgs, + # pkgs-51b85c, + # lib, + ... +}: { + # imports = [./walker.nix]; + # services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + home.packages = with pkgs; [ + nautilus + ghostty + helvum + loupe + evince + junction + celluloid + mission-center + dconf + glib + libnotify + playerctl + # wdisplays + pwvucontrol + wl-clipboard + # polkit_gnome + # libqalculate + #papirus-icon-theme + # gnomeExtensions.alphabetical-app-grid + # gnomeExtensions.appindicator + # gnomeExtensions.caffeine + # gnomeExtensions.pano + # gnomeExtensions.forge + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + # web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + # gtk.enable = true; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + # }; + dconf.settings = { + "io/github/celluloid-player/celluloid" = { + always-use-floating-controls = true; + always-use-floating-header-bar = true; + csd-enable = true; + }; + + "org/gnome/desktop/a11y/applications" = { + screen-reader-enabled = false; + }; + + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + color-scheme = "prefer-dark"; + cursor-blink-time = 1200; + enable-animations = true; + gtk-enable-primary-paste = false; + text-scaling-factor = 1.0; + toolbar-style = "text"; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/wm/keybindings" = { + switch-input-source = ["Escape"]; + switch-input-source-backward = ["Escape"]; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = true; + button-layout = "icon:close"; + }; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + workspaces-only-on-primary = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "forge@jmmaranan.com"]; + night-light-enabled = false; + night-light-schedule-automatic = false; + }; + + "org/gnome/software" = { + download-updates = false; + download-updates-notify = false; + first-run = false; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + + "org/gtk/gtk4/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + sidebar-width = 140; + sort-column = "name"; + sort-directories-first = true; + sort-order = "ascending"; + type-format = "category"; + view-type = "list"; + }; + + "org/gtk/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + show-size-column = true; + show-type-column = true; + sort-column = "name"; + sort-directories-first = false; + sort-order = "ascending"; + type-format = "category"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/jay/i3status-rust-0-33-2.nix b/hosts/dunamis/users/user/desktop/jay/i3status-rust-0-33-2.nix new file mode 100644 index 0000000..911ab42 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/jay/i3status-rust-0-33-2.nix @@ -0,0 +1,68 @@ +# with import {}; # bring all of Nixpkgs into scope +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + makeWrapper, + dbus, + libpulseaudio, + notmuch, + openssl, + ethtool, + lm_sensors, + iw, + iproute2, + withICUCalendar ? false, +}: +rustPlatform.buildRustPackage rec { + pname = "i3status-rust"; + version = "0.33.2"; + + src = fetchFromGitHub { + owner = "greshake"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-xJm4MsEU0OVX401WvKllg3zUwgCvjLxlAQzXE/oD1J0="; + }; + + cargoHash = "sha256-9jbJVnZhFbMYldBkRVSIiorUYDNtF3AAwNEpyNJXpjo="; + + nativeBuildInputs = [pkg-config makeWrapper]; + + buildInputs = [dbus libpulseaudio notmuch openssl lm_sensors]; + + buildFeatures = + [ + "notmuch" + "maildir" + "pulseaudio" + ] + ++ (lib.optionals withICUCalendar ["icu_calendar"]); + + prePatch = '' + substituteInPlace src/util.rs \ + --replace "/usr/share/i3status-rust" "$out/share" + ''; + + postInstall = '' + mkdir -p $out/share + cp -R examples files/* $out/share + ''; + + postFixup = '' + wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [iproute2 ethtool iw]} + ''; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with lib; { + description = "Very resource-friendly and feature-rich replacement for i3status"; + homepage = "https://github.com/greshake/i3status-rust"; + license = licenses.gpl3Only; + mainProgram = "i3status-rs"; + maintainers = with maintainers; [backuitist globin]; + platforms = platforms.linux; + }; +} diff --git a/hosts/dunamis/users/user/desktop/jay/main.nix b/hosts/dunamis/users/user/desktop/jay/main.nix new file mode 100644 index 0000000..f43e043 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/jay/main.nix @@ -0,0 +1,308 @@ +{ + config, + pkgs, + ... +}: { + home.packages = [pkgs.jay]; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + config.jay = { + default = ["gtk"]; + "org.freedesktop.impl.portal.ScreenCast" = ["jay"]; + "org.freedesktop.impl.portal.RemoteDesktop" = ["jay"]; + "org.freedesktop.impl.portal.Inhibit" = ["none"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk4"]; + }; + }; + programs.i3status-rust = { + enable = true; + package = pkgs.callPackage ./i3status-rust-0-33-2.nix {}; + bars = { + default = { + theme = "plain"; + blocks = [ + { + alert = 10.0; + block = "disk_space"; + info_type = "available"; + interval = 60; + path = "/"; + warning = 20.0; + } + { + block = "memory"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; + } + { + block = "cpu"; + interval = 1; + } + { + block = "load"; + format = " $icon $1m "; + interval = 1; + } + { + block = "sound"; + } + { + block = "time"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; + interval = 60; + } + ]; + }; + }; + }; + programs.i3status = { + enable = true; + enableDefault = true; + general = { + output_format = "i3bar"; + interval = 1; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 0; + vertical-pad = 0; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + + xdg.configFile.jay = { + target = "jay/config.toml"; + recursive = true; + source = (pkgs.formats.toml {}).generate "jay-config" { + keymap = '' + xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)" }; + }; + ''; + on-graphics-initialized = [ + # { + # type = "exec"; + # exec = "mako"; + # } + { + type = "exec"; + exec = "~/wl-tray-bridge/target/release/wl-tray-bridge"; + } + ]; + outputs = [ + { + match.connector = "eDP-1"; + scale = 1.2; + } + ]; + vrr = { + mode = "always"; + cursor-hz = 75; + }; + repeat-rate = { + rate = 50; + delay = 200; + }; + theme = { + bg-color = "#${config.lib.stylix.colors.base00}"; + bar-bg-color = "#${config.lib.stylix.colors.base00}"; + border-color = "#${config.lib.stylix.colors.base0D}"; + separator-color = "#${config.lib.stylix.colors.base01}"; + bar-status-text-color = "#${config.lib.stylix.colors.base05}"; + focused-title-text-color = "#${config.lib.stylix.colors.base07}"; + focused-title-bg-color = "#${config.lib.stylix.colors.base00}"; + focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}"; + focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}"; + unfocused-title-text-color = "#${config.lib.stylix.colors.base03}"; + unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}"; + attention-requested-bg-color = "#${config.lib.stylix.colors.base09}"; + font = "${config.stylix.fonts.sansSerif.name}"; + border-width = 2; + title-height = 24; + }; + status = { + format = "pango"; + exec = ["i3status-rs" "config-default"]; + }; + window-management-key = "Super_L"; + shortcuts = let + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + "logo-${left}" = "focus-left"; + "logo-${down}" = "focus-down"; + "logo-${up}" = "focus-up"; + "logo-${right}" = "focus-right"; + "logo-shift-${left}" = "move-left"; + "logo-shift-${down}" = "move-down"; + "logo-shift-${up}" = "move-up"; + "logo-shift-${right}" = "move-right"; + logo-d = "split-horizontal"; + logo-v = "split-vertical"; + logo-t = "toggle-split"; + logo-m = "toggle-mono"; + logo-shift-m = "toggle-fullscreen"; + logo-f = "focus-parent"; + logo-q = "close"; + logo-shift-f = "toggle-floating"; + alt-Return = { + type = "exec"; + exec = "wezterm"; + }; + logo-space = { + type = "exec"; + exec = "fuzzel"; + }; + logo-ctrl-q = "quit"; + logo-shift-r = "reload-config-toml"; + ctrl-alt-F1 = { + type = "switch-to-vt"; + num = 1; + }; + ctrl-alt-F2 = { + type = "switch-to-vt"; + num = 2; + }; + ctrl-alt-F3 = { + type = "switch-to-vt"; + num = 3; + }; + ctrl-alt-F4 = { + type = "switch-to-vt"; + num = 4; + }; + ctrl-alt-F5 = { + type = "switch-to-vt"; + num = 5; + }; + ctrl-alt-F6 = { + type = "switch-to-vt"; + num = 6; + }; + ctrl-alt-F7 = { + type = "switch-to-vt"; + num = 7; + }; + ctrl-alt-F8 = { + type = "switch-to-vt"; + num = 8; + }; + ctrl-alt-F9 = { + type = "switch-to-vt"; + num = 9; + }; + ctrl-alt-F10 = { + type = "switch-to-vt"; + num = 10; + }; + ctrl-alt-F11 = { + type = "switch-to-vt"; + num = 11; + }; + ctrl-alt-F12 = { + type = "switch-to-vt"; + num = 12; + }; + logo-1 = { + type = "show-workspace"; + name = "1"; + }; + logo-2 = { + type = "show-workspace"; + name = "2"; + }; + logo-3 = { + type = "show-workspace"; + name = "3"; + }; + logo-4 = { + type = "show-workspace"; + name = "4"; + }; + logo-5 = { + type = "show-workspace"; + name = "5"; + }; + logo-6 = { + type = "show-workspace"; + name = "6"; + }; + logo-7 = { + type = "show-workspace"; + name = "7"; + }; + logo-8 = { + type = "show-workspace"; + name = "8"; + }; + logo-9 = { + type = "show-workspace"; + name = "9"; + }; + logo-0 = { + type = "show-workspace"; + name = "10"; + }; + logo-shift-1 = { + type = "move-to-workspace"; + name = "1"; + }; + logo-shift-2 = { + type = "move-to-workspace"; + name = "2"; + }; + logo-shift-3 = { + type = "move-to-workspace"; + name = "3"; + }; + logo-shift-4 = { + type = "move-to-workspace"; + name = "4"; + }; + logo-shift-5 = { + type = "move-to-workspace"; + name = "5"; + }; + logo-shift-6 = { + type = "move-to-workspace"; + name = "6"; + }; + logo-shift-7 = { + type = "move-to-workspace"; + name = "7"; + }; + logo-shift-8 = { + type = "move-to-workspace"; + name = "8"; + }; + logo-shift-9 = { + type = "move-to-workspace"; + name = "9"; + }; + logo-shift-0 = { + type = "move-to-workspace"; + name = "10"; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/plasma/main.nix b/hosts/dunamis/users/user/desktop/plasma/main.nix new file mode 100644 index 0000000..4ad1def --- /dev/null +++ b/hosts/dunamis/users/user/desktop/plasma/main.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + # lib, + ... +}: { + #imports = [ ]; + stylix.targets.kde.enable = true; + home.packages = with pkgs; [ + noto-fonts-emoji + base16-schemes + wl-clipboard-rs + pwvucontrol + adw-gtk3 + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/fuzzel.nix b/hosts/dunamis/users/user/desktop/river/fuzzel.nix new file mode 100644 index 0000000..22a4ffe --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/main.nix b/hosts/dunamis/users/user/desktop/river/main.nix new file mode 100644 index 0000000..6812f46 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/main.nix @@ -0,0 +1,310 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [ + ./niri.nix + ./wofi.nix + ./fuzzel.nix + ./waybar.nix + ./swaync.nix + ./swayidle.nix + ./swaylock.nix + ./wlsunset.nix + ./udiskie.nix + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Blue"; + size = 24; + }; + image = ../wallpapers/wallhaven-5g9ed8.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 12; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Papirus-Dark"; + }; + }; + + fuzzel.enable = true; + waybar.enable = true; + swaync.enable = false; + wlsunset.enable = true; + component.swaylock.enable = true; + swayidle.enable = true; + udiskie.enable = true; + imv.enable = true; + + services.gnome-keyring.enable = true; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + corners = "top-right,bottom-left"; + offset = "45x5"; + origin = "top-right"; + timeout = 15; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + home.packages = with pkgs; [ + dconf + glib + wbg + swayidle + swaylock-effects + libnotify + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + xwayland-satellite + papirus-icon-theme + #libsForQt5.qt5ct + #kdePackages.qt6ct + #libsForQt5.qtstyleplugin-kvantum + #kdePackages.qtstyleplugin-kvantum + #adwaita-qt + #adwaita-qt6 + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.configFile = { + #niri = { + # recursive = true; + # source = dotfiles/niri; + #}; + #qt5ct = { + # recursive = true; + # source = dotfiles/qt5ct; + #}; + #qt6ct = { + # recursive = true; + # source = dotfiles/qt6ct; + #}; + #Kvantum = { + # recursive = true; + # source = dotfiles/Kvantum; + #}; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + # Service = { + # Type = "dbus"; + # ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wbg = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.wbg}/bin/wbg ${config.stylix.image}"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + swayidle = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + + xwayland-satellite = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/swayidle.nix b/hosts/dunamis/users/user/desktop/river/swayidle.nix new file mode 100644 index 0000000..7c1f7ac --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/swayidle.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + swayidle.enable = + lib.mkEnableOption "enable swayidle"; + }; + config = lib.mkIf config.swayidle.enable { + services.swayidle = { + enable = true; + systemdTarget = "graphical-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + { + timeout = 600; + command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/swaylock.nix b/hosts/dunamis/users/user/desktop/river/swaylock.nix new file mode 100644 index 0000000..ce939d9 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/swaylock.nix @@ -0,0 +1,30 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.swaylock.enable = + lib.mkEnableOption "enable swaylock"; + }; + config = lib.mkIf config.component.swaylock.enable { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + font = "${config.stylix.fonts.serif.name}"; + font-size = 25; + indicator-radius = 100; + indicator-thickness = 20; + indicator-idle-visible = true; + + # -effect section + screenshots = true; + clock = true; + effect-pixelate = 60; + effect-vignette = "0.5:0.5"; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/udiskie.nix b/hosts/dunamis/users/user/desktop/river/udiskie.nix new file mode 100644 index 0000000..be28f82 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/udiskie.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: { + options = { + udiskie.enable = + lib.mkEnableOption "enable udiskie"; + }; + config = lib.mkIf config.udiskie.enable { + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/waybar.nix b/hosts/dunamis/users/user/desktop/river/waybar.nix new file mode 100644 index 0000000..2b5d93e --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/waybar.nix @@ -0,0 +1,418 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + waybar.enable = + lib.mkEnableOption "enable waybar"; + }; + config = lib.mkIf config.waybar.enable { + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 48; + margin-right = 48; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/niri" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/niri" = { + orientation = "inherit"; + modules = [ + "niri/language" + "niri/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.3em; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: #ed8796; + color: #181926; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: #ed8796; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: #b7bdf8; + color: #000000; + } + + #power-profiles-daemon.power-saver { + background-color: #8aadf4; + color: #000000; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/river/wlsunset.nix b/hosts/dunamis/users/user/desktop/river/wlsunset.nix new file mode 100644 index 0000000..aa4ec97 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/river/wlsunset.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: { + options = { + wlsunset.enable = + lib.mkEnableOption "enable wlsunset"; + }; + config = lib.mkIf config.wlsunset.enable { + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/sway/chrome-backlight.nix b/hosts/dunamis/users/user/desktop/sway/chrome-backlight.nix new file mode 100644 index 0000000..b658e07 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/sway/chrome-backlight.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + programs.waybar.settings.bar-0."custom/kbd-backlight" = lib.mkDefault { + exec = "cat /sys/class/leds/chromeos::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/chromeos::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/chromeos::kbd_backlight -U 5%"; + }; +} diff --git a/hosts/dunamis/users/user/desktop/sway/fuzzel.nix b/hosts/dunamis/users/user/desktop/sway/fuzzel.nix new file mode 100644 index 0000000..ecefcd0 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/sway/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/sway/hyprlock.nix b/hosts/dunamis/users/user/desktop/sway/hyprlock.nix new file mode 100644 index 0000000..229519e --- /dev/null +++ b/hosts/dunamis/users/user/desktop/sway/hyprlock.nix @@ -0,0 +1,104 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.hyprlock.enable = + lib.mkEnableOption "enable hyprlock"; + }; + config = lib.mkIf config.component.hyprlock.enable { + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/sway/main-scroller.nix b/hosts/dunamis/users/user/desktop/sway/main-scroller.nix new file mode 100644 index 0000000..ea13cdc --- /dev/null +++ b/hosts/dunamis/users/user/desktop/sway/main-scroller.nix @@ -0,0 +1,917 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [../theming/gruvbox.nix]; + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.plugins = ["${pkgs.hyprlandPlugins.hyprscroller}/lib/libhyprscroller.so"]; + wayland.windowManager.hyprland.settings = { + input = { + kb_layout = "us,ua"; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + monitor = [ + ", preferred, auto, 1" + "eDP-1, preferred, auto, 1.2" + ]; + env = [ + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,gtk3" + ]; + decoration = { + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "kitty"; + "$screenLocker" = "hyprlock"; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + gaps_in = 4; + gaps_out = 4; + border_size = 4; + allow_tearing = true; + layout = "scroller"; + }; + + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, fuzzel" + "$mod, Escape, exec, hyprctl switchxkblayout all next" + "$mod, M, scroller:fitsize, active" + "$mod, K, scroller:cyclesize" + "$modCtrl, H, killactive" + "$modCtrl, M, fullscreen" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + + ", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/" + "CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/" + "SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/" + # navigation + #"$modCtrl, N," + "$mod, $left, scroller:movefocus, l" + "$mod, $down, scroller:movefocus, d" + "$mod, $up, scroller:movefocus, u" + "$mod, $right, scroller:movefocus, r" + "$modshift, $left, workspace, e-1" + "$modshift, $right, workspace, e+1" + "$mod, left, scroller:movefocus, l" + "$mod, up, scroller:movefocus, u" + "$mod, down, scroller:movefocus, d" + "$mod, right, scroller:movefocus, r" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + + "$modCtrl, $left, scroller:movewindow, l" + "$modCtrl, $down, scroller:movewindow, d" + "$modCtrl, $up, scroller:movewindow, u" + "$modCtrl, $right, scroller:movewindow, r" + "$modCtrl, left, scroller:movewindow, l" + "$modCtrl, up, scroller:movewindow, u" + "$modCtrl, down, scroller:movewindow, d" + "$modCtrl, right, scroller:movewindow, r" + # workspaces + "$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" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, 10" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + ]; + binde = [ + "$mod, comma, resizeactive, -10 0" + "$mod, period, resizeactive, 10 0" + "$modShift, comma, resizeactive, 0 -10" + "$modShift, period, resizeactive, 0 10" + ]; + bindl = [ + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, auto, preferred, 1.2'" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modCtrl, Escape, exit" + ]; + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 500; + }; + windowrulev2 = [ + "float, class:(com.github.hluk.copyq)" + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + ]; + }; + + services.hyprpaper = { + enable = true; + }; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 600; + on-timeout = "hyprlock"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["gitea-local"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 8; + margin-right = 8; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/hypr" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "hyprland/workspaces" = { + format = "{id}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "hyprland/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/hypr" = { + orientation = "inherit"; + modules = [ + "hyprland/language" + "hyprland/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0E; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base08; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + #corners = "top-right,bottom-left"; + offset = "12x12"; + origin = "top-right"; + timeout = 15; + frame_width = 4; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + + home.packages = with pkgs; [ + dconf + glib + grimblast + grim + slurp + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + papirus-icon-theme + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/sway/main.nix b/hosts/dunamis/users/user/desktop/sway/main.nix new file mode 100644 index 0000000..4adf6c7 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/sway/main.nix @@ -0,0 +1,922 @@ +{ + config, + pkgs, + # pkgs-51b85c, + lib, + ... +}: { + # imports = [./walker.nix]; + stylix.targets.sway.enable = true; + wayland.windowManager.sway = { + enable = true; + systemd.enable = true; + # xwayland.enable = false; + wrapperFeatures.gtk = true; + config = let + modifier = "Mod4"; + terminal = "wezterm"; + launcher = "fuzzel"; + clipboard = "copyq toggle"; + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + bars = [ + { + command = "${pkgs.waybar}/bin/waybar"; + } + ]; + + modifier = "${modifier}"; + terminal = "${terminal}"; + menu = "${launcher}"; + + left = "${left}"; + down = "${down}"; + up = "${up}"; + right = "${right}"; + + workspaceLayout = "tabbed"; + + input = { + "*" = { + xkb_layout = "us,ua"; + repeat_delay = "200"; + repeat_rate = "50"; + accel_profile = "flat"; + }; + "type:touchpad" = { + tap = "enabled"; + scroll_method = "two_finger"; + }; + }; + output = { + "Samsung Electric Company S24R65x H4TMA03291" = { + mode = "1920x1080@74.973Hz"; + pos = "0 0"; + adaptive_sync = "on"; + allow_tearing = "yes"; + max_render_time = "off"; + }; + "AOC 27V2G5 0x0000026C" = { + pos = "1920 0"; + }; + }; + keybindings = lib.mkForce { + "${modifier}+Ctrl+q" = "kill"; + "${modifier}+Ctrl+Escape" = "exit"; + "${modifier}+Ctrl+r" = "reload"; + + "${modifier}+Ctrl+${left}" = "move left"; + "${modifier}+Ctrl+${down}" = "move down"; + "${modifier}+Ctrl+${up}" = "move up"; + "${modifier}+Ctrl+${right}" = "move right"; + "${modifier}+Ctrl+left" = "move left"; + "${modifier}+Ctrl+down" = "move down"; + "${modifier}+Ctrl+up" = "move up"; + "${modifier}+Ctrl+right" = "move right"; + "${modifier}+Ctrl+1" = "move window workspace 1"; + "${modifier}+Ctrl+2" = "move window workspace 2"; + "${modifier}+Ctrl+3" = "move window workspace 3"; + "${modifier}+Ctrl+4" = "move window workspace 4"; + "${modifier}+Ctrl+5" = "move window workspace 5"; + "${modifier}+Ctrl+6" = "move window workspace 6"; + "${modifier}+Ctrl+7" = "move window workspace 7"; + "${modifier}+Ctrl+8" = "move window workspace 8"; + "${modifier}+Ctrl+9" = "move window workspace 9"; + "${modifier}+Ctrl+0" = "move window workspace 10"; + "${modifier}+Ctrl+l" = "move window workspace prev"; + "${modifier}+Ctrl+y" = "move window workspace next"; + + "${modifier}+Shift+${left}" = "focus output left"; + "${modifier}+Shift+${down}" = "focus output down"; + "${modifier}+Shift+${up}" = "focus output up"; + "${modifier}+Shift+${right}" = "focus output right"; + "${modifier}+Shift+left" = "focus output left"; + "${modifier}+Shift+down" = "focus output down"; + "${modifier}+Shift+up" = "focus output up"; + "${modifier}+Shift+right" = "focus output right"; + + "${modifier}+Return" = "exec ${terminal}"; + "${modifier}+Shift+v" = "exec ${clipboard}"; + "${modifier}+Space" = "exec ${launcher}"; + + "${modifier}+c" = "splith"; + "${modifier}+d" = "splitv"; + "${modifier}+s" = "layout toggle split"; + "${modifier}+t" = "layout tabbed"; + "${modifier}+h" = "focus mode_toggle"; + "${modifier}+f" = "floating toggle"; + "${modifier}+m" = "fullscreen toggle"; + "${modifier}+g" = "sticky toggle"; + "${modifier}+b" = "bar mode toggle"; + + "--locked ${modifier}+Escape" = "exec swaymsg input \"*\" xkb_switch_layout next"; + "Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -o -r -c '#ff0000ff')" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ~/pics/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png''; + + "${modifier}+1" = "workspace 1"; + "${modifier}+2" = "workspace 2"; + "${modifier}+3" = "workspace 3"; + "${modifier}+4" = "workspace 4"; + "${modifier}+5" = "workspace 5"; + "${modifier}+6" = "workspace 6"; + "${modifier}+7" = "workspace 7"; + "${modifier}+8" = "workspace 8"; + "${modifier}+9" = "workspace 9"; + "${modifier}+0" = "workspace 10"; + "${modifier}+l" = "workspace prev"; + "${modifier}+y" = "workspace next"; + + "${modifier}+${left}" = "focus left"; + "${modifier}+${down}" = "focus down"; + "${modifier}+${up}" = "focus up"; + "${modifier}+${right}" = "focus right"; + "${modifier}+left" = "focus left"; + "${modifier}+down" = "focus down"; + "${modifier}+up" = "focus up"; + "${modifier}+right" = "focus right"; + }; + window = { + border = 1; + # hideEdgeBorders = "smart"; + }; + gaps = { + # top = 6; + # bottom = 6; + # left = 6; + # right = 6; + outer = 6; + inner = 3; + }; + floating.criteria = [ + { + app_id = "com.github.hluk.copyq"; + } + { + app_id = "com.saivert.pwvucontrol"; + } + ]; + }; + }; + programs.swaylock.enable = true; + services.swayidle = { + enable = true; + systemdTarget = "sway-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock}/bin/swaylock -fF"; + } + { + timeout = 301; + command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; + resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; + } + ]; + events = [ + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF &&"; + } + { + event = "unlock"; + command = "${pkgs.procps}/bin/pkill -SIGUSR1 swaylock"; + } + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF & ${pkgs.playerctl}/bin/playerctl pause"; + } + ]; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services = { + network-manager-applet.enable = true; + blueman-applet.enable = true; + copyq.enable = true; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + # systemd = { + # enable = true; + # target = "graphical-session.target"; + # }; + settings = { + bar-0 = { + ipc = true; + id = "bar-0"; + layer = "top"; + position = "bottom"; + height = 32; + spacing = 6; + # margin-top = 8; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/sway" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + "privacy" + "tray" + "wireplumber" + # "group/laptop" + "idle_inhibitor" + ]; + "sway/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "I"; + "2" = "II"; + "3" = "III"; + "4" = "IV"; + "5" = "V"; + "6" = "VI"; + "7" = "VII"; + "8" = "IIX"; + "9" = "IX"; + "10" = "X"; + #focused = "󰗝"; + #active = "󰻃"; + #default = "󰄰"; + }; + }; + "sway/language" = { + format = "{flag}"; + tooltip-format = "{long}"; + on-click = "swaymsg input type:keyboard xkb_switch_layout next"; + }; + "group/sway" = { + orientation = "inherit"; + modules = [ + "sway/language" + "sway/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "custom/backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + # "custom/backlight" = { + # format = "{}% {icon}"; + # interval = 1; + # format-icons = ["󰃠"]; + # }; + # "custom/kbd-backlight" = { + # exec = "brightnessctl s 5%+"; + # interval = 1; + # format = "{}% {icon}"; + # format-icons = ["󰌌"]; + # on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; + # on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; + # }; + # battery = { + # states = { + # good = 95; + # warning = 30; + # critical = 15; + # }; + # format = "{capacity}% {icon}"; + # format-full = "{capacity}% 󱟢"; + # format-charging = "{capacity}% 󰂄"; + # format-plugged = "{capacity}% 󰚥"; + # format-alt = "{icon} {time}"; + # format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + # }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + # "power-profiles-daemon" = { + # format = "{icon}"; + # tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + # tooltip = true; + # format-icons = { + # default = "󱡮"; + # performance = "󱡮"; + # balanced = ""; + # power-saver = ""; + # }; + # }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + window#waybar { + background-color: @base00; + border: 1px solid @base0D; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + .modules-left, + .modules-center, + .modules-right { + padding: 1px; + margin-left: 4px; + margin-right: 4px; + } + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.5em; + color: @base05; + background-color: @base00; + } + + /* #upower, + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.5em; + } */ + + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.focused, + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base0D; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0B; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base0A; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.rofi = { + enable = true; + theme = { + window = { + height = 360; + border = 3; + }; + + inputbar = { + children = ["prompt" "entry"]; + border-radius = 5; + padding = 2; + }; + + prompt = { + padding = 6; + border-radius = 3; + margin = "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "~>"; + }; + + entry = { + padding = 6; + margin = "20px 0px 0px 10px"; + }; + + listview = { + border = "0px 0px 0px"; + padding = "6px 0px 0px"; + margin = "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = 5; + }; + + element-icon = { + size = 25; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = 10; + vertical-align = "0.5"; + horizontal-align = "0.5"; + }; + + message = { + margin = 2; + padding = 2; + border-radius = 5; + }; + + textbox = { + padding = 6; + margin = "20 0 0 20"; + }; + }; + extraConfig = { + show-icons = true; + modi = "run,drun,window"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 8; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 2; + radius = 4; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 4; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "bottom-right"; + timeout = 15; + frame_width = 2; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + # services.flameshot = { + # enable = true; + # settings = { + # General = { + # buttons = "@Variant(000x7f000vQList0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)"; + # filenamePattern = "screenshot-%F_%H-%M-%S"; + # saveAsFileExtension = "png"; + # savePath = "/home/user/pics/screenshots"; + # uiColor = "#${config.lib.stylix.colors.base0D}"; + # showStartupLaunchMessage = false; + # showDesktopNotification = false; + # showHelp = false; + # }; + # }; + # }; + home.packages = with pkgs; [ + nautilus + helvum + loupe + evince + celluloid + mission-center + dconf + glib + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + libqalculate + #papirus-icon-theme + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + }; + }; + + systemd.user.settings.Manager.DefaultEnvironment = { + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # # }; + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + # walker = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # xwayland-satellite = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["niri.service"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/atelier-estuary.nix b/hosts/dunamis/users/user/desktop/theming/atelier-estuary.nix new file mode 100644 index 0000000..71f38c2 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/atelier-estuary.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-estuary.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-ne3v2r.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool-light.nix b/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool-light.nix new file mode 100644 index 0000000..23fc859 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool-light.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml"; + polarity = "light"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-m37gy8.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Light"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool.nix b/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool.nix new file mode 100644 index 0000000..86e39f1 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/atelier-sulphurpool.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-7p3vy9.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/ayu-dark.nix b/hosts/dunamis/users/user/desktop/theming/ayu-dark.nix new file mode 100644 index 0000000..6ae2a19 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/ayu-dark.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-exj8pw.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/ayu-mirage.nix b/hosts/dunamis/users/user/desktop/theming/ayu-mirage.nix new file mode 100644 index 0000000..3bb367d --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/ayu-mirage.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-mirage.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-wexo3x.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/catppuccin-macchiato.nix b/hosts/dunamis/users/user/desktop/theming/catppuccin-macchiato.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/catppuccin-macchiato.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/dracula.nix b/hosts/dunamis/users/user/desktop/theming/dracula.nix new file mode 100644 index 0000000..e861468 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/dracula.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/gruvbox.nix b/hosts/dunamis/users/user/desktop/theming/gruvbox.nix new file mode 100644 index 0000000..546ddff --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/gruvbox.nix @@ -0,0 +1,71 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + gruvbox-plus-icons + (nerdfonts.override {fonts = ["FantasqueSansMono" "Ubuntu" "UbuntuSans"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.capitaine-cursors-themed; + name = "Capitaine Cursors (Gruvbox)"; + size = 24; + }; + image = ../wallpapers/wallhaven-qze297.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Gruvbox-Plus-Dark"; + package = pkgs.gruvbox-plus-icons; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Gruvbox-Plus-Dark"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/heetch.nix b/hosts/dunamis/users/user/desktop/theming/heetch.nix new file mode 100644 index 0000000..5ae05f1 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/heetch.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Red"; + size = 24; + }; + image = ../wallpapers/wallhaven-9mdqgd.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/heetchduck.nix b/hosts/dunamis/users/user/desktop/theming/heetchduck.nix new file mode 100644 index 0000000..8037eea --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/heetchduck.nix @@ -0,0 +1,55 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../../../../../../wallpapers/wallhaven-o5p5ql.jpg; + # image = null; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + base08 = "e33400"; + base09 = "e39400"; + base0A = "f2ce00"; + base0B = "5ccc96"; + base0C = "00a3cc"; + base0D = "7a5ccc"; + base0E = "b3a1e6"; + base0F = "ce6f8f"; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/outrun-dark.nix b/hosts/dunamis/users/user/desktop/theming/outrun-dark.nix new file mode 100644 index 0000000..6364ec1 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/outrun-dark.nix @@ -0,0 +1,76 @@ +{ + # config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/outrun-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-o5p5ql.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + # stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + # }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/rose-pine-moon.nix b/hosts/dunamis/users/user/desktop/theming/rose-pine-moon.nix new file mode 100644 index 0000000..455ef3d --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/rose-pine-moon.nix @@ -0,0 +1,74 @@ +{ + config, + pkgs, + ... +}: { + fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + polarity = "dark"; + cursor = { + # package = pkgs.bibata-cursors-translucent; + package = pkgs.rose-pine-cursor; + name = "BreezeX-RosePineDawn-Linux"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + name = "rose-pine-moon"; + package = pkgs.rose-pine-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/selenized-black.nix b/hosts/dunamis/users/user/desktop/theming/selenized-black.nix new file mode 100644 index 0000000..adfa2e6 --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/selenized-black.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-vml6j5.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/desktop/theming/solarized.nix b/hosts/dunamis/users/user/desktop/theming/solarized.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/dunamis/users/user/desktop/theming/solarized.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix new file mode 100644 index 0000000..966f977 --- /dev/null +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -0,0 +1,17 @@ +{inputs, ...}: { + imports = with inputs; [ + nix-flatpak.homeManagerModules.nix-flatpak + nixvim.homeManagerModules.nixvim + walker.homeManagerModules.default + self.homeModules.desktop + ./programs.nix + ]; + home = { + stateVersion = "25.05"; + sessionPath = [ + "$HOME/.local/bin" + ]; + }; + desktop.niri.enable = true; + # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; +} diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix new file mode 100644 index 0000000..767c15f --- /dev/null +++ b/hosts/dunamis/users/user/programs.nix @@ -0,0 +1,45 @@ +{pkgs, ...}: { + imports = [./programs/main.nix]; + + shell = { + nushell.enable = true; + oh-my-posh.enable = true; + }; + + console.yazi.enable = true; + + programs = { + bat.enable = true; + eza.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + gitui.enable = true; + }; + + terminal = { + ghostty.enable = true; + kitty.enable = true; + }; + + editor = { + helix.enable = true; + neve.enable = true; + }; + + home.packages = with pkgs; [ + flatpak + waycheck + vial + git + ripgrep + trashy + fd + dust + procs + tree + zip + unzip + virt-manager + ]; +} diff --git a/hosts/dunamis/users/user/programs/console.nix b/hosts/dunamis/users/user/programs/console.nix new file mode 100644 index 0000000..dc72295 --- /dev/null +++ b/hosts/dunamis/users/user/programs/console.nix @@ -0,0 +1,23 @@ +{ + # config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + eza + tree + speedtest-rs + zip + unzip + execline + fastfetch + alejandra + uutils-coreutils-noprefix + ]; +} diff --git a/hosts/dunamis/users/user/programs/console/yazi.nix b/hosts/dunamis/users/user/programs/console/yazi.nix new file mode 100644 index 0000000..274d52d --- /dev/null +++ b/hosts/dunamis/users/user/programs/console/yazi.nix @@ -0,0 +1,88 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.console.yazi; +in { + options = { + console.yazi.enable = + mkEnableOption "enable yazi file manager"; + }; + config = mkIf cfg.enable { + programs.yazi = { + enable = true; + enableNushellIntegration = true; + settings = { + opener = { + open = [ + { + run = "xdg-open \"$@\""; + orphan = true; + desc = "Open"; + } + ]; + edit = [ + { + run = "$EDITOR \"$@\""; + block = true; + desc = "Edit"; + } + ]; + dragdrop = [ + { + run = "${pkgs.ripdrag}/bin/ripdrag \"$@\""; + desc = "Drag'n'drop"; + orphan = true; + for = "unix"; + } + ]; + }; + open.rules = [ + { + mime = "text/*"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.toml"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.c"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.cpp"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.rs"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.py"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.json"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*"; + use = ["open" "edit" "dragdrop"]; + } + ]; + }; + keymap = { + manager.append_keymap = [ + { + on = [""]; + run = ''shell '${pkgs.ripdrag}/bin/ripdrag -x "$@"' --confirm''; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/editor/helix.nix b/hosts/dunamis/users/user/programs/editor/helix.nix new file mode 100644 index 0000000..6fa013e --- /dev/null +++ b/hosts/dunamis/users/user/programs/editor/helix.nix @@ -0,0 +1,122 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.editor.helix; +in { + options = { + editor.helix.enable = + mkEnableOption "enable helix editor"; + }; + config = mkIf cfg.enable { + programs.helix = { + enable = true; + defaultEditor = true; + settings = { + editor = { + line-number = "relative"; + bufferline = "multiple"; + cursorline = true; + lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + statusline = { + left = ["mode" "spinner" "version-control"]; + center = ["file-name"]; + right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"]; + separator = "|"; + }; + soft-wrap = { + enable = true; + max-wrap = 25; + max-indent-retain = 0; + wrap-indicator = ""; + }; + }; + keys.normal = { + space = { + space = "file_picker"; + w = ":w"; + q = ":q"; + x = ":x"; + n = ":n"; + "," = "goto_previous_buffer"; + "." = "goto_next_buffer"; + l = ":reflow"; + }; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + languages = { + language-server = { + clangd = { + command = "${pkgs.clang-tools}/bin/clangd"; + }; + rust-analyzer = { + command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + }; + texlab = { + command = "${pkgs.texlab}/bin/texlab"; + }; + nil = { + command = "${pkgs.nil}/bin/nil"; + }; + markdown-oxide = { + command = "${pkgs.markdown-oxide}/bin/markdown-oxide"; + }; + tinymist = { + command = lib.getExe pkgs.tinymist; + }; + }; + language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.alejandra}/bin/alejandra"; + language-servers = ["nil"]; + } + { + name = "latex"; + auto-format = true; + formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent"; + language-servers = ["texlab"]; + } + { + name = "typst"; + auto-format = true; + formatter.command = lib.getExe pkgs.typstyle; + language-servers = ["tinymist"]; + } + { + name = "markdown"; + auto-format = true; + formatter.command = "${pkgs.comrak}/bin/comrak"; + language-servers = ["markdown-oxide"]; + } + { + name = "c"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "cpp"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "rust"; + auto-format = true; + language-servers = ["rust-analyzer"]; + formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/editor/main.nix b/hosts/dunamis/users/user/programs/editor/main.nix new file mode 100644 index 0000000..2838df3 --- /dev/null +++ b/hosts/dunamis/users/user/programs/editor/main.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./helix.nix + ./zed.nix + ./neve.nix + #./nixvim.nix + ]; +} diff --git a/hosts/dunamis/users/user/programs/editor/neve.nix b/hosts/dunamis/users/user/programs/editor/neve.nix new file mode 100644 index 0000000..6477381 --- /dev/null +++ b/hosts/dunamis/users/user/programs/editor/neve.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: +with lib; let + cfg = config.editor.neve; +in { + options = { + editor.neve.enable = + mkEnableOption "enable neve neovim distribution"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + neovide + cpplint + statix + ]; + programs.nixvim = { + enable = true; + imports = [inputs.neve.nixvimModule]; + viAlias = true; + vimAlias = true; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/editor/nixvim.nix b/hosts/dunamis/users/user/programs/editor/nixvim.nix new file mode 100644 index 0000000..70511ce --- /dev/null +++ b/hosts/dunamis/users/user/programs/editor/nixvim.nix @@ -0,0 +1,270 @@ +{ + pkgs, + pkgs-51b85c, + lib, + config, + ... +}: { + options = { + editor.neovim.enable = + lib.mkEnableOption "enable neovim text editor"; + }; + config = lib.mkIf config.editors.neovim.enable { + # stylix.targets.nixvim.enable = true; + home.packages = with pkgs; [neovide]; + programs.nixvim = { + enable = true; + enableMan = true; + # package = ; + plugins.lualine.enable = true; + plugins.treesitter = { + enable = true; + folding = true; + }; + plugins = { + yazi.enable = true; + noice = { + enable = true; + popupmenu.backend = "nui"; + }; + notify.enable = true; + telescope.enable = true; + transparent.enable = true; + lsp-format.enable = true; + lsp-lines.enable = true; + lsp-status.enable = true; + which-key.enable = true; + web-devicons.enable = true; + + # vimtex = { + # enable = true; + # texlivePackage = pkgs.tectonic; #pkgs.texlive.combined.scheme-full; + # settings = { + # compiler_method = "tectonic"; + # view_method = "zathura_simple"; + # compiler_tectonic = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "--synctex" + # "--keep-logs" + # "-Z shell-escape" + # "-Z continue-on-errors" + # ]; + # }; + # compiler_latexmk = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "-xelatex" + # "-recorder" + # "-file-line-error" + # "-synctex=1" + # "-interaction=nonstopmode" + # "-shell-escape" + # ]; + # }; + # }; + # }; + treesitter-textobjects.enable = true; + cmp-latex-symbols.enable = true; + dap.enable = true; + rustaceanvim.enable = true; + lsp = { + enable = true; + servers = { + clangd.enable = true; + #rust_analyzer = { + # enable = true; + # installRustc = true; + # installCargo = true; + #}; + lua_ls.enable = true; + nil_ls.enable = true; + }; + }; + }; + plugins = { + cmp-nvim-lsp = {enable = true;}; # lsp + cmp-buffer = {enable = true;}; + cmp-path = {enable = true;}; # file system paths + cmp_luasnip = {enable = true;}; # snippets + cmp-cmdline = {enable = true;}; # autocomplete for cmdline + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + ]; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + experimental = { + ghost_text = true; + }; + }; + }; + luasnip = { + enable = true; + settings = { + enable_autosnippets = true; + store_selection_keys = ""; + }; + }; + }; + clipboard = { + providers.wl-copy.enable = true; + }; + + globals.mapleader = " "; + globals.maplocalleader = ","; + + opts = { + # Show line numbers + number = true; + + # Show relative line numbers + relativenumber = true; + + # Use the system clipboard + clipboard = "unnamedplus"; + + # Number of spaces that represent a + tabstop = 2; + softtabstop = 2; + + # Show tabline always + showtabline = 2; + + # Use spaces instead of tabs + expandtab = true; + + # Enable smart indentation + smartindent = true; + + # Number of spaces to use for each step of (auto)indent + shiftwidth = 2; + + # Enable break indent + breakindent = true; + + # Highlight the screen line of the cursor + cursorline = true; + + # Minimum number of screen lines to keep above and below the cursor + scrolloff = 8; + + # Enable mouse support + mouse = "a"; + + # Set folding method to manual + foldmethod = "manual"; + + # Disable folding by default + foldenable = false; + + # Wrap long lines at a character in 'breakat' + linebreak = true; + + # Disable spell checking + spell = false; + + # Disable swap file creation + swapfile = false; + + # Time in milliseconds to wait for a mapped sequence to complete + timeoutlen = 300; + + # Enable 24-bit RGB color in the TUI + termguicolors = true; + + # Don't show mode in the command line + showmode = false; + + # Open new split below the current window + splitbelow = true; + + # Keep the screen when splitting + splitkeep = "screen"; + + # Open new split to the right of the current window + splitright = true; + + # Hide command line unless needed + cmdheight = 0; + + # Remove EOB + fillchars = { + eob = " "; + }; + }; + keymaps = [ + { + mode = "n"; + key = "j"; + action = "gj"; + } + { + mode = "n"; + key = "k"; + action = "gk"; + } + { + mode = "n"; + key = "n"; + action = "nzzzv"; + } + { + mode = "n"; + key = "N"; + action = "Nzzzv"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = "yy"; + action = "Yazi"; + options = {desc = "open yazi";}; + } + { + mode = "n"; + key = "fo"; + action = "Telescope oldfiles"; + options = {desc = "Telescope oldfiles";}; + } + { + mode = "n"; + key = "ff"; + action = "Telescope find_files"; + options = {desc = "Telescope find files";}; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/editor/zed.nix b/hosts/dunamis/users/user/programs/editor/zed.nix new file mode 100644 index 0000000..44609c8 --- /dev/null +++ b/hosts/dunamis/users/user/programs/editor/zed.nix @@ -0,0 +1,114 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.editor.zed; +in { + options = { + editor.zed.enable = + mkEnableOption "enable zed editor"; + }; + config = mkIf cfg.enable { + programs.zed-editor = { + enable = true; + extensions = [ + "nix" + "latex" + "typst" + ]; + userSettings = { + vim_mode = true; + ui_font_size = lib.mkForce 16; + buffer_font_size = lib.mkForce 16; + features = {inline_completion_provider = "none";}; + auto_update = false; + languages = { + "Nix" = { + language-servers = [ + "nil" + "!nixd" + ]; + formatter = { + external.command = lib.getExe pkgs.alejandra; + }; + }; + "Rust" = { + formatter = { + external = { + command = lib.getExe pkgs.rustfmt; + arguments = ["--edition" "2021"]; + }; + }; + }; + "typst" = { + language-servers = ["tinymist"]; + format_on_save = "on"; + formatter = { + external = { + command = lib.getExe pkgs.typstyle; + arguments = ["-i" "{buffer_path}"]; + }; + }; + }; + "Python" = { + format_on_save = "on"; + formatter = [ + { + language_server = { + name = "ruff"; + }; + } + ]; + language_servers = ["ruff"]; + }; + }; + lsp = { + clangd = { + binary = { + arguments = []; + path = "${pkgs.clang-tools}/bin/clangd"; + }; + }; + rust-analyzer = { + binary = { + arguments = []; + path = lib.getExe pkgs.rust-analyzer; + }; + }; + ruff = { + binary = { + arguments = []; + path = lib.getExe pkgs.ruff; + }; + }; + nil = { + binary = { + arguments = []; + path = lib.getExe pkgs.nil; + }; + initialization_options.formatting.command = [(lib.getExe pkgs.alejandra)]; + }; + texlab = { + binary = { + arguments = []; + path = lib.getExe pkgs.texlab; + }; + }; + tinymist = { + binary = { + arguments = []; + path = lib.getExe pkgs.tinymist; + }; + }; + }; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/flatpak.nix b/hosts/dunamis/users/user/programs/flatpak.nix new file mode 100644 index 0000000..9087fd7 --- /dev/null +++ b/hosts/dunamis/users/user/programs/flatpak.nix @@ -0,0 +1,110 @@ +{ + services.flatpak = { + enable = true; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + { + name = "hero-persson"; + location = "https://hero-persson.github.io/unmojang-flatpak/index.flatpakrepo"; + } + ]; + packages = [ + # misc + "io.github.zen_browser.zen" + "net.mullvad.MullvadBrowser" + "com.obsproject.Studio" + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + "org.qbittorrent.qBittorrent" + + # "com.transmissionbt.Transmission" + "com.usebottles.bottles" + "com.logseq.Logseq" + "org.octave.Octave" + "io.github.martchus.syncthingtray" + + # chatting + "org.signal.Signal" + "im.riot.Riot" + "org.telegram.desktop" + "io.github.spacingbat3.webcord" + # "dev.vencord.Vesktop" + "org.mozilla.Thunderbird" + + # media + "org.atheme.audacious" + "io.freetubeapp.FreeTube" + #"io.github.celluloid_player.Celluloid" + # "io.mpv.Mpv" + + # gaming + #"com.github._0negal.Viper" + "com.valvesoftware.Steam" + "net.lutris.Lutris" + "com.heroicgameslauncher.hgl" + { + appId = "org.unmojang.FjordLauncher"; + origin = "hero-persson"; + } + "org.freedesktop.Platform.VulkanLayer.MangoHud//24.08" + "org.freedesktop.Platform.VulkanLayer.gamescope//24.08" + ]; + overrides = { + "global" = { + # Force Wayland by default + Context = { + sockets = ["wayland" "!x11" "!fallback-x11"]; + filesystems = [ + "xdg-run/pipewire-0" + "xdg-config/gtk-3.0:ro" + "xdg-config/gtk-4.0:ro" + # "~/.local/share/fonts:ro" + "~/.local/share/icons:ro" + # "~/.nix-profile/share/icons:ro" + # "~/.nix-profile/share/fonts:ro" + "/nix/store:ro" + ]; + }; + Environment = { + XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + #GTK_THEME = "adw-gtk3"; + }; + }; + "io.github.martchus.syncthingtray".Context.filesystems = ["/storage/games/heroic/Factorio/game/saves"]; + "org.octave.Octave".Context.sockets = ["x11"]; + "org.octave.Octave".Environment = {QT_QPA_PLATFORM = "xcb";}; + "com.valvesoftware.Steam" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/steam"]; + }; + Environment = { + STEAM_FORCE_DESKTOPUI_SCALING = "1.3"; + }; + }; + "org.signal.Signal" = { + Environment = { + SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + }; + }; + "net.lutris.Lutris".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/lutris" "~/games/lutris"]; + }; + "com.heroicgameslauncher.hgl".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/heroic" "~/games/heroic"]; + }; + "com.usebottles.Bottles" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"]; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/main.nix b/hosts/dunamis/users/user/programs/main.nix new file mode 100644 index 0000000..ef6db4a --- /dev/null +++ b/hosts/dunamis/users/user/programs/main.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./console.nix + ./flatpak.nix + ./console/yazi.nix + ./editor/main.nix + ./shell/main.nix + ./terminal/main.nix + ]; +} diff --git a/hosts/dunamis/users/user/programs/shell/main.nix b/hosts/dunamis/users/user/programs/shell/main.nix new file mode 100644 index 0000000..fd8a6f4 --- /dev/null +++ b/hosts/dunamis/users/user/programs/shell/main.nix @@ -0,0 +1,3 @@ +{ + imports = [./nushell.nix ./oh-my-posh.nix]; +} diff --git a/hosts/dunamis/users/user/programs/shell/nushell.nix b/hosts/dunamis/users/user/programs/shell/nushell.nix new file mode 100644 index 0000000..73ad8f5 --- /dev/null +++ b/hosts/dunamis/users/user/programs/shell/nushell.nix @@ -0,0 +1,100 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.shell.nushell; +in { + options = { + shell.nushell.enable = + mkEnableOption "enable nushell"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh.enableNushellIntegration = true; + programs.zoxide = { + enable = true; + enableNushellIntegration = true; + }; + programs.carapace = { + enable = true; + enableNushellIntegration = true; + }; + programs.atuin = { + enable = true; + enableNushellIntegration = true; + flags = [ + "--disable-up-arrow" + ]; + }; + programs.nushell = { + enable = true; + environmentVariables = { + CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; + CARAPACE_MATCH = 1; + EDITOR = "hx"; + }; + shellAliases = { + cd = "z"; + cat = "bat"; + l = "ls -l"; + nix-shell = "nix-shell --command nu"; + }; + extraConfig = '' + $env.config = { + show_banner: false + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + + ls: { + use_ls_colors: true + clickable_links: true + } + + rm: { + always_trash: true + } + edit_mode: 'vi' + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "fuzzy" + external: { + enable: true + # max_results: 100 + # completer: $carapace_completer # check 'carapace_completer' + } + } + } + ''; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/shell/oh-my-posh.nix b/hosts/dunamis/users/user/programs/shell/oh-my-posh.nix new file mode 100644 index 0000000..79815ff --- /dev/null +++ b/hosts/dunamis/users/user/programs/shell/oh-my-posh.nix @@ -0,0 +1,106 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.shell.oh-my-posh; +in { + options = { + shell.oh-my-posh.enable = + mkEnableOption "enable oh my posh"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh = { + enable = true; + settings = { + version = 2; + final_space = true; + console_title_template = "{{ .Shell }} in {{ .Folder }}"; + blocks = [ + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "path"; + style = "plain"; + background = "transparent"; + foreground = "blue"; + template = "{{ .Path }}"; + properties = { + style = "full"; + }; + } + { + type = "text"; + style = "plain"; + background = "transparent"; + template = "{{ if .Env.BW_SESSION }} 󰞀{{ end }}"; + } + { + type = "nix-shell"; + style = "plain"; + background = "transparent"; + template = "{{ if ne .Type \"unknown\" }} {{ end }}"; + } + { + type = "git"; + style = "plain"; + foreground = "p:grey"; + background = "transparent"; + template = " {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}"; + properties = { + branch_icon = ""; + commit_icon = "@"; + fetch_status = true; + }; + } + ]; + } + { + type = "rprompt"; + overflow = "hidden"; + segments = [ + { + type = "executiontime"; + style = "plain"; + foreground = "yellow"; + background = "transparent"; + template = "{{ .FormattedMs }}"; + properties = { + threshold = 5000; + }; + } + ]; + } + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "text"; + style = "plain"; + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯"; + } + ]; + } + ]; + transient_prompt = { + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯ "; + }; + secondary_prompt = { + foreground = "magenta"; + background = "transparent"; + template = "❯❯ "; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/shell/zsh.nix b/hosts/dunamis/users/user/programs/shell/zsh.nix new file mode 100644 index 0000000..7f4f53b --- /dev/null +++ b/hosts/dunamis/users/user/programs/shell/zsh.nix @@ -0,0 +1,75 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + zsh.enable = + lib.mkEnableOption "enable z shell"; + }; + config = lib.mkIf config.zsh.enable { + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + initExtra = '' + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + ''; + # promptInit = "oh-my-posh init zsh -c ~/.config/oh-my-posh/zen.toml"; + enableCompletion = true; + autosuggestion.enable = true; + #autosuggestion.highlight = "fg=#ff00ff,bg=cyan,bold,underline"; + shellAliases = { + ls = "eza"; + cat = "bat"; + cd = "z"; + l = "eza -alh"; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + plugins = [ + { + name = "zsh-autosuggestions"; + file = "zsh-autosuggestions.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autocomplete"; + rev = "v0.7.0"; + sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw="; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.8.0"; + sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; + }; + } + { + name = "zsh-history-substring-search"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-history-substring-search"; + rev = "v1.1.0"; + sha256 = "sha256-GSEvgvgWi1rrsgikTzDXokHTROoyPRlU0FVpAoEmXG4="; + }; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsin.fromh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/terminal/ghostty.nix b/hosts/dunamis/users/user/programs/terminal/ghostty.nix new file mode 100644 index 0000000..dba50d1 --- /dev/null +++ b/hosts/dunamis/users/user/programs/terminal/ghostty.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.ghostty; +in { + options = { + terminal.ghostty.enable = mkEnableOption "enable ghostty terminal"; + }; + config = mkIf cfg.enable { + programs.ghostty = { + enable = true; + settings = { + gtk-single-instance = true; + window-decoration = "client"; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/terminal/kitty.nix b/hosts/dunamis/users/user/programs/terminal/kitty.nix new file mode 100644 index 0000000..98f76b6 --- /dev/null +++ b/hosts/dunamis/users/user/programs/terminal/kitty.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.kitty; +in { + options = { + terminal.kitty.enable = + mkEnableOption "enable kitty terminal"; + }; + config = mkIf cfg.enable { + programs.kitty = { + enable = true; + settings = { + tab_bar_edge = "bottom"; + tab_bar_align = "left"; + tab_bar_style = "fade"; + # tab_separator = " "; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/programs/terminal/main.nix b/hosts/dunamis/users/user/programs/terminal/main.nix new file mode 100644 index 0000000..46dc60b --- /dev/null +++ b/hosts/dunamis/users/user/programs/terminal/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./kitty.nix + ./ghostty.nix + ./wezterm.nix + ]; +} diff --git a/hosts/dunamis/users/user/programs/terminal/wezterm.nix b/hosts/dunamis/users/user/programs/terminal/wezterm.nix new file mode 100644 index 0000000..88a83e0 --- /dev/null +++ b/hosts/dunamis/users/user/programs/terminal/wezterm.nix @@ -0,0 +1,90 @@ +{ + config, + inputs, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.terminal.wezterm; +in { + options = { + terminal.wezterm.enable = + mkEnableOption "enable wez's terminal"; + }; + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = inputs.wezterm.packages.${pkgs.system}.default; + extraConfig = '' + local wezterm = require 'wezterm' + local act = wezterm.action + return { + front_end = 'WebGpu', + unix_domains = { + { + name = 'unix', + }, + }, + enable_kitty_graphics = true, + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + use_fancy_tab_bar = false, + inactive_pane_hsb = { + saturation = 0.8, + brightness = 0.7, + }, + -- window_frame = { + -- font = wezterm.font { family = 'Cantarell', weight = 'Bold' }, + -- }, + disable_default_key_bindings = true, + leader = { key = 'Space', mods = 'CTRL', timeout_milliseconds = 2000 }, + keys = { + { key = 'n', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) }, + { key = 'e', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Down', }, + { key = 'u', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Up', }, + { key = 'i', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) }, + { key = 'Enter', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, + { key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, + { key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, + { key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, + { key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, + { key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, + -- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, + { key = 'l', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, + { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, + { key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, + { key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, + { key = 'LeftArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Left' }, + { key = 'RightArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Right' }, + { key = 'UpArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Up' }, + { key = 'DownArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Down' }, + { key = ',', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '.', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = '%', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '"', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = 'n', mods = 'CTRL', action = act.ActivatePaneDirection 'Left', }, + { key = 'i', mods = 'CTRL', action = act.ActivatePaneDirection 'Right', }, + { key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, + { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = false } }, + { key = 'f', mods = 'SHIFT|CTRL', action = act.CloseCurrentPane{ confirm = false } }, + { key = 'b', mods = 'LEADER|CTRL', action = act.SendString '\x02', }, + { key = 'Enter', mods = 'LEADER', action = act.ActivateCopyMode, }, + { key = 'p', mods = 'LEADER', action = act.PasteFrom 'PrimarySelection', }, + { key = 'k', mods = 'SHIFT|CTRL', action = act.Multiple + { + act.ClearScrollback 'ScrollbackAndViewport', + act.SendKey { key = 'L', mods = 'CTRL' }, + }, + }, + { key = 'r', mods = 'LEADER', action = act.ActivateKeyTable { name = 'resize_pane', one_shot = false, }, } + }, + } + ''; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/gnome/main.nix b/hosts/dunamis/users/work/desktop/gnome/main.nix new file mode 100644 index 0000000..36deffe --- /dev/null +++ b/hosts/dunamis/users/work/desktop/gnome/main.nix @@ -0,0 +1,176 @@ +{ + config, + pkgs, + # pkgs-51b85c, + # lib, + ... +}: { + # imports = [./walker.nix]; + # services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + home.packages = with pkgs; [ + nautilus + ghostty + helvum + loupe + evince + junction + celluloid + mission-center + dconf + glib + libnotify + playerctl + # wdisplays + pwvucontrol + wl-clipboard + # polkit_gnome + # libqalculate + #papirus-icon-theme + # gnomeExtensions.alphabetical-app-grid + # gnomeExtensions.appindicator + # gnomeExtensions.caffeine + # gnomeExtensions.pano + # gnomeExtensions.forge + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + # web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + # gtk.enable = true; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + # }; + dconf.settings = { + "io/github/celluloid-player/celluloid" = { + always-use-floating-controls = true; + always-use-floating-header-bar = true; + csd-enable = true; + }; + + "org/gnome/desktop/a11y/applications" = { + screen-reader-enabled = false; + }; + + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + color-scheme = "prefer-dark"; + cursor-blink-time = 1200; + enable-animations = true; + gtk-enable-primary-paste = false; + text-scaling-factor = 1.0; + toolbar-style = "text"; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/wm/keybindings" = { + switch-input-source = ["Escape"]; + switch-input-source-backward = ["Escape"]; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = true; + button-layout = "icon:close"; + }; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + workspaces-only-on-primary = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "forge@jmmaranan.com"]; + night-light-enabled = false; + night-light-schedule-automatic = false; + }; + + "org/gnome/software" = { + download-updates = false; + download-updates-notify = false; + first-run = false; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + + "org/gtk/gtk4/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + sidebar-width = 140; + sort-column = "name"; + sort-directories-first = true; + sort-order = "ascending"; + type-format = "category"; + view-type = "list"; + }; + + "org/gtk/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + show-size-column = true; + show-type-column = true; + sort-column = "name"; + sort-directories-first = false; + sort-order = "ascending"; + type-format = "category"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/jay/i3status-rust-0-33-2.nix b/hosts/dunamis/users/work/desktop/jay/i3status-rust-0-33-2.nix new file mode 100644 index 0000000..911ab42 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/jay/i3status-rust-0-33-2.nix @@ -0,0 +1,68 @@ +# with import {}; # bring all of Nixpkgs into scope +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + makeWrapper, + dbus, + libpulseaudio, + notmuch, + openssl, + ethtool, + lm_sensors, + iw, + iproute2, + withICUCalendar ? false, +}: +rustPlatform.buildRustPackage rec { + pname = "i3status-rust"; + version = "0.33.2"; + + src = fetchFromGitHub { + owner = "greshake"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-xJm4MsEU0OVX401WvKllg3zUwgCvjLxlAQzXE/oD1J0="; + }; + + cargoHash = "sha256-9jbJVnZhFbMYldBkRVSIiorUYDNtF3AAwNEpyNJXpjo="; + + nativeBuildInputs = [pkg-config makeWrapper]; + + buildInputs = [dbus libpulseaudio notmuch openssl lm_sensors]; + + buildFeatures = + [ + "notmuch" + "maildir" + "pulseaudio" + ] + ++ (lib.optionals withICUCalendar ["icu_calendar"]); + + prePatch = '' + substituteInPlace src/util.rs \ + --replace "/usr/share/i3status-rust" "$out/share" + ''; + + postInstall = '' + mkdir -p $out/share + cp -R examples files/* $out/share + ''; + + postFixup = '' + wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [iproute2 ethtool iw]} + ''; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with lib; { + description = "Very resource-friendly and feature-rich replacement for i3status"; + homepage = "https://github.com/greshake/i3status-rust"; + license = licenses.gpl3Only; + mainProgram = "i3status-rs"; + maintainers = with maintainers; [backuitist globin]; + platforms = platforms.linux; + }; +} diff --git a/hosts/dunamis/users/work/desktop/jay/main.nix b/hosts/dunamis/users/work/desktop/jay/main.nix new file mode 100644 index 0000000..f43e043 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/jay/main.nix @@ -0,0 +1,308 @@ +{ + config, + pkgs, + ... +}: { + home.packages = [pkgs.jay]; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + config.jay = { + default = ["gtk"]; + "org.freedesktop.impl.portal.ScreenCast" = ["jay"]; + "org.freedesktop.impl.portal.RemoteDesktop" = ["jay"]; + "org.freedesktop.impl.portal.Inhibit" = ["none"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk4"]; + }; + }; + programs.i3status-rust = { + enable = true; + package = pkgs.callPackage ./i3status-rust-0-33-2.nix {}; + bars = { + default = { + theme = "plain"; + blocks = [ + { + alert = 10.0; + block = "disk_space"; + info_type = "available"; + interval = 60; + path = "/"; + warning = 20.0; + } + { + block = "memory"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; + } + { + block = "cpu"; + interval = 1; + } + { + block = "load"; + format = " $icon $1m "; + interval = 1; + } + { + block = "sound"; + } + { + block = "time"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; + interval = 60; + } + ]; + }; + }; + }; + programs.i3status = { + enable = true; + enableDefault = true; + general = { + output_format = "i3bar"; + interval = 1; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 0; + vertical-pad = 0; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + + xdg.configFile.jay = { + target = "jay/config.toml"; + recursive = true; + source = (pkgs.formats.toml {}).generate "jay-config" { + keymap = '' + xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)" }; + }; + ''; + on-graphics-initialized = [ + # { + # type = "exec"; + # exec = "mako"; + # } + { + type = "exec"; + exec = "~/wl-tray-bridge/target/release/wl-tray-bridge"; + } + ]; + outputs = [ + { + match.connector = "eDP-1"; + scale = 1.2; + } + ]; + vrr = { + mode = "always"; + cursor-hz = 75; + }; + repeat-rate = { + rate = 50; + delay = 200; + }; + theme = { + bg-color = "#${config.lib.stylix.colors.base00}"; + bar-bg-color = "#${config.lib.stylix.colors.base00}"; + border-color = "#${config.lib.stylix.colors.base0D}"; + separator-color = "#${config.lib.stylix.colors.base01}"; + bar-status-text-color = "#${config.lib.stylix.colors.base05}"; + focused-title-text-color = "#${config.lib.stylix.colors.base07}"; + focused-title-bg-color = "#${config.lib.stylix.colors.base00}"; + focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}"; + focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}"; + unfocused-title-text-color = "#${config.lib.stylix.colors.base03}"; + unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}"; + attention-requested-bg-color = "#${config.lib.stylix.colors.base09}"; + font = "${config.stylix.fonts.sansSerif.name}"; + border-width = 2; + title-height = 24; + }; + status = { + format = "pango"; + exec = ["i3status-rs" "config-default"]; + }; + window-management-key = "Super_L"; + shortcuts = let + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + "logo-${left}" = "focus-left"; + "logo-${down}" = "focus-down"; + "logo-${up}" = "focus-up"; + "logo-${right}" = "focus-right"; + "logo-shift-${left}" = "move-left"; + "logo-shift-${down}" = "move-down"; + "logo-shift-${up}" = "move-up"; + "logo-shift-${right}" = "move-right"; + logo-d = "split-horizontal"; + logo-v = "split-vertical"; + logo-t = "toggle-split"; + logo-m = "toggle-mono"; + logo-shift-m = "toggle-fullscreen"; + logo-f = "focus-parent"; + logo-q = "close"; + logo-shift-f = "toggle-floating"; + alt-Return = { + type = "exec"; + exec = "wezterm"; + }; + logo-space = { + type = "exec"; + exec = "fuzzel"; + }; + logo-ctrl-q = "quit"; + logo-shift-r = "reload-config-toml"; + ctrl-alt-F1 = { + type = "switch-to-vt"; + num = 1; + }; + ctrl-alt-F2 = { + type = "switch-to-vt"; + num = 2; + }; + ctrl-alt-F3 = { + type = "switch-to-vt"; + num = 3; + }; + ctrl-alt-F4 = { + type = "switch-to-vt"; + num = 4; + }; + ctrl-alt-F5 = { + type = "switch-to-vt"; + num = 5; + }; + ctrl-alt-F6 = { + type = "switch-to-vt"; + num = 6; + }; + ctrl-alt-F7 = { + type = "switch-to-vt"; + num = 7; + }; + ctrl-alt-F8 = { + type = "switch-to-vt"; + num = 8; + }; + ctrl-alt-F9 = { + type = "switch-to-vt"; + num = 9; + }; + ctrl-alt-F10 = { + type = "switch-to-vt"; + num = 10; + }; + ctrl-alt-F11 = { + type = "switch-to-vt"; + num = 11; + }; + ctrl-alt-F12 = { + type = "switch-to-vt"; + num = 12; + }; + logo-1 = { + type = "show-workspace"; + name = "1"; + }; + logo-2 = { + type = "show-workspace"; + name = "2"; + }; + logo-3 = { + type = "show-workspace"; + name = "3"; + }; + logo-4 = { + type = "show-workspace"; + name = "4"; + }; + logo-5 = { + type = "show-workspace"; + name = "5"; + }; + logo-6 = { + type = "show-workspace"; + name = "6"; + }; + logo-7 = { + type = "show-workspace"; + name = "7"; + }; + logo-8 = { + type = "show-workspace"; + name = "8"; + }; + logo-9 = { + type = "show-workspace"; + name = "9"; + }; + logo-0 = { + type = "show-workspace"; + name = "10"; + }; + logo-shift-1 = { + type = "move-to-workspace"; + name = "1"; + }; + logo-shift-2 = { + type = "move-to-workspace"; + name = "2"; + }; + logo-shift-3 = { + type = "move-to-workspace"; + name = "3"; + }; + logo-shift-4 = { + type = "move-to-workspace"; + name = "4"; + }; + logo-shift-5 = { + type = "move-to-workspace"; + name = "5"; + }; + logo-shift-6 = { + type = "move-to-workspace"; + name = "6"; + }; + logo-shift-7 = { + type = "move-to-workspace"; + name = "7"; + }; + logo-shift-8 = { + type = "move-to-workspace"; + name = "8"; + }; + logo-shift-9 = { + type = "move-to-workspace"; + name = "9"; + }; + logo-shift-0 = { + type = "move-to-workspace"; + name = "10"; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/plasma/main.nix b/hosts/dunamis/users/work/desktop/plasma/main.nix new file mode 100644 index 0000000..4ad1def --- /dev/null +++ b/hosts/dunamis/users/work/desktop/plasma/main.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + # lib, + ... +}: { + #imports = [ ]; + stylix.targets.kde.enable = true; + home.packages = with pkgs; [ + noto-fonts-emoji + base16-schemes + wl-clipboard-rs + pwvucontrol + adw-gtk3 + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/fuzzel.nix b/hosts/dunamis/users/work/desktop/river/fuzzel.nix new file mode 100644 index 0000000..22a4ffe --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/main.nix b/hosts/dunamis/users/work/desktop/river/main.nix new file mode 100644 index 0000000..6812f46 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/main.nix @@ -0,0 +1,310 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [ + ./niri.nix + ./wofi.nix + ./fuzzel.nix + ./waybar.nix + ./swaync.nix + ./swayidle.nix + ./swaylock.nix + ./wlsunset.nix + ./udiskie.nix + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Blue"; + size = 24; + }; + image = ../wallpapers/wallhaven-5g9ed8.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 12; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Papirus-Dark"; + }; + }; + + fuzzel.enable = true; + waybar.enable = true; + swaync.enable = false; + wlsunset.enable = true; + component.swaylock.enable = true; + swayidle.enable = true; + udiskie.enable = true; + imv.enable = true; + + services.gnome-keyring.enable = true; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + corners = "top-right,bottom-left"; + offset = "45x5"; + origin = "top-right"; + timeout = 15; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + home.packages = with pkgs; [ + dconf + glib + wbg + swayidle + swaylock-effects + libnotify + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + xwayland-satellite + papirus-icon-theme + #libsForQt5.qt5ct + #kdePackages.qt6ct + #libsForQt5.qtstyleplugin-kvantum + #kdePackages.qtstyleplugin-kvantum + #adwaita-qt + #adwaita-qt6 + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.configFile = { + #niri = { + # recursive = true; + # source = dotfiles/niri; + #}; + #qt5ct = { + # recursive = true; + # source = dotfiles/qt5ct; + #}; + #qt6ct = { + # recursive = true; + # source = dotfiles/qt6ct; + #}; + #Kvantum = { + # recursive = true; + # source = dotfiles/Kvantum; + #}; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + # Service = { + # Type = "dbus"; + # ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wbg = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.wbg}/bin/wbg ${config.stylix.image}"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + swayidle = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + + xwayland-satellite = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/swayidle.nix b/hosts/dunamis/users/work/desktop/river/swayidle.nix new file mode 100644 index 0000000..7c1f7ac --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/swayidle.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + swayidle.enable = + lib.mkEnableOption "enable swayidle"; + }; + config = lib.mkIf config.swayidle.enable { + services.swayidle = { + enable = true; + systemdTarget = "graphical-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + { + timeout = 600; + command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/swaylock.nix b/hosts/dunamis/users/work/desktop/river/swaylock.nix new file mode 100644 index 0000000..ce939d9 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/swaylock.nix @@ -0,0 +1,30 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.swaylock.enable = + lib.mkEnableOption "enable swaylock"; + }; + config = lib.mkIf config.component.swaylock.enable { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + font = "${config.stylix.fonts.serif.name}"; + font-size = 25; + indicator-radius = 100; + indicator-thickness = 20; + indicator-idle-visible = true; + + # -effect section + screenshots = true; + clock = true; + effect-pixelate = 60; + effect-vignette = "0.5:0.5"; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/udiskie.nix b/hosts/dunamis/users/work/desktop/river/udiskie.nix new file mode 100644 index 0000000..be28f82 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/udiskie.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: { + options = { + udiskie.enable = + lib.mkEnableOption "enable udiskie"; + }; + config = lib.mkIf config.udiskie.enable { + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/waybar.nix b/hosts/dunamis/users/work/desktop/river/waybar.nix new file mode 100644 index 0000000..2b5d93e --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/waybar.nix @@ -0,0 +1,418 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + waybar.enable = + lib.mkEnableOption "enable waybar"; + }; + config = lib.mkIf config.waybar.enable { + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 48; + margin-right = 48; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/niri" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/niri" = { + orientation = "inherit"; + modules = [ + "niri/language" + "niri/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.3em; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: #ed8796; + color: #181926; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: #ed8796; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: #b7bdf8; + color: #000000; + } + + #power-profiles-daemon.power-saver { + background-color: #8aadf4; + color: #000000; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/river/wlsunset.nix b/hosts/dunamis/users/work/desktop/river/wlsunset.nix new file mode 100644 index 0000000..aa4ec97 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/river/wlsunset.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: { + options = { + wlsunset.enable = + lib.mkEnableOption "enable wlsunset"; + }; + config = lib.mkIf config.wlsunset.enable { + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/sway/chrome-backlight.nix b/hosts/dunamis/users/work/desktop/sway/chrome-backlight.nix new file mode 100644 index 0000000..b658e07 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/sway/chrome-backlight.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + programs.waybar.settings.bar-0."custom/kbd-backlight" = lib.mkDefault { + exec = "cat /sys/class/leds/chromeos::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/chromeos::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/chromeos::kbd_backlight -U 5%"; + }; +} diff --git a/hosts/dunamis/users/work/desktop/sway/fuzzel.nix b/hosts/dunamis/users/work/desktop/sway/fuzzel.nix new file mode 100644 index 0000000..ecefcd0 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/sway/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/sway/hyprlock.nix b/hosts/dunamis/users/work/desktop/sway/hyprlock.nix new file mode 100644 index 0000000..229519e --- /dev/null +++ b/hosts/dunamis/users/work/desktop/sway/hyprlock.nix @@ -0,0 +1,104 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.hyprlock.enable = + lib.mkEnableOption "enable hyprlock"; + }; + config = lib.mkIf config.component.hyprlock.enable { + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/sway/main-scroller.nix b/hosts/dunamis/users/work/desktop/sway/main-scroller.nix new file mode 100644 index 0000000..ea13cdc --- /dev/null +++ b/hosts/dunamis/users/work/desktop/sway/main-scroller.nix @@ -0,0 +1,917 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [../theming/gruvbox.nix]; + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.plugins = ["${pkgs.hyprlandPlugins.hyprscroller}/lib/libhyprscroller.so"]; + wayland.windowManager.hyprland.settings = { + input = { + kb_layout = "us,ua"; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + monitor = [ + ", preferred, auto, 1" + "eDP-1, preferred, auto, 1.2" + ]; + env = [ + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,gtk3" + ]; + decoration = { + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "kitty"; + "$screenLocker" = "hyprlock"; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + gaps_in = 4; + gaps_out = 4; + border_size = 4; + allow_tearing = true; + layout = "scroller"; + }; + + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, fuzzel" + "$mod, Escape, exec, hyprctl switchxkblayout all next" + "$mod, M, scroller:fitsize, active" + "$mod, K, scroller:cyclesize" + "$modCtrl, H, killactive" + "$modCtrl, M, fullscreen" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + + ", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/" + "CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/" + "SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/" + # navigation + #"$modCtrl, N," + "$mod, $left, scroller:movefocus, l" + "$mod, $down, scroller:movefocus, d" + "$mod, $up, scroller:movefocus, u" + "$mod, $right, scroller:movefocus, r" + "$modshift, $left, workspace, e-1" + "$modshift, $right, workspace, e+1" + "$mod, left, scroller:movefocus, l" + "$mod, up, scroller:movefocus, u" + "$mod, down, scroller:movefocus, d" + "$mod, right, scroller:movefocus, r" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + + "$modCtrl, $left, scroller:movewindow, l" + "$modCtrl, $down, scroller:movewindow, d" + "$modCtrl, $up, scroller:movewindow, u" + "$modCtrl, $right, scroller:movewindow, r" + "$modCtrl, left, scroller:movewindow, l" + "$modCtrl, up, scroller:movewindow, u" + "$modCtrl, down, scroller:movewindow, d" + "$modCtrl, right, scroller:movewindow, r" + # workspaces + "$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" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, 10" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + ]; + binde = [ + "$mod, comma, resizeactive, -10 0" + "$mod, period, resizeactive, 10 0" + "$modShift, comma, resizeactive, 0 -10" + "$modShift, period, resizeactive, 0 10" + ]; + bindl = [ + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, auto, preferred, 1.2'" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modCtrl, Escape, exit" + ]; + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 500; + }; + windowrulev2 = [ + "float, class:(com.github.hluk.copyq)" + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + ]; + }; + + services.hyprpaper = { + enable = true; + }; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 600; + on-timeout = "hyprlock"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["gitea-local"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 8; + margin-right = 8; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/hypr" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "hyprland/workspaces" = { + format = "{id}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "hyprland/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/hypr" = { + orientation = "inherit"; + modules = [ + "hyprland/language" + "hyprland/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0E; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base08; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + #corners = "top-right,bottom-left"; + offset = "12x12"; + origin = "top-right"; + timeout = 15; + frame_width = 4; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + + home.packages = with pkgs; [ + dconf + glib + grimblast + grim + slurp + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + papirus-icon-theme + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/sway/main.nix b/hosts/dunamis/users/work/desktop/sway/main.nix new file mode 100644 index 0000000..4adf6c7 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/sway/main.nix @@ -0,0 +1,922 @@ +{ + config, + pkgs, + # pkgs-51b85c, + lib, + ... +}: { + # imports = [./walker.nix]; + stylix.targets.sway.enable = true; + wayland.windowManager.sway = { + enable = true; + systemd.enable = true; + # xwayland.enable = false; + wrapperFeatures.gtk = true; + config = let + modifier = "Mod4"; + terminal = "wezterm"; + launcher = "fuzzel"; + clipboard = "copyq toggle"; + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + bars = [ + { + command = "${pkgs.waybar}/bin/waybar"; + } + ]; + + modifier = "${modifier}"; + terminal = "${terminal}"; + menu = "${launcher}"; + + left = "${left}"; + down = "${down}"; + up = "${up}"; + right = "${right}"; + + workspaceLayout = "tabbed"; + + input = { + "*" = { + xkb_layout = "us,ua"; + repeat_delay = "200"; + repeat_rate = "50"; + accel_profile = "flat"; + }; + "type:touchpad" = { + tap = "enabled"; + scroll_method = "two_finger"; + }; + }; + output = { + "Samsung Electric Company S24R65x H4TMA03291" = { + mode = "1920x1080@74.973Hz"; + pos = "0 0"; + adaptive_sync = "on"; + allow_tearing = "yes"; + max_render_time = "off"; + }; + "AOC 27V2G5 0x0000026C" = { + pos = "1920 0"; + }; + }; + keybindings = lib.mkForce { + "${modifier}+Ctrl+q" = "kill"; + "${modifier}+Ctrl+Escape" = "exit"; + "${modifier}+Ctrl+r" = "reload"; + + "${modifier}+Ctrl+${left}" = "move left"; + "${modifier}+Ctrl+${down}" = "move down"; + "${modifier}+Ctrl+${up}" = "move up"; + "${modifier}+Ctrl+${right}" = "move right"; + "${modifier}+Ctrl+left" = "move left"; + "${modifier}+Ctrl+down" = "move down"; + "${modifier}+Ctrl+up" = "move up"; + "${modifier}+Ctrl+right" = "move right"; + "${modifier}+Ctrl+1" = "move window workspace 1"; + "${modifier}+Ctrl+2" = "move window workspace 2"; + "${modifier}+Ctrl+3" = "move window workspace 3"; + "${modifier}+Ctrl+4" = "move window workspace 4"; + "${modifier}+Ctrl+5" = "move window workspace 5"; + "${modifier}+Ctrl+6" = "move window workspace 6"; + "${modifier}+Ctrl+7" = "move window workspace 7"; + "${modifier}+Ctrl+8" = "move window workspace 8"; + "${modifier}+Ctrl+9" = "move window workspace 9"; + "${modifier}+Ctrl+0" = "move window workspace 10"; + "${modifier}+Ctrl+l" = "move window workspace prev"; + "${modifier}+Ctrl+y" = "move window workspace next"; + + "${modifier}+Shift+${left}" = "focus output left"; + "${modifier}+Shift+${down}" = "focus output down"; + "${modifier}+Shift+${up}" = "focus output up"; + "${modifier}+Shift+${right}" = "focus output right"; + "${modifier}+Shift+left" = "focus output left"; + "${modifier}+Shift+down" = "focus output down"; + "${modifier}+Shift+up" = "focus output up"; + "${modifier}+Shift+right" = "focus output right"; + + "${modifier}+Return" = "exec ${terminal}"; + "${modifier}+Shift+v" = "exec ${clipboard}"; + "${modifier}+Space" = "exec ${launcher}"; + + "${modifier}+c" = "splith"; + "${modifier}+d" = "splitv"; + "${modifier}+s" = "layout toggle split"; + "${modifier}+t" = "layout tabbed"; + "${modifier}+h" = "focus mode_toggle"; + "${modifier}+f" = "floating toggle"; + "${modifier}+m" = "fullscreen toggle"; + "${modifier}+g" = "sticky toggle"; + "${modifier}+b" = "bar mode toggle"; + + "--locked ${modifier}+Escape" = "exec swaymsg input \"*\" xkb_switch_layout next"; + "Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -o -r -c '#ff0000ff')" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ~/pics/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png''; + + "${modifier}+1" = "workspace 1"; + "${modifier}+2" = "workspace 2"; + "${modifier}+3" = "workspace 3"; + "${modifier}+4" = "workspace 4"; + "${modifier}+5" = "workspace 5"; + "${modifier}+6" = "workspace 6"; + "${modifier}+7" = "workspace 7"; + "${modifier}+8" = "workspace 8"; + "${modifier}+9" = "workspace 9"; + "${modifier}+0" = "workspace 10"; + "${modifier}+l" = "workspace prev"; + "${modifier}+y" = "workspace next"; + + "${modifier}+${left}" = "focus left"; + "${modifier}+${down}" = "focus down"; + "${modifier}+${up}" = "focus up"; + "${modifier}+${right}" = "focus right"; + "${modifier}+left" = "focus left"; + "${modifier}+down" = "focus down"; + "${modifier}+up" = "focus up"; + "${modifier}+right" = "focus right"; + }; + window = { + border = 1; + # hideEdgeBorders = "smart"; + }; + gaps = { + # top = 6; + # bottom = 6; + # left = 6; + # right = 6; + outer = 6; + inner = 3; + }; + floating.criteria = [ + { + app_id = "com.github.hluk.copyq"; + } + { + app_id = "com.saivert.pwvucontrol"; + } + ]; + }; + }; + programs.swaylock.enable = true; + services.swayidle = { + enable = true; + systemdTarget = "sway-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock}/bin/swaylock -fF"; + } + { + timeout = 301; + command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; + resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; + } + ]; + events = [ + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF &&"; + } + { + event = "unlock"; + command = "${pkgs.procps}/bin/pkill -SIGUSR1 swaylock"; + } + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF & ${pkgs.playerctl}/bin/playerctl pause"; + } + ]; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services = { + network-manager-applet.enable = true; + blueman-applet.enable = true; + copyq.enable = true; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + # systemd = { + # enable = true; + # target = "graphical-session.target"; + # }; + settings = { + bar-0 = { + ipc = true; + id = "bar-0"; + layer = "top"; + position = "bottom"; + height = 32; + spacing = 6; + # margin-top = 8; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/sway" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + "privacy" + "tray" + "wireplumber" + # "group/laptop" + "idle_inhibitor" + ]; + "sway/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "I"; + "2" = "II"; + "3" = "III"; + "4" = "IV"; + "5" = "V"; + "6" = "VI"; + "7" = "VII"; + "8" = "IIX"; + "9" = "IX"; + "10" = "X"; + #focused = "󰗝"; + #active = "󰻃"; + #default = "󰄰"; + }; + }; + "sway/language" = { + format = "{flag}"; + tooltip-format = "{long}"; + on-click = "swaymsg input type:keyboard xkb_switch_layout next"; + }; + "group/sway" = { + orientation = "inherit"; + modules = [ + "sway/language" + "sway/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "custom/backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + # "custom/backlight" = { + # format = "{}% {icon}"; + # interval = 1; + # format-icons = ["󰃠"]; + # }; + # "custom/kbd-backlight" = { + # exec = "brightnessctl s 5%+"; + # interval = 1; + # format = "{}% {icon}"; + # format-icons = ["󰌌"]; + # on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; + # on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; + # }; + # battery = { + # states = { + # good = 95; + # warning = 30; + # critical = 15; + # }; + # format = "{capacity}% {icon}"; + # format-full = "{capacity}% 󱟢"; + # format-charging = "{capacity}% 󰂄"; + # format-plugged = "{capacity}% 󰚥"; + # format-alt = "{icon} {time}"; + # format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + # }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + # "power-profiles-daemon" = { + # format = "{icon}"; + # tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + # tooltip = true; + # format-icons = { + # default = "󱡮"; + # performance = "󱡮"; + # balanced = ""; + # power-saver = ""; + # }; + # }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + window#waybar { + background-color: @base00; + border: 1px solid @base0D; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + .modules-left, + .modules-center, + .modules-right { + padding: 1px; + margin-left: 4px; + margin-right: 4px; + } + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.5em; + color: @base05; + background-color: @base00; + } + + /* #upower, + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.5em; + } */ + + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.focused, + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base0D; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0B; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base0A; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.rofi = { + enable = true; + theme = { + window = { + height = 360; + border = 3; + }; + + inputbar = { + children = ["prompt" "entry"]; + border-radius = 5; + padding = 2; + }; + + prompt = { + padding = 6; + border-radius = 3; + margin = "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "~>"; + }; + + entry = { + padding = 6; + margin = "20px 0px 0px 10px"; + }; + + listview = { + border = "0px 0px 0px"; + padding = "6px 0px 0px"; + margin = "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = 5; + }; + + element-icon = { + size = 25; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = 10; + vertical-align = "0.5"; + horizontal-align = "0.5"; + }; + + message = { + margin = 2; + padding = 2; + border-radius = 5; + }; + + textbox = { + padding = 6; + margin = "20 0 0 20"; + }; + }; + extraConfig = { + show-icons = true; + modi = "run,drun,window"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 8; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 2; + radius = 4; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 4; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "bottom-right"; + timeout = 15; + frame_width = 2; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + # services.flameshot = { + # enable = true; + # settings = { + # General = { + # buttons = "@Variant(000x7f000vQList0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)"; + # filenamePattern = "screenshot-%F_%H-%M-%S"; + # saveAsFileExtension = "png"; + # savePath = "/home/user/pics/screenshots"; + # uiColor = "#${config.lib.stylix.colors.base0D}"; + # showStartupLaunchMessage = false; + # showDesktopNotification = false; + # showHelp = false; + # }; + # }; + # }; + home.packages = with pkgs; [ + nautilus + helvum + loupe + evince + celluloid + mission-center + dconf + glib + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + libqalculate + #papirus-icon-theme + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + }; + }; + + systemd.user.settings.Manager.DefaultEnvironment = { + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # # }; + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + # walker = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # xwayland-satellite = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["niri.service"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/atelier-estuary.nix b/hosts/dunamis/users/work/desktop/theming/atelier-estuary.nix new file mode 100644 index 0000000..71f38c2 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/atelier-estuary.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-estuary.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-ne3v2r.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool-light.nix b/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool-light.nix new file mode 100644 index 0000000..23fc859 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool-light.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml"; + polarity = "light"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-m37gy8.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Light"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool.nix b/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool.nix new file mode 100644 index 0000000..86e39f1 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/atelier-sulphurpool.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-7p3vy9.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/ayu-dark.nix b/hosts/dunamis/users/work/desktop/theming/ayu-dark.nix new file mode 100644 index 0000000..6ae2a19 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/ayu-dark.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-exj8pw.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/ayu-mirage.nix b/hosts/dunamis/users/work/desktop/theming/ayu-mirage.nix new file mode 100644 index 0000000..3bb367d --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/ayu-mirage.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-mirage.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-wexo3x.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/catppuccin-macchiato.nix b/hosts/dunamis/users/work/desktop/theming/catppuccin-macchiato.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/catppuccin-macchiato.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/dracula.nix b/hosts/dunamis/users/work/desktop/theming/dracula.nix new file mode 100644 index 0000000..e861468 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/dracula.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/gruvbox.nix b/hosts/dunamis/users/work/desktop/theming/gruvbox.nix new file mode 100644 index 0000000..546ddff --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/gruvbox.nix @@ -0,0 +1,71 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + gruvbox-plus-icons + (nerdfonts.override {fonts = ["FantasqueSansMono" "Ubuntu" "UbuntuSans"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.capitaine-cursors-themed; + name = "Capitaine Cursors (Gruvbox)"; + size = 24; + }; + image = ../wallpapers/wallhaven-qze297.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Gruvbox-Plus-Dark"; + package = pkgs.gruvbox-plus-icons; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Gruvbox-Plus-Dark"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/heetch.nix b/hosts/dunamis/users/work/desktop/theming/heetch.nix new file mode 100644 index 0000000..5ae05f1 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/heetch.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Red"; + size = 24; + }; + image = ../wallpapers/wallhaven-9mdqgd.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/heetchduck.nix b/hosts/dunamis/users/work/desktop/theming/heetchduck.nix new file mode 100644 index 0000000..8037eea --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/heetchduck.nix @@ -0,0 +1,55 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../../../../../../wallpapers/wallhaven-o5p5ql.jpg; + # image = null; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + base08 = "e33400"; + base09 = "e39400"; + base0A = "f2ce00"; + base0B = "5ccc96"; + base0C = "00a3cc"; + base0D = "7a5ccc"; + base0E = "b3a1e6"; + base0F = "ce6f8f"; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/outrun-dark.nix b/hosts/dunamis/users/work/desktop/theming/outrun-dark.nix new file mode 100644 index 0000000..6364ec1 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/outrun-dark.nix @@ -0,0 +1,76 @@ +{ + # config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/outrun-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-o5p5ql.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + # stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + # }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/rose-pine-moon.nix b/hosts/dunamis/users/work/desktop/theming/rose-pine-moon.nix new file mode 100644 index 0000000..455ef3d --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/rose-pine-moon.nix @@ -0,0 +1,74 @@ +{ + config, + pkgs, + ... +}: { + fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + polarity = "dark"; + cursor = { + # package = pkgs.bibata-cursors-translucent; + package = pkgs.rose-pine-cursor; + name = "BreezeX-RosePineDawn-Linux"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + name = "rose-pine-moon"; + package = pkgs.rose-pine-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/selenized-black.nix b/hosts/dunamis/users/work/desktop/theming/selenized-black.nix new file mode 100644 index 0000000..adfa2e6 --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/selenized-black.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-vml6j5.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/desktop/theming/solarized.nix b/hosts/dunamis/users/work/desktop/theming/solarized.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/dunamis/users/work/desktop/theming/solarized.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/dunamis/users/work/home-configuration.nix b/hosts/dunamis/users/work/home-configuration.nix new file mode 100644 index 0000000..15e1f07 --- /dev/null +++ b/hosts/dunamis/users/work/home-configuration.nix @@ -0,0 +1,17 @@ +{inputs, ...}: { + imports = with inputs; [ + nix-flatpak.homeManagerModules.nix-flatpak + nixvim.homeManagerModules.nixvim + walker.homeManagerModules.default + self.homeModules.desktop + ./programs.nix + ]; + home = { + stateVersion = "25.05"; + sessionPath = [ + "$HOME/.local/bin" + ]; + }; + desktop.plasma.enable = true; + # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; +} diff --git a/hosts/dunamis/users/work/programs.nix b/hosts/dunamis/users/work/programs.nix new file mode 100644 index 0000000..b705e1a --- /dev/null +++ b/hosts/dunamis/users/work/programs.nix @@ -0,0 +1,41 @@ +{pkgs, ...}: { + imports = [./programs/main.nix]; + + shell = { + nushell.enable = true; + oh-my-posh.enable = true; + }; + + console.yazi.enable = true; + + programs = { + bat.enable = true; + eza.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + gitui.enable = true; + }; + + terminal = { + ghostty.enable = true; + kitty.enable = true; + }; + + editor = { + helix.enable = true; + neve.enable = true; + }; + + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + tree + zip + unzip + ]; +} diff --git a/hosts/dunamis/users/work/programs/console.nix b/hosts/dunamis/users/work/programs/console.nix new file mode 100644 index 0000000..dc72295 --- /dev/null +++ b/hosts/dunamis/users/work/programs/console.nix @@ -0,0 +1,23 @@ +{ + # config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + eza + tree + speedtest-rs + zip + unzip + execline + fastfetch + alejandra + uutils-coreutils-noprefix + ]; +} diff --git a/hosts/dunamis/users/work/programs/console/yazi.nix b/hosts/dunamis/users/work/programs/console/yazi.nix new file mode 100644 index 0000000..274d52d --- /dev/null +++ b/hosts/dunamis/users/work/programs/console/yazi.nix @@ -0,0 +1,88 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.console.yazi; +in { + options = { + console.yazi.enable = + mkEnableOption "enable yazi file manager"; + }; + config = mkIf cfg.enable { + programs.yazi = { + enable = true; + enableNushellIntegration = true; + settings = { + opener = { + open = [ + { + run = "xdg-open \"$@\""; + orphan = true; + desc = "Open"; + } + ]; + edit = [ + { + run = "$EDITOR \"$@\""; + block = true; + desc = "Edit"; + } + ]; + dragdrop = [ + { + run = "${pkgs.ripdrag}/bin/ripdrag \"$@\""; + desc = "Drag'n'drop"; + orphan = true; + for = "unix"; + } + ]; + }; + open.rules = [ + { + mime = "text/*"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.toml"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.c"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.cpp"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.rs"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.py"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.json"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*"; + use = ["open" "edit" "dragdrop"]; + } + ]; + }; + keymap = { + manager.append_keymap = [ + { + on = [""]; + run = ''shell '${pkgs.ripdrag}/bin/ripdrag -x "$@"' --confirm''; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/editor/helix.nix b/hosts/dunamis/users/work/programs/editor/helix.nix new file mode 100644 index 0000000..6fa013e --- /dev/null +++ b/hosts/dunamis/users/work/programs/editor/helix.nix @@ -0,0 +1,122 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.editor.helix; +in { + options = { + editor.helix.enable = + mkEnableOption "enable helix editor"; + }; + config = mkIf cfg.enable { + programs.helix = { + enable = true; + defaultEditor = true; + settings = { + editor = { + line-number = "relative"; + bufferline = "multiple"; + cursorline = true; + lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + statusline = { + left = ["mode" "spinner" "version-control"]; + center = ["file-name"]; + right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"]; + separator = "|"; + }; + soft-wrap = { + enable = true; + max-wrap = 25; + max-indent-retain = 0; + wrap-indicator = ""; + }; + }; + keys.normal = { + space = { + space = "file_picker"; + w = ":w"; + q = ":q"; + x = ":x"; + n = ":n"; + "," = "goto_previous_buffer"; + "." = "goto_next_buffer"; + l = ":reflow"; + }; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + languages = { + language-server = { + clangd = { + command = "${pkgs.clang-tools}/bin/clangd"; + }; + rust-analyzer = { + command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + }; + texlab = { + command = "${pkgs.texlab}/bin/texlab"; + }; + nil = { + command = "${pkgs.nil}/bin/nil"; + }; + markdown-oxide = { + command = "${pkgs.markdown-oxide}/bin/markdown-oxide"; + }; + tinymist = { + command = lib.getExe pkgs.tinymist; + }; + }; + language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.alejandra}/bin/alejandra"; + language-servers = ["nil"]; + } + { + name = "latex"; + auto-format = true; + formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent"; + language-servers = ["texlab"]; + } + { + name = "typst"; + auto-format = true; + formatter.command = lib.getExe pkgs.typstyle; + language-servers = ["tinymist"]; + } + { + name = "markdown"; + auto-format = true; + formatter.command = "${pkgs.comrak}/bin/comrak"; + language-servers = ["markdown-oxide"]; + } + { + name = "c"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "cpp"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "rust"; + auto-format = true; + language-servers = ["rust-analyzer"]; + formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; + } + ]; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/editor/main.nix b/hosts/dunamis/users/work/programs/editor/main.nix new file mode 100644 index 0000000..2838df3 --- /dev/null +++ b/hosts/dunamis/users/work/programs/editor/main.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./helix.nix + ./zed.nix + ./neve.nix + #./nixvim.nix + ]; +} diff --git a/hosts/dunamis/users/work/programs/editor/neve.nix b/hosts/dunamis/users/work/programs/editor/neve.nix new file mode 100644 index 0000000..6477381 --- /dev/null +++ b/hosts/dunamis/users/work/programs/editor/neve.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: +with lib; let + cfg = config.editor.neve; +in { + options = { + editor.neve.enable = + mkEnableOption "enable neve neovim distribution"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + neovide + cpplint + statix + ]; + programs.nixvim = { + enable = true; + imports = [inputs.neve.nixvimModule]; + viAlias = true; + vimAlias = true; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/editor/nixvim.nix b/hosts/dunamis/users/work/programs/editor/nixvim.nix new file mode 100644 index 0000000..70511ce --- /dev/null +++ b/hosts/dunamis/users/work/programs/editor/nixvim.nix @@ -0,0 +1,270 @@ +{ + pkgs, + pkgs-51b85c, + lib, + config, + ... +}: { + options = { + editor.neovim.enable = + lib.mkEnableOption "enable neovim text editor"; + }; + config = lib.mkIf config.editors.neovim.enable { + # stylix.targets.nixvim.enable = true; + home.packages = with pkgs; [neovide]; + programs.nixvim = { + enable = true; + enableMan = true; + # package = ; + plugins.lualine.enable = true; + plugins.treesitter = { + enable = true; + folding = true; + }; + plugins = { + yazi.enable = true; + noice = { + enable = true; + popupmenu.backend = "nui"; + }; + notify.enable = true; + telescope.enable = true; + transparent.enable = true; + lsp-format.enable = true; + lsp-lines.enable = true; + lsp-status.enable = true; + which-key.enable = true; + web-devicons.enable = true; + + # vimtex = { + # enable = true; + # texlivePackage = pkgs.tectonic; #pkgs.texlive.combined.scheme-full; + # settings = { + # compiler_method = "tectonic"; + # view_method = "zathura_simple"; + # compiler_tectonic = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "--synctex" + # "--keep-logs" + # "-Z shell-escape" + # "-Z continue-on-errors" + # ]; + # }; + # compiler_latexmk = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "-xelatex" + # "-recorder" + # "-file-line-error" + # "-synctex=1" + # "-interaction=nonstopmode" + # "-shell-escape" + # ]; + # }; + # }; + # }; + treesitter-textobjects.enable = true; + cmp-latex-symbols.enable = true; + dap.enable = true; + rustaceanvim.enable = true; + lsp = { + enable = true; + servers = { + clangd.enable = true; + #rust_analyzer = { + # enable = true; + # installRustc = true; + # installCargo = true; + #}; + lua_ls.enable = true; + nil_ls.enable = true; + }; + }; + }; + plugins = { + cmp-nvim-lsp = {enable = true;}; # lsp + cmp-buffer = {enable = true;}; + cmp-path = {enable = true;}; # file system paths + cmp_luasnip = {enable = true;}; # snippets + cmp-cmdline = {enable = true;}; # autocomplete for cmdline + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + ]; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + experimental = { + ghost_text = true; + }; + }; + }; + luasnip = { + enable = true; + settings = { + enable_autosnippets = true; + store_selection_keys = ""; + }; + }; + }; + clipboard = { + providers.wl-copy.enable = true; + }; + + globals.mapleader = " "; + globals.maplocalleader = ","; + + opts = { + # Show line numbers + number = true; + + # Show relative line numbers + relativenumber = true; + + # Use the system clipboard + clipboard = "unnamedplus"; + + # Number of spaces that represent a + tabstop = 2; + softtabstop = 2; + + # Show tabline always + showtabline = 2; + + # Use spaces instead of tabs + expandtab = true; + + # Enable smart indentation + smartindent = true; + + # Number of spaces to use for each step of (auto)indent + shiftwidth = 2; + + # Enable break indent + breakindent = true; + + # Highlight the screen line of the cursor + cursorline = true; + + # Minimum number of screen lines to keep above and below the cursor + scrolloff = 8; + + # Enable mouse support + mouse = "a"; + + # Set folding method to manual + foldmethod = "manual"; + + # Disable folding by default + foldenable = false; + + # Wrap long lines at a character in 'breakat' + linebreak = true; + + # Disable spell checking + spell = false; + + # Disable swap file creation + swapfile = false; + + # Time in milliseconds to wait for a mapped sequence to complete + timeoutlen = 300; + + # Enable 24-bit RGB color in the TUI + termguicolors = true; + + # Don't show mode in the command line + showmode = false; + + # Open new split below the current window + splitbelow = true; + + # Keep the screen when splitting + splitkeep = "screen"; + + # Open new split to the right of the current window + splitright = true; + + # Hide command line unless needed + cmdheight = 0; + + # Remove EOB + fillchars = { + eob = " "; + }; + }; + keymaps = [ + { + mode = "n"; + key = "j"; + action = "gj"; + } + { + mode = "n"; + key = "k"; + action = "gk"; + } + { + mode = "n"; + key = "n"; + action = "nzzzv"; + } + { + mode = "n"; + key = "N"; + action = "Nzzzv"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = "yy"; + action = "Yazi"; + options = {desc = "open yazi";}; + } + { + mode = "n"; + key = "fo"; + action = "Telescope oldfiles"; + options = {desc = "Telescope oldfiles";}; + } + { + mode = "n"; + key = "ff"; + action = "Telescope find_files"; + options = {desc = "Telescope find files";}; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/editor/zed.nix b/hosts/dunamis/users/work/programs/editor/zed.nix new file mode 100644 index 0000000..44609c8 --- /dev/null +++ b/hosts/dunamis/users/work/programs/editor/zed.nix @@ -0,0 +1,114 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.editor.zed; +in { + options = { + editor.zed.enable = + mkEnableOption "enable zed editor"; + }; + config = mkIf cfg.enable { + programs.zed-editor = { + enable = true; + extensions = [ + "nix" + "latex" + "typst" + ]; + userSettings = { + vim_mode = true; + ui_font_size = lib.mkForce 16; + buffer_font_size = lib.mkForce 16; + features = {inline_completion_provider = "none";}; + auto_update = false; + languages = { + "Nix" = { + language-servers = [ + "nil" + "!nixd" + ]; + formatter = { + external.command = lib.getExe pkgs.alejandra; + }; + }; + "Rust" = { + formatter = { + external = { + command = lib.getExe pkgs.rustfmt; + arguments = ["--edition" "2021"]; + }; + }; + }; + "typst" = { + language-servers = ["tinymist"]; + format_on_save = "on"; + formatter = { + external = { + command = lib.getExe pkgs.typstyle; + arguments = ["-i" "{buffer_path}"]; + }; + }; + }; + "Python" = { + format_on_save = "on"; + formatter = [ + { + language_server = { + name = "ruff"; + }; + } + ]; + language_servers = ["ruff"]; + }; + }; + lsp = { + clangd = { + binary = { + arguments = []; + path = "${pkgs.clang-tools}/bin/clangd"; + }; + }; + rust-analyzer = { + binary = { + arguments = []; + path = lib.getExe pkgs.rust-analyzer; + }; + }; + ruff = { + binary = { + arguments = []; + path = lib.getExe pkgs.ruff; + }; + }; + nil = { + binary = { + arguments = []; + path = lib.getExe pkgs.nil; + }; + initialization_options.formatting.command = [(lib.getExe pkgs.alejandra)]; + }; + texlab = { + binary = { + arguments = []; + path = lib.getExe pkgs.texlab; + }; + }; + tinymist = { + binary = { + arguments = []; + path = lib.getExe pkgs.tinymist; + }; + }; + }; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/flatpak.nix b/hosts/dunamis/users/work/programs/flatpak.nix new file mode 100644 index 0000000..05888e4 --- /dev/null +++ b/hosts/dunamis/users/work/programs/flatpak.nix @@ -0,0 +1,65 @@ +{ + services.flatpak = { + enable = true; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + ]; + packages = [ + # misc + "io.github.zen_browser.zen" + "net.mullvad.MullvadBrowser" + "com.obsproject.Studio" + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + + "com.usebottles.bottles" + "com.logseq.Logseq" + + # chatting + "org.signal.Signal" + "org.telegram.desktop" + "org.mozilla.Thunderbird" + + # media + #"io.github.celluloid_player.Celluloid" + "io.mpv.Mpv" + ]; + overrides = { + "global" = { + # Force Wayland by default + Context = { + sockets = ["wayland" "!x11" "!fallback-x11"]; + filesystems = [ + "xdg-run/pipewire-0" + "xdg-config/gtk-3.0:ro" + "xdg-config/gtk-4.0:ro" + # "~/.local/share/fonts:ro" + "~/.local/share/icons:ro" + # "~/.nix-profile/share/icons:ro" + # "~/.nix-profile/share/fonts:ro" + "/nix/store:ro" + ]; + }; + Environment = { + XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + #GTK_THEME = "adw-gtk3"; + }; + }; + "org.signal.Signal" = { + Environment = { + SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + }; + }; + "com.usebottles.Bottles" = { + Context = { + sockets = ["x11" "wayland"]; + # filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"]; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/main.nix b/hosts/dunamis/users/work/programs/main.nix new file mode 100644 index 0000000..ef6db4a --- /dev/null +++ b/hosts/dunamis/users/work/programs/main.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./console.nix + ./flatpak.nix + ./console/yazi.nix + ./editor/main.nix + ./shell/main.nix + ./terminal/main.nix + ]; +} diff --git a/hosts/dunamis/users/work/programs/shell/main.nix b/hosts/dunamis/users/work/programs/shell/main.nix new file mode 100644 index 0000000..fd8a6f4 --- /dev/null +++ b/hosts/dunamis/users/work/programs/shell/main.nix @@ -0,0 +1,3 @@ +{ + imports = [./nushell.nix ./oh-my-posh.nix]; +} diff --git a/hosts/dunamis/users/work/programs/shell/nushell.nix b/hosts/dunamis/users/work/programs/shell/nushell.nix new file mode 100644 index 0000000..73ad8f5 --- /dev/null +++ b/hosts/dunamis/users/work/programs/shell/nushell.nix @@ -0,0 +1,100 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.shell.nushell; +in { + options = { + shell.nushell.enable = + mkEnableOption "enable nushell"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh.enableNushellIntegration = true; + programs.zoxide = { + enable = true; + enableNushellIntegration = true; + }; + programs.carapace = { + enable = true; + enableNushellIntegration = true; + }; + programs.atuin = { + enable = true; + enableNushellIntegration = true; + flags = [ + "--disable-up-arrow" + ]; + }; + programs.nushell = { + enable = true; + environmentVariables = { + CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; + CARAPACE_MATCH = 1; + EDITOR = "hx"; + }; + shellAliases = { + cd = "z"; + cat = "bat"; + l = "ls -l"; + nix-shell = "nix-shell --command nu"; + }; + extraConfig = '' + $env.config = { + show_banner: false + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + + ls: { + use_ls_colors: true + clickable_links: true + } + + rm: { + always_trash: true + } + edit_mode: 'vi' + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "fuzzy" + external: { + enable: true + # max_results: 100 + # completer: $carapace_completer # check 'carapace_completer' + } + } + } + ''; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/shell/oh-my-posh.nix b/hosts/dunamis/users/work/programs/shell/oh-my-posh.nix new file mode 100644 index 0000000..79815ff --- /dev/null +++ b/hosts/dunamis/users/work/programs/shell/oh-my-posh.nix @@ -0,0 +1,106 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.shell.oh-my-posh; +in { + options = { + shell.oh-my-posh.enable = + mkEnableOption "enable oh my posh"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh = { + enable = true; + settings = { + version = 2; + final_space = true; + console_title_template = "{{ .Shell }} in {{ .Folder }}"; + blocks = [ + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "path"; + style = "plain"; + background = "transparent"; + foreground = "blue"; + template = "{{ .Path }}"; + properties = { + style = "full"; + }; + } + { + type = "text"; + style = "plain"; + background = "transparent"; + template = "{{ if .Env.BW_SESSION }} 󰞀{{ end }}"; + } + { + type = "nix-shell"; + style = "plain"; + background = "transparent"; + template = "{{ if ne .Type \"unknown\" }} {{ end }}"; + } + { + type = "git"; + style = "plain"; + foreground = "p:grey"; + background = "transparent"; + template = " {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}"; + properties = { + branch_icon = ""; + commit_icon = "@"; + fetch_status = true; + }; + } + ]; + } + { + type = "rprompt"; + overflow = "hidden"; + segments = [ + { + type = "executiontime"; + style = "plain"; + foreground = "yellow"; + background = "transparent"; + template = "{{ .FormattedMs }}"; + properties = { + threshold = 5000; + }; + } + ]; + } + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "text"; + style = "plain"; + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯"; + } + ]; + } + ]; + transient_prompt = { + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯ "; + }; + secondary_prompt = { + foreground = "magenta"; + background = "transparent"; + template = "❯❯ "; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/shell/zsh.nix b/hosts/dunamis/users/work/programs/shell/zsh.nix new file mode 100644 index 0000000..7f4f53b --- /dev/null +++ b/hosts/dunamis/users/work/programs/shell/zsh.nix @@ -0,0 +1,75 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + zsh.enable = + lib.mkEnableOption "enable z shell"; + }; + config = lib.mkIf config.zsh.enable { + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + initExtra = '' + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + ''; + # promptInit = "oh-my-posh init zsh -c ~/.config/oh-my-posh/zen.toml"; + enableCompletion = true; + autosuggestion.enable = true; + #autosuggestion.highlight = "fg=#ff00ff,bg=cyan,bold,underline"; + shellAliases = { + ls = "eza"; + cat = "bat"; + cd = "z"; + l = "eza -alh"; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + plugins = [ + { + name = "zsh-autosuggestions"; + file = "zsh-autosuggestions.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autocomplete"; + rev = "v0.7.0"; + sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw="; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.8.0"; + sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; + }; + } + { + name = "zsh-history-substring-search"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-history-substring-search"; + rev = "v1.1.0"; + sha256 = "sha256-GSEvgvgWi1rrsgikTzDXokHTROoyPRlU0FVpAoEmXG4="; + }; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsin.fromh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/terminal/ghostty.nix b/hosts/dunamis/users/work/programs/terminal/ghostty.nix new file mode 100644 index 0000000..0641053 --- /dev/null +++ b/hosts/dunamis/users/work/programs/terminal/ghostty.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.ghostty; +in { + options = { + terminal.ghostty.enable = mkEnableOption "enable ghostty terminal"; + }; + config = mkIf cfg.enable { + programs.ghostty.enable = true; + # home.packages = [ + # inputs.ghostty.packages.x86_64-linux.default + # pkgs.ghostty + }; +} diff --git a/hosts/dunamis/users/work/programs/terminal/kitty.nix b/hosts/dunamis/users/work/programs/terminal/kitty.nix new file mode 100644 index 0000000..98f76b6 --- /dev/null +++ b/hosts/dunamis/users/work/programs/terminal/kitty.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.kitty; +in { + options = { + terminal.kitty.enable = + mkEnableOption "enable kitty terminal"; + }; + config = mkIf cfg.enable { + programs.kitty = { + enable = true; + settings = { + tab_bar_edge = "bottom"; + tab_bar_align = "left"; + tab_bar_style = "fade"; + # tab_separator = " "; + }; + }; + }; +} diff --git a/hosts/dunamis/users/work/programs/terminal/main.nix b/hosts/dunamis/users/work/programs/terminal/main.nix new file mode 100644 index 0000000..46dc60b --- /dev/null +++ b/hosts/dunamis/users/work/programs/terminal/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./kitty.nix + ./ghostty.nix + ./wezterm.nix + ]; +} diff --git a/hosts/dunamis/users/work/programs/terminal/wezterm.nix b/hosts/dunamis/users/work/programs/terminal/wezterm.nix new file mode 100644 index 0000000..88a83e0 --- /dev/null +++ b/hosts/dunamis/users/work/programs/terminal/wezterm.nix @@ -0,0 +1,90 @@ +{ + config, + inputs, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.terminal.wezterm; +in { + options = { + terminal.wezterm.enable = + mkEnableOption "enable wez's terminal"; + }; + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = inputs.wezterm.packages.${pkgs.system}.default; + extraConfig = '' + local wezterm = require 'wezterm' + local act = wezterm.action + return { + front_end = 'WebGpu', + unix_domains = { + { + name = 'unix', + }, + }, + enable_kitty_graphics = true, + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + use_fancy_tab_bar = false, + inactive_pane_hsb = { + saturation = 0.8, + brightness = 0.7, + }, + -- window_frame = { + -- font = wezterm.font { family = 'Cantarell', weight = 'Bold' }, + -- }, + disable_default_key_bindings = true, + leader = { key = 'Space', mods = 'CTRL', timeout_milliseconds = 2000 }, + keys = { + { key = 'n', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) }, + { key = 'e', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Down', }, + { key = 'u', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Up', }, + { key = 'i', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) }, + { key = 'Enter', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, + { key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, + { key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, + { key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, + { key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, + { key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, + -- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, + { key = 'l', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, + { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, + { key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, + { key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, + { key = 'LeftArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Left' }, + { key = 'RightArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Right' }, + { key = 'UpArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Up' }, + { key = 'DownArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Down' }, + { key = ',', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '.', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = '%', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '"', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = 'n', mods = 'CTRL', action = act.ActivatePaneDirection 'Left', }, + { key = 'i', mods = 'CTRL', action = act.ActivatePaneDirection 'Right', }, + { key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, + { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = false } }, + { key = 'f', mods = 'SHIFT|CTRL', action = act.CloseCurrentPane{ confirm = false } }, + { key = 'b', mods = 'LEADER|CTRL', action = act.SendString '\x02', }, + { key = 'Enter', mods = 'LEADER', action = act.ActivateCopyMode, }, + { key = 'p', mods = 'LEADER', action = act.PasteFrom 'PrimarySelection', }, + { key = 'k', mods = 'SHIFT|CTRL', action = act.Multiple + { + act.ClearScrollback 'ScrollbackAndViewport', + act.SendKey { key = 'L', mods = 'CTRL' }, + }, + }, + { key = 'r', mods = 'LEADER', action = act.ActivateKeyTable { name = 'resize_pane', one_shot = false, }, } + }, + } + ''; + }; + }; +} diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix new file mode 100644 index 0000000..8a24f77 --- /dev/null +++ b/hosts/sarien/configuration.nix @@ -0,0 +1,82 @@ +# device-specific setup +{ + pkgs, + inputs, + ... +}: { + imports = with inputs; [ + ./hardware-conf.nix + ./users.nix + ./programs.nix + ./system/main.nix + chaotic.nixosModules.default + stylix.nixosModules.stylix + self.nixosModules.desktop + ]; + desktop = { + hyprland.enable = true; + # niri.enable = true; + # plasma.enable = true; + }; + services.logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; + }; + + nix.settings.experimental-features = ["nix-command" "flakes"]; + system.stateVersion = "unstable"; + + time.timeZone = "Europe/Kyiv"; + locale.ukrainian.enable = true; + + networking.hostName = "vylxae"; + networking.networkmanager.enable = true; + + # required for syncthing + networking.firewall = { + allowedTCPPorts = [22000]; + allowedUDPPorts = [21027 22000]; + }; + + boot = { + # kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_cachyos; + plymouth.enable = true; + loader.efi.canTouchEfiVariables = true; + loader.systemd-boot = { + enable = true; + consoleMode = "auto"; + }; + }; + + console = { + earlySetup = true; + packages = [pkgs.terminus_font]; + font = "${pkgs.terminus_font}/share/consolefonts/ter-c18n.psf.gz"; + }; + + services = { + power-profiles-daemon.enable = true; + hardware.openrgb.enable = true; + flatpak.enable = true; + fstrim.enable = true; + fwupd.enable = true; + openssh.enable = true; + }; + services.scx = { + enable = true; + scheduler = "scx_flash"; + }; + + security.basic.enable = true; + + virtual = { + libvirt.enable = true; + podman.enable = false; + }; + + wireless.bluetooth.enableBlueman = true; + + opentabletdriver.enable = false; + qmk-vial.enable = true; +} diff --git a/hosts/sarien/hardware-conf.nix b/hosts/sarien/hardware-conf.nix new file mode 100644 index 0000000..9aa83b8 --- /dev/null +++ b/hosts/sarien/hardware-conf.nix @@ -0,0 +1,102 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + # pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + wireless = { + wifi.enable = true; + bluetooth.enable = true; + }; + + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = ["i915"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + boot.kernelParams = [ + "i915.enable_guc=2" + "i915.enable_fbc=1" + "i915.enable_psr=2" + ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=@nixos,compress=zstd"]; + }; + + boot.initrd.luks.devices."luks-149371a0-a41f-4c43-8935-cb199508c66a".device = "/dev/disk/by-uuid/149371a0-a41f-4c43-8935-cb199508c66a"; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=home,compress=zstd"]; + }; + + fileSystems."/storage" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=@storage,compress=zstd"]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/F195-F7C0"; + fsType = "vfat"; + options = ["umask=0077"]; + }; + + swapDevices = []; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s20f0u1u2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + # hardware.intelgpu.vaapiDriver = "intel-media-driver"; + + services.udev.extraHwdb = '' + evdev:input:b0011v0001p0001eAB83* + KEYBOARD_KEY_d5=sysrq + KEYBOARD_KEY_d4=leftmeta + KEYBOARD_KEY_95=brightnessdown + KEYBOARD_KEY_91=brightnessup + ''; + + services.keyd = { + enable = true; + keyboards = { + default = { + ids = ["0001:0001"]; + settings = { + main = { + camera = "brightnessdown"; + prog1 = "brightnessup"; + # home row mods + a = "lettermod(alt, a, 200, 150)"; + s = "lettermod(meta, s, 200, 150)"; + d = "lettermod(control, d, 200, 150)"; + f = "lettermod(shift, f, 200, 150)"; + j = "lettermod(shift, j, 200, 150)"; + k = "lettermod(control, k, 200, 150)"; + l = "lettermod(meta, l, 200, 150)"; + ";" = "lettermod(alt, ;, 200, 150)"; + }; + }; + }; + }; + }; +} diff --git a/hosts/sarien/programs.nix b/hosts/sarien/programs.nix new file mode 100644 index 0000000..3abc859 --- /dev/null +++ b/hosts/sarien/programs.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + programs.neovim = { + enable = false; + viAlias = true; + vimAlias = true; + }; + programs.nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 7d --keep 3"; + flake = "/home/user/.config/nixos"; + }; + environment.systemPackages = with pkgs; [ + helix + nushell + ]; +} diff --git a/hosts/sarien/system/main.nix b/hosts/sarien/system/main.nix new file mode 100644 index 0000000..aa8213d --- /dev/null +++ b/hosts/sarien/system/main.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./misc/main.nix + ./security/main.nix + ./virtual/main.nix + ./wireless/main.nix + ./stylix.nix + ]; +} diff --git a/hosts/sarien/system/misc/locale.nix b/hosts/sarien/system/misc/locale.nix new file mode 100644 index 0000000..89209a9 --- /dev/null +++ b/hosts/sarien/system/misc/locale.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + ... +}: { + options = { + locale.ukrainian.enable = + lib.mkEnableOption "enables ukrainian locale"; + }; + config = lib.mkIf config.locale.ukrainian.enable { + i18n = { + defaultLocale = "uk_UA.UTF-8"; + extraLocaleSettings = { + LC_CTYPE = "uk_UA.UTF-8"; + LC_NUMERIC = "uk_UA.UTF-8"; + LC_TIME = "uk_UA.UTF-8"; + LC_COLLATE = "en_US.UTF-8"; + LC_MONETARY = "uk_UA.UTF-8"; + LC_MESSAGES = "uk_UA.UTF-8"; + LC_PAPER = "uk_UA.UTF-8"; + LC_NAME = "uk_UA.UTF-8"; + LC_ADDRESS = "uk_UA.UTF-8"; + LC_TELEPHONE = "uk_UA.UTF-8"; + LC_MEASUREMENT = "uk_UA.UTF-8"; + LC_IDENTIFICATION = "uk_UA.UTF-8"; + }; + }; + }; +} diff --git a/hosts/sarien/system/misc/main.nix b/hosts/sarien/system/misc/main.nix new file mode 100644 index 0000000..4c4bc47 --- /dev/null +++ b/hosts/sarien/system/misc/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./opentabletdriver.nix + ./qmk-vial.nix + ./locale.nix + ]; +} diff --git a/hosts/sarien/system/misc/mullvad-vpn.nix b/hosts/sarien/system/misc/mullvad-vpn.nix new file mode 100644 index 0000000..31d3c05 --- /dev/null +++ b/hosts/sarien/system/misc/mullvad-vpn.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + services.mullvad-vpn = { + enable = true; + package = pkgs.mullvad-vpn; + }; +} diff --git a/hosts/sarien/system/misc/opentabletdriver.nix b/hosts/sarien/system/misc/opentabletdriver.nix new file mode 100644 index 0000000..8951ff9 --- /dev/null +++ b/hosts/sarien/system/misc/opentabletdriver.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: { + options = { + opentabletdriver.enable = + lib.mkEnableOption "enables opentabletdriver"; + }; + config = lib.mkIf config.opentabletdriver.enable { + hardware.opentabletdriver = { + enable = true; + daemon.enable = true; + blacklistedKernelModules = [ + "hid-uclogic" + "wacom" + ]; + }; + }; +} diff --git a/hosts/sarien/system/misc/qmk-vial.nix b/hosts/sarien/system/misc/qmk-vial.nix new file mode 100644 index 0000000..0fd5732 --- /dev/null +++ b/hosts/sarien/system/misc/qmk-vial.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + config, + ... +}: { + options = { + qmk-vial.enable = + lib.mkEnableOption "adds a udev rule for vial keyboards"; + }; + config = lib.mkIf config.qmk-vial.enable { + services.udev.extraRules = '' + #vial rule + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + }; +} diff --git a/hosts/sarien/system/security/basic.nix b/hosts/sarien/system/security/basic.nix new file mode 100644 index 0000000..bcb4cdc --- /dev/null +++ b/hosts/sarien/system/security/basic.nix @@ -0,0 +1,90 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.security.basic; +in { + options = { + security.basic.enable = + lib.mkEnableOption "enable basic security"; + }; + config = lib.mkIf cfg.enable { + security = { + sudo.enable = false; + # doas.enable = true; + sudo-rs = { + enable = true; + execWheelOnly = true; + }; + polkit.enable = true; + polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if ( + subject.isInGroup("users") + && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + ) + ) + { + return polkit.Result.YES; + } + }); + ''; + apparmor.enable = lib.mkDefault true; + }; + + environment.systemPackages = with pkgs; [ + (mkIf (config.security.doas.enable == true) doas-sudo-shim) # if doas install doas sudo shim + ]; + + services.dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + services.ntpd-rs = { + enable = true; + #settings = { + # server = { + # require-nts = true; + # }; + #}; + }; + + boot.blacklistedKernelModules = [ + # Obscure network protocols + "ax25" + "netrom" + "rose" + # Old or rare or insufficiently audited filesystems + "adfs" + "affs" + "bfs" + "befs" + "cramfs" + "efs" + "erofs" + "exofs" + "freevxfs" + "f2fs" + "hfs" + "hpfs" + "jfs" + "minix" + "nilfs2" + "ntfs" + "omfs" + "qnx4" + "qnx6" + "sysv" + "ufs" + ]; + + nix.settings.allowed-users = lib.mkDefault ["@users"]; + }; +} diff --git a/hosts/sarien/system/security/dnscrypt-proxy.nix b/hosts/sarien/system/security/dnscrypt-proxy.nix new file mode 100644 index 0000000..4dd9aa9 --- /dev/null +++ b/hosts/sarien/system/security/dnscrypt-proxy.nix @@ -0,0 +1,49 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; { + options = { + security.dnscrypt-proxy.enable = + mkEnableOption "enable dnscrypt-proxy"; + }; + config = mkIf config.security.dnscrypt-proxy.enable { + networking = { + nameservers = ["127.0.0.1" "::1"]; + # If using dhcpcd: + dhcpcd.extraConfig = "nohook resolv.conf"; + # If using NetworkManager: + networkmanager.dns = "none"; + }; + + # Make sure you don't have services.resolved.enable on. + services.dnscrypt-proxy2 = { + enable = true; + settings = { + ipv6_servers = false; + require_dnssec = true; + + sources.public-resolvers = { + urls = [ + "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" + "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" + ]; + cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; + minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + }; + + # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md + server_names = [ + #"quad9-dnscrypt-ip4-filter-pri" + "cloudflare" + ]; + }; + }; + + systemd.services.dnscrypt-proxy2.serviceConfig = { + StateDirectory = "dnscrypt-proxy"; + }; + }; +} diff --git a/hosts/sarien/system/security/extensive.nix b/hosts/sarien/system/security/extensive.nix new file mode 100644 index 0000000..bc14ba3 --- /dev/null +++ b/hosts/sarien/system/security/extensive.nix @@ -0,0 +1,66 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.security.extensive; +in { + options = { + security.extensive.enable = + mkEnableOption "enable extensive security"; + }; + config = mkIf cfg.enable { + security.basic.enable = true; + + environment.memoryAllocator.provider = mkDefault "scudo"; + environment.variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1"; + + security = { + lockKernelModules = mkDefault false; + protectKernelImage = mkDefault true; + # allowSimultaneousMultithreading = mkDefault false; + forcePageTableIsolation = mkDefault true; + unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable; + virtualisation.flushL1DataCache = mkDefault "always"; + apparmor.enable = mkDefault true; + apparmor.killUnconfinedConfinables = mkDefault true; + }; + + boot.kernel.sysctl = { + # Hide kptrs even for processes with CAP_SYSLOG + "kernel.kptr_restrict" = mkOverride 500 2; + # Disable bpf() JIT (to eliminate spray attacks) + "net.core.bpf_jit_enable" = mkDefault false; + # Disable ftrace debugging + "kernel.ftrace_enabled" = mkDefault false; + }; + + boot.kernel.sysctl = { + # Enable strict reverse path filtering (that is, do not attempt to route + # packets that "obviously" do not belong to the iface's network; dropped + # packets are logged as martians). + "net.ipv4.conf.all.log_martians" = mkDefault true; + "net.ipv4.conf.all.rp_filter" = mkDefault "1"; + "net.ipv4.conf.default.log_martians" = mkDefault true; + "net.ipv4.conf.default.rp_filter" = mkDefault "1"; + + # Ignore broadcast ICMP (mitigate SMURF) + "net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault true; + + # Ignore incoming ICMP redirects (note: default is needed to ensure that the + # setting is applied to interfaces added after the sysctls are set) + "net.ipv4.conf.all.accept_redirects" = mkDefault false; + "net.ipv4.conf.all.secure_redirects" = mkDefault false; + "net.ipv4.conf.default.accept_redirects" = mkDefault false; + "net.ipv4.conf.default.secure_redirects" = mkDefault false; + "net.ipv6.conf.all.accept_redirects" = mkDefault false; + "net.ipv6.conf.default.accept_redirects" = mkDefault false; + + # Ignore outgoing ICMP redirects (this is ipv4 only) + "net.ipv4.conf.all.send_redirects" = mkDefault false; + "net.ipv4.conf.default.send_redirects" = mkDefault false; + }; + }; +} diff --git a/hosts/sarien/system/security/main.nix b/hosts/sarien/system/security/main.nix new file mode 100644 index 0000000..aee351c --- /dev/null +++ b/hosts/sarien/system/security/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./basic.nix + ./extensive.nix + ./dnscrypt-proxy.nix + ]; +} diff --git a/hosts/sarien/system/stylix.nix b/hosts/sarien/system/stylix.nix new file mode 100644 index 0000000..87ec500 --- /dev/null +++ b/hosts/sarien/system/stylix.nix @@ -0,0 +1,41 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml"; + polarity = "light"; + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 32; + }; + image = ../../../wallpapers/wallhaven-yxpv2k.png; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 14; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; +} diff --git a/hosts/sarien/system/virtual/docker.nix b/hosts/sarien/system/virtual/docker.nix new file mode 100644 index 0000000..f35dce2 --- /dev/null +++ b/hosts/sarien/system/virtual/docker.nix @@ -0,0 +1,29 @@ +{ + # pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.docker; +in { + options = { + virtual.docker.enable = + mkEnableOption "enable docker"; + }; + config = mkIf cfg.enable { + virtualisation.docker = { + enable = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + storageDriver = "btrfs"; + autoPrune.enable = true; + #defaultNetwork.settings = { + # dns_enabled = true; + #}; + }; + virtualisation.oci-containers.backend = "docker"; + }; +} diff --git a/hosts/sarien/system/virtual/libvirt.nix b/hosts/sarien/system/virtual/libvirt.nix new file mode 100644 index 0000000..2270b99 --- /dev/null +++ b/hosts/sarien/system/virtual/libvirt.nix @@ -0,0 +1,35 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.libvirt; +in { + options = { + virtual.libvirt.enable = + mkEnableOption "enables virtualisation"; + }; + config = mkIf cfg.enable { + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = false; + swtpm.enable = true; + vhostUserPackages = [pkgs.virtiofsd]; + ovmf = { + enable = true; + packages = [ + (pkgs.OVMF.override { + secureBoot = true; + tpmSupport = true; + }) + .fd + ]; + }; + }; + }; + }; +} diff --git a/hosts/sarien/system/virtual/main.nix b/hosts/sarien/system/virtual/main.nix new file mode 100644 index 0000000..f2229d6 --- /dev/null +++ b/hosts/sarien/system/virtual/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./libvirt.nix + ./podman.nix + ./docker.nix + ]; +} diff --git a/hosts/sarien/system/virtual/podman.nix b/hosts/sarien/system/virtual/podman.nix new file mode 100644 index 0000000..de5edac --- /dev/null +++ b/hosts/sarien/system/virtual/podman.nix @@ -0,0 +1,28 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.virtual.podman; +in { + options = { + virtual.podman.enable = + mkEnableOption "enables podman"; + }; + config = mkIf cfg.enable { + virtualisation = { + containers.enable = true; + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; + environment.systemPackages = with pkgs; [ + podman-tui + podman-compose + ]; + }; +} diff --git a/hosts/sarien/system/wireless/bluetooth.nix b/hosts/sarien/system/wireless/bluetooth.nix new file mode 100644 index 0000000..354884a --- /dev/null +++ b/hosts/sarien/system/wireless/bluetooth.nix @@ -0,0 +1,21 @@ +{ + # pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.wireless.bluetooth; +in { + options = { + wireless.bluetooth = { + enable = mkEnableOption "enable bluetooth"; + enableBlueman = mkEnableOption "enable bluetooth manager"; + }; + }; + config = mkIf cfg.enable { + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.blueman.enable = cfg.enableBlueman; + }; +} diff --git a/hosts/sarien/system/wireless/main.nix b/hosts/sarien/system/wireless/main.nix new file mode 100644 index 0000000..412300c --- /dev/null +++ b/hosts/sarien/system/wireless/main.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bluetooth.nix + ./wifi.nix + ]; +} diff --git a/hosts/sarien/system/wireless/wifi.nix b/hosts/sarien/system/wireless/wifi.nix new file mode 100644 index 0000000..7f7e6b5 --- /dev/null +++ b/hosts/sarien/system/wireless/wifi.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + ... +}: +with lib; let + cfg = config.wireless.wifi; +in { + options = { + wireless.wifi.enable = + mkEnableOption "enables wifi with iwd and MAC address randomisation"; + }; + config = mkIf cfg.enable { + networking = { + networkmanager.wifi.backend = "iwd"; + wireless.iwd = { + enable = true; + settings = { + General = { + AddressRandomization = "network"; + }; + Settings = { + AlwaysRandomizeAddress = true; + }; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users.nix b/hosts/sarien/users.nix new file mode 100644 index 0000000..18d4cb4 --- /dev/null +++ b/hosts/sarien/users.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + nix.settings.trusted-users = ["user"]; + users.users = { + user = { + isNormalUser = true; + extraGroups = ["wheel" "video" "libvirtd" "dialout"]; + shell = pkgs.nushell; + }; + # work = { + # isNormalUser = true; + # extraGroups = ["video"]; + # shell = pkgs.nushell; + # }; + }; +} diff --git a/hosts/sarien/users/user/desktop/gnome/main.nix b/hosts/sarien/users/user/desktop/gnome/main.nix new file mode 100644 index 0000000..36deffe --- /dev/null +++ b/hosts/sarien/users/user/desktop/gnome/main.nix @@ -0,0 +1,176 @@ +{ + config, + pkgs, + # pkgs-51b85c, + # lib, + ... +}: { + # imports = [./walker.nix]; + # services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + home.packages = with pkgs; [ + nautilus + ghostty + helvum + loupe + evince + junction + celluloid + mission-center + dconf + glib + libnotify + playerctl + # wdisplays + pwvucontrol + wl-clipboard + # polkit_gnome + # libqalculate + #papirus-icon-theme + # gnomeExtensions.alphabetical-app-grid + # gnomeExtensions.appindicator + # gnomeExtensions.caffeine + # gnomeExtensions.pano + # gnomeExtensions.forge + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + # web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + # gtk.enable = true; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + # }; + dconf.settings = { + "io/github/celluloid-player/celluloid" = { + always-use-floating-controls = true; + always-use-floating-header-bar = true; + csd-enable = true; + }; + + "org/gnome/desktop/a11y/applications" = { + screen-reader-enabled = false; + }; + + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + color-scheme = "prefer-dark"; + cursor-blink-time = 1200; + enable-animations = true; + gtk-enable-primary-paste = false; + text-scaling-factor = 1.0; + toolbar-style = "text"; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/wm/keybindings" = { + switch-input-source = ["Escape"]; + switch-input-source-backward = ["Escape"]; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = true; + button-layout = "icon:close"; + }; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + workspaces-only-on-primary = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "forge@jmmaranan.com"]; + night-light-enabled = false; + night-light-schedule-automatic = false; + }; + + "org/gnome/software" = { + download-updates = false; + download-updates-notify = false; + first-run = false; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + + "org/gtk/gtk4/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + sidebar-width = 140; + sort-column = "name"; + sort-directories-first = true; + sort-order = "ascending"; + type-format = "category"; + view-type = "list"; + }; + + "org/gtk/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + show-size-column = true; + show-type-column = true; + sort-column = "name"; + sort-directories-first = false; + sort-order = "ascending"; + type-format = "category"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/jay/i3status-rust-0-33-2.nix b/hosts/sarien/users/user/desktop/jay/i3status-rust-0-33-2.nix new file mode 100644 index 0000000..911ab42 --- /dev/null +++ b/hosts/sarien/users/user/desktop/jay/i3status-rust-0-33-2.nix @@ -0,0 +1,68 @@ +# with import {}; # bring all of Nixpkgs into scope +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + makeWrapper, + dbus, + libpulseaudio, + notmuch, + openssl, + ethtool, + lm_sensors, + iw, + iproute2, + withICUCalendar ? false, +}: +rustPlatform.buildRustPackage rec { + pname = "i3status-rust"; + version = "0.33.2"; + + src = fetchFromGitHub { + owner = "greshake"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-xJm4MsEU0OVX401WvKllg3zUwgCvjLxlAQzXE/oD1J0="; + }; + + cargoHash = "sha256-9jbJVnZhFbMYldBkRVSIiorUYDNtF3AAwNEpyNJXpjo="; + + nativeBuildInputs = [pkg-config makeWrapper]; + + buildInputs = [dbus libpulseaudio notmuch openssl lm_sensors]; + + buildFeatures = + [ + "notmuch" + "maildir" + "pulseaudio" + ] + ++ (lib.optionals withICUCalendar ["icu_calendar"]); + + prePatch = '' + substituteInPlace src/util.rs \ + --replace "/usr/share/i3status-rust" "$out/share" + ''; + + postInstall = '' + mkdir -p $out/share + cp -R examples files/* $out/share + ''; + + postFixup = '' + wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [iproute2 ethtool iw]} + ''; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with lib; { + description = "Very resource-friendly and feature-rich replacement for i3status"; + homepage = "https://github.com/greshake/i3status-rust"; + license = licenses.gpl3Only; + mainProgram = "i3status-rs"; + maintainers = with maintainers; [backuitist globin]; + platforms = platforms.linux; + }; +} diff --git a/hosts/sarien/users/user/desktop/jay/main.nix b/hosts/sarien/users/user/desktop/jay/main.nix new file mode 100644 index 0000000..f43e043 --- /dev/null +++ b/hosts/sarien/users/user/desktop/jay/main.nix @@ -0,0 +1,308 @@ +{ + config, + pkgs, + ... +}: { + home.packages = [pkgs.jay]; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + config.jay = { + default = ["gtk"]; + "org.freedesktop.impl.portal.ScreenCast" = ["jay"]; + "org.freedesktop.impl.portal.RemoteDesktop" = ["jay"]; + "org.freedesktop.impl.portal.Inhibit" = ["none"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk4"]; + }; + }; + programs.i3status-rust = { + enable = true; + package = pkgs.callPackage ./i3status-rust-0-33-2.nix {}; + bars = { + default = { + theme = "plain"; + blocks = [ + { + alert = 10.0; + block = "disk_space"; + info_type = "available"; + interval = 60; + path = "/"; + warning = 20.0; + } + { + block = "memory"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; + } + { + block = "cpu"; + interval = 1; + } + { + block = "load"; + format = " $icon $1m "; + interval = 1; + } + { + block = "sound"; + } + { + block = "time"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; + interval = 60; + } + ]; + }; + }; + }; + programs.i3status = { + enable = true; + enableDefault = true; + general = { + output_format = "i3bar"; + interval = 1; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 0; + vertical-pad = 0; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + + xdg.configFile.jay = { + target = "jay/config.toml"; + recursive = true; + source = (pkgs.formats.toml {}).generate "jay-config" { + keymap = '' + xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)" }; + }; + ''; + on-graphics-initialized = [ + # { + # type = "exec"; + # exec = "mako"; + # } + { + type = "exec"; + exec = "~/wl-tray-bridge/target/release/wl-tray-bridge"; + } + ]; + outputs = [ + { + match.connector = "eDP-1"; + scale = 1.2; + } + ]; + vrr = { + mode = "always"; + cursor-hz = 75; + }; + repeat-rate = { + rate = 50; + delay = 200; + }; + theme = { + bg-color = "#${config.lib.stylix.colors.base00}"; + bar-bg-color = "#${config.lib.stylix.colors.base00}"; + border-color = "#${config.lib.stylix.colors.base0D}"; + separator-color = "#${config.lib.stylix.colors.base01}"; + bar-status-text-color = "#${config.lib.stylix.colors.base05}"; + focused-title-text-color = "#${config.lib.stylix.colors.base07}"; + focused-title-bg-color = "#${config.lib.stylix.colors.base00}"; + focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}"; + focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}"; + unfocused-title-text-color = "#${config.lib.stylix.colors.base03}"; + unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}"; + attention-requested-bg-color = "#${config.lib.stylix.colors.base09}"; + font = "${config.stylix.fonts.sansSerif.name}"; + border-width = 2; + title-height = 24; + }; + status = { + format = "pango"; + exec = ["i3status-rs" "config-default"]; + }; + window-management-key = "Super_L"; + shortcuts = let + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + "logo-${left}" = "focus-left"; + "logo-${down}" = "focus-down"; + "logo-${up}" = "focus-up"; + "logo-${right}" = "focus-right"; + "logo-shift-${left}" = "move-left"; + "logo-shift-${down}" = "move-down"; + "logo-shift-${up}" = "move-up"; + "logo-shift-${right}" = "move-right"; + logo-d = "split-horizontal"; + logo-v = "split-vertical"; + logo-t = "toggle-split"; + logo-m = "toggle-mono"; + logo-shift-m = "toggle-fullscreen"; + logo-f = "focus-parent"; + logo-q = "close"; + logo-shift-f = "toggle-floating"; + alt-Return = { + type = "exec"; + exec = "wezterm"; + }; + logo-space = { + type = "exec"; + exec = "fuzzel"; + }; + logo-ctrl-q = "quit"; + logo-shift-r = "reload-config-toml"; + ctrl-alt-F1 = { + type = "switch-to-vt"; + num = 1; + }; + ctrl-alt-F2 = { + type = "switch-to-vt"; + num = 2; + }; + ctrl-alt-F3 = { + type = "switch-to-vt"; + num = 3; + }; + ctrl-alt-F4 = { + type = "switch-to-vt"; + num = 4; + }; + ctrl-alt-F5 = { + type = "switch-to-vt"; + num = 5; + }; + ctrl-alt-F6 = { + type = "switch-to-vt"; + num = 6; + }; + ctrl-alt-F7 = { + type = "switch-to-vt"; + num = 7; + }; + ctrl-alt-F8 = { + type = "switch-to-vt"; + num = 8; + }; + ctrl-alt-F9 = { + type = "switch-to-vt"; + num = 9; + }; + ctrl-alt-F10 = { + type = "switch-to-vt"; + num = 10; + }; + ctrl-alt-F11 = { + type = "switch-to-vt"; + num = 11; + }; + ctrl-alt-F12 = { + type = "switch-to-vt"; + num = 12; + }; + logo-1 = { + type = "show-workspace"; + name = "1"; + }; + logo-2 = { + type = "show-workspace"; + name = "2"; + }; + logo-3 = { + type = "show-workspace"; + name = "3"; + }; + logo-4 = { + type = "show-workspace"; + name = "4"; + }; + logo-5 = { + type = "show-workspace"; + name = "5"; + }; + logo-6 = { + type = "show-workspace"; + name = "6"; + }; + logo-7 = { + type = "show-workspace"; + name = "7"; + }; + logo-8 = { + type = "show-workspace"; + name = "8"; + }; + logo-9 = { + type = "show-workspace"; + name = "9"; + }; + logo-0 = { + type = "show-workspace"; + name = "10"; + }; + logo-shift-1 = { + type = "move-to-workspace"; + name = "1"; + }; + logo-shift-2 = { + type = "move-to-workspace"; + name = "2"; + }; + logo-shift-3 = { + type = "move-to-workspace"; + name = "3"; + }; + logo-shift-4 = { + type = "move-to-workspace"; + name = "4"; + }; + logo-shift-5 = { + type = "move-to-workspace"; + name = "5"; + }; + logo-shift-6 = { + type = "move-to-workspace"; + name = "6"; + }; + logo-shift-7 = { + type = "move-to-workspace"; + name = "7"; + }; + logo-shift-8 = { + type = "move-to-workspace"; + name = "8"; + }; + logo-shift-9 = { + type = "move-to-workspace"; + name = "9"; + }; + logo-shift-0 = { + type = "move-to-workspace"; + name = "10"; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/plasma/main.nix b/hosts/sarien/users/user/desktop/plasma/main.nix new file mode 100644 index 0000000..4ad1def --- /dev/null +++ b/hosts/sarien/users/user/desktop/plasma/main.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + # lib, + ... +}: { + #imports = [ ]; + stylix.targets.kde.enable = true; + home.packages = with pkgs; [ + noto-fonts-emoji + base16-schemes + wl-clipboard-rs + pwvucontrol + adw-gtk3 + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/fuzzel.nix b/hosts/sarien/users/user/desktop/river/fuzzel.nix new file mode 100644 index 0000000..22a4ffe --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/main.nix b/hosts/sarien/users/user/desktop/river/main.nix new file mode 100644 index 0000000..6812f46 --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/main.nix @@ -0,0 +1,310 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [ + ./niri.nix + ./wofi.nix + ./fuzzel.nix + ./waybar.nix + ./swaync.nix + ./swayidle.nix + ./swaylock.nix + ./wlsunset.nix + ./udiskie.nix + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Blue"; + size = 24; + }; + image = ../wallpapers/wallhaven-5g9ed8.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 12; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Papirus-Dark"; + }; + }; + + fuzzel.enable = true; + waybar.enable = true; + swaync.enable = false; + wlsunset.enable = true; + component.swaylock.enable = true; + swayidle.enable = true; + udiskie.enable = true; + imv.enable = true; + + services.gnome-keyring.enable = true; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + corners = "top-right,bottom-left"; + offset = "45x5"; + origin = "top-right"; + timeout = 15; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + home.packages = with pkgs; [ + dconf + glib + wbg + swayidle + swaylock-effects + libnotify + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + xwayland-satellite + papirus-icon-theme + #libsForQt5.qt5ct + #kdePackages.qt6ct + #libsForQt5.qtstyleplugin-kvantum + #kdePackages.qtstyleplugin-kvantum + #adwaita-qt + #adwaita-qt6 + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.configFile = { + #niri = { + # recursive = true; + # source = dotfiles/niri; + #}; + #qt5ct = { + # recursive = true; + # source = dotfiles/qt5ct; + #}; + #qt6ct = { + # recursive = true; + # source = dotfiles/qt6ct; + #}; + #Kvantum = { + # recursive = true; + # source = dotfiles/Kvantum; + #}; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + # Service = { + # Type = "dbus"; + # ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wbg = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.wbg}/bin/wbg ${config.stylix.image}"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + swayidle = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + + xwayland-satellite = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/swayidle.nix b/hosts/sarien/users/user/desktop/river/swayidle.nix new file mode 100644 index 0000000..7c1f7ac --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/swayidle.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + swayidle.enable = + lib.mkEnableOption "enable swayidle"; + }; + config = lib.mkIf config.swayidle.enable { + services.swayidle = { + enable = true; + systemdTarget = "graphical-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + { + timeout = 600; + command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + ]; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/swaylock.nix b/hosts/sarien/users/user/desktop/river/swaylock.nix new file mode 100644 index 0000000..ce939d9 --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/swaylock.nix @@ -0,0 +1,30 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.swaylock.enable = + lib.mkEnableOption "enable swaylock"; + }; + config = lib.mkIf config.component.swaylock.enable { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + font = "${config.stylix.fonts.serif.name}"; + font-size = 25; + indicator-radius = 100; + indicator-thickness = 20; + indicator-idle-visible = true; + + # -effect section + screenshots = true; + clock = true; + effect-pixelate = 60; + effect-vignette = "0.5:0.5"; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/udiskie.nix b/hosts/sarien/users/user/desktop/river/udiskie.nix new file mode 100644 index 0000000..be28f82 --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/udiskie.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: { + options = { + udiskie.enable = + lib.mkEnableOption "enable udiskie"; + }; + config = lib.mkIf config.udiskie.enable { + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/waybar.nix b/hosts/sarien/users/user/desktop/river/waybar.nix new file mode 100644 index 0000000..2b5d93e --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/waybar.nix @@ -0,0 +1,418 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + waybar.enable = + lib.mkEnableOption "enable waybar"; + }; + config = lib.mkIf config.waybar.enable { + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 48; + margin-right = 48; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/niri" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/niri" = { + orientation = "inherit"; + modules = [ + "niri/language" + "niri/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.3em; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: #ed8796; + color: #181926; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: #ed8796; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: #b7bdf8; + color: #000000; + } + + #power-profiles-daemon.power-saver { + background-color: #8aadf4; + color: #000000; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/river/wlsunset.nix b/hosts/sarien/users/user/desktop/river/wlsunset.nix new file mode 100644 index 0000000..aa4ec97 --- /dev/null +++ b/hosts/sarien/users/user/desktop/river/wlsunset.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: { + options = { + wlsunset.enable = + lib.mkEnableOption "enable wlsunset"; + }; + config = lib.mkIf config.wlsunset.enable { + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/sway/chrome-backlight.nix b/hosts/sarien/users/user/desktop/sway/chrome-backlight.nix new file mode 100644 index 0000000..b658e07 --- /dev/null +++ b/hosts/sarien/users/user/desktop/sway/chrome-backlight.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + programs.waybar.settings.bar-0."custom/kbd-backlight" = lib.mkDefault { + exec = "cat /sys/class/leds/chromeos::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/chromeos::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/chromeos::kbd_backlight -U 5%"; + }; +} diff --git a/hosts/sarien/users/user/desktop/sway/fuzzel.nix b/hosts/sarien/users/user/desktop/sway/fuzzel.nix new file mode 100644 index 0000000..ecefcd0 --- /dev/null +++ b/hosts/sarien/users/user/desktop/sway/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/sway/hyprlock.nix b/hosts/sarien/users/user/desktop/sway/hyprlock.nix new file mode 100644 index 0000000..229519e --- /dev/null +++ b/hosts/sarien/users/user/desktop/sway/hyprlock.nix @@ -0,0 +1,104 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.hyprlock.enable = + lib.mkEnableOption "enable hyprlock"; + }; + config = lib.mkIf config.component.hyprlock.enable { + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/sway/main-scroller.nix b/hosts/sarien/users/user/desktop/sway/main-scroller.nix new file mode 100644 index 0000000..ea13cdc --- /dev/null +++ b/hosts/sarien/users/user/desktop/sway/main-scroller.nix @@ -0,0 +1,917 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [../theming/gruvbox.nix]; + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.plugins = ["${pkgs.hyprlandPlugins.hyprscroller}/lib/libhyprscroller.so"]; + wayland.windowManager.hyprland.settings = { + input = { + kb_layout = "us,ua"; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + monitor = [ + ", preferred, auto, 1" + "eDP-1, preferred, auto, 1.2" + ]; + env = [ + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,gtk3" + ]; + decoration = { + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "kitty"; + "$screenLocker" = "hyprlock"; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + gaps_in = 4; + gaps_out = 4; + border_size = 4; + allow_tearing = true; + layout = "scroller"; + }; + + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, fuzzel" + "$mod, Escape, exec, hyprctl switchxkblayout all next" + "$mod, M, scroller:fitsize, active" + "$mod, K, scroller:cyclesize" + "$modCtrl, H, killactive" + "$modCtrl, M, fullscreen" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + + ", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/" + "CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/" + "SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/" + # navigation + #"$modCtrl, N," + "$mod, $left, scroller:movefocus, l" + "$mod, $down, scroller:movefocus, d" + "$mod, $up, scroller:movefocus, u" + "$mod, $right, scroller:movefocus, r" + "$modshift, $left, workspace, e-1" + "$modshift, $right, workspace, e+1" + "$mod, left, scroller:movefocus, l" + "$mod, up, scroller:movefocus, u" + "$mod, down, scroller:movefocus, d" + "$mod, right, scroller:movefocus, r" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + + "$modCtrl, $left, scroller:movewindow, l" + "$modCtrl, $down, scroller:movewindow, d" + "$modCtrl, $up, scroller:movewindow, u" + "$modCtrl, $right, scroller:movewindow, r" + "$modCtrl, left, scroller:movewindow, l" + "$modCtrl, up, scroller:movewindow, u" + "$modCtrl, down, scroller:movewindow, d" + "$modCtrl, right, scroller:movewindow, r" + # workspaces + "$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" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, 10" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + ]; + binde = [ + "$mod, comma, resizeactive, -10 0" + "$mod, period, resizeactive, 10 0" + "$modShift, comma, resizeactive, 0 -10" + "$modShift, period, resizeactive, 0 10" + ]; + bindl = [ + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, auto, preferred, 1.2'" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modCtrl, Escape, exit" + ]; + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 500; + }; + windowrulev2 = [ + "float, class:(com.github.hluk.copyq)" + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + ]; + }; + + services.hyprpaper = { + enable = true; + }; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 600; + on-timeout = "hyprlock"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["gitea-local"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 8; + margin-right = 8; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/hypr" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "hyprland/workspaces" = { + format = "{id}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "hyprland/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/hypr" = { + orientation = "inherit"; + modules = [ + "hyprland/language" + "hyprland/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0E; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base08; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + #corners = "top-right,bottom-left"; + offset = "12x12"; + origin = "top-right"; + timeout = 15; + frame_width = 4; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + + home.packages = with pkgs; [ + dconf + glib + grimblast + grim + slurp + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + papirus-icon-theme + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/sway/main.nix b/hosts/sarien/users/user/desktop/sway/main.nix new file mode 100644 index 0000000..4adf6c7 --- /dev/null +++ b/hosts/sarien/users/user/desktop/sway/main.nix @@ -0,0 +1,922 @@ +{ + config, + pkgs, + # pkgs-51b85c, + lib, + ... +}: { + # imports = [./walker.nix]; + stylix.targets.sway.enable = true; + wayland.windowManager.sway = { + enable = true; + systemd.enable = true; + # xwayland.enable = false; + wrapperFeatures.gtk = true; + config = let + modifier = "Mod4"; + terminal = "wezterm"; + launcher = "fuzzel"; + clipboard = "copyq toggle"; + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + bars = [ + { + command = "${pkgs.waybar}/bin/waybar"; + } + ]; + + modifier = "${modifier}"; + terminal = "${terminal}"; + menu = "${launcher}"; + + left = "${left}"; + down = "${down}"; + up = "${up}"; + right = "${right}"; + + workspaceLayout = "tabbed"; + + input = { + "*" = { + xkb_layout = "us,ua"; + repeat_delay = "200"; + repeat_rate = "50"; + accel_profile = "flat"; + }; + "type:touchpad" = { + tap = "enabled"; + scroll_method = "two_finger"; + }; + }; + output = { + "Samsung Electric Company S24R65x H4TMA03291" = { + mode = "1920x1080@74.973Hz"; + pos = "0 0"; + adaptive_sync = "on"; + allow_tearing = "yes"; + max_render_time = "off"; + }; + "AOC 27V2G5 0x0000026C" = { + pos = "1920 0"; + }; + }; + keybindings = lib.mkForce { + "${modifier}+Ctrl+q" = "kill"; + "${modifier}+Ctrl+Escape" = "exit"; + "${modifier}+Ctrl+r" = "reload"; + + "${modifier}+Ctrl+${left}" = "move left"; + "${modifier}+Ctrl+${down}" = "move down"; + "${modifier}+Ctrl+${up}" = "move up"; + "${modifier}+Ctrl+${right}" = "move right"; + "${modifier}+Ctrl+left" = "move left"; + "${modifier}+Ctrl+down" = "move down"; + "${modifier}+Ctrl+up" = "move up"; + "${modifier}+Ctrl+right" = "move right"; + "${modifier}+Ctrl+1" = "move window workspace 1"; + "${modifier}+Ctrl+2" = "move window workspace 2"; + "${modifier}+Ctrl+3" = "move window workspace 3"; + "${modifier}+Ctrl+4" = "move window workspace 4"; + "${modifier}+Ctrl+5" = "move window workspace 5"; + "${modifier}+Ctrl+6" = "move window workspace 6"; + "${modifier}+Ctrl+7" = "move window workspace 7"; + "${modifier}+Ctrl+8" = "move window workspace 8"; + "${modifier}+Ctrl+9" = "move window workspace 9"; + "${modifier}+Ctrl+0" = "move window workspace 10"; + "${modifier}+Ctrl+l" = "move window workspace prev"; + "${modifier}+Ctrl+y" = "move window workspace next"; + + "${modifier}+Shift+${left}" = "focus output left"; + "${modifier}+Shift+${down}" = "focus output down"; + "${modifier}+Shift+${up}" = "focus output up"; + "${modifier}+Shift+${right}" = "focus output right"; + "${modifier}+Shift+left" = "focus output left"; + "${modifier}+Shift+down" = "focus output down"; + "${modifier}+Shift+up" = "focus output up"; + "${modifier}+Shift+right" = "focus output right"; + + "${modifier}+Return" = "exec ${terminal}"; + "${modifier}+Shift+v" = "exec ${clipboard}"; + "${modifier}+Space" = "exec ${launcher}"; + + "${modifier}+c" = "splith"; + "${modifier}+d" = "splitv"; + "${modifier}+s" = "layout toggle split"; + "${modifier}+t" = "layout tabbed"; + "${modifier}+h" = "focus mode_toggle"; + "${modifier}+f" = "floating toggle"; + "${modifier}+m" = "fullscreen toggle"; + "${modifier}+g" = "sticky toggle"; + "${modifier}+b" = "bar mode toggle"; + + "--locked ${modifier}+Escape" = "exec swaymsg input \"*\" xkb_switch_layout next"; + "Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -o -r -c '#ff0000ff')" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ~/pics/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png''; + + "${modifier}+1" = "workspace 1"; + "${modifier}+2" = "workspace 2"; + "${modifier}+3" = "workspace 3"; + "${modifier}+4" = "workspace 4"; + "${modifier}+5" = "workspace 5"; + "${modifier}+6" = "workspace 6"; + "${modifier}+7" = "workspace 7"; + "${modifier}+8" = "workspace 8"; + "${modifier}+9" = "workspace 9"; + "${modifier}+0" = "workspace 10"; + "${modifier}+l" = "workspace prev"; + "${modifier}+y" = "workspace next"; + + "${modifier}+${left}" = "focus left"; + "${modifier}+${down}" = "focus down"; + "${modifier}+${up}" = "focus up"; + "${modifier}+${right}" = "focus right"; + "${modifier}+left" = "focus left"; + "${modifier}+down" = "focus down"; + "${modifier}+up" = "focus up"; + "${modifier}+right" = "focus right"; + }; + window = { + border = 1; + # hideEdgeBorders = "smart"; + }; + gaps = { + # top = 6; + # bottom = 6; + # left = 6; + # right = 6; + outer = 6; + inner = 3; + }; + floating.criteria = [ + { + app_id = "com.github.hluk.copyq"; + } + { + app_id = "com.saivert.pwvucontrol"; + } + ]; + }; + }; + programs.swaylock.enable = true; + services.swayidle = { + enable = true; + systemdTarget = "sway-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock}/bin/swaylock -fF"; + } + { + timeout = 301; + command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; + resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; + } + ]; + events = [ + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF &&"; + } + { + event = "unlock"; + command = "${pkgs.procps}/bin/pkill -SIGUSR1 swaylock"; + } + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF & ${pkgs.playerctl}/bin/playerctl pause"; + } + ]; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services = { + network-manager-applet.enable = true; + blueman-applet.enable = true; + copyq.enable = true; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + # systemd = { + # enable = true; + # target = "graphical-session.target"; + # }; + settings = { + bar-0 = { + ipc = true; + id = "bar-0"; + layer = "top"; + position = "bottom"; + height = 32; + spacing = 6; + # margin-top = 8; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/sway" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + "privacy" + "tray" + "wireplumber" + # "group/laptop" + "idle_inhibitor" + ]; + "sway/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "I"; + "2" = "II"; + "3" = "III"; + "4" = "IV"; + "5" = "V"; + "6" = "VI"; + "7" = "VII"; + "8" = "IIX"; + "9" = "IX"; + "10" = "X"; + #focused = "󰗝"; + #active = "󰻃"; + #default = "󰄰"; + }; + }; + "sway/language" = { + format = "{flag}"; + tooltip-format = "{long}"; + on-click = "swaymsg input type:keyboard xkb_switch_layout next"; + }; + "group/sway" = { + orientation = "inherit"; + modules = [ + "sway/language" + "sway/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "custom/backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + # "custom/backlight" = { + # format = "{}% {icon}"; + # interval = 1; + # format-icons = ["󰃠"]; + # }; + # "custom/kbd-backlight" = { + # exec = "brightnessctl s 5%+"; + # interval = 1; + # format = "{}% {icon}"; + # format-icons = ["󰌌"]; + # on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; + # on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; + # }; + # battery = { + # states = { + # good = 95; + # warning = 30; + # critical = 15; + # }; + # format = "{capacity}% {icon}"; + # format-full = "{capacity}% 󱟢"; + # format-charging = "{capacity}% 󰂄"; + # format-plugged = "{capacity}% 󰚥"; + # format-alt = "{icon} {time}"; + # format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + # }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + # "power-profiles-daemon" = { + # format = "{icon}"; + # tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + # tooltip = true; + # format-icons = { + # default = "󱡮"; + # performance = "󱡮"; + # balanced = ""; + # power-saver = ""; + # }; + # }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + window#waybar { + background-color: @base00; + border: 1px solid @base0D; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + .modules-left, + .modules-center, + .modules-right { + padding: 1px; + margin-left: 4px; + margin-right: 4px; + } + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.5em; + color: @base05; + background-color: @base00; + } + + /* #upower, + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.5em; + } */ + + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.focused, + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base0D; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0B; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base0A; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.rofi = { + enable = true; + theme = { + window = { + height = 360; + border = 3; + }; + + inputbar = { + children = ["prompt" "entry"]; + border-radius = 5; + padding = 2; + }; + + prompt = { + padding = 6; + border-radius = 3; + margin = "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "~>"; + }; + + entry = { + padding = 6; + margin = "20px 0px 0px 10px"; + }; + + listview = { + border = "0px 0px 0px"; + padding = "6px 0px 0px"; + margin = "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = 5; + }; + + element-icon = { + size = 25; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = 10; + vertical-align = "0.5"; + horizontal-align = "0.5"; + }; + + message = { + margin = 2; + padding = 2; + border-radius = 5; + }; + + textbox = { + padding = 6; + margin = "20 0 0 20"; + }; + }; + extraConfig = { + show-icons = true; + modi = "run,drun,window"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 8; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 2; + radius = 4; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 4; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "bottom-right"; + timeout = 15; + frame_width = 2; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + # services.flameshot = { + # enable = true; + # settings = { + # General = { + # buttons = "@Variant(000x7f000vQList0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)"; + # filenamePattern = "screenshot-%F_%H-%M-%S"; + # saveAsFileExtension = "png"; + # savePath = "/home/user/pics/screenshots"; + # uiColor = "#${config.lib.stylix.colors.base0D}"; + # showStartupLaunchMessage = false; + # showDesktopNotification = false; + # showHelp = false; + # }; + # }; + # }; + home.packages = with pkgs; [ + nautilus + helvum + loupe + evince + celluloid + mission-center + dconf + glib + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + libqalculate + #papirus-icon-theme + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + }; + }; + + systemd.user.settings.Manager.DefaultEnvironment = { + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # # }; + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + # walker = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # xwayland-satellite = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["niri.service"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/atelier-estuary.nix b/hosts/sarien/users/user/desktop/theming/atelier-estuary.nix new file mode 100644 index 0000000..71f38c2 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/atelier-estuary.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-estuary.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-ne3v2r.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool-light.nix b/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool-light.nix new file mode 100644 index 0000000..23fc859 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool-light.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml"; + polarity = "light"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-m37gy8.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Light"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool.nix b/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool.nix new file mode 100644 index 0000000..86e39f1 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/atelier-sulphurpool.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-7p3vy9.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/ayu-dark.nix b/hosts/sarien/users/user/desktop/theming/ayu-dark.nix new file mode 100644 index 0000000..6ae2a19 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/ayu-dark.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-exj8pw.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/users/user/desktop/theming/ayu-mirage.nix b/hosts/sarien/users/user/desktop/theming/ayu-mirage.nix new file mode 100644 index 0000000..3bb367d --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/ayu-mirage.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-mirage.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-wexo3x.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/users/user/desktop/theming/catppuccin-macchiato.nix b/hosts/sarien/users/user/desktop/theming/catppuccin-macchiato.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/catppuccin-macchiato.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/dracula.nix b/hosts/sarien/users/user/desktop/theming/dracula.nix new file mode 100644 index 0000000..e861468 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/dracula.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/gruvbox.nix b/hosts/sarien/users/user/desktop/theming/gruvbox.nix new file mode 100644 index 0000000..546ddff --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/gruvbox.nix @@ -0,0 +1,71 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + gruvbox-plus-icons + (nerdfonts.override {fonts = ["FantasqueSansMono" "Ubuntu" "UbuntuSans"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.capitaine-cursors-themed; + name = "Capitaine Cursors (Gruvbox)"; + size = 24; + }; + image = ../wallpapers/wallhaven-qze297.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Gruvbox-Plus-Dark"; + package = pkgs.gruvbox-plus-icons; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Gruvbox-Plus-Dark"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/heetch.nix b/hosts/sarien/users/user/desktop/theming/heetch.nix new file mode 100644 index 0000000..5ae05f1 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/heetch.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Red"; + size = 24; + }; + image = ../wallpapers/wallhaven-9mdqgd.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/heetchduck.nix b/hosts/sarien/users/user/desktop/theming/heetchduck.nix new file mode 100644 index 0000000..8037eea --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/heetchduck.nix @@ -0,0 +1,55 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../../../../../../wallpapers/wallhaven-o5p5ql.jpg; + # image = null; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + base08 = "e33400"; + base09 = "e39400"; + base0A = "f2ce00"; + base0B = "5ccc96"; + base0C = "00a3cc"; + base0D = "7a5ccc"; + base0E = "b3a1e6"; + base0F = "ce6f8f"; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/outrun-dark.nix b/hosts/sarien/users/user/desktop/theming/outrun-dark.nix new file mode 100644 index 0000000..6364ec1 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/outrun-dark.nix @@ -0,0 +1,76 @@ +{ + # config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/outrun-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-o5p5ql.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + # stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + # }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/users/user/desktop/theming/rose-pine-moon.nix b/hosts/sarien/users/user/desktop/theming/rose-pine-moon.nix new file mode 100644 index 0000000..455ef3d --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/rose-pine-moon.nix @@ -0,0 +1,74 @@ +{ + config, + pkgs, + ... +}: { + fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + polarity = "dark"; + cursor = { + # package = pkgs.bibata-cursors-translucent; + package = pkgs.rose-pine-cursor; + name = "BreezeX-RosePineDawn-Linux"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + name = "rose-pine-moon"; + package = pkgs.rose-pine-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/selenized-black.nix b/hosts/sarien/users/user/desktop/theming/selenized-black.nix new file mode 100644 index 0000000..adfa2e6 --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/selenized-black.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-vml6j5.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/desktop/theming/solarized.nix b/hosts/sarien/users/user/desktop/theming/solarized.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/sarien/users/user/desktop/theming/solarized.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/users/user/home-configuration.nix b/hosts/sarien/users/user/home-configuration.nix new file mode 100644 index 0000000..6aca47a --- /dev/null +++ b/hosts/sarien/users/user/home-configuration.nix @@ -0,0 +1,17 @@ +{inputs, ...}: { + imports = with inputs; [ + nix-flatpak.homeManagerModules.nix-flatpak + nixvim.homeManagerModules.nixvim + walker.homeManagerModules.default + self.homeModules.desktop + ./programs.nix + ]; + home = { + stateVersion = "25.05"; + sessionPath = [ + "$HOME/.local/bin" + ]; + }; + desktop.hyprland.enable = true; + # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; +} diff --git a/hosts/sarien/users/user/programs.nix b/hosts/sarien/users/user/programs.nix new file mode 100644 index 0000000..767c15f --- /dev/null +++ b/hosts/sarien/users/user/programs.nix @@ -0,0 +1,45 @@ +{pkgs, ...}: { + imports = [./programs/main.nix]; + + shell = { + nushell.enable = true; + oh-my-posh.enable = true; + }; + + console.yazi.enable = true; + + programs = { + bat.enable = true; + eza.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + gitui.enable = true; + }; + + terminal = { + ghostty.enable = true; + kitty.enable = true; + }; + + editor = { + helix.enable = true; + neve.enable = true; + }; + + home.packages = with pkgs; [ + flatpak + waycheck + vial + git + ripgrep + trashy + fd + dust + procs + tree + zip + unzip + virt-manager + ]; +} diff --git a/hosts/sarien/users/user/programs/console.nix b/hosts/sarien/users/user/programs/console.nix new file mode 100644 index 0000000..dc72295 --- /dev/null +++ b/hosts/sarien/users/user/programs/console.nix @@ -0,0 +1,23 @@ +{ + # config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + eza + tree + speedtest-rs + zip + unzip + execline + fastfetch + alejandra + uutils-coreutils-noprefix + ]; +} diff --git a/hosts/sarien/users/user/programs/console/yazi.nix b/hosts/sarien/users/user/programs/console/yazi.nix new file mode 100644 index 0000000..274d52d --- /dev/null +++ b/hosts/sarien/users/user/programs/console/yazi.nix @@ -0,0 +1,88 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.console.yazi; +in { + options = { + console.yazi.enable = + mkEnableOption "enable yazi file manager"; + }; + config = mkIf cfg.enable { + programs.yazi = { + enable = true; + enableNushellIntegration = true; + settings = { + opener = { + open = [ + { + run = "xdg-open \"$@\""; + orphan = true; + desc = "Open"; + } + ]; + edit = [ + { + run = "$EDITOR \"$@\""; + block = true; + desc = "Edit"; + } + ]; + dragdrop = [ + { + run = "${pkgs.ripdrag}/bin/ripdrag \"$@\""; + desc = "Drag'n'drop"; + orphan = true; + for = "unix"; + } + ]; + }; + open.rules = [ + { + mime = "text/*"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.toml"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.c"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.cpp"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.rs"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.py"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.json"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*"; + use = ["open" "edit" "dragdrop"]; + } + ]; + }; + keymap = { + manager.append_keymap = [ + { + on = [""]; + run = ''shell '${pkgs.ripdrag}/bin/ripdrag -x "$@"' --confirm''; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/editor/helix.nix b/hosts/sarien/users/user/programs/editor/helix.nix new file mode 100644 index 0000000..6fa013e --- /dev/null +++ b/hosts/sarien/users/user/programs/editor/helix.nix @@ -0,0 +1,122 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.editor.helix; +in { + options = { + editor.helix.enable = + mkEnableOption "enable helix editor"; + }; + config = mkIf cfg.enable { + programs.helix = { + enable = true; + defaultEditor = true; + settings = { + editor = { + line-number = "relative"; + bufferline = "multiple"; + cursorline = true; + lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + statusline = { + left = ["mode" "spinner" "version-control"]; + center = ["file-name"]; + right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"]; + separator = "|"; + }; + soft-wrap = { + enable = true; + max-wrap = 25; + max-indent-retain = 0; + wrap-indicator = ""; + }; + }; + keys.normal = { + space = { + space = "file_picker"; + w = ":w"; + q = ":q"; + x = ":x"; + n = ":n"; + "," = "goto_previous_buffer"; + "." = "goto_next_buffer"; + l = ":reflow"; + }; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + languages = { + language-server = { + clangd = { + command = "${pkgs.clang-tools}/bin/clangd"; + }; + rust-analyzer = { + command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + }; + texlab = { + command = "${pkgs.texlab}/bin/texlab"; + }; + nil = { + command = "${pkgs.nil}/bin/nil"; + }; + markdown-oxide = { + command = "${pkgs.markdown-oxide}/bin/markdown-oxide"; + }; + tinymist = { + command = lib.getExe pkgs.tinymist; + }; + }; + language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.alejandra}/bin/alejandra"; + language-servers = ["nil"]; + } + { + name = "latex"; + auto-format = true; + formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent"; + language-servers = ["texlab"]; + } + { + name = "typst"; + auto-format = true; + formatter.command = lib.getExe pkgs.typstyle; + language-servers = ["tinymist"]; + } + { + name = "markdown"; + auto-format = true; + formatter.command = "${pkgs.comrak}/bin/comrak"; + language-servers = ["markdown-oxide"]; + } + { + name = "c"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "cpp"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "rust"; + auto-format = true; + language-servers = ["rust-analyzer"]; + formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/editor/main.nix b/hosts/sarien/users/user/programs/editor/main.nix new file mode 100644 index 0000000..2838df3 --- /dev/null +++ b/hosts/sarien/users/user/programs/editor/main.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./helix.nix + ./zed.nix + ./neve.nix + #./nixvim.nix + ]; +} diff --git a/hosts/sarien/users/user/programs/editor/neve.nix b/hosts/sarien/users/user/programs/editor/neve.nix new file mode 100644 index 0000000..6477381 --- /dev/null +++ b/hosts/sarien/users/user/programs/editor/neve.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: +with lib; let + cfg = config.editor.neve; +in { + options = { + editor.neve.enable = + mkEnableOption "enable neve neovim distribution"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + neovide + cpplint + statix + ]; + programs.nixvim = { + enable = true; + imports = [inputs.neve.nixvimModule]; + viAlias = true; + vimAlias = true; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/editor/nixvim.nix b/hosts/sarien/users/user/programs/editor/nixvim.nix new file mode 100644 index 0000000..70511ce --- /dev/null +++ b/hosts/sarien/users/user/programs/editor/nixvim.nix @@ -0,0 +1,270 @@ +{ + pkgs, + pkgs-51b85c, + lib, + config, + ... +}: { + options = { + editor.neovim.enable = + lib.mkEnableOption "enable neovim text editor"; + }; + config = lib.mkIf config.editors.neovim.enable { + # stylix.targets.nixvim.enable = true; + home.packages = with pkgs; [neovide]; + programs.nixvim = { + enable = true; + enableMan = true; + # package = ; + plugins.lualine.enable = true; + plugins.treesitter = { + enable = true; + folding = true; + }; + plugins = { + yazi.enable = true; + noice = { + enable = true; + popupmenu.backend = "nui"; + }; + notify.enable = true; + telescope.enable = true; + transparent.enable = true; + lsp-format.enable = true; + lsp-lines.enable = true; + lsp-status.enable = true; + which-key.enable = true; + web-devicons.enable = true; + + # vimtex = { + # enable = true; + # texlivePackage = pkgs.tectonic; #pkgs.texlive.combined.scheme-full; + # settings = { + # compiler_method = "tectonic"; + # view_method = "zathura_simple"; + # compiler_tectonic = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "--synctex" + # "--keep-logs" + # "-Z shell-escape" + # "-Z continue-on-errors" + # ]; + # }; + # compiler_latexmk = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "-xelatex" + # "-recorder" + # "-file-line-error" + # "-synctex=1" + # "-interaction=nonstopmode" + # "-shell-escape" + # ]; + # }; + # }; + # }; + treesitter-textobjects.enable = true; + cmp-latex-symbols.enable = true; + dap.enable = true; + rustaceanvim.enable = true; + lsp = { + enable = true; + servers = { + clangd.enable = true; + #rust_analyzer = { + # enable = true; + # installRustc = true; + # installCargo = true; + #}; + lua_ls.enable = true; + nil_ls.enable = true; + }; + }; + }; + plugins = { + cmp-nvim-lsp = {enable = true;}; # lsp + cmp-buffer = {enable = true;}; + cmp-path = {enable = true;}; # file system paths + cmp_luasnip = {enable = true;}; # snippets + cmp-cmdline = {enable = true;}; # autocomplete for cmdline + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + ]; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + experimental = { + ghost_text = true; + }; + }; + }; + luasnip = { + enable = true; + settings = { + enable_autosnippets = true; + store_selection_keys = ""; + }; + }; + }; + clipboard = { + providers.wl-copy.enable = true; + }; + + globals.mapleader = " "; + globals.maplocalleader = ","; + + opts = { + # Show line numbers + number = true; + + # Show relative line numbers + relativenumber = true; + + # Use the system clipboard + clipboard = "unnamedplus"; + + # Number of spaces that represent a + tabstop = 2; + softtabstop = 2; + + # Show tabline always + showtabline = 2; + + # Use spaces instead of tabs + expandtab = true; + + # Enable smart indentation + smartindent = true; + + # Number of spaces to use for each step of (auto)indent + shiftwidth = 2; + + # Enable break indent + breakindent = true; + + # Highlight the screen line of the cursor + cursorline = true; + + # Minimum number of screen lines to keep above and below the cursor + scrolloff = 8; + + # Enable mouse support + mouse = "a"; + + # Set folding method to manual + foldmethod = "manual"; + + # Disable folding by default + foldenable = false; + + # Wrap long lines at a character in 'breakat' + linebreak = true; + + # Disable spell checking + spell = false; + + # Disable swap file creation + swapfile = false; + + # Time in milliseconds to wait for a mapped sequence to complete + timeoutlen = 300; + + # Enable 24-bit RGB color in the TUI + termguicolors = true; + + # Don't show mode in the command line + showmode = false; + + # Open new split below the current window + splitbelow = true; + + # Keep the screen when splitting + splitkeep = "screen"; + + # Open new split to the right of the current window + splitright = true; + + # Hide command line unless needed + cmdheight = 0; + + # Remove EOB + fillchars = { + eob = " "; + }; + }; + keymaps = [ + { + mode = "n"; + key = "j"; + action = "gj"; + } + { + mode = "n"; + key = "k"; + action = "gk"; + } + { + mode = "n"; + key = "n"; + action = "nzzzv"; + } + { + mode = "n"; + key = "N"; + action = "Nzzzv"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = "yy"; + action = "Yazi"; + options = {desc = "open yazi";}; + } + { + mode = "n"; + key = "fo"; + action = "Telescope oldfiles"; + options = {desc = "Telescope oldfiles";}; + } + { + mode = "n"; + key = "ff"; + action = "Telescope find_files"; + options = {desc = "Telescope find files";}; + } + ]; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/editor/zed.nix b/hosts/sarien/users/user/programs/editor/zed.nix new file mode 100644 index 0000000..44609c8 --- /dev/null +++ b/hosts/sarien/users/user/programs/editor/zed.nix @@ -0,0 +1,114 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.editor.zed; +in { + options = { + editor.zed.enable = + mkEnableOption "enable zed editor"; + }; + config = mkIf cfg.enable { + programs.zed-editor = { + enable = true; + extensions = [ + "nix" + "latex" + "typst" + ]; + userSettings = { + vim_mode = true; + ui_font_size = lib.mkForce 16; + buffer_font_size = lib.mkForce 16; + features = {inline_completion_provider = "none";}; + auto_update = false; + languages = { + "Nix" = { + language-servers = [ + "nil" + "!nixd" + ]; + formatter = { + external.command = lib.getExe pkgs.alejandra; + }; + }; + "Rust" = { + formatter = { + external = { + command = lib.getExe pkgs.rustfmt; + arguments = ["--edition" "2021"]; + }; + }; + }; + "typst" = { + language-servers = ["tinymist"]; + format_on_save = "on"; + formatter = { + external = { + command = lib.getExe pkgs.typstyle; + arguments = ["-i" "{buffer_path}"]; + }; + }; + }; + "Python" = { + format_on_save = "on"; + formatter = [ + { + language_server = { + name = "ruff"; + }; + } + ]; + language_servers = ["ruff"]; + }; + }; + lsp = { + clangd = { + binary = { + arguments = []; + path = "${pkgs.clang-tools}/bin/clangd"; + }; + }; + rust-analyzer = { + binary = { + arguments = []; + path = lib.getExe pkgs.rust-analyzer; + }; + }; + ruff = { + binary = { + arguments = []; + path = lib.getExe pkgs.ruff; + }; + }; + nil = { + binary = { + arguments = []; + path = lib.getExe pkgs.nil; + }; + initialization_options.formatting.command = [(lib.getExe pkgs.alejandra)]; + }; + texlab = { + binary = { + arguments = []; + path = lib.getExe pkgs.texlab; + }; + }; + tinymist = { + binary = { + arguments = []; + path = lib.getExe pkgs.tinymist; + }; + }; + }; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/flatpak.nix b/hosts/sarien/users/user/programs/flatpak.nix new file mode 100644 index 0000000..ad2cd10 --- /dev/null +++ b/hosts/sarien/users/user/programs/flatpak.nix @@ -0,0 +1,107 @@ +{ + services.flatpak = { + enable = true; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + { + name = "hero-persson"; + location = "https://hero-persson.github.io/unmojang-flatpak/index.flatpakrepo"; + } + ]; + packages = [ + # misc + "io.github.zen_browser.zen" + "net.mullvad.MullvadBrowser" + "com.obsproject.Studio" + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + "org.qbittorrent.qBittorrent" + + # "com.transmissionbt.Transmission" + "com.usebottles.bottles" + "com.logseq.Logseq" + "io.github.martchus.syncthingtray" + + # chatting + "org.signal.Signal" + "im.riot.Riot" + "org.telegram.desktop" + "io.github.spacingbat3.webcord" + "org.mozilla.Thunderbird" + + # media + "org.atheme.audacious" + "io.freetubeapp.FreeTube" + #"io.github.celluloid_player.Celluloid" + # "io.mpv.Mpv" + + # gaming + #"com.github._0negal.Viper" + "net.lutris.Lutris" + "com.heroicgameslauncher.hgl" + { + appId = "org.unmojang.FjordLauncher"; + origin = "hero-persson"; + } + "org.freedesktop.Platform.VulkanLayer.MangoHud//24.08" + "org.freedesktop.Platform.VulkanLayer.gamescope//24.08" + ]; + overrides = { + "global" = { + # Force Wayland by default + Context = { + sockets = ["wayland" "!x11" "!fallback-x11"]; + filesystems = [ + "xdg-run/pipewire-0" + "xdg-config/gtk-3.0:ro" + "xdg-config/gtk-4.0:ro" + # "~/.local/share/fonts:ro" + "~/.local/share/icons:ro" + # "~/.nix-profile/share/icons:ro" + # "~/.nix-profile/share/fonts:ro" + "/nix/store:ro" + ]; + }; + Environment = { + XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + #GTK_THEME = "adw-gtk3"; + }; + }; + "io.github.martchus.syncthingtray".Context.filesystems = ["/storage/games/heroic/Factorio/game/saves"]; + "org.octave.Octave".Context.sockets = ["x11"]; + "org.octave.Octave".Environment = {QT_QPA_PLATFORM = "xcb";}; + "com.valvesoftware.Steam" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/steam"]; + }; + Environment = { + STEAM_FORCE_DESKTOPUI_SCALING = "1.3"; + }; + }; + "org.signal.Signal" = { + Environment = { + SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + }; + }; + "net.lutris.Lutris".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/lutris" "~/games/lutris"]; + }; + "com.heroicgameslauncher.hgl".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/heroic" "~/games/heroic"]; + }; + "com.usebottles.Bottles" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"]; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/main.nix b/hosts/sarien/users/user/programs/main.nix new file mode 100644 index 0000000..ef6db4a --- /dev/null +++ b/hosts/sarien/users/user/programs/main.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./console.nix + ./flatpak.nix + ./console/yazi.nix + ./editor/main.nix + ./shell/main.nix + ./terminal/main.nix + ]; +} diff --git a/hosts/sarien/users/user/programs/shell/main.nix b/hosts/sarien/users/user/programs/shell/main.nix new file mode 100644 index 0000000..fd8a6f4 --- /dev/null +++ b/hosts/sarien/users/user/programs/shell/main.nix @@ -0,0 +1,3 @@ +{ + imports = [./nushell.nix ./oh-my-posh.nix]; +} diff --git a/hosts/sarien/users/user/programs/shell/nushell.nix b/hosts/sarien/users/user/programs/shell/nushell.nix new file mode 100644 index 0000000..73ad8f5 --- /dev/null +++ b/hosts/sarien/users/user/programs/shell/nushell.nix @@ -0,0 +1,100 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.shell.nushell; +in { + options = { + shell.nushell.enable = + mkEnableOption "enable nushell"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh.enableNushellIntegration = true; + programs.zoxide = { + enable = true; + enableNushellIntegration = true; + }; + programs.carapace = { + enable = true; + enableNushellIntegration = true; + }; + programs.atuin = { + enable = true; + enableNushellIntegration = true; + flags = [ + "--disable-up-arrow" + ]; + }; + programs.nushell = { + enable = true; + environmentVariables = { + CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; + CARAPACE_MATCH = 1; + EDITOR = "hx"; + }; + shellAliases = { + cd = "z"; + cat = "bat"; + l = "ls -l"; + nix-shell = "nix-shell --command nu"; + }; + extraConfig = '' + $env.config = { + show_banner: false + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + + ls: { + use_ls_colors: true + clickable_links: true + } + + rm: { + always_trash: true + } + edit_mode: 'vi' + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "fuzzy" + external: { + enable: true + # max_results: 100 + # completer: $carapace_completer # check 'carapace_completer' + } + } + } + ''; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/shell/oh-my-posh.nix b/hosts/sarien/users/user/programs/shell/oh-my-posh.nix new file mode 100644 index 0000000..79815ff --- /dev/null +++ b/hosts/sarien/users/user/programs/shell/oh-my-posh.nix @@ -0,0 +1,106 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.shell.oh-my-posh; +in { + options = { + shell.oh-my-posh.enable = + mkEnableOption "enable oh my posh"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh = { + enable = true; + settings = { + version = 2; + final_space = true; + console_title_template = "{{ .Shell }} in {{ .Folder }}"; + blocks = [ + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "path"; + style = "plain"; + background = "transparent"; + foreground = "blue"; + template = "{{ .Path }}"; + properties = { + style = "full"; + }; + } + { + type = "text"; + style = "plain"; + background = "transparent"; + template = "{{ if .Env.BW_SESSION }} 󰞀{{ end }}"; + } + { + type = "nix-shell"; + style = "plain"; + background = "transparent"; + template = "{{ if ne .Type \"unknown\" }} {{ end }}"; + } + { + type = "git"; + style = "plain"; + foreground = "p:grey"; + background = "transparent"; + template = " {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}"; + properties = { + branch_icon = ""; + commit_icon = "@"; + fetch_status = true; + }; + } + ]; + } + { + type = "rprompt"; + overflow = "hidden"; + segments = [ + { + type = "executiontime"; + style = "plain"; + foreground = "yellow"; + background = "transparent"; + template = "{{ .FormattedMs }}"; + properties = { + threshold = 5000; + }; + } + ]; + } + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "text"; + style = "plain"; + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯"; + } + ]; + } + ]; + transient_prompt = { + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯ "; + }; + secondary_prompt = { + foreground = "magenta"; + background = "transparent"; + template = "❯❯ "; + }; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/shell/zsh.nix b/hosts/sarien/users/user/programs/shell/zsh.nix new file mode 100644 index 0000000..7f4f53b --- /dev/null +++ b/hosts/sarien/users/user/programs/shell/zsh.nix @@ -0,0 +1,75 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + zsh.enable = + lib.mkEnableOption "enable z shell"; + }; + config = lib.mkIf config.zsh.enable { + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + initExtra = '' + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + ''; + # promptInit = "oh-my-posh init zsh -c ~/.config/oh-my-posh/zen.toml"; + enableCompletion = true; + autosuggestion.enable = true; + #autosuggestion.highlight = "fg=#ff00ff,bg=cyan,bold,underline"; + shellAliases = { + ls = "eza"; + cat = "bat"; + cd = "z"; + l = "eza -alh"; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + plugins = [ + { + name = "zsh-autosuggestions"; + file = "zsh-autosuggestions.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autocomplete"; + rev = "v0.7.0"; + sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw="; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.8.0"; + sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; + }; + } + { + name = "zsh-history-substring-search"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-history-substring-search"; + rev = "v1.1.0"; + sha256 = "sha256-GSEvgvgWi1rrsgikTzDXokHTROoyPRlU0FVpAoEmXG4="; + }; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsin.fromh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/terminal/ghostty.nix b/hosts/sarien/users/user/programs/terminal/ghostty.nix new file mode 100644 index 0000000..dba50d1 --- /dev/null +++ b/hosts/sarien/users/user/programs/terminal/ghostty.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.ghostty; +in { + options = { + terminal.ghostty.enable = mkEnableOption "enable ghostty terminal"; + }; + config = mkIf cfg.enable { + programs.ghostty = { + enable = true; + settings = { + gtk-single-instance = true; + window-decoration = "client"; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/terminal/kitty.nix b/hosts/sarien/users/user/programs/terminal/kitty.nix new file mode 100644 index 0000000..98f76b6 --- /dev/null +++ b/hosts/sarien/users/user/programs/terminal/kitty.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.kitty; +in { + options = { + terminal.kitty.enable = + mkEnableOption "enable kitty terminal"; + }; + config = mkIf cfg.enable { + programs.kitty = { + enable = true; + settings = { + tab_bar_edge = "bottom"; + tab_bar_align = "left"; + tab_bar_style = "fade"; + # tab_separator = " "; + }; + }; + }; +} diff --git a/hosts/sarien/users/user/programs/terminal/main.nix b/hosts/sarien/users/user/programs/terminal/main.nix new file mode 100644 index 0000000..46dc60b --- /dev/null +++ b/hosts/sarien/users/user/programs/terminal/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./kitty.nix + ./ghostty.nix + ./wezterm.nix + ]; +} diff --git a/hosts/sarien/users/user/programs/terminal/wezterm.nix b/hosts/sarien/users/user/programs/terminal/wezterm.nix new file mode 100644 index 0000000..88a83e0 --- /dev/null +++ b/hosts/sarien/users/user/programs/terminal/wezterm.nix @@ -0,0 +1,90 @@ +{ + config, + inputs, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.terminal.wezterm; +in { + options = { + terminal.wezterm.enable = + mkEnableOption "enable wez's terminal"; + }; + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = inputs.wezterm.packages.${pkgs.system}.default; + extraConfig = '' + local wezterm = require 'wezterm' + local act = wezterm.action + return { + front_end = 'WebGpu', + unix_domains = { + { + name = 'unix', + }, + }, + enable_kitty_graphics = true, + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + use_fancy_tab_bar = false, + inactive_pane_hsb = { + saturation = 0.8, + brightness = 0.7, + }, + -- window_frame = { + -- font = wezterm.font { family = 'Cantarell', weight = 'Bold' }, + -- }, + disable_default_key_bindings = true, + leader = { key = 'Space', mods = 'CTRL', timeout_milliseconds = 2000 }, + keys = { + { key = 'n', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) }, + { key = 'e', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Down', }, + { key = 'u', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Up', }, + { key = 'i', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) }, + { key = 'Enter', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, + { key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, + { key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, + { key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, + { key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, + { key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, + -- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, + { key = 'l', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, + { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, + { key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, + { key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, + { key = 'LeftArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Left' }, + { key = 'RightArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Right' }, + { key = 'UpArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Up' }, + { key = 'DownArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Down' }, + { key = ',', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '.', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = '%', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '"', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = 'n', mods = 'CTRL', action = act.ActivatePaneDirection 'Left', }, + { key = 'i', mods = 'CTRL', action = act.ActivatePaneDirection 'Right', }, + { key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, + { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = false } }, + { key = 'f', mods = 'SHIFT|CTRL', action = act.CloseCurrentPane{ confirm = false } }, + { key = 'b', mods = 'LEADER|CTRL', action = act.SendString '\x02', }, + { key = 'Enter', mods = 'LEADER', action = act.ActivateCopyMode, }, + { key = 'p', mods = 'LEADER', action = act.PasteFrom 'PrimarySelection', }, + { key = 'k', mods = 'SHIFT|CTRL', action = act.Multiple + { + act.ClearScrollback 'ScrollbackAndViewport', + act.SendKey { key = 'L', mods = 'CTRL' }, + }, + }, + { key = 'r', mods = 'LEADER', action = act.ActivateKeyTable { name = 'resize_pane', one_shot = false, }, } + }, + } + ''; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/gnome/main.nix b/hosts/sarien/work_user/desktop/gnome/main.nix new file mode 100644 index 0000000..36deffe --- /dev/null +++ b/hosts/sarien/work_user/desktop/gnome/main.nix @@ -0,0 +1,176 @@ +{ + config, + pkgs, + # pkgs-51b85c, + # lib, + ... +}: { + # imports = [./walker.nix]; + # services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + home.packages = with pkgs; [ + nautilus + ghostty + helvum + loupe + evince + junction + celluloid + mission-center + dconf + glib + libnotify + playerctl + # wdisplays + pwvucontrol + wl-clipboard + # polkit_gnome + # libqalculate + #papirus-icon-theme + # gnomeExtensions.alphabetical-app-grid + # gnomeExtensions.appindicator + # gnomeExtensions.caffeine + # gnomeExtensions.pano + # gnomeExtensions.forge + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + # web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + # gtk.enable = true; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + # }; + dconf.settings = { + "io/github/celluloid-player/celluloid" = { + always-use-floating-controls = true; + always-use-floating-header-bar = true; + csd-enable = true; + }; + + "org/gnome/desktop/a11y/applications" = { + screen-reader-enabled = false; + }; + + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + color-scheme = "prefer-dark"; + cursor-blink-time = 1200; + enable-animations = true; + gtk-enable-primary-paste = false; + text-scaling-factor = 1.0; + toolbar-style = "text"; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/wm/keybindings" = { + switch-input-source = ["Escape"]; + switch-input-source-backward = ["Escape"]; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = true; + button-layout = "icon:close"; + }; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + workspaces-only-on-primary = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "forge@jmmaranan.com"]; + night-light-enabled = false; + night-light-schedule-automatic = false; + }; + + "org/gnome/software" = { + download-updates = false; + download-updates-notify = false; + first-run = false; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + + "org/gtk/gtk4/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + sidebar-width = 140; + sort-column = "name"; + sort-directories-first = true; + sort-order = "ascending"; + type-format = "category"; + view-type = "list"; + }; + + "org/gtk/settings/file-chooser" = { + date-format = "regular"; + location-mode = "path-bar"; + show-hidden = true; + show-size-column = true; + show-type-column = true; + sort-column = "name"; + sort-directories-first = false; + sort-order = "ascending"; + type-format = "category"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/jay/i3status-rust-0-33-2.nix b/hosts/sarien/work_user/desktop/jay/i3status-rust-0-33-2.nix new file mode 100644 index 0000000..911ab42 --- /dev/null +++ b/hosts/sarien/work_user/desktop/jay/i3status-rust-0-33-2.nix @@ -0,0 +1,68 @@ +# with import {}; # bring all of Nixpkgs into scope +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + makeWrapper, + dbus, + libpulseaudio, + notmuch, + openssl, + ethtool, + lm_sensors, + iw, + iproute2, + withICUCalendar ? false, +}: +rustPlatform.buildRustPackage rec { + pname = "i3status-rust"; + version = "0.33.2"; + + src = fetchFromGitHub { + owner = "greshake"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-xJm4MsEU0OVX401WvKllg3zUwgCvjLxlAQzXE/oD1J0="; + }; + + cargoHash = "sha256-9jbJVnZhFbMYldBkRVSIiorUYDNtF3AAwNEpyNJXpjo="; + + nativeBuildInputs = [pkg-config makeWrapper]; + + buildInputs = [dbus libpulseaudio notmuch openssl lm_sensors]; + + buildFeatures = + [ + "notmuch" + "maildir" + "pulseaudio" + ] + ++ (lib.optionals withICUCalendar ["icu_calendar"]); + + prePatch = '' + substituteInPlace src/util.rs \ + --replace "/usr/share/i3status-rust" "$out/share" + ''; + + postInstall = '' + mkdir -p $out/share + cp -R examples files/* $out/share + ''; + + postFixup = '' + wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [iproute2 ethtool iw]} + ''; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with lib; { + description = "Very resource-friendly and feature-rich replacement for i3status"; + homepage = "https://github.com/greshake/i3status-rust"; + license = licenses.gpl3Only; + mainProgram = "i3status-rs"; + maintainers = with maintainers; [backuitist globin]; + platforms = platforms.linux; + }; +} diff --git a/hosts/sarien/work_user/desktop/jay/main.nix b/hosts/sarien/work_user/desktop/jay/main.nix new file mode 100644 index 0000000..f43e043 --- /dev/null +++ b/hosts/sarien/work_user/desktop/jay/main.nix @@ -0,0 +1,308 @@ +{ + config, + pkgs, + ... +}: { + home.packages = [pkgs.jay]; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; + config.jay = { + default = ["gtk"]; + "org.freedesktop.impl.portal.ScreenCast" = ["jay"]; + "org.freedesktop.impl.portal.RemoteDesktop" = ["jay"]; + "org.freedesktop.impl.portal.Inhibit" = ["none"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk4"]; + }; + }; + programs.i3status-rust = { + enable = true; + package = pkgs.callPackage ./i3status-rust-0-33-2.nix {}; + bars = { + default = { + theme = "plain"; + blocks = [ + { + alert = 10.0; + block = "disk_space"; + info_type = "available"; + interval = 60; + path = "/"; + warning = 20.0; + } + { + block = "memory"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; + } + { + block = "cpu"; + interval = 1; + } + { + block = "load"; + format = " $icon $1m "; + interval = 1; + } + { + block = "sound"; + } + { + block = "time"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; + interval = 60; + } + ]; + }; + }; + }; + programs.i3status = { + enable = true; + enableDefault = true; + general = { + output_format = "i3bar"; + interval = 1; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 0; + vertical-pad = 0; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + + xdg.configFile.jay = { + target = "jay/config.toml"; + recursive = true; + source = (pkgs.formats.toml {}).generate "jay-config" { + keymap = '' + xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)" }; + }; + ''; + on-graphics-initialized = [ + # { + # type = "exec"; + # exec = "mako"; + # } + { + type = "exec"; + exec = "~/wl-tray-bridge/target/release/wl-tray-bridge"; + } + ]; + outputs = [ + { + match.connector = "eDP-1"; + scale = 1.2; + } + ]; + vrr = { + mode = "always"; + cursor-hz = 75; + }; + repeat-rate = { + rate = 50; + delay = 200; + }; + theme = { + bg-color = "#${config.lib.stylix.colors.base00}"; + bar-bg-color = "#${config.lib.stylix.colors.base00}"; + border-color = "#${config.lib.stylix.colors.base0D}"; + separator-color = "#${config.lib.stylix.colors.base01}"; + bar-status-text-color = "#${config.lib.stylix.colors.base05}"; + focused-title-text-color = "#${config.lib.stylix.colors.base07}"; + focused-title-bg-color = "#${config.lib.stylix.colors.base00}"; + focused-inactive-title-text-color = "#${config.lib.stylix.colors.base03}"; + focused-inactive-title-bg-color = "#${config.lib.stylix.colors.base00}"; + unfocused-title-text-color = "#${config.lib.stylix.colors.base03}"; + unfocused-title-bg-color = "#${config.lib.stylix.colors.base01}"; + attention-requested-bg-color = "#${config.lib.stylix.colors.base09}"; + font = "${config.stylix.fonts.sansSerif.name}"; + border-width = 2; + title-height = 24; + }; + status = { + format = "pango"; + exec = ["i3status-rs" "config-default"]; + }; + window-management-key = "Super_L"; + shortcuts = let + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + "logo-${left}" = "focus-left"; + "logo-${down}" = "focus-down"; + "logo-${up}" = "focus-up"; + "logo-${right}" = "focus-right"; + "logo-shift-${left}" = "move-left"; + "logo-shift-${down}" = "move-down"; + "logo-shift-${up}" = "move-up"; + "logo-shift-${right}" = "move-right"; + logo-d = "split-horizontal"; + logo-v = "split-vertical"; + logo-t = "toggle-split"; + logo-m = "toggle-mono"; + logo-shift-m = "toggle-fullscreen"; + logo-f = "focus-parent"; + logo-q = "close"; + logo-shift-f = "toggle-floating"; + alt-Return = { + type = "exec"; + exec = "wezterm"; + }; + logo-space = { + type = "exec"; + exec = "fuzzel"; + }; + logo-ctrl-q = "quit"; + logo-shift-r = "reload-config-toml"; + ctrl-alt-F1 = { + type = "switch-to-vt"; + num = 1; + }; + ctrl-alt-F2 = { + type = "switch-to-vt"; + num = 2; + }; + ctrl-alt-F3 = { + type = "switch-to-vt"; + num = 3; + }; + ctrl-alt-F4 = { + type = "switch-to-vt"; + num = 4; + }; + ctrl-alt-F5 = { + type = "switch-to-vt"; + num = 5; + }; + ctrl-alt-F6 = { + type = "switch-to-vt"; + num = 6; + }; + ctrl-alt-F7 = { + type = "switch-to-vt"; + num = 7; + }; + ctrl-alt-F8 = { + type = "switch-to-vt"; + num = 8; + }; + ctrl-alt-F9 = { + type = "switch-to-vt"; + num = 9; + }; + ctrl-alt-F10 = { + type = "switch-to-vt"; + num = 10; + }; + ctrl-alt-F11 = { + type = "switch-to-vt"; + num = 11; + }; + ctrl-alt-F12 = { + type = "switch-to-vt"; + num = 12; + }; + logo-1 = { + type = "show-workspace"; + name = "1"; + }; + logo-2 = { + type = "show-workspace"; + name = "2"; + }; + logo-3 = { + type = "show-workspace"; + name = "3"; + }; + logo-4 = { + type = "show-workspace"; + name = "4"; + }; + logo-5 = { + type = "show-workspace"; + name = "5"; + }; + logo-6 = { + type = "show-workspace"; + name = "6"; + }; + logo-7 = { + type = "show-workspace"; + name = "7"; + }; + logo-8 = { + type = "show-workspace"; + name = "8"; + }; + logo-9 = { + type = "show-workspace"; + name = "9"; + }; + logo-0 = { + type = "show-workspace"; + name = "10"; + }; + logo-shift-1 = { + type = "move-to-workspace"; + name = "1"; + }; + logo-shift-2 = { + type = "move-to-workspace"; + name = "2"; + }; + logo-shift-3 = { + type = "move-to-workspace"; + name = "3"; + }; + logo-shift-4 = { + type = "move-to-workspace"; + name = "4"; + }; + logo-shift-5 = { + type = "move-to-workspace"; + name = "5"; + }; + logo-shift-6 = { + type = "move-to-workspace"; + name = "6"; + }; + logo-shift-7 = { + type = "move-to-workspace"; + name = "7"; + }; + logo-shift-8 = { + type = "move-to-workspace"; + name = "8"; + }; + logo-shift-9 = { + type = "move-to-workspace"; + name = "9"; + }; + logo-shift-0 = { + type = "move-to-workspace"; + name = "10"; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/plasma/main.nix b/hosts/sarien/work_user/desktop/plasma/main.nix new file mode 100644 index 0000000..4ad1def --- /dev/null +++ b/hosts/sarien/work_user/desktop/plasma/main.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + # lib, + ... +}: { + #imports = [ ]; + stylix.targets.kde.enable = true; + home.packages = with pkgs; [ + noto-fonts-emoji + base16-schemes + wl-clipboard-rs + pwvucontrol + adw-gtk3 + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/fuzzel.nix b/hosts/sarien/work_user/desktop/river/fuzzel.nix new file mode 100644 index 0000000..22a4ffe --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 3; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/main.nix b/hosts/sarien/work_user/desktop/river/main.nix new file mode 100644 index 0000000..6812f46 --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/main.nix @@ -0,0 +1,310 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [ + ./niri.nix + ./wofi.nix + ./fuzzel.nix + ./waybar.nix + ./swaync.nix + ./swayidle.nix + ./swaylock.nix + ./wlsunset.nix + ./udiskie.nix + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Blue"; + size = 24; + }; + image = ../wallpapers/wallhaven-5g9ed8.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 12; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Papirus-Dark"; + }; + }; + + fuzzel.enable = true; + waybar.enable = true; + swaync.enable = false; + wlsunset.enable = true; + component.swaylock.enable = true; + swayidle.enable = true; + udiskie.enable = true; + imv.enable = true; + + services.gnome-keyring.enable = true; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + corners = "top-right,bottom-left"; + offset = "45x5"; + origin = "top-right"; + timeout = 15; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + home.packages = with pkgs; [ + dconf + glib + wbg + swayidle + swaylock-effects + libnotify + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + xwayland-satellite + papirus-icon-theme + #libsForQt5.qt5ct + #kdePackages.qt6ct + #libsForQt5.qtstyleplugin-kvantum + #kdePackages.qtstyleplugin-kvantum + #adwaita-qt + #adwaita-qt6 + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.configFile = { + #niri = { + # recursive = true; + # source = dotfiles/niri; + #}; + #qt5ct = { + # recursive = true; + # source = dotfiles/qt5ct; + #}; + #qt6ct = { + # recursive = true; + # source = dotfiles/qt6ct; + #}; + #Kvantum = { + # recursive = true; + # source = dotfiles/Kvantum; + #}; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + # Service = { + # Type = "dbus"; + # ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wbg = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.wbg}/bin/wbg ${config.stylix.image}"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + swayidle = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + + xwayland-satellite = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/swayidle.nix b/hosts/sarien/work_user/desktop/river/swayidle.nix new file mode 100644 index 0000000..7c1f7ac --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/swayidle.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + swayidle.enable = + lib.mkEnableOption "enable swayidle"; + }; + config = lib.mkIf config.swayidle.enable { + services.swayidle = { + enable = true; + systemdTarget = "graphical-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + { + timeout = 600; + command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + ]; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/swaylock.nix b/hosts/sarien/work_user/desktop/river/swaylock.nix new file mode 100644 index 0000000..ce939d9 --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/swaylock.nix @@ -0,0 +1,30 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.swaylock.enable = + lib.mkEnableOption "enable swaylock"; + }; + config = lib.mkIf config.component.swaylock.enable { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + font = "${config.stylix.fonts.serif.name}"; + font-size = 25; + indicator-radius = 100; + indicator-thickness = 20; + indicator-idle-visible = true; + + # -effect section + screenshots = true; + clock = true; + effect-pixelate = 60; + effect-vignette = "0.5:0.5"; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/udiskie.nix b/hosts/sarien/work_user/desktop/river/udiskie.nix new file mode 100644 index 0000000..be28f82 --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/udiskie.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: { + options = { + udiskie.enable = + lib.mkEnableOption "enable udiskie"; + }; + config = lib.mkIf config.udiskie.enable { + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/waybar.nix b/hosts/sarien/work_user/desktop/river/waybar.nix new file mode 100644 index 0000000..2b5d93e --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/waybar.nix @@ -0,0 +1,418 @@ +{ + config, + lib, + pkgs, + ... +}: { + options = { + waybar.enable = + lib.mkEnableOption "enable waybar"; + }; + config = lib.mkIf config.waybar.enable { + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 48; + margin-right = 48; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/niri" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/niri" = { + orientation = "inherit"; + modules = [ + "niri/language" + "niri/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.3em; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: #ed8796; + color: #181926; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: #ed8796; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: #b7bdf8; + color: #000000; + } + + #power-profiles-daemon.power-saver { + background-color: #8aadf4; + color: #000000; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/river/wlsunset.nix b/hosts/sarien/work_user/desktop/river/wlsunset.nix new file mode 100644 index 0000000..aa4ec97 --- /dev/null +++ b/hosts/sarien/work_user/desktop/river/wlsunset.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: { + options = { + wlsunset.enable = + lib.mkEnableOption "enable wlsunset"; + }; + config = lib.mkIf config.wlsunset.enable { + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/sway/chrome-backlight.nix b/hosts/sarien/work_user/desktop/sway/chrome-backlight.nix new file mode 100644 index 0000000..b658e07 --- /dev/null +++ b/hosts/sarien/work_user/desktop/sway/chrome-backlight.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + programs.waybar.settings.bar-0."custom/kbd-backlight" = lib.mkDefault { + exec = "cat /sys/class/leds/chromeos::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/chromeos::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/chromeos::kbd_backlight -U 5%"; + }; +} diff --git a/hosts/sarien/work_user/desktop/sway/fuzzel.nix b/hosts/sarien/work_user/desktop/sway/fuzzel.nix new file mode 100644 index 0000000..ecefcd0 --- /dev/null +++ b/hosts/sarien/work_user/desktop/sway/fuzzel.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + options = { + fuzzel.enable = + lib.mkEnableOption "enable fuzzel launcher"; + }; + config = lib.mkIf config.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/sway/hyprlock.nix b/hosts/sarien/work_user/desktop/sway/hyprlock.nix new file mode 100644 index 0000000..229519e --- /dev/null +++ b/hosts/sarien/work_user/desktop/sway/hyprlock.nix @@ -0,0 +1,104 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + component.hyprlock.enable = + lib.mkEnableOption "enable hyprlock"; + }; + config = lib.mkIf config.component.hyprlock.enable { + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/sway/main-scroller.nix b/hosts/sarien/work_user/desktop/sway/main-scroller.nix new file mode 100644 index 0000000..ea13cdc --- /dev/null +++ b/hosts/sarien/work_user/desktop/sway/main-scroller.nix @@ -0,0 +1,917 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [../theming/gruvbox.nix]; + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.plugins = ["${pkgs.hyprlandPlugins.hyprscroller}/lib/libhyprscroller.so"]; + wayland.windowManager.hyprland.settings = { + input = { + kb_layout = "us,ua"; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + monitor = [ + ", preferred, auto, 1" + "eDP-1, preferred, auto, 1.2" + ]; + env = [ + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,gtk3" + ]; + decoration = { + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "kitty"; + "$screenLocker" = "hyprlock"; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + gaps_in = 4; + gaps_out = 4; + border_size = 4; + allow_tearing = true; + layout = "scroller"; + }; + + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, fuzzel" + "$mod, Escape, exec, hyprctl switchxkblayout all next" + "$mod, M, scroller:fitsize, active" + "$mod, K, scroller:cyclesize" + "$modCtrl, H, killactive" + "$modCtrl, M, fullscreen" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + + ", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/" + "CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/" + "SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/" + # navigation + #"$modCtrl, N," + "$mod, $left, scroller:movefocus, l" + "$mod, $down, scroller:movefocus, d" + "$mod, $up, scroller:movefocus, u" + "$mod, $right, scroller:movefocus, r" + "$modshift, $left, workspace, e-1" + "$modshift, $right, workspace, e+1" + "$mod, left, scroller:movefocus, l" + "$mod, up, scroller:movefocus, u" + "$mod, down, scroller:movefocus, d" + "$mod, right, scroller:movefocus, r" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + + "$modCtrl, $left, scroller:movewindow, l" + "$modCtrl, $down, scroller:movewindow, d" + "$modCtrl, $up, scroller:movewindow, u" + "$modCtrl, $right, scroller:movewindow, r" + "$modCtrl, left, scroller:movewindow, l" + "$modCtrl, up, scroller:movewindow, u" + "$modCtrl, down, scroller:movewindow, d" + "$modCtrl, right, scroller:movewindow, r" + # workspaces + "$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" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, 10" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + ]; + binde = [ + "$mod, comma, resizeactive, -10 0" + "$mod, period, resizeactive, 10 0" + "$modShift, comma, resizeactive, 0 -10" + "$modShift, period, resizeactive, 0 10" + ]; + bindl = [ + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, auto, preferred, 1.2'" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modCtrl, Escape, exit" + ]; + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 500; + }; + windowrulev2 = [ + "float, class:(com.github.hluk.copyq)" + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + ]; + }; + + services.hyprpaper = { + enable = true; + }; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 600; + on-timeout = "hyprlock"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["gitea-local"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services.network-manager-applet.enable = true; + services.copyq.enable = true; + + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "top"; + height = 40; + spacing = 4; + margin-left = 8; + margin-right = 8; + margin-top = 4; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/hypr" + "wlr/taskbar" + ]; + modules-center = ["clock" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + "group/laptop" + "idle_inhibitor" + ]; + "hyprland/workspaces" = { + format = "{id}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "hyprland/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/hypr" = { + orientation = "inherit"; + modules = [ + "hyprland/language" + "hyprland/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "backlight" = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + on-scroll-up = "light -A 2%"; + on-scroll-down = "light -U 2%"; + }; + "custom/kbd-backlight" = { + exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 12px; + margin-right: 4px; + } + .modules-center { + border-radius: 12px; + } + .modules-right { + border-radius: 12px; + margin-left: 4px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: #000000; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0E; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base08; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.wezterm}/bin/wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 4; + radius = 12; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + #corners = "top-right,bottom-left"; + offset = "12x12"; + origin = "top-right"; + timeout = 15; + frame_width = 4; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + + home.packages = with pkgs; [ + dconf + glib + grimblast + grim + slurp + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + papirus-icon-theme + ]; + + gtk = { + enable = true; + #iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["yazi.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["imv.desktop"]; + video_player = ["io.mpv.Mpv.desktop"]; + pdf_reader = ["org.pwmt.zathura-pdf-mupdf.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "application/pdf" = pdf_reader; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # }; + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland.service"]; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/sway/main.nix b/hosts/sarien/work_user/desktop/sway/main.nix new file mode 100644 index 0000000..4adf6c7 --- /dev/null +++ b/hosts/sarien/work_user/desktop/sway/main.nix @@ -0,0 +1,922 @@ +{ + config, + pkgs, + # pkgs-51b85c, + lib, + ... +}: { + # imports = [./walker.nix]; + stylix.targets.sway.enable = true; + wayland.windowManager.sway = { + enable = true; + systemd.enable = true; + # xwayland.enable = false; + wrapperFeatures.gtk = true; + config = let + modifier = "Mod4"; + terminal = "wezterm"; + launcher = "fuzzel"; + clipboard = "copyq toggle"; + left = "n"; + down = "e"; + up = "u"; + right = "i"; + in { + bars = [ + { + command = "${pkgs.waybar}/bin/waybar"; + } + ]; + + modifier = "${modifier}"; + terminal = "${terminal}"; + menu = "${launcher}"; + + left = "${left}"; + down = "${down}"; + up = "${up}"; + right = "${right}"; + + workspaceLayout = "tabbed"; + + input = { + "*" = { + xkb_layout = "us,ua"; + repeat_delay = "200"; + repeat_rate = "50"; + accel_profile = "flat"; + }; + "type:touchpad" = { + tap = "enabled"; + scroll_method = "two_finger"; + }; + }; + output = { + "Samsung Electric Company S24R65x H4TMA03291" = { + mode = "1920x1080@74.973Hz"; + pos = "0 0"; + adaptive_sync = "on"; + allow_tearing = "yes"; + max_render_time = "off"; + }; + "AOC 27V2G5 0x0000026C" = { + pos = "1920 0"; + }; + }; + keybindings = lib.mkForce { + "${modifier}+Ctrl+q" = "kill"; + "${modifier}+Ctrl+Escape" = "exit"; + "${modifier}+Ctrl+r" = "reload"; + + "${modifier}+Ctrl+${left}" = "move left"; + "${modifier}+Ctrl+${down}" = "move down"; + "${modifier}+Ctrl+${up}" = "move up"; + "${modifier}+Ctrl+${right}" = "move right"; + "${modifier}+Ctrl+left" = "move left"; + "${modifier}+Ctrl+down" = "move down"; + "${modifier}+Ctrl+up" = "move up"; + "${modifier}+Ctrl+right" = "move right"; + "${modifier}+Ctrl+1" = "move window workspace 1"; + "${modifier}+Ctrl+2" = "move window workspace 2"; + "${modifier}+Ctrl+3" = "move window workspace 3"; + "${modifier}+Ctrl+4" = "move window workspace 4"; + "${modifier}+Ctrl+5" = "move window workspace 5"; + "${modifier}+Ctrl+6" = "move window workspace 6"; + "${modifier}+Ctrl+7" = "move window workspace 7"; + "${modifier}+Ctrl+8" = "move window workspace 8"; + "${modifier}+Ctrl+9" = "move window workspace 9"; + "${modifier}+Ctrl+0" = "move window workspace 10"; + "${modifier}+Ctrl+l" = "move window workspace prev"; + "${modifier}+Ctrl+y" = "move window workspace next"; + + "${modifier}+Shift+${left}" = "focus output left"; + "${modifier}+Shift+${down}" = "focus output down"; + "${modifier}+Shift+${up}" = "focus output up"; + "${modifier}+Shift+${right}" = "focus output right"; + "${modifier}+Shift+left" = "focus output left"; + "${modifier}+Shift+down" = "focus output down"; + "${modifier}+Shift+up" = "focus output up"; + "${modifier}+Shift+right" = "focus output right"; + + "${modifier}+Return" = "exec ${terminal}"; + "${modifier}+Shift+v" = "exec ${clipboard}"; + "${modifier}+Space" = "exec ${launcher}"; + + "${modifier}+c" = "splith"; + "${modifier}+d" = "splitv"; + "${modifier}+s" = "layout toggle split"; + "${modifier}+t" = "layout tabbed"; + "${modifier}+h" = "focus mode_toggle"; + "${modifier}+f" = "floating toggle"; + "${modifier}+m" = "fullscreen toggle"; + "${modifier}+g" = "sticky toggle"; + "${modifier}+b" = "bar mode toggle"; + + "--locked ${modifier}+Escape" = "exec swaymsg input \"*\" xkb_switch_layout next"; + "Print" = ''exec ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -o -r -c '#ff0000ff')" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ~/pics/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png''; + + "${modifier}+1" = "workspace 1"; + "${modifier}+2" = "workspace 2"; + "${modifier}+3" = "workspace 3"; + "${modifier}+4" = "workspace 4"; + "${modifier}+5" = "workspace 5"; + "${modifier}+6" = "workspace 6"; + "${modifier}+7" = "workspace 7"; + "${modifier}+8" = "workspace 8"; + "${modifier}+9" = "workspace 9"; + "${modifier}+0" = "workspace 10"; + "${modifier}+l" = "workspace prev"; + "${modifier}+y" = "workspace next"; + + "${modifier}+${left}" = "focus left"; + "${modifier}+${down}" = "focus down"; + "${modifier}+${up}" = "focus up"; + "${modifier}+${right}" = "focus right"; + "${modifier}+left" = "focus left"; + "${modifier}+down" = "focus down"; + "${modifier}+up" = "focus up"; + "${modifier}+right" = "focus right"; + }; + window = { + border = 1; + # hideEdgeBorders = "smart"; + }; + gaps = { + # top = 6; + # bottom = 6; + # left = 6; + # right = 6; + outer = 6; + inner = 3; + }; + floating.criteria = [ + { + app_id = "com.github.hluk.copyq"; + } + { + app_id = "com.saivert.pwvucontrol"; + } + ]; + }; + }; + programs.swaylock.enable = true; + services.swayidle = { + enable = true; + systemdTarget = "sway-session.target"; + timeouts = [ + { + timeout = 300; + command = "${pkgs.swaylock}/bin/swaylock -fF"; + } + { + timeout = 301; + command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; + resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; + } + ]; + events = [ + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF &&"; + } + { + event = "unlock"; + command = "${pkgs.procps}/bin/pkill -SIGUSR1 swaylock"; + } + { + event = "lock"; + command = "${pkgs.swaylock}/bin/swaylock -fF & ${pkgs.playerctl}/bin/playerctl pause"; + } + ]; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services = { + network-manager-applet.enable = true; + blueman-applet.enable = true; + copyq.enable = true; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + # systemd = { + # enable = true; + # target = "graphical-session.target"; + # }; + settings = { + bar-0 = { + ipc = true; + id = "bar-0"; + layer = "top"; + position = "bottom"; + height = 32; + spacing = 6; + # margin-top = 8; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "group/sway" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + "privacy" + "tray" + "wireplumber" + # "group/laptop" + "idle_inhibitor" + ]; + "sway/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "I"; + "2" = "II"; + "3" = "III"; + "4" = "IV"; + "5" = "V"; + "6" = "VI"; + "7" = "VII"; + "8" = "IIX"; + "9" = "IX"; + "10" = "X"; + #focused = "󰗝"; + #active = "󰻃"; + #default = "󰄰"; + }; + }; + "sway/language" = { + format = "{flag}"; + tooltip-format = "{long}"; + on-click = "swaymsg input type:keyboard xkb_switch_layout next"; + }; + "group/sway" = { + orientation = "inherit"; + modules = [ + "sway/language" + "sway/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "custom/backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + # "custom/backlight" = { + # format = "{}% {icon}"; + # interval = 1; + # format-icons = ["󰃠"]; + # }; + # "custom/kbd-backlight" = { + # exec = "brightnessctl s 5%+"; + # interval = 1; + # format = "{}% {icon}"; + # format-icons = ["󰌌"]; + # on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; + # on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; + # }; + # battery = { + # states = { + # good = 95; + # warning = 30; + # critical = 15; + # }; + # format = "{capacity}% {icon}"; + # format-full = "{capacity}% 󱟢"; + # format-charging = "{capacity}% 󰂄"; + # format-plugged = "{capacity}% 󰚥"; + # format-alt = "{icon} {time}"; + # format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + # }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + # "power-profiles-daemon" = { + # format = "{icon}"; + # tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + # tooltip = true; + # format-icons = { + # default = "󱡮"; + # performance = "󱡮"; + # balanced = ""; + # power-saver = ""; + # }; + # }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + window#waybar { + background-color: @base00; + border: 1px solid @base0D; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + .modules-left, + .modules-center, + .modules-right { + padding: 1px; + margin-left: 4px; + margin-right: 4px; + } + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.5em; + color: @base05; + background-color: @base00; + } + + /* #upower, + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.5em; + } */ + + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.focused, + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base0D; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0B; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base0A; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + programs.rofi = { + enable = true; + theme = { + window = { + height = 360; + border = 3; + }; + + inputbar = { + children = ["prompt" "entry"]; + border-radius = 5; + padding = 2; + }; + + prompt = { + padding = 6; + border-radius = 3; + margin = "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "~>"; + }; + + entry = { + padding = 6; + margin = "20px 0px 0px 10px"; + }; + + listview = { + border = "0px 0px 0px"; + padding = "6px 0px 0px"; + margin = "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = 5; + }; + + element-icon = { + size = 25; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = 10; + vertical-align = "0.5"; + horizontal-align = "0.5"; + }; + + message = { + margin = 2; + padding = 2; + border-radius = 5; + }; + + textbox = { + padding = 6; + margin = "20 0 0 20"; + }; + }; + extraConfig = { + show-icons = true; + modi = "run,drun,window"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "wezterm -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + horizontal-pad = 8; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + }; + border = { + width = 2; + radius = 4; + }; + }; + }; + + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 4; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "bottom-right"; + timeout = 15; + frame_width = 2; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + # services.flameshot = { + # enable = true; + # settings = { + # General = { + # buttons = "@Variant(000x7f000vQList0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)"; + # filenamePattern = "screenshot-%F_%H-%M-%S"; + # saveAsFileExtension = "png"; + # savePath = "/home/user/pics/screenshots"; + # uiColor = "#${config.lib.stylix.colors.base0D}"; + # showStartupLaunchMessage = false; + # showDesktopNotification = false; + # showHelp = false; + # }; + # }; + # }; + home.packages = with pkgs; [ + nautilus + helvum + loupe + evince + celluloid + mission-center + dconf + glib + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + libqalculate + #papirus-icon-theme + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["io.github.zen_browser.zen.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + }; + }; + + systemd.user.settings.Manager.DefaultEnvironment = { + #DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # waybar = { + # Unit = { + # Description = "Swaync notification daemon"; + # # }; + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + # walker = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["sway-session.target"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["sway-session.target"]; + }; + }; + # xwayland-satellite = { + # Unit = { + # PartOf = ["graphical-session.target"]; + # After = ["graphical-session.target"]; + # Requisite = ["graphical-session.target"]; + # }; + # Install = { + # WantedBy = ["niri.service"]; + # }; + # Service = { + # Type = "simple"; + # ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/atelier-estuary.nix b/hosts/sarien/work_user/desktop/theming/atelier-estuary.nix new file mode 100644 index 0000000..71f38c2 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/atelier-estuary.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-estuary.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-ne3v2r.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool-light.nix b/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool-light.nix new file mode 100644 index 0000000..23fc859 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool-light.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml"; + polarity = "light"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Tinted"; + size = 32; + }; + image = ../wallpapers/wallhaven-m37gy8.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Light"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool.nix b/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool.nix new file mode 100644 index 0000000..86e39f1 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/atelier-sulphurpool.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-7p3vy9.jpg; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/ayu-dark.nix b/hosts/sarien/work_user/desktop/theming/ayu-dark.nix new file mode 100644 index 0000000..6ae2a19 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/ayu-dark.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-exj8pw.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/work_user/desktop/theming/ayu-mirage.nix b/hosts/sarien/work_user/desktop/theming/ayu-mirage.nix new file mode 100644 index 0000000..3bb367d --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/ayu-mirage.nix @@ -0,0 +1,76 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-mirage.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-wexo3x.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/work_user/desktop/theming/catppuccin-macchiato.nix b/hosts/sarien/work_user/desktop/theming/catppuccin-macchiato.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/catppuccin-macchiato.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/dracula.nix b/hosts/sarien/work_user/desktop/theming/dracula.nix new file mode 100644 index 0000000..e861468 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/dracula.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/gruvbox.nix b/hosts/sarien/work_user/desktop/theming/gruvbox.nix new file mode 100644 index 0000000..546ddff --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/gruvbox.nix @@ -0,0 +1,71 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + gruvbox-plus-icons + (nerdfonts.override {fonts = ["FantasqueSansMono" "Ubuntu" "UbuntuSans"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.capitaine-cursors-themed; + name = "Capitaine Cursors (Gruvbox)"; + size = 24; + }; + image = ../wallpapers/wallhaven-qze297.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Gruvbox-Plus-Dark"; + package = pkgs.gruvbox-plus-icons; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "Gruvbox-Plus-Dark"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/heetch.nix b/hosts/sarien/work_user/desktop/theming/heetch.nix new file mode 100644 index 0000000..5ae05f1 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/heetch.nix @@ -0,0 +1,75 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.google-cursor; + name = "GoogleDot-Red"; + size = 24; + }; + image = ../wallpapers/wallhaven-9mdqgd.jpg; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/heetchduck.nix b/hosts/sarien/work_user/desktop/theming/heetchduck.nix new file mode 100644 index 0000000..8037eea --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/heetchduck.nix @@ -0,0 +1,55 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../../../../../../wallpapers/wallhaven-o5p5ql.jpg; + # image = null; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + base08 = "e33400"; + base09 = "e39400"; + base0A = "f2ce00"; + base0B = "5ccc96"; + base0C = "00a3cc"; + base0D = "7a5ccc"; + base0E = "b3a1e6"; + base0F = "ce6f8f"; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/outrun-dark.nix b/hosts/sarien/work_user/desktop/theming/outrun-dark.nix new file mode 100644 index 0000000..6364ec1 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/outrun-dark.nix @@ -0,0 +1,76 @@ +{ + # config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/outrun-dark.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-o5p5ql.jpg; + # imageScalingMode = "center"; + opacity.terminal = 0.9; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + # stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # aotic base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + # }; + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + # qt = { + # enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + # }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = "${config.gtk.iconTheme.name}"; + # }; + # }; +} diff --git a/hosts/sarien/work_user/desktop/theming/rose-pine-moon.nix b/hosts/sarien/work_user/desktop/theming/rose-pine-moon.nix new file mode 100644 index 0000000..455ef3d --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/rose-pine-moon.nix @@ -0,0 +1,74 @@ +{ + config, + pkgs, + ... +}: { + fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + #papirus-icon-theme + nerd-fonts.iosevka + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + polarity = "dark"; + cursor = { + # package = pkgs.bibata-cursors-translucent; + package = pkgs.rose-pine-cursor; + name = "BreezeX-RosePineDawn-Linux"; + size = 32; + }; + image = ../wallpapers/wallhaven-47m35e.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.papirus-icon-theme; + name = "rose-pine-moon"; + package = pkgs.rose-pine-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/selenized-black.nix b/hosts/sarien/work_user/desktop/theming/selenized-black.nix new file mode 100644 index 0000000..adfa2e6 --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/selenized-black.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["Iosevka"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.bibata-cursors-translucent; + name = "Bibata_Ghost"; + size = 32; + }; + image = ../wallpapers/wallhaven-vml6j5.png; + opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["Iosevka"];}; + name = "Iosevka Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/desktop/theming/solarized.nix b/hosts/sarien/work_user/desktop/theming/solarized.nix new file mode 100644 index 0000000..759365a --- /dev/null +++ b/hosts/sarien/work_user/desktop/theming/solarized.nix @@ -0,0 +1,78 @@ +{ + config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + #papirus-icon-theme + (nerdfonts.override {fonts = ["FantasqueSansMono"];}) + ]; + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; + polarity = "dark"; + cursor = { + package = pkgs.catppuccin-cursors.macchiatoBlue; + name = "catppuccin-macchiato-blue-cursors"; + size = 24; + }; + image = ../wallpapers/wallhaven-2ke6lg.jpg; + #opacity.terminal = 0.8; + fonts = { + sizes = { + applications = 13; + desktop = 14; + popups = 13; + terminal = 15; + }; + serif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + sansSerif = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Propo"; + }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FantasqueSansMono"];}; + name = "FantasqueSansM Nerd Font Mono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + stylix.override = { + # base08 = "dc322f"; + # base09 = "cb4b16"; + # base0A = "b58900"; + # base0D = "859900"; + # base0C = "2aa198"; + # base0B = "268bd2"; + # base0E = "6c71c4"; + # base0F = "d33682"; + #base0B = "008dd1"; + #base0D = "7f8b00"; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders.override { + flavor = "macchiato"; + accent = "blue"; + }; + }; + }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; +} diff --git a/hosts/sarien/work_user/home-configuration.nix b/hosts/sarien/work_user/home-configuration.nix new file mode 100644 index 0000000..2b8bd59 --- /dev/null +++ b/hosts/sarien/work_user/home-configuration.nix @@ -0,0 +1,17 @@ +{inputs, ...}: { + imports = with inputs; [ + nix-flatpak.homeManagerModules.nix-flatpak + nixvim.homeManagerModules.nixvim + walker.homeManagerModules.default + self.homeModules.plasma + ./programs.nix + ]; + home = { + stateVersion = "25.05"; + sessionPath = [ + "$HOME/.local/bin" + ]; + }; + desktop.plasma.enable = true; + # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; +} diff --git a/hosts/sarien/work_user/programs.nix b/hosts/sarien/work_user/programs.nix new file mode 100644 index 0000000..b705e1a --- /dev/null +++ b/hosts/sarien/work_user/programs.nix @@ -0,0 +1,41 @@ +{pkgs, ...}: { + imports = [./programs/main.nix]; + + shell = { + nushell.enable = true; + oh-my-posh.enable = true; + }; + + console.yazi.enable = true; + + programs = { + bat.enable = true; + eza.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + gitui.enable = true; + }; + + terminal = { + ghostty.enable = true; + kitty.enable = true; + }; + + editor = { + helix.enable = true; + neve.enable = true; + }; + + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + tree + zip + unzip + ]; +} diff --git a/hosts/sarien/work_user/programs/console.nix b/hosts/sarien/work_user/programs/console.nix new file mode 100644 index 0000000..dc72295 --- /dev/null +++ b/hosts/sarien/work_user/programs/console.nix @@ -0,0 +1,23 @@ +{ + # config, + pkgs, + ... +}: { + home.packages = with pkgs; [ + git + ripgrep + trashy + fd + dust + procs + eza + tree + speedtest-rs + zip + unzip + execline + fastfetch + alejandra + uutils-coreutils-noprefix + ]; +} diff --git a/hosts/sarien/work_user/programs/console/yazi.nix b/hosts/sarien/work_user/programs/console/yazi.nix new file mode 100644 index 0000000..274d52d --- /dev/null +++ b/hosts/sarien/work_user/programs/console/yazi.nix @@ -0,0 +1,88 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.console.yazi; +in { + options = { + console.yazi.enable = + mkEnableOption "enable yazi file manager"; + }; + config = mkIf cfg.enable { + programs.yazi = { + enable = true; + enableNushellIntegration = true; + settings = { + opener = { + open = [ + { + run = "xdg-open \"$@\""; + orphan = true; + desc = "Open"; + } + ]; + edit = [ + { + run = "$EDITOR \"$@\""; + block = true; + desc = "Edit"; + } + ]; + dragdrop = [ + { + run = "${pkgs.ripdrag}/bin/ripdrag \"$@\""; + desc = "Drag'n'drop"; + orphan = true; + for = "unix"; + } + ]; + }; + open.rules = [ + { + mime = "text/*"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.toml"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.c"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.cpp"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.rs"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.py"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*.json"; + use = ["edit" "open" "dragdrop"]; + } + { + name = "*"; + use = ["open" "edit" "dragdrop"]; + } + ]; + }; + keymap = { + manager.append_keymap = [ + { + on = [""]; + run = ''shell '${pkgs.ripdrag}/bin/ripdrag -x "$@"' --confirm''; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/editor/helix.nix b/hosts/sarien/work_user/programs/editor/helix.nix new file mode 100644 index 0000000..6fa013e --- /dev/null +++ b/hosts/sarien/work_user/programs/editor/helix.nix @@ -0,0 +1,122 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.editor.helix; +in { + options = { + editor.helix.enable = + mkEnableOption "enable helix editor"; + }; + config = mkIf cfg.enable { + programs.helix = { + enable = true; + defaultEditor = true; + settings = { + editor = { + line-number = "relative"; + bufferline = "multiple"; + cursorline = true; + lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + normal = "block"; + select = "underline"; + }; + statusline = { + left = ["mode" "spinner" "version-control"]; + center = ["file-name"]; + right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"]; + separator = "|"; + }; + soft-wrap = { + enable = true; + max-wrap = 25; + max-indent-retain = 0; + wrap-indicator = ""; + }; + }; + keys.normal = { + space = { + space = "file_picker"; + w = ":w"; + q = ":q"; + x = ":x"; + n = ":n"; + "," = "goto_previous_buffer"; + "." = "goto_next_buffer"; + l = ":reflow"; + }; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + languages = { + language-server = { + clangd = { + command = "${pkgs.clang-tools}/bin/clangd"; + }; + rust-analyzer = { + command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + }; + texlab = { + command = "${pkgs.texlab}/bin/texlab"; + }; + nil = { + command = "${pkgs.nil}/bin/nil"; + }; + markdown-oxide = { + command = "${pkgs.markdown-oxide}/bin/markdown-oxide"; + }; + tinymist = { + command = lib.getExe pkgs.tinymist; + }; + }; + language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.alejandra}/bin/alejandra"; + language-servers = ["nil"]; + } + { + name = "latex"; + auto-format = true; + formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent"; + language-servers = ["texlab"]; + } + { + name = "typst"; + auto-format = true; + formatter.command = lib.getExe pkgs.typstyle; + language-servers = ["tinymist"]; + } + { + name = "markdown"; + auto-format = true; + formatter.command = "${pkgs.comrak}/bin/comrak"; + language-servers = ["markdown-oxide"]; + } + { + name = "c"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "cpp"; + auto-format = true; + formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + } + { + name = "rust"; + auto-format = true; + language-servers = ["rust-analyzer"]; + formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; + } + ]; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/editor/main.nix b/hosts/sarien/work_user/programs/editor/main.nix new file mode 100644 index 0000000..2838df3 --- /dev/null +++ b/hosts/sarien/work_user/programs/editor/main.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./helix.nix + ./zed.nix + ./neve.nix + #./nixvim.nix + ]; +} diff --git a/hosts/sarien/work_user/programs/editor/neve.nix b/hosts/sarien/work_user/programs/editor/neve.nix new file mode 100644 index 0000000..6477381 --- /dev/null +++ b/hosts/sarien/work_user/programs/editor/neve.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + inputs, + config, + ... +}: +with lib; let + cfg = config.editor.neve; +in { + options = { + editor.neve.enable = + mkEnableOption "enable neve neovim distribution"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + neovide + cpplint + statix + ]; + programs.nixvim = { + enable = true; + imports = [inputs.neve.nixvimModule]; + viAlias = true; + vimAlias = true; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/editor/nixvim.nix b/hosts/sarien/work_user/programs/editor/nixvim.nix new file mode 100644 index 0000000..70511ce --- /dev/null +++ b/hosts/sarien/work_user/programs/editor/nixvim.nix @@ -0,0 +1,270 @@ +{ + pkgs, + pkgs-51b85c, + lib, + config, + ... +}: { + options = { + editor.neovim.enable = + lib.mkEnableOption "enable neovim text editor"; + }; + config = lib.mkIf config.editors.neovim.enable { + # stylix.targets.nixvim.enable = true; + home.packages = with pkgs; [neovide]; + programs.nixvim = { + enable = true; + enableMan = true; + # package = ; + plugins.lualine.enable = true; + plugins.treesitter = { + enable = true; + folding = true; + }; + plugins = { + yazi.enable = true; + noice = { + enable = true; + popupmenu.backend = "nui"; + }; + notify.enable = true; + telescope.enable = true; + transparent.enable = true; + lsp-format.enable = true; + lsp-lines.enable = true; + lsp-status.enable = true; + which-key.enable = true; + web-devicons.enable = true; + + # vimtex = { + # enable = true; + # texlivePackage = pkgs.tectonic; #pkgs.texlive.combined.scheme-full; + # settings = { + # compiler_method = "tectonic"; + # view_method = "zathura_simple"; + # compiler_tectonic = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "--synctex" + # "--keep-logs" + # "-Z shell-escape" + # "-Z continue-on-errors" + # ]; + # }; + # compiler_latexmk = { + # "aux_dir" = {}; + # "out_dir" = {}; + # "callback" = 1; + # "continuous" = 0; + # "executable" = "latexmk"; + # "hooks" = {}; + # "options" = [ + # "-xelatex" + # "-recorder" + # "-file-line-error" + # "-synctex=1" + # "-interaction=nonstopmode" + # "-shell-escape" + # ]; + # }; + # }; + # }; + treesitter-textobjects.enable = true; + cmp-latex-symbols.enable = true; + dap.enable = true; + rustaceanvim.enable = true; + lsp = { + enable = true; + servers = { + clangd.enable = true; + #rust_analyzer = { + # enable = true; + # installRustc = true; + # installCargo = true; + #}; + lua_ls.enable = true; + nil_ls.enable = true; + }; + }; + }; + plugins = { + cmp-nvim-lsp = {enable = true;}; # lsp + cmp-buffer = {enable = true;}; + cmp-path = {enable = true;}; # file system paths + cmp_luasnip = {enable = true;}; # snippets + cmp-cmdline = {enable = true;}; # autocomplete for cmdline + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + ]; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + experimental = { + ghost_text = true; + }; + }; + }; + luasnip = { + enable = true; + settings = { + enable_autosnippets = true; + store_selection_keys = ""; + }; + }; + }; + clipboard = { + providers.wl-copy.enable = true; + }; + + globals.mapleader = " "; + globals.maplocalleader = ","; + + opts = { + # Show line numbers + number = true; + + # Show relative line numbers + relativenumber = true; + + # Use the system clipboard + clipboard = "unnamedplus"; + + # Number of spaces that represent a + tabstop = 2; + softtabstop = 2; + + # Show tabline always + showtabline = 2; + + # Use spaces instead of tabs + expandtab = true; + + # Enable smart indentation + smartindent = true; + + # Number of spaces to use for each step of (auto)indent + shiftwidth = 2; + + # Enable break indent + breakindent = true; + + # Highlight the screen line of the cursor + cursorline = true; + + # Minimum number of screen lines to keep above and below the cursor + scrolloff = 8; + + # Enable mouse support + mouse = "a"; + + # Set folding method to manual + foldmethod = "manual"; + + # Disable folding by default + foldenable = false; + + # Wrap long lines at a character in 'breakat' + linebreak = true; + + # Disable spell checking + spell = false; + + # Disable swap file creation + swapfile = false; + + # Time in milliseconds to wait for a mapped sequence to complete + timeoutlen = 300; + + # Enable 24-bit RGB color in the TUI + termguicolors = true; + + # Don't show mode in the command line + showmode = false; + + # Open new split below the current window + splitbelow = true; + + # Keep the screen when splitting + splitkeep = "screen"; + + # Open new split to the right of the current window + splitright = true; + + # Hide command line unless needed + cmdheight = 0; + + # Remove EOB + fillchars = { + eob = " "; + }; + }; + keymaps = [ + { + mode = "n"; + key = "j"; + action = "gj"; + } + { + mode = "n"; + key = "k"; + action = "gk"; + } + { + mode = "n"; + key = "n"; + action = "nzzzv"; + } + { + mode = "n"; + key = "N"; + action = "Nzzzv"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = "yy"; + action = "Yazi"; + options = {desc = "open yazi";}; + } + { + mode = "n"; + key = "fo"; + action = "Telescope oldfiles"; + options = {desc = "Telescope oldfiles";}; + } + { + mode = "n"; + key = "ff"; + action = "Telescope find_files"; + options = {desc = "Telescope find files";}; + } + ]; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/editor/zed.nix b/hosts/sarien/work_user/programs/editor/zed.nix new file mode 100644 index 0000000..44609c8 --- /dev/null +++ b/hosts/sarien/work_user/programs/editor/zed.nix @@ -0,0 +1,114 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.editor.zed; +in { + options = { + editor.zed.enable = + mkEnableOption "enable zed editor"; + }; + config = mkIf cfg.enable { + programs.zed-editor = { + enable = true; + extensions = [ + "nix" + "latex" + "typst" + ]; + userSettings = { + vim_mode = true; + ui_font_size = lib.mkForce 16; + buffer_font_size = lib.mkForce 16; + features = {inline_completion_provider = "none";}; + auto_update = false; + languages = { + "Nix" = { + language-servers = [ + "nil" + "!nixd" + ]; + formatter = { + external.command = lib.getExe pkgs.alejandra; + }; + }; + "Rust" = { + formatter = { + external = { + command = lib.getExe pkgs.rustfmt; + arguments = ["--edition" "2021"]; + }; + }; + }; + "typst" = { + language-servers = ["tinymist"]; + format_on_save = "on"; + formatter = { + external = { + command = lib.getExe pkgs.typstyle; + arguments = ["-i" "{buffer_path}"]; + }; + }; + }; + "Python" = { + format_on_save = "on"; + formatter = [ + { + language_server = { + name = "ruff"; + }; + } + ]; + language_servers = ["ruff"]; + }; + }; + lsp = { + clangd = { + binary = { + arguments = []; + path = "${pkgs.clang-tools}/bin/clangd"; + }; + }; + rust-analyzer = { + binary = { + arguments = []; + path = lib.getExe pkgs.rust-analyzer; + }; + }; + ruff = { + binary = { + arguments = []; + path = lib.getExe pkgs.ruff; + }; + }; + nil = { + binary = { + arguments = []; + path = lib.getExe pkgs.nil; + }; + initialization_options.formatting.command = [(lib.getExe pkgs.alejandra)]; + }; + texlab = { + binary = { + arguments = []; + path = lib.getExe pkgs.texlab; + }; + }; + tinymist = { + binary = { + arguments = []; + path = lib.getExe pkgs.tinymist; + }; + }; + }; + telemetry = { + diagnostics = false; + metrics = false; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/flatpak.nix b/hosts/sarien/work_user/programs/flatpak.nix new file mode 100644 index 0000000..05888e4 --- /dev/null +++ b/hosts/sarien/work_user/programs/flatpak.nix @@ -0,0 +1,65 @@ +{ + services.flatpak = { + enable = true; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + ]; + packages = [ + # misc + "io.github.zen_browser.zen" + "net.mullvad.MullvadBrowser" + "com.obsproject.Studio" + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + + "com.usebottles.bottles" + "com.logseq.Logseq" + + # chatting + "org.signal.Signal" + "org.telegram.desktop" + "org.mozilla.Thunderbird" + + # media + #"io.github.celluloid_player.Celluloid" + "io.mpv.Mpv" + ]; + overrides = { + "global" = { + # Force Wayland by default + Context = { + sockets = ["wayland" "!x11" "!fallback-x11"]; + filesystems = [ + "xdg-run/pipewire-0" + "xdg-config/gtk-3.0:ro" + "xdg-config/gtk-4.0:ro" + # "~/.local/share/fonts:ro" + "~/.local/share/icons:ro" + # "~/.nix-profile/share/icons:ro" + # "~/.nix-profile/share/fonts:ro" + "/nix/store:ro" + ]; + }; + Environment = { + XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + #GTK_THEME = "adw-gtk3"; + }; + }; + "org.signal.Signal" = { + Environment = { + SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + }; + }; + "com.usebottles.Bottles" = { + Context = { + sockets = ["x11" "wayland"]; + # filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"]; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/main.nix b/hosts/sarien/work_user/programs/main.nix new file mode 100644 index 0000000..ef6db4a --- /dev/null +++ b/hosts/sarien/work_user/programs/main.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./console.nix + ./flatpak.nix + ./console/yazi.nix + ./editor/main.nix + ./shell/main.nix + ./terminal/main.nix + ]; +} diff --git a/hosts/sarien/work_user/programs/shell/main.nix b/hosts/sarien/work_user/programs/shell/main.nix new file mode 100644 index 0000000..fd8a6f4 --- /dev/null +++ b/hosts/sarien/work_user/programs/shell/main.nix @@ -0,0 +1,3 @@ +{ + imports = [./nushell.nix ./oh-my-posh.nix]; +} diff --git a/hosts/sarien/work_user/programs/shell/nushell.nix b/hosts/sarien/work_user/programs/shell/nushell.nix new file mode 100644 index 0000000..73ad8f5 --- /dev/null +++ b/hosts/sarien/work_user/programs/shell/nushell.nix @@ -0,0 +1,100 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.shell.nushell; +in { + options = { + shell.nushell.enable = + mkEnableOption "enable nushell"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh.enableNushellIntegration = true; + programs.zoxide = { + enable = true; + enableNushellIntegration = true; + }; + programs.carapace = { + enable = true; + enableNushellIntegration = true; + }; + programs.atuin = { + enable = true; + enableNushellIntegration = true; + flags = [ + "--disable-up-arrow" + ]; + }; + programs.nushell = { + enable = true; + environmentVariables = { + CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; + CARAPACE_MATCH = 1; + EDITOR = "hx"; + }; + shellAliases = { + cd = "z"; + cat = "bat"; + l = "ls -l"; + nix-shell = "nix-shell --command nu"; + }; + extraConfig = '' + $env.config = { + show_banner: false + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + + ls: { + use_ls_colors: true + clickable_links: true + } + + rm: { + always_trash: true + } + edit_mode: 'vi' + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "fuzzy" + external: { + enable: true + # max_results: 100 + # completer: $carapace_completer # check 'carapace_completer' + } + } + } + ''; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/shell/oh-my-posh.nix b/hosts/sarien/work_user/programs/shell/oh-my-posh.nix new file mode 100644 index 0000000..79815ff --- /dev/null +++ b/hosts/sarien/work_user/programs/shell/oh-my-posh.nix @@ -0,0 +1,106 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.shell.oh-my-posh; +in { + options = { + shell.oh-my-posh.enable = + mkEnableOption "enable oh my posh"; + }; + config = mkIf cfg.enable { + programs.oh-my-posh = { + enable = true; + settings = { + version = 2; + final_space = true; + console_title_template = "{{ .Shell }} in {{ .Folder }}"; + blocks = [ + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "path"; + style = "plain"; + background = "transparent"; + foreground = "blue"; + template = "{{ .Path }}"; + properties = { + style = "full"; + }; + } + { + type = "text"; + style = "plain"; + background = "transparent"; + template = "{{ if .Env.BW_SESSION }} 󰞀{{ end }}"; + } + { + type = "nix-shell"; + style = "plain"; + background = "transparent"; + template = "{{ if ne .Type \"unknown\" }} {{ end }}"; + } + { + type = "git"; + style = "plain"; + foreground = "p:grey"; + background = "transparent"; + template = " {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}"; + properties = { + branch_icon = ""; + commit_icon = "@"; + fetch_status = true; + }; + } + ]; + } + { + type = "rprompt"; + overflow = "hidden"; + segments = [ + { + type = "executiontime"; + style = "plain"; + foreground = "yellow"; + background = "transparent"; + template = "{{ .FormattedMs }}"; + properties = { + threshold = 5000; + }; + } + ]; + } + { + type = "prompt"; + alignment = "left"; + newline = true; + segments = [ + { + type = "text"; + style = "plain"; + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯"; + } + ]; + } + ]; + transient_prompt = { + foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"]; + background = "transparent"; + template = "❯ "; + }; + secondary_prompt = { + foreground = "magenta"; + background = "transparent"; + template = "❯❯ "; + }; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/shell/zsh.nix b/hosts/sarien/work_user/programs/shell/zsh.nix new file mode 100644 index 0000000..7f4f53b --- /dev/null +++ b/hosts/sarien/work_user/programs/shell/zsh.nix @@ -0,0 +1,75 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + zsh.enable = + lib.mkEnableOption "enable z shell"; + }; + config = lib.mkIf config.zsh.enable { + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + initExtra = '' + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + ''; + # promptInit = "oh-my-posh init zsh -c ~/.config/oh-my-posh/zen.toml"; + enableCompletion = true; + autosuggestion.enable = true; + #autosuggestion.highlight = "fg=#ff00ff,bg=cyan,bold,underline"; + shellAliases = { + ls = "eza"; + cat = "bat"; + cd = "z"; + l = "eza -alh"; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + plugins = [ + { + name = "zsh-autosuggestions"; + file = "zsh-autosuggestions.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autocomplete"; + rev = "v0.7.0"; + sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw="; + }; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.8.0"; + sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; + }; + } + { + name = "zsh-history-substring-search"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-history-substring-search"; + rev = "v1.1.0"; + sha256 = "sha256-GSEvgvgWi1rrsgikTzDXokHTROoyPRlU0FVpAoEmXG4="; + }; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsin.fromh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/terminal/ghostty.nix b/hosts/sarien/work_user/programs/terminal/ghostty.nix new file mode 100644 index 0000000..0641053 --- /dev/null +++ b/hosts/sarien/work_user/programs/terminal/ghostty.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.ghostty; +in { + options = { + terminal.ghostty.enable = mkEnableOption "enable ghostty terminal"; + }; + config = mkIf cfg.enable { + programs.ghostty.enable = true; + # home.packages = [ + # inputs.ghostty.packages.x86_64-linux.default + # pkgs.ghostty + }; +} diff --git a/hosts/sarien/work_user/programs/terminal/kitty.nix b/hosts/sarien/work_user/programs/terminal/kitty.nix new file mode 100644 index 0000000..98f76b6 --- /dev/null +++ b/hosts/sarien/work_user/programs/terminal/kitty.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.terminal.kitty; +in { + options = { + terminal.kitty.enable = + mkEnableOption "enable kitty terminal"; + }; + config = mkIf cfg.enable { + programs.kitty = { + enable = true; + settings = { + tab_bar_edge = "bottom"; + tab_bar_align = "left"; + tab_bar_style = "fade"; + # tab_separator = " "; + }; + }; + }; +} diff --git a/hosts/sarien/work_user/programs/terminal/main.nix b/hosts/sarien/work_user/programs/terminal/main.nix new file mode 100644 index 0000000..46dc60b --- /dev/null +++ b/hosts/sarien/work_user/programs/terminal/main.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./kitty.nix + ./ghostty.nix + ./wezterm.nix + ]; +} diff --git a/hosts/sarien/work_user/programs/terminal/wezterm.nix b/hosts/sarien/work_user/programs/terminal/wezterm.nix new file mode 100644 index 0000000..88a83e0 --- /dev/null +++ b/hosts/sarien/work_user/programs/terminal/wezterm.nix @@ -0,0 +1,90 @@ +{ + config, + inputs, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.terminal.wezterm; +in { + options = { + terminal.wezterm.enable = + mkEnableOption "enable wez's terminal"; + }; + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = inputs.wezterm.packages.${pkgs.system}.default; + extraConfig = '' + local wezterm = require 'wezterm' + local act = wezterm.action + return { + front_end = 'WebGpu', + unix_domains = { + { + name = 'unix', + }, + }, + enable_kitty_graphics = true, + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + use_fancy_tab_bar = false, + inactive_pane_hsb = { + saturation = 0.8, + brightness = 0.7, + }, + -- window_frame = { + -- font = wezterm.font { family = 'Cantarell', weight = 'Bold' }, + -- }, + disable_default_key_bindings = true, + leader = { key = 'Space', mods = 'CTRL', timeout_milliseconds = 2000 }, + keys = { + { key = 'n', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) }, + { key = 'e', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Down', }, + { key = 'u', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Up', }, + { key = 'i', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) }, + { key = 'Enter', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, + { key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, + { key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, + { key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, + { key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, + { key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, + -- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, + { key = 'l', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, + { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, + { key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, + { key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, + { key = 'LeftArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Left' }, + { key = 'RightArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Right' }, + { key = 'UpArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Up' }, + { key = 'DownArrow', mods = 'CTRL', action = act.ActivatePaneDirection 'Down' }, + { key = ',', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '.', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = '%', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, + { key = '"', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, + { key = 'n', mods = 'CTRL', action = act.ActivatePaneDirection 'Left', }, + { key = 'i', mods = 'CTRL', action = act.ActivatePaneDirection 'Right', }, + { key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, + { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = false } }, + { key = 'f', mods = 'SHIFT|CTRL', action = act.CloseCurrentPane{ confirm = false } }, + { key = 'b', mods = 'LEADER|CTRL', action = act.SendString '\x02', }, + { key = 'Enter', mods = 'LEADER', action = act.ActivateCopyMode, }, + { key = 'p', mods = 'LEADER', action = act.PasteFrom 'PrimarySelection', }, + { key = 'k', mods = 'SHIFT|CTRL', action = act.Multiple + { + act.ClearScrollback 'ScrollbackAndViewport', + act.SendKey { key = 'L', mods = 'CTRL' }, + }, + }, + { key = 'r', mods = 'LEADER', action = act.ActivateKeyTable { name = 'resize_pane', one_shot = false, }, } + }, + } + ''; + }; + }; +} diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix new file mode 100644 index 0000000..52d57b3 --- /dev/null +++ b/modules/home/desktop/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./hyprland/default.nix + ./niri/default.nix + ./plasma/default.nix + ]; +} diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix new file mode 100644 index 0000000..fe7ba4f --- /dev/null +++ b/modules/home/desktop/hyprland/default.nix @@ -0,0 +1,1712 @@ +{ + config, + pkgs, + lib, + osConfig, + ... +}: let + cfg = config.desktop.hyprland; + hostname = osConfig.networking.hostName; +in { + options = { + desktop.hyprland.enable = + lib.mkEnableOption "enable hyprland desktop"; + }; + config = lib.mkIf cfg.enable { + wayland.windowManager.hyprland = { + enable = true; + package = pkgs.hyprland; + plugins = with pkgs.hyprlandPlugins; [ + hyprexpo + # hyprspace + hy3 + # hyprsplit + ]; + settings = { + input = { + kb_layout = "us,ua"; + resolve_binds_by_sym = 1; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "ite-tech.-inc.-ite-device(8910)-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + xwayland.force_zero_scaling = true; + monitor = [ + ", preferred, auto, 1" + # "desc:AOC 27V2G5 0x0000026C, highrr, -1920x0, 1" # , bitdepth, 10" + "desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0" + # "HDMI-A-1, addreserved, 0, 300, 0, 0" + "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1" + "desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1" + "desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10" + # "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10" + "desc:BOE 0x08E8, preferred, 1920x0, 1.2" + "desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2" + ]; + env = [ + # "EDITOR,hx" + "ELECTRON_OZONE_PLATFORM_HINT,auto" + "QT_QPA_PLATFORM,wayland" + # "QT_QPA_PLATFORMTHEME,gtk3" + "XCURSOR_SIZE,32" + #"GTK_THEME,adw-gtk3" + "GSK_RENDERER,ngl" + # "DISPLAY,:123" + ]; + decoration = { + shadow.enabled = false; + # drop_shadow = false; + blur = { + size = 8; + passes = 3; + }; + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + misc = { + disable_splash_rendering = true; + disable_hyprland_logo = true; + # vfr = true; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + #group = { + # }; + plugin = [ + { + hyprexpo = { + columns = 3; + gap_size = 8; + #bg_col = "rgb(111111)"; + workspace_method = "first 1"; # [center/first] [workspace] e.g. first 1 or center m+1 + enable_gesture = true; # laptop touchpad + gesture_fingers = 3; # 3 or 4 + gesture_distance = 400; # how far is the "max" + gesture_positive = true; # positive = swipe down. Negative = swipe up.; + }; + } + { + hy3 = { + autotile = true; + tab_first_window = false; + tabs = { + render_text = true; + height = 24; + padding = 8; + rounding = 8; + text_height = 14; + text_center = true; + text_font = "${config.stylix.fonts.sansSerif.name}"; + + "col.active" = "0xff${config.lib.stylix.colors.base00}"; + "col.inactive" = "0xff${config.lib.stylix.colors.base00}"; + "col.urgent" = "0xff${config.lib.stylix.colors.base00}"; + "col.active.text" = "0xff${config.lib.stylix.colors.base0D}"; + "col.inactive.text" = "0xff${config.lib.stylix.colors.base05}"; + "col.urgent.text" = "0xff${config.lib.stylix.colors.base09}"; + }; + }; + } + { + # hyprsplit = { + # num_workspaces = 9; + # }; + } + #{ + # dynamic-cursors = { + # enable = true; + # mode = "rotate"; + # threshold = 2; + # shake = { + # enable = true; + # }; + # }; + #} + ]; + dwindle = { + force_split = 2; + default_split_ratio = 1.4; + }; + master = { + mfact = 0.6; + }; + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "ghostty"; + "$launcher" = "walker"; + "$screenLocker" = "hyprlock"; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + gaps_in = 4; + gaps_out = 8; + border_size = 3; + allow_tearing = true; + layout = "hy3"; + }; + # group = { + # groupbar = lib.mkDefault { + # height = 24; + # font_size = 14; + # font_family = "${config.stylix.fonts.sansSerif.name}"; + + # "col.active" = "0xff${config.lib.stylix.colors.base00}"; + # "col.inactive" = "0xff${config.lib.stylix.colors.base00}"; + # # "col.urgent" = "0xff${config.lib.stylix.colors.base00}"; + # "col.text.active" = "0xff${config.lib.stylix.colors.base0D}"; + # "col.text.inactive" = "0xff${config.lib.stylix.colors.base05}"; + # # "col.text.urgent" = "0xff${config.lib.stylix.colors.base09}"; + # }; + # }; + + bindn = [", mouse:272, hy3:focustab, mouse"]; + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, $launcher" + "$mod, Escape, exec, hyprctl switchxkblayout all next" + "$modCtrl, Q, killactive" + "$modCtrl, M, fullscreen" + "$modCtrl, G, togglefloating" + + # "$mod,T, togglegroup" + # "$mod, period, changegroupactive, f" + # "$mod, comma, changegroupactive, b" + # "$mod, S, hy3:changegroup, opposite" + "$mod, T, hy3:changegroup, toggletab" + "$mod, S, hy3:changegroup, opposite" + "$mod, period, hy3:focustab, r, wrap" + "$mod, comma, hy3:focustab, l, wrap" + "$modCtrl, period, hy3:changefocus, raise" + "$modCtrl, comma, hy3:changefocus, lower" + + "$mod, Tab, hyprexpo:expo, toggle" + # "$mod, Tab, hyprexpo:expo, toggle" + + "$mod, Colon, togglespecialworkspace, magic" + "$mod, Colon, movetoworkspace, +0" + "$mod, Colon, togglespecialworkspace, magic" + "$mod, Colon, movetoworkspace, special:magic" + "$mod, Colon, togglespecialworkspace, magic" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + + ", Print, exec, flameshot gui" #${xdg.userDirs.pictures}/screenshots/" + #", Print, exec, grimblast --freeze copy area" #${xdg.userDirs.pictures}/screenshots/" + #"CTRL, Print, exec, grimblast --freeze copy active" #${xdg.userDirs.pictures}/screenshots/" + #"SHIFT, Print, exec, grimblast --freeze copy output" #${xdg.userDirs.pictures}/screenshots/" + # navigation + #"$modCtrl, N," + "$mod, $left, hy3:movefocus, l" + "$mod, $down, hy3:movefocus, d" + "$mod, $up, hy3:movefocus, u" + "$mod, $right, hy3:movefocus, r" + "$modShift, $left, workspace, e-1" + "$modShift, $right, workspace, e+1" + # "$modShift, $down, focusmonitor, HDMI-A-1" + # "$modShift, $up, focusmonitor, eDP-1" + "$mod, left, hy3:movefocus, l" + "$mod, up, hy3:movefocus, u" + "$mod, down, hy3:movefocus, d" + "$mod, right, hy3:movefocus, r" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + "$modShift, down, focusmonitor, e+1" + "$modShift, up, focusmonitor, e-1" + + "$modCtrl, $left, hy3:movewindow, l" + "$modCtrl, $down, hy3:movewindow, d" + "$modCtrl, $up, hy3:movewindow, u" + "$modCtrl, $right, hy3:movewindow, r" + "$modCtrl, left, hy3:movewindow, l" + "$modCtrl, up, hy3:movewindow, u" + "$modCtrl, down, hy3:movewindow, d" + "$modCtrl, right, hy3:movewindow, r" + # workspaces + "$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" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, 10" + + "$mod, Q, workspace, 1" + "$mod, W, workspace, 2" + "$mod, F, workspace, 3" + "$mod, P, workspace, 4" + "$mod, B, workspace, 5" + "$mod, J, workspace, 6" + "$mod, L, workspace, 7" + "$mod, U, workspace, 8" + "$mod, Y, workspace, 9" + "$mod, ', workspace, 10" + + "$modShiftCtrl, Q, movetoworkspace, 1" + "$modShiftCtrl, W, movetoworkspace, 2" + "$modShiftCtrl, F, movetoworkspace, 3" + "$modShiftCtrl, P, movetoworkspace, 4" + "$modShiftCtrl, B, movetoworkspace, 5" + "$modShiftCtrl, J, movetoworkspace, 6" + "$modShiftCtrl, L, movetoworkspace, 7" + "$modShiftCtrl, U, movetoworkspace, 8" + "$modShiftCtrl, Y, movetoworkspace, 9" + "$modShiftCtrl, ', movetoworkspace, 10" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + ]; + # binde = [ + # "$mod, comma, resizeactive, -10 0" + # "$mod, period, resizeactive, 10 0" + # "$modShift, comma, resizeactive, 0 -10" + # "$modShift, period, resizeactive, 0 10" + # ]; + bindl = [ + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, preferred, 1920x0, 1.2'" + ", XF86MonBrightnessUp, exec, brightnessctl s 5%+" + ", XF86MonBrightnessDown, exec, brightnessctl s 5%-" + "ALT, XF86MonBrightnessUp, exec, brightnessctl s 5%+ -d platform::kbd_backlight" + "ALT, XF86MonBrightnessDown, exec, brightnessctl s 5%- -d platform::kbd_backlight" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modCtrl, Escape, exit" + ]; + bindm = [ + # mouse movements + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 300; + }; + windowrulev2 = [ + # tray/misc utilities + "float, class:(com.saivert.pwvucontrol)" + "float, class:(re.sonny.Junction)" + "float, class:(com.github.hluk.copyq)" + "float, class:(nm-connection-editor)" + "float, class:(.blueman-manager-wrapped)" + # flameshot + "noanim, class:^(flameshot)$" + "float, class:^(flameshot)$" + "move 0 0, class:^(flameshot)$" + "pin, class:^(flameshot)$" + ## games + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + # apex legends + # "immediate, class:(steam_app_1172470)" + # cs2 + "immediate, class:(cs2)" + # deadlock + "float, class:(steam_app_1422450)" + "fullscreen, class:(steam_app_1422450)" + "immediate, class:(steam_app_1422450)" + + "immediate, initialTitle:(Ghostrunner)" + ]; + }; + extraConfig = '' + bind = $modShift, S, submap, resize + submap = resize + binde = , right, resizeactive, 10 0 + binde = , left, resizeactive, -10 0 + binde = , up, resizeactive, 0 -10 + binde = , down, resizeactive, 0 10 + binde = , $right, resizeactive, 10 0 + binde = , $left, resizeactive, -10 0 + binde = , $up, resizeactive, 0 -10 + binde = , $down, resizeactive, 0 10 + bind = , escape, submap, reset + submap = reset + ''; + }; + services.hyprpaper = { + enable = true; + }; + services.hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + lock_cmd = "pidof hyprlock || hyprlock"; + # unlock_cmd = "loginctl unlock-session"; + }; + listener = [ + { + timeout = 600; + on-timeout = "pidof hyprlock || hyprlock"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.playerctld.enable = true; + services.gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + services.ssh-agent.enable = true; + programs.keychain = { + enable = false; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + services = { + network-manager-applet.enable = true; + blueman-applet.enable = true; + copyq.enable = true; + }; + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Light"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + # platformTheme.name = "gtk3"; + #style.name = "gtk2"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; + stylix.targets.waybar.enable = false; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + layer = "top"; + position = "bottom"; + height = 40; + spacing = 6; + margin-left = 6; + margin-right = 6; + margin-bottom = 6; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "clock" + "wlr/taskbar" + ]; + modules-center = ["group/hypr"]; + modules-right = [ + "privacy" + "tray" + "wireplumber" + (lib.mkIf (hostname != "dunamis") + "group/laptop") + "idle_inhibitor" + ]; + "hyprland/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "I"; + "2" = "II"; + "3" = "III"; + "4" = "IV"; + "5" = "V"; + "6" = "VI"; + "7" = "VII"; + "8" = "IIX"; + "9" = "IX"; + "10" = "I"; + "11" = "II"; + "12" = "III"; + "13" = "IV"; + "14" = "V"; + "15" = "VI"; + "16" = "VII"; + "17" = "IIX"; + "18" = "IX"; + #focused = "󰗝"; + #active = "󰻃"; + #default = "󰄰"; + }; + }; + "hyprland/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/hypr" = { + orientation = "inherit"; + modules = [ + "hyprland/language" + "hyprland/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "backlight" = { + # device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = ["" ""]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + "custom/backlight" = { + format = "{}% {icon}"; + interval = 1; + format-icons = ["󰃠"]; + exec = "sudo -u user -- ~/.local/bin/brightness.nu get-percentage"; + on-scroll-up = "sudo -u user -- ~/.local/bin/brightness.nu increase 2"; + on-scroll-down = "sudo -u user ~/.local/bin/brightness.nu decrease 2"; + }; + "custom/kbd-backlight" = { + exec = "~/.local/bin/keyboard-brightness.nu get-percentage"; + interval = 1; + format = "{}% {icon}"; + format-icons = ["󰌌"]; + on-scroll-up = "~/.local/bin/keyboard-brightness.nu increase"; + on-scroll-down = "~/.local/bin/keyboard-brightness.nu decrease"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-left { + border-radius: 16px; + } + .modules-center { + border-radius: 16px; + } + .modules-right { + border-radius: 16px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + /* .modules-center { + margin: 4px; + margin-top: 6px; + }*/ + button { + box-shadow: inset 0 -3px transparent; + border-radius: 16px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 16px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + font-weight: bold; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base0D; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0B; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base0A; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + + # stylix.targets.wofi.enable = false; + programs.rofi = { + enable = false; + theme = { + window = { + height = 360; + border = 3; + }; + + inputbar = { + children = ["prompt" "entry"]; + border-radius = 5; + padding = 2; + }; + + prompt = { + padding = 6; + border-radius = 3; + margin = "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "~>"; + }; + + entry = { + padding = 6; + margin = "20px 0px 0px 10px"; + }; + + listview = { + border = "0px 0px 0px"; + padding = "6px 0px 0px"; + margin = "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = 5; + }; + + element-icon = { + size = 25; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = 10; + vertical-align = "0.5"; + horizontal-align = "0.5"; + }; + + message = { + margin = 2; + padding = 2; + border-radius = 5; + }; + + textbox = { + padding = 6; + margin = "20 0 0 20"; + }; + }; + extraConfig = { + show-icons = true; + modi = "run,drun,window"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + }; + programs.wofi = { + enable = false; + settings = { + show = "drun"; + width = "450"; + height = "350"; + always_parse_args = true; + show_all = true; + term = "wezterm"; + hide_scroll = true; + print_command = true; + insensitive = true; + prompt = "~>"; + columns = 2; + halign = "fill"; + #valign = "fill"; + line_wrap = "char"; + dynamic_lines = false; + }; + style = lib.mkDefault '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + + * { + /* font-family: ${config.stylix.fonts.serif.name}, monospace; */ + font-size: 16px; + } + + /* Window */ + window { + margin: 0px; + padding: 8px; + border: 4px solid @base0D; + border-radius: 16px; + background-color: @base00; + } + + /* Inner Box */ + #inner-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base00; + } + /* Outer Box */ + #outer-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base00; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: 10px; + border: none; + background-color: @base00; + } + + /* Input */ + #input { + margin: 5px 20px; + padding: 10px; + border: none; + border-radius: 7px; + color: @base05; + background-color: @base00; + } + + #input image { + border: none; + color: @base08; + } + + #input * { + outline: 4px solid @base0C!important; + } + + /* Text */ + #text { + margin: 5px; + border: none; + color: @base05; + } + + #entry { + background-color: @base00; + } + + #entry arrow { + border: none; + color: @base0E; + } + + /* Selected Entry */ + #entry:selected { + border: 0.11em solid @base0D; + } + + #entry:selected #text { + color: @base0C; + } + + #entry:drop(active) { + background-color: @base0A!important; + } + ''; + }; + + programs.walker = { + enable = true; + package = pkgs.walker; + runAsService = true; + config = { + activation_mode.labels = "neiotsra"; + # theme = "stylix"; + as_window = false; + builtins = { + applications = { + actions = {enabled = true;}; + context_aware = true; + name = "applications"; + placeholder = "Applications"; + prioritize_new = true; + refresh = true; + show_generic = false; + show_icon_when_single = true; + show_sub_when_single = true; + weight = 5; + }; + calc = { + icon = "accessories-calculator"; + min_chars = 4; + name = "calc"; + placeholder = "Calculator"; + weight = 5; + }; + clipboard = { + image_height = 300; + max_entries = 10; + name = "clipboard"; + placeholder = "Clipboard"; + switcher_only = true; + weight = 5; + }; + commands = { + icon = "utilities-terminal"; + name = "commands"; + placeholder = "Commands"; + switcher_only = true; + weight = 5; + }; + custom_commands = { + icon = "utilities-terminal"; + name = "custom_commands"; + placeholder = "Custom Commands"; + weight = 5; + }; + dmenu = { + name = "dmenu"; + placeholder = "Dmenu"; + switcher_only = true; + weight = 5; + }; + emojis = { + history = true; + name = "emojis"; + placeholder = "Emojis"; + switcher_only = true; + typeahead = true; + weight = 5; + }; + finder = { + concurrency = 8; + icon = "folder"; + ignore_gitignore = true; + name = "finder"; + placeholder = "Finder"; + refresh = true; + switcher_only = true; + weight = 5; + }; + runner = { + generic_entry = false; + history = true; + icon = "utilities-terminal"; + name = "runner"; + placeholder = "Runner"; + refresh = true; + typeahead = true; + weight = 5; + }; + ssh = { + history = true; + icon = "preferences-system-network"; + name = "ssh"; + placeholder = "SSH"; + refresh = true; + switcher_only = true; + weight = 5; + }; + switcher = { + name = "switcher"; + placeholder = "Switcher"; + prefix = "/"; + weight = 5; + }; + # websearch = { + # engines = ["google"]; + # icon = "applications-internet"; + # name = "websearch"; + # placeholder = "Websearch"; + # weight = 5; + # }; + windows = { + icon = "view-restore"; + name = "windows"; + placeholder = "Windows"; + weight = 5; + }; + }; + disable_click_to_close = false; + force_keyboard_focus = true; + list = { + max_entries = 50; + show_initial_entries = true; + single_click = true; + }; + search = { + delay = 0; + force_keyboard_focus = true; + history = true; + placeholder = "Search..."; + }; + }; + theme = { + layout = { + ui = { + anchors = { + bottom = false; + left = false; + right = false; + top = false; + }; + window = { + h_align = "center"; + v_align = "center"; + box = { + width = 500; + height = 300; + h_align = "center"; + v_align = "center"; + spacing = 12; + orientation = "vertical"; + # margins = { + # bottom = 200; + # top = 200; + # start = 200; + # }; + search = { + margins = { + bottom = 0; + top = 0; + start = 8; + end = 8; + }; + spacing = 12; + # v_align = "baseline"; + h_align = "top"; + h_expand = true; + v_expand = true; + }; + scroll = { + h_align = "fill"; + v_align = "fill"; + h_expand = false; + overlay_scrolling = true; + list = { + # max_height = 300; + margins = { + bottom = 8; + top = 0; + start = 8; + end = 8; + }; + always_show = true; + v_align = "fill"; + h_align = "bottom"; + h_expand = true; + v_expand = true; + item = { + icon.theme = "${config.gtk.iconTheme.name}"; + spacing = 4; + activation_label = { + h_align = "end"; + # v_align = "bottom"; + h_expand = false; + justify = "right"; + spacing = 4; + margins.end = 12; + # x_align = 1; + }; + text = { + h_align = "start"; + h_expand = true; + revert = true; + wrap = true; + }; + }; + }; + }; + }; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + + #window, + #box, + #search, + #password, + #input, + #typeahead, + #spinner, + #list, + child, + scrollbar, + slider, + #item, + #text, + #label, + #sub, + #activationlabel { + all: unset; + } + + #window { + background: none; + color: @base05; + } + + #box { + border-radius: 20px; + border-width: 4px; + border-color: @base0D; + background: @base00; + } + + #search { + background: @base01; + border-radius: 12px; + padding: 8px; + } + + #password, + #input, + #typeahead { + background: none; + box-shadow: none; + border-radius: 12px; + } + + #input > *:first-child, + #typeahead > *:first-child { + margin-right: 12px; + border-radius: 12px; + } + + /* #spinner { + } */ + + #typeahead { + color: @base05; + } + + #input placeholder { + opacity: 0.5; + } + + #list { + padding: 8px; + border-radius: 12px; + background: @base01; + } + + child { + box-shadow: none; + } + + child:selected, + child:hover { + box-shadow: none; + border-radius: 8px; + background: @base02; + } + + #item { + padding: 4px; + } + + /* #icon { + } + + #text { + } + + #label { + } */ + + #sub { + font-size: smaller; + opacity: 0.5; + } + + #activationlabel { + opacity: 0.5; + } + + .activation #activationlabel { + opacity: 1; + color: @base05; + } + + .activation #text, + .activation #icon, + .activation #search { + opacity: 0.5; + } + ''; + }; + }; + services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = lib.mkDefault 9; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "bottom-right"; + timeout = 15; + frame_width = 3; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + stylix.targets.hyprlock.enable = false; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 4; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 3; + position = "0, 0"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + #placeholder_text = '\'Password...'\'; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "274, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "0, 60"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "274, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "0, -60"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "0, 60"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')"; + #text = "$TIME + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "0, -60"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + services.wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + services.udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + services.flameshot = { + enable = true; + settings = { + General = { + buttons = "@Variant(000x7f000vQList0000x130000000x1000x2000x3000x4000x5000x6000x12000xf000x13000b000 000x10000000v000x17000xe000f000x11)"; + filenamePattern = "screenshot-%F_%H-%M-%S"; + saveAsFileExtension = "png"; + savePath = "/home/user/pics/screenshots"; + uiColor = "#${config.lib.stylix.colors.base0D}"; + showStartupLaunchMessage = false; + showDesktopNotification = false; + showHelp = false; + }; + }; + }; + home.packages = with pkgs; [ + brightnessctl + nautilus + helvum + loupe + evince + junction + celluloid + mission-center + dconf + glib + grimblast + grim + slurp + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + polkit_gnome + libqalculate + #papirus-icon-theme + ]; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + # QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + }; + waybar = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["hyprland-session.target"]; + }; + }; + }; + }; +} diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix new file mode 100644 index 0000000..fa41904 --- /dev/null +++ b/modules/home/desktop/niri/default.nix @@ -0,0 +1,1493 @@ +{ + config, + pkgs, + lib, + osConfig, + ... +}: +with lib; let + cfg = config.desktop.niri; +in { + options = { + desktop.niri.enable = + mkEnableOption "enable niri desktop"; + }; + config = mkIf cfg.enable { + stylix.targets = { + waybar.enable = false; + hyprlock.enable = false; + }; + services = { + ssh-agent.enable = true; + playerctld.enable = true; + network-manager-applet.enable = true; + copyq.enable = true; + gnome-keyring = { + enable = true; + components = ["secrets" "ssh"]; + }; + udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + wlsunset = { + enable = true; + latitude = "49.6"; + longitude = "36.1"; + temperature = { + day = 6500; + night = 3000; + }; + systemdTarget = "graphical-session.target"; + }; + dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 300; + icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + corner_radius = 12; + #corners = "top-right,bottom-left"; + offset = "16x16"; + origin = "top-right"; + timeout = 15; + frame_width = 3; + notification_limit = 5; + }; + rule-telegram = { + "desktop_entry" = "org.telegram.desktop"; + "urgency" = "normal"; + }; + }; + }; + hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "loginctl lock-session"; + lock_cmd = "pidof hyprlock || hyprlock"; + # unlock_cmd = "loginctl unlock-session"; + }; + listener = [ + { + timeout = 600; + on-timeout = "pidof hyprlock || hyprlock"; + } + { + timeout = 601; + on-timeout = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + } + ]; + }; + }; + }; + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 4; + position = "0, -30"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${config.lib.stylix.colors.base05})"; + inner_color = "rgb(${config.lib.stylix.colors.base00})"; + outer_color = "rgb(${config.lib.stylix.colors.base0D})"; + check_color = "rgb(${config.lib.stylix.colors.base0A})"; + fail_color = "rgb(${config.lib.stylix.colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + size = "150, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "-62, 30"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + size = "120, 50"; + color = "rgb(${config.lib.stylix.colors.base00})"; + border_color = "rgb(${config.lib.stylix.colors.base0D})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "-62, 28"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${config.lib.stylix.colors.base00})"; + color = "rgb(${config.lib.stylix.colors.base05})"; + position = "77, 28"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + + xdg.configFile = { + niri = { + target = "niri/config.kdl"; + text = let + cursor_size = toString config.stylix.cursor.size; + terminal = "ghostty"; + launcher = "walker"; + # clipboard = "copyq toggle"; + left = "n"; + down = "e"; + up = "i"; + right = "o"; + in '' + environment { + DISPLAY ":123" + QT_QPA_PLATFORM "wayland" + // QT_STYLE_OVERRIDE "adwaita" + // QT_QPA_PLATFORMTHEME "qt5ct" + GDK_BACKEND "wayland" + MOZ_ENABLE_WAYLAND "1" + MOZ_WEBRENDER "1" + XDG_SESSION_TYPE "wayland" + CLUTTER_BACKEND "wayland" + SDL_VIDEODRIVER "wayland" + } + input { + keyboard { + xkb { + layout "us,ua" + // variant "colemak_dh," + options "grp:menu_toggle" + } + repeat-delay 200 + repeat-rate 50 + track-layout "global" + + } + touchpad { + // off + tap + // dwt + // dwtp + natural-scroll + accel-speed 0.2 + accel-profile "flat" + // scroll-method "two-finger" + // disabled-on-external-mouse + } + mouse { + // off + // natural-scroll + accel-speed 0.0 + accel-profile "flat" + // scroll-method "no-scroll" + } + /-touch { + off + } + + warp-mouse-to-focus + + // focus-follows-mouse + } + + output "eDP-1" { + // off + scale 1.2 + transform "normal" + // position x=1920 y=0 + } + output "Samsung Electric Company S24R65x H4TMA03291" { + position x=0 y=0 + variable-refresh-rate + } + output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" { + mode "2560x1440@180.000" + variable-refresh-rate + position x=0 y=0 + scale 1.25 + } + output "PNP(AOC) 27V2G5 0x0000026C" { + position x=1920 y=0 + mode "1920x1080@74.973" + variable-refresh-rate + } + + cursor { + xcursor-theme "${config.stylix.cursor.name}" + xcursor-size ${cursor_size} + } + + layout { + gaps 11 + center-focused-column "never" // "on-overflow" + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + // default-column-width { proportion 0.9; } + default-column-width {} + + focus-ring { + //off + width 3 + active-gradient from="#${config.lib.stylix.colors.base0D}" to="#${config.lib.stylix.colors.base04}" angle=40 relative-to="workspace-view" + inactive-color "#${config.lib.stylix.colors.base03}" + // inactive-gradient from="#1c1c1c" to="#4e4e4e" angle=60 relative-to="workspace-view" + } + + // You can also add a border. It's similar to the focus ring, but always visible. + border { + // The settings are the same as for the focus ring. + // If you enable the border, you probably want to disable the focus ring. + off + + width 4 + // active-color "#ffc87f" + inactive-color "#${config.lib.stylix.colors.base00}" + // active-gradient from="#${config.lib.stylix.colors.base0D}" to="#${config.lib.stylix.colors.base0C}" angle=40 relative-to="workspace-view" + // inactive-gradient from="#1c1c1c" to="#4e4e4e" angle=60 relative-to="workspace-view" + + // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view" + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + struts { + left 52 + right 52 + } + } + + prefer-no-csd + + hotkey-overlay { + skip-at-startup + } + window-rule { + geometry-corner-radius 12 + clip-to-geometry true + } + + screenshot-path "~/pics/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" + // screenshot-path null + + animations { + // off + slowdown 0.7 + } + + window-rule { + match app-id=r#"^org\.wezfurlong\.wezterm$"# + default-column-width { proportion 1.0; } + } + window-rule { + match app-id=r#"^re\.sonny\.Junction$"# + open-floating true + open-focused true + } + + // window-rule { + // match app-id=r#"^com\.mitchellh\.ghostty$"# + // draw-border-with-background false + // } + + window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.telegram\.desktop$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + match app-id=r#"^signal$"# + match app-id=r#"^Bitwarden$"# + // block-out-from "screen-capture" + block-out-from "screencast" + } + + binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+Return repeat=false { spawn "${terminal}"; } + Mod+Space repeat=false { spawn "${launcher}"; } + Super+Alt+L repeat=false { spawn "hyprlock"; } + Super+Alt+B repeat=false { spawn "io.github.zen_browser.zen"; } + Super+Alt+V repeat=false { spawn "copyq" "toggle"; } + Super+Alt+D repeat=false { spawn "dunstctl" "set-paused" "toggle"; } + Super+Alt+C repeat=false { spawn "dunstctl" "close-all"; } + Super+Alt+X repeat=false { spawn "dunstctl" "history-pop"; } + Mod+Alt+Q { quit; } + Mod+Alt+P { power-off-monitors; } + + XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-"; } + XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; } + XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; } + XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; } + XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; } + + + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; } + Alt+XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "platform::kbd_backlight"; } + Alt+XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "platform::kbd_backlight"; } + + + Mod+Left { focus-column-left; } + Mod+Down { focus-window-or-workspace-down; } + Mod+Up { focus-window-or-workspace-up; } + Mod+Right { focus-column-right; } + Mod+${left} { focus-column-left; } + Mod+${down} { focus-window-or-workspace-down; } + Mod+${up} { focus-window-or-workspace-up; } + Mod+${right} { focus-column-right; } + + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Down { move-window-down-or-to-workspace-down; } + Mod+Ctrl+Up { move-window-up-or-to-workspace-up; } + Mod+Ctrl+Right { move-column-right; } + Mod+Ctrl+${left} { move-column-left; } + Mod+Ctrl+${down} { move-window-down-or-to-workspace-down; } + Mod+Ctrl+${up} { move-window-up-or-to-workspace-up; } + Mod+Ctrl+${right} { move-column-right; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + + Mod+Shift+Left { focus-monitor-left; } + Mod+Shift+Down { focus-monitor-down; } + Mod+Shift+Up { focus-monitor-up; } + Mod+Shift+Right { focus-monitor-right; } + Mod+Shift+${left} { focus-monitor-left; } + Mod+Shift+${down} { focus-monitor-down; } + Mod+Shift+${up} { focus-monitor-up; } + Mod+Shift+${right} { focus-monitor-right; } + + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } + Mod+Shift+Ctrl+${left} { move-column-to-monitor-left; } + Mod+Shift+Ctrl+${down} { move-column-to-monitor-down; } + Mod+Shift+Ctrl+${up} { move-column-to-monitor-up; } + Mod+Shift+Ctrl+${right} { move-column-to-monitor-right; } + + // Mod+Page_Down { focus-workspace-down; } + // Mod+Page_Up { focus-workspace-up; } + // Mod+N { focus-workspace-down; } + // Mod+E { focus-workspace-up; } + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } + // Mod+Ctrl+N { move-column-to-workspace-down; } + // Mod+Ctrl+U { move-column-to-workspace-up; } + + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + // Mod+Shift+N { move-workspace-down; } + // Mod+Shift+U { move-workspace-up; } + + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; } + Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; } + + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + Mod+Ctrl+1 { move-column-to-workspace 1; } + Mod+Ctrl+2 { move-column-to-workspace 2; } + Mod+Ctrl+3 { move-column-to-workspace 3; } + Mod+Ctrl+4 { move-column-to-workspace 4; } + Mod+Ctrl+5 { move-column-to-workspace 5; } + Mod+Ctrl+6 { move-column-to-workspace 6; } + Mod+Ctrl+7 { move-column-to-workspace 7; } + Mod+Ctrl+8 { move-column-to-workspace 8; } + Mod+Ctrl+9 { move-column-to-workspace 9; } + + // Mod+Q { focus-workspace 1; } + // Mod+W { focus-workspace 2; } + // Mod+F { focus-workspace 3; } + // Mod+P { focus-workspace 4; } + // Mod+B { focus-workspace 5; } + // Mod+J { focus-workspace 6; } + // Mod+L { focus-workspace 7; } + // Mod+Y { focus-workspace 8; } + // Mod+Apostrophe { focus-workspace 9; } + // Mod+Ctrl+Q { move-column-to-workspace 1; } + // Mod+Ctrl+W { move-column-to-workspace 2; } + // Mod+Ctrl+F { move-column-to-workspace 3; } + // Mod+Ctrl+P { move-column-to-workspace 4; } + // Mod+Ctrl+B { move-column-to-workspace 5; } + // Mod+Ctrl+J { move-column-to-workspace 6; } + // Mod+Ctrl+L { move-column-to-workspace 7; } + // Mod+Ctrl+Y { move-column-to-workspace 8; } + // Mod+Ctrl+Apostrophe { move-column-to-workspace 9; } + + // Mod+Ctrl+1 { move-window-to-workspace 1; } + + Mod+Tab { focus-workspace-previous; } + + Mod+Ctrl+Comma { consume-or-expel-window-left; } + Mod+Ctrl+Period { consume-or-expel-window-right; } + + Mod+Comma { set-column-width "-10%"; } + Mod+Period { set-column-width "+10%"; } + Mod+T { switch-preset-column-width; } + Mod+Shift+Comma { set-window-height "-10%"; } + Mod+Shift+Period { set-window-height "+10%"; } + Mod+Shift+T { reset-window-height; } + + Mod+M { maximize-column; } + Mod+Ctrl+M { fullscreen-window; } + Mod+C { center-column; } + + Mod+Ctrl+Q { close-window; } + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + Mod+Escape { switch-layout "next"; } + // Mod+Shift+Space { switch-layout "prev"; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + } + ''; + }; + }; + programs.waybar = { + enable = true; + #package = pkgs.waybar-0.11.0"; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = let + hostname = osConfig.networking.hostName; + in { + bar-0 = { + layer = "top"; + position = "bottom"; + height = 40; + spacing = 6; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + #"custom/notification" + "clock" + "wlr/taskbar" + ]; + modules-center = ["group/niri" "privacy"]; + modules-right = [ + "tray" + "wireplumber" + (lib.mkIf (hostname != "dunamis") + "group/laptop") + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + focused = "󰗝"; + active = "󰻃"; + default = "󰄰"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; + "custom/text" = { + format = "here will be workspaces"; + interval = "once"; + tooltip = false; + }; + "group/niri" = { + orientation = "inherit"; + modules = [ + "niri/language" + "niri/workspaces" + ]; + }; + "group/laptop" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + children-class = "laptop"; + transition-left-to-right = false; + }; + modules = [ + "battery" + "power-profiles-daemon" + "custom/separator" + "custom/kbd-backlight" + "custom/separator" + "backlight" + "custom/separator" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰈈"; + deactivated = "󰈉"; + }; + }; + "tray" = { + icon-size = 24; + spacing = 3; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + # "backlight" = { + # device = "intel_backlight"; + # format = "{percent}% {icon}"; + # format-icons = ["󰃞" "󰃟" "󰃝" "󰃠"]; + # on-scroll-up = "light -A 2%"; + # on-scroll-down = "light -U 2%"; + # }; + "custom/backlight" = { + format = "{}% {icon}"; + format-icons = ["󰃠"]; + exec = "~/.local/bin/brightness.nu get-percentage"; + on-scroll-up = "~/.local/bin/brightness.nu change 2"; + on-scroll-down = "~/.local/bin/brightness.nu change 2"; + interval = 1; + }; + "custom/kbd-backlight" = { + format = "{}% {icon}"; + format-icons = ["󰌌"]; + exec = "~/.local/bin/keyboard-brightness.nu get-percentage"; + on-scroll-up = "~/.local/bin/keyboard-brightness.nu change"; + on-scroll-down = "~/.local/bin/keyboard-brightness.nu change -1"; + interval = 1; + }; + # "custom/kbd-backlight" = { + # exec = "cat /sys/class/leds/platform::kbd_backlight/brightness"; + # interval = 1; + # format = "{}% {icon}"; + # format-icons = ["󰌌"]; + # on-scroll-up = "light -s sysfs/leds/platform::kbd_backlight -A 5%"; + # on-scroll-down = "light -s sysfs/leds/platform::kbd_backlight -U 5%"; + # }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = "pwvucontrol"; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + # icon-spacing = 4; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 24; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + * { + font-family: Iosevka Nerd Font Propo, FontAwesome; + font-size: 100%; + /* margin: 0px 2px 2px 2px; */ + } + + window#waybar { + background-color: transparent; + /* border-top: 3px solid @overlay0; */ + color: @base05; + /* padding: 0px 2px 0px 0px; */ + transition-property: background-color; + transition-duration: 0.5s; + } + + .modules-right, + .modules-center, + .modules-left { + border-radius: 8px; + } + + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 12px; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #custom-kbd-backlight, + #workspaces, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #laptop, + #tray, + #mode, + #privacy + #privacy-item, + #idle_inhibitor, + #backlight-slider, + #custom-notification, + #scratchpad, + #power-profiles-daemon, + #taskbar, + #language, + #upower, + #mpris, + #mpd { + padding: 0 0.8em; + border-radius: 12px; + color: @base05; + background-color: @base00; + } + + /* #upower, */ + #battery, + #backlight, + #custom-kbd-backlight, + #backlight-slider, + #cpu, + #memory, + #disk, + #network, + #wireplumber, + #power-profiles-daemon { + padding-right: 0.8em; + } + + #language { + padding-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + #workspaces { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + #taskbar, + #workspaces { + padding: 0 0.5em; + } + #taskbar button, + #workspaces button { + padding: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + #power-profiles-daemon.performance { + background-color: @base00; + color: @base08; + } + + #power-profiles-daemon.balanced { + background-color: @base00; + color: @base0E; + } + + #power-profiles-daemon.power-saver { + background-color: @base00; + color: @base08; + } + + label:focus { + background-color: #000000; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; + } + + #idle_inhibitor { + padding: 0 0.9em; + } + + + #idle_inhibitor:hover { + box-shadow: inset 0 -3px @base05; + } + + #idle_inhibitor.activated { + background-color: @base05; + color: @base00; + } + + #idle_inhibitor.activated:hover { + box-shadow: inset 0 -3px @base00; + } + + #laptop, + #privacy { + padding: 0em; + } + + #privacy-item.screenshare { + background-color: @base00; + color: @base0C; + } + + #privacy-item.audio-in { + background-color: @base00; + color: @base0E; + } + + #privacy-item.audio-out { + background-color: @base; + } + ''; + }; + programs.walker = { + enable = true; + package = pkgs.walker; + runAsService = true; + config = { + activation_mode.labels = "neiotsra"; + # theme = "stylix"; + as_window = false; + builtins = { + applications = { + actions = {enabled = true;}; + context_aware = true; + name = "applications"; + placeholder = "Applications"; + prioritize_new = true; + refresh = true; + show_generic = false; + show_icon_when_single = true; + show_sub_when_single = true; + weight = 5; + }; + calc = { + icon = "accessories-calculator"; + min_chars = 4; + name = "calc"; + placeholder = "Calculator"; + weight = 5; + }; + clipboard = { + image_height = 300; + max_entries = 10; + name = "clipboard"; + placeholder = "Clipboard"; + switcher_only = true; + weight = 5; + }; + commands = { + icon = "utilities-terminal"; + name = "commands"; + placeholder = "Commands"; + switcher_only = true; + weight = 5; + }; + custom_commands = { + icon = "utilities-terminal"; + name = "custom_commands"; + placeholder = "Custom Commands"; + weight = 5; + }; + dmenu = { + name = "dmenu"; + placeholder = "Dmenu"; + switcher_only = true; + weight = 5; + }; + emojis = { + history = true; + name = "emojis"; + placeholder = "Emojis"; + switcher_only = true; + typeahead = true; + weight = 5; + }; + finder = { + concurrency = 8; + icon = "folder"; + ignore_gitignore = true; + name = "finder"; + placeholder = "Finder"; + refresh = true; + switcher_only = true; + weight = 5; + }; + runner = { + generic_entry = false; + history = true; + icon = "utilities-terminal"; + name = "runner"; + placeholder = "Runner"; + refresh = true; + typeahead = true; + weight = 5; + }; + ssh = { + history = true; + icon = "preferences-system-network"; + name = "ssh"; + placeholder = "SSH"; + refresh = true; + switcher_only = true; + weight = 5; + }; + switcher = { + name = "switcher"; + placeholder = "Switcher"; + prefix = "/"; + weight = 5; + }; + # websearch = { + # engines = ["google"]; + # icon = "applications-internet"; + # name = "websearch"; + # placeholder = "Websearch"; + # weight = 5; + # }; + windows = { + icon = "view-restore"; + name = "windows"; + placeholder = "Windows"; + weight = 5; + }; + }; + disable_click_to_close = false; + force_keyboard_focus = true; + list = { + max_entries = 50; + show_initial_entries = true; + single_click = true; + }; + search = { + delay = 0; + force_keyboard_focus = true; + history = true; + placeholder = "Search..."; + }; + }; + theme = { + layout = { + ui = { + anchors = { + bottom = false; + left = false; + right = false; + top = false; + }; + window = { + h_align = "center"; + v_align = "center"; + box = { + width = 500; + height = 300; + h_align = "center"; + v_align = "center"; + spacing = 12; + orientation = "vertical"; + # margins = { + # bottom = 200; + # top = 200; + # start = 200; + # }; + search = { + margins = { + # bottom = 0; + # top = 0; + start = 8; + end = 8; + }; + spacing = 12; + # v_align = "baseline"; + h_align = "top"; + h_expand = true; + v_expand = true; + }; + scroll = { + h_align = "fill"; + v_align = "fill"; + h_expand = false; + overlay_scrolling = true; + list = { + # max_height = 300; + margins = { + bottom = 8; + top = 0; + start = 8; + end = 8; + }; + always_show = true; + v_align = "fill"; + h_align = "bottom"; + h_expand = false; + v_expand = true; + item = { + icon.theme = "${config.gtk.iconTheme.name}"; + spacing = 4; + activation_label = { + h_align = "end"; + # v_align = "bottom"; + h_expand = false; + justify = "right"; + spacing = 4; + margins.end = 12; + # x_align = 1; + }; + text = { + h_align = "start"; + h_expand = true; + revert = true; + wrap = true; + }; + }; + }; + }; + }; + }; + }; + }; + style = '' + @define-color base00 #${config.lib.stylix.colors.base00}; + @define-color base01 #${config.lib.stylix.colors.base01}; + @define-color base02 #${config.lib.stylix.colors.base02}; + @define-color base03 #${config.lib.stylix.colors.base03}; + @define-color base04 #${config.lib.stylix.colors.base04}; + @define-color base05 #${config.lib.stylix.colors.base05}; + @define-color base06 #${config.lib.stylix.colors.base06}; + @define-color base07 #${config.lib.stylix.colors.base07}; + @define-color base08 #${config.lib.stylix.colors.base08}; + @define-color base09 #${config.lib.stylix.colors.base09}; + @define-color base0A #${config.lib.stylix.colors.base0A}; + @define-color base0B #${config.lib.stylix.colors.base0B}; + @define-color base0C #${config.lib.stylix.colors.base0C}; + @define-color base0D #${config.lib.stylix.colors.base0D}; + @define-color base0E #${config.lib.stylix.colors.base0E}; + @define-color base0F #${config.lib.stylix.colors.base0F}; + + #window, + #box, + #search, + #password, + #input, + #typeahead, + #spinner, + #list, + child, + scrollbar, + slider, + #item, + #text, + #label, + #sub, + #activationlabel { + all: unset; + } + + #window { + background: none; + color: @base05; + } + + #box { + border-radius: 20px; + border-width: 4px; + border-color: @base0D; + background: @base00; + } + + #search { + background: @base01; + border-radius: 12px; + padding: 8px; + } + + #password, + #input, + #typeahead { + background: none; + box-shadow: none; + border-radius: 12px; + } + + #input > *:first-child, + #typeahead > *:first-child { + margin-right: 12px; + border-radius: 12px; + } + + /* #spinner { + } */ + + #typeahead { + color: @base05; + } + + #input placeholder { + opacity: 0.5; + } + + #list { + padding: 8px; + border-radius: 12px; + background: @base01; + } + + child { + box-shadow: none; + } + + child:selected, + child:hover { + box-shadow: none; + border-radius: 8px; + background: @base02; + } + + #item { + padding: 4px; + } + + /* #icon { + } + + #text { + } + + #label { + } */ + + #sub { + font-size: smaller; + opacity: 0.5; + } + + #activationlabel { + opacity: 0.5; + } + + .activation #activationlabel { + opacity: 1; + color: @base05; + } + + .activation #text, + .activation #icon, + .activation #search { + opacity: 0.5; + } + ''; + }; + }; + + programs.wpaperd.enable = true; + programs.keychain = { + enable = true; + keys = ["gitea-local"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + + home.packages = with pkgs; [ + niri + nautilus + helvum + loupe + evince + celluloid + junction + swayidle + swaylock-effects + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard + polkit_gnome + xwayland-satellite + ]; + + gtk = { + enable = true; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + qt = { + enable = true; + # platformTheme.name = "gtk3"; + }; + dconf.settings = { + "org/gnome/desktop/interface" = { + icon-theme = "${config.gtk.iconTheme.name}"; + }; + }; + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + pdf_reader = ["org.gnome.Evince.desktop"]; + in { + "inode/directory" = file_manager; + "video/x-matroska" = video_player; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-mpeg" = video_player; + "image/png" = image_viewer; + "image/jpeg" = image_viewer; + "application/pdf" = pdf_reader; + "text/html" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + # QT_QPA_PLATFORMTHEME = "gtk3"; + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + systemd.user.targets.tray = { + # workaround for udiskie + Unit = { + Description = "Home Manager System Tray"; + }; + }; + systemd.user.services = { + udiskie = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + waybar = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + copyq = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Environment = lib.mkForce "QT_QPA_PLATFORM=wayland"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wpaperd = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.wpaperd}/bin/wpaperd"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + network-manager-applet = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + gnome-polkit-agent = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + wlsunset = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + hypridle = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + }; + xwayland-satellite = { + Unit = { + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + Requisite = ["graphical-session.target"]; + }; + Install = { + WantedBy = ["niri.service"]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite :123"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; + }; +} diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix new file mode 100644 index 0000000..26e5294 --- /dev/null +++ b/modules/home/desktop/plasma/default.nix @@ -0,0 +1,32 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.plasma; +in { + options = { + desktop.plasma.enable = + mkEnableOption "enable plasma desktop"; + }; + config = mkIf cfg.enable { + stylix.targets.kde.enable = true; + home.packages = with pkgs; [ + wl-clipboard + ]; + xdg.userDirs = { + enable = true; + createDirectories = true; + templates = "${config.home.homeDirectory}/temps"; + publicShare = "${config.home.homeDirectory}/pub"; + desktop = "${config.home.homeDirectory}/desktop"; + download = "${config.home.homeDirectory}/downloads"; + documents = "${config.home.homeDirectory}/docs"; + pictures = "${config.home.homeDirectory}/pics"; + videos = "${config.home.homeDirectory}/vids"; + music = "${config.home.homeDirectory}/music"; + }; + }; +} diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix new file mode 100644 index 0000000..b9f89bc --- /dev/null +++ b/modules/nixos/desktop/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./niri.nix + ./plasma.nix + ./hyprland.nix + ]; +} diff --git a/modules/nixos/desktop/hyprland.nix b/modules/nixos/desktop/hyprland.nix new file mode 100644 index 0000000..c698209 --- /dev/null +++ b/modules/nixos/desktop/hyprland.nix @@ -0,0 +1,56 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.hyprland; +in { + imports = [./misc/sound.nix ./misc/regreet.nix]; + options = { + desktop.hyprland.enable = + mkEnableOption "enable hyprland desktop"; + }; + config = mkIf cfg.enable { + programs.hyprland.enable = true; + programs.hyprland.package = pkgs.hyprland; + fonts.fontDir.enable = true; + security.pam.services.hyprlock = {}; + security.pam.loginLimits = [ + { + domain = "@users"; + item = "rtprio"; + type = "-"; + value = 1; + } + ]; + programs.dconf.enable = true; + programs.seahorse.enable = true; + services.gnome.gnome-keyring.enable = true; + services.udisks2.enable = true; + services.dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + ]; + config = { + common = { + default = [ + "hyprland" + "gtk" + ]; + }; + }; + }; + services.greetd.settings.initial_session = { + user = "user"; + command = "Hyprland"; + }; + }; +} diff --git a/modules/nixos/desktop/misc/regreet.nix b/modules/nixos/desktop/misc/regreet.nix new file mode 100644 index 0000000..e4e86f8 --- /dev/null +++ b/modules/nixos/desktop/misc/regreet.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + programs.regreet.enable = true; + services.greetd = { + enable = true; + vt = 6; + settings = { + default_session = { + command = "${pkgs.cage}/bin/cage -s -m last -- ${pkgs.greetd.regreet}/bin/regreet"; + }; + }; + }; +} diff --git a/modules/nixos/desktop/misc/sound.nix b/modules/nixos/desktop/misc/sound.nix new file mode 100644 index 0000000..e5fdaec --- /dev/null +++ b/modules/nixos/desktop/misc/sound.nix @@ -0,0 +1,18 @@ +{ + services = { + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + extraConfig.pipewire."92-low-latency" = { + context.properties = { + default.clock.rate = 48000; + default.clock.quantum = 32; + default.clock.min-quantum = 32; + default.clock.max-quantum = 32; + }; + }; + }; + }; +} diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri.nix new file mode 100644 index 0000000..2c08f09 --- /dev/null +++ b/modules/nixos/desktop/niri.nix @@ -0,0 +1,60 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.niri; +in { + imports = [./misc/sound.nix ./misc/regreet.nix]; + options = { + desktop.niri.enable = + mkEnableOption "enable niri desktop"; + }; + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + brightnessctl + gcr_4 + ]; + fonts.fontDir.enable = true; + security.pam = { + services.hyprlock = {}; + loginLimits = [ + { + domain = "@users"; + item = "rtprio"; + type = "-"; + value = 1; + } + ]; + }; + services = { + gnome.gnome-keyring.enable = true; + udisks2.enable = true; + dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + }; + programs = { + dconf.enable = true; + seahorse.enable = true; + }; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk + ]; + config.common.default = [ + "gnome" + "gtk" + ]; + }; + services.greetd.settings.initial_session = { + user = "user"; + command = "${pkgs.niri}/bin/niri-session"; + }; + }; +} diff --git a/modules/nixos/desktop/plasma.nix b/modules/nixos/desktop/plasma.nix new file mode 100644 index 0000000..4401dec --- /dev/null +++ b/modules/nixos/desktop/plasma.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.plasma; +in { + imports = [ + ./misc/sound.nix + ]; + options = { + desktop.plasma = { + enable = mkEnableOption "enable plasma desktop"; + sddmEnable = mkEnableOption "enable simple display manager"; + }; + }; + config = mkIf cfg.enable { + services.displayManager.sddm = { + enable = cfg.sddmEnable; + wayland.enable = true; + }; + services.desktopManager.plasma6.enable = true; + + fonts.fontDir.enable = true; + }; +}