diff --git a/Makefile b/Makefile index da37be66..a6050e5a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,8 @@ -.PHONY: build test switch - -build: - nixos-rebuild build --flake . +.PHONY: build test test: sudo nixos-rebuild test --flake . -switch: - sudo nixos-rebuild switch --flake . +build: + nixos-rebuild build --flake . + diff --git a/home/alacritty/default.nix b/home/alacritty/default.nix new file mode 100644 index 00000000..cb47cc0a --- /dev/null +++ b/home/alacritty/default.nix @@ -0,0 +1,19 @@ +{...}: { + stylix.targets.alacritty.enable = true; + programs.alacritty = { + enable = true; + settings = { + window = { + dynamic_title = true; + padding = { + x = 10; + y = 10; + }; + decorations = "none"; + }; + selection.save_to_clipboard = true; + live_config_reload = true; + mouse.hide_when_typing = true; + }; + }; +} diff --git a/home/default.nix b/home/default.nix index cd486052..daeb5860 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,14 +1,6 @@ {lib, ...}: { imports = [./config/default.nix ./scripts/default.nix]; - stylix.targets = { - avizo.enable = true; - firefox.enable = true; - foot.enable = true; - fzf.enable = true; - rofi.enable = true; - swaylock.enable = true; - xresources.enable = true; - }; + stylix.targets.fzf.enable = true; programs = rec { bash.enable = true; fish.enable = true; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 0398d277..9ae59258 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -4,6 +4,10 @@ pkgs, ... }: { + stylix.targets = { + avizo.enable = true; + xresources.enable = true; + }; imports = [ ../default.nix ../accounts/default.nix @@ -11,6 +15,7 @@ ../waybar/default.nix ../rofi/default.nix ../swaync/default.nix + ../alacritty/default.nix ../emacs/default.nix ../nyxt/default.nix ../obs/default.nix @@ -18,6 +23,8 @@ services = { gpg-agent.pinentryFlavor = "gnome3"; avizo.enable = true; + blueman-applet.enable = true; + network-manager-applet.enable = true; syncthing.enable = true; udiskie = { enable = true; @@ -26,22 +33,6 @@ tray = "never"; }; }; - programs.foot = { - enable = true; - settings = { - main = { - pad = "10x10"; - locked-title = false; - notify-focus-inhibit = true; - selection-target = "both"; - }; - bell = { - urgent = true; - notify = true; - }; - mouse = {hide-when-typing = "yes";}; - }; - }; gtk = { enable = true; cursorTheme = { @@ -92,9 +83,9 @@ exec-once = with config; [ "hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}" "git -C $HOME/.emacs pull --ff-only" - "swaync" + "${pkgs.swaynotificationcenter}/bin/swaync" "${pkgs.hyprpaper}/bin/hyprpaper" - "${pkgs.dex}/bin/dex --autostart" + "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" ]; gestures.workspace_swipe = true; input = { @@ -220,11 +211,12 @@ "SUPER SHIFT, ${toString w}, movetoworkspace, ${toString w}" ]; in + with config.programs; with lib.lists; flatten (forEach (range 1 9) workspace) ++ [ # See https://wiki.hyprland.org/Configuring/Keywords/ for more - "SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse" + "SUPER, F1, exec, ${swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse" "SUPER, Q, killactive," "SUPER SHIFT, Q, exec, rofi -replace -show power-menu" "SUPER, V, togglefloating" @@ -234,16 +226,15 @@ "SUPER, P, exec, pkill rofi || rofi-pass" "SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used" "SUPER ALT, P, exec, pkill rofi || rofi-pass --insert" - "SUPER, Z, exec, swaync-client -t -sw" - "SUPER SHIFT, Z, exec, swaync-client -d -sw" + "SUPER, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" + "SUPER SHIFT, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw" # Common program shortcuts - "SUPER, Space, exec, rofi -replace -show combi" - "SUPER, Return, exec, foot" - "SUPER SHIFT, Return, exec, emacsclient -c" - "SUPER, S, exec, foot -e btm --group --battery" - "SUPER, W, exec, nyxt --no-socket --with-file bookmarks=${../nyxt/bookmarks.lisp}" - "SUPER, F, exec, thunar $HOME" + "SUPER, Space, exec, ${rofi.package}/bin/rofi -replace -show combi" + "SUPER, Return, exec, ${alacritty.package}/bin/alacritty" + "SUPER SHIFT, Return, exec, ${emacs.finalPackage}/bin/emacsclient -c" + "SUPER, S, exec, ${alacritty.package}/bin/alacritty -e btm --group --battery" + "SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket --with-file bookmarks=${../nyxt/bookmarks.lisp}" # Misc useful binds '',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"'' @@ -274,10 +265,10 @@ "SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1" "SUPER, O, focusurgentorlast" ]; - bindl = [ + bindl = with config.services; [ # Sound - ",XF86AudioMute,exec,${pkgs.avizo}/bin/volumectl %" - ",XF86AudioMicMute,exec,${pkgs.avizo}/bin/volumectl -m %" + ",XF86AudioMute,exec,${avizo.package}/bin/volumectl %" + ",XF86AudioMicMute,exec,${avizo.package}/bin/volumectl -m %" # Playback ",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause" @@ -285,14 +276,14 @@ ",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous" ",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next" ]; - bindle = [ + bindle = with config.services; [ # Sound - ",XF86AudioRaiseVolume,exec,${pkgs.avizo}/bin/volumectl -u + 5" - ",XF86AudioLowerVolume,exec,${pkgs.avizo}/bin/volumectl -u - 5" + ",XF86AudioRaiseVolume,exec,${avizo.package}/bin/volumectl -u + 5" + ",XF86AudioLowerVolume,exec,${avizo.package}/bin/volumectl -u - 5" # Brightness - ",XF86MonBrightnessUp,exec,${pkgs.avizo}/bin/lightctl + 5" - ",XF86MonBrightnessDown,exec,${pkgs.avizo}/bin/lightctl - 5" + ",XF86MonBrightnessUp,exec,${avizo.package}/bin/lightctl + 5" + ",XF86MonBrightnessDown,exec,${avizo.package}/bin/lightctl - 5" ]; bindm = [ # Move/resize windows with mainMod + LMB/RMB and dragging diff --git a/home/rofi/default.nix b/home/rofi/default.nix index 1627f9af..a2309368 100644 --- a/home/rofi/default.nix +++ b/home/rofi/default.nix @@ -3,11 +3,12 @@ pkgs, ... }: { + stylix.targets.rofi.enable = true; programs.rofi = { enable = true; package = pkgs.rofi-wayland; location = "center"; - terminal = "foot"; + terminal = "${pkgs.alacritty}/bin/alacritty"; pass = { enable = true; package = pkgs.rofi-pass-wayland; diff --git a/home/swaylock/default.nix b/home/swaylock/default.nix index 0c4e761c..4632826f 100644 --- a/home/swaylock/default.nix +++ b/home/swaylock/default.nix @@ -3,6 +3,7 @@ pkgs, ... }: { + stylix.targets.swaylock.enable = true; programs.swaylock = { enable = true; package = pkgs.swaylock-effects; diff --git a/home/waybar/default.nix b/home/waybar/default.nix index 85314598..4cfbb59f 100644 --- a/home/waybar/default.nix +++ b/home/waybar/default.nix @@ -36,11 +36,10 @@ # TODO workspace rewrites "rewrite" = { "(.*) - GNU Emacs at (.*)" = " $1 [$2]"; - "foot" = " "; + "Alacritty" = " "; "Nyxt - (.*)" = "󰀹 $1"; "(.*) — Mozilla Firefox" = "󰈹 $1"; "(.*) - Chromium" = "󰊯 $1"; - "(.*) - Thunar" = "󰝰 $1"; ".*WebCord (.*)" = "󰙯 $1"; "[Ss]team" = "󰓓 "; "(.*) - mpv" = "󰦟 $1"; diff --git a/system/desktop.nix b/system/desktop.nix index 14a6c4e3..add3b409 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -5,7 +5,6 @@ }: { imports = [./default.nix]; environment.systemPackages = with pkgs; [ - dex libnotify libcamera glib diff --git a/system/hyprland.nix b/system/hyprland.nix index c65b818d..6d200e74 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -10,13 +10,7 @@ GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim"; }; systemPackages = with pkgs; [ - libsForQt5.polkit-kde-agent - swaylock-effects - swaynotificationcenter xdg-utils - hyprpaper - pipewire - wireplumber wtype wl-clipboard swayimg @@ -24,12 +18,9 @@ pavucontrol playerctl brightnessctl - networkmanagerapplet - bluez protonvpn-gui mpv streamlink - mpg123 libreoffice webcord ]; @@ -38,8 +29,6 @@ services = { blueman.enable = true; udisks2.enable = true; - gvfs.enable = true; - tumbler.enable = true; xserver.enable = false; greetd.settings = let command = "Hyprland"; @@ -78,10 +67,6 @@ programs = { dconf.enable = true; light.enable = true; - thunar = { - enable = true; - plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman]; - }; hyprland = { enable = true; xwayland.enable = true;