From dafac62822c0051e8d472432c167794e3697315d Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Wed, 5 Mar 2025 09:12:58 -0800 Subject: [PATCH] feat: void swap --- common/darwin/fonts.nix | 5 +- flake.nix | 6 +- home-manager/machines/cubert.nix | 2 +- home-manager/machines/leela.nix | 36 +++++++ home-manager/modules/hyprland.nix | 18 ++-- home-manager/modules/kitty/default.nix | 7 -- home-manager/modules/kitty/mac.nix | 144 ------------------------- home-manager/modules/waybar.nix | 62 +++++------ home-manager/modules/zsh/zshrc.nix | 5 +- 9 files changed, 86 insertions(+), 199 deletions(-) create mode 100644 home-manager/machines/leela.nix delete mode 100644 home-manager/modules/kitty/default.nix delete mode 100644 home-manager/modules/kitty/mac.nix diff --git a/common/darwin/fonts.nix b/common/darwin/fonts.nix index 066f4cf..6e7f694 100644 --- a/common/darwin/fonts.nix +++ b/common/darwin/fonts.nix @@ -4,11 +4,8 @@ fontDir.enable = true; packages = [ pkgs.nerd-fonts.meslo - ] - fonts = - [ - ] + fonts = [] ++ builtins.attrValues { inherit (pkgs) diff --git a/flake.nix b/flake.nix index b4b9153..ff2265f 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,10 @@ mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration { - inherit modules pkgs; + inherit pkgs; + modules = + modules + ++ [stylix.homeManagerModules.stylix]; extraSpecialArgs = {inherit inputs outputs;}; }; in rec { @@ -161,6 +164,7 @@ "kdb424@farnsworth" = mkHome [./home-manager/machines/headless.nix] nixpkgs.legacyPackages.aarch64-linux; "kdb424@zapp" = mkHome [./home-manager/machines/headless.nix] nixpkgs.legacyPackages.x86_64-linux; "kdb424@amy" = mkHome [./home-manager/machines/headless.nix] nixpkgs.legacyPackages.x86_64-linux; + "kdb424@leela" = mkHome [./home-manager/machines/leela.nix] nixpkgs.legacyPackages.x86_64-linux; }; }; diff --git a/home-manager/machines/cubert.nix b/home-manager/machines/cubert.nix index 2a0494e..111fa8d 100644 --- a/home-manager/machines/cubert.nix +++ b/home-manager/machines/cubert.nix @@ -28,7 +28,7 @@ ../modules/mac.nix ../modules/commonGUI.nix ]; - + stylix = { autoEnable = true; image = pkgs.fetchurl { diff --git a/home-manager/machines/leela.nix b/home-manager/machines/leela.nix new file mode 100644 index 0000000..54368b5 --- /dev/null +++ b/home-manager/machines/leela.nix @@ -0,0 +1,36 @@ +{ + config, + pkgs, + ... +}: { + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "kdb424"; + home.homeDirectory = "/home/kdb424"; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "23.05"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + imports = [ + ../modules/common.nix + ../modules/linux.nix + ../modules/hyprland.nix + ]; + + stylix = { + autoEnable = true; + image = pkgs.fetchurl { + url = "https://git.kdb424.xyz/kdb424/wallpapers/raw/branch/main/wallhaven-kwk9o6.jpg"; + sha256 = "sha256-x2oFkDrt+96gd603hXC1T/FxpJJIuiI8xrww4REdzLE="; + }; + }; +} diff --git a/home-manager/modules/hyprland.nix b/home-manager/modules/hyprland.nix index 6cc5319..3327bdc 100644 --- a/home-manager/modules/hyprland.nix +++ b/home-manager/modules/hyprland.nix @@ -44,7 +44,6 @@ }; master = { - new_is_master = false; smart_resizing = false; }; @@ -95,7 +94,7 @@ bind = [ # general binds - "$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty" + "$mod, RETURN, exec, /bin/alacritty" "SUPER_SHIFT, C, killactive" "SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout" "$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle @@ -106,13 +105,13 @@ "SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard # Volume - ",XF86AudioRaiseVolume, exec, ${pkgs.ponymix}/bin/ponymix inc 2" - ",XF86AudioLowerVolume, exec, ${pkgs.ponymix}/bin/ponymix dec 2" - ",XF86AudioMute, exec, ${pkgs.ponymix}/bin/ponymix, toggle" + ",XF86AudioRaiseVolume, exec, /bin/ponymix inc 2" + ",XF86AudioLowerVolume, exec, /bin/ponymix dec 2" + ",XF86AudioMute, exec, /bin/ponymix, toggle" # Uses a fancy curve that I stole from somewhere that emulate's Mac's brightness level changes. - ",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int(($1 + .72) * 1.4) }')\"" - ",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int($1 / 1.4) }')\"" + ",XF86MonBrightnessUp, exec, /bin/light -S \"$(/bin/light -G | /bin/awk '{ print int(($1 + .72) * 1.4) }')\"" + ",XF86MonBrightnessDown, exec, /bin/light -S \"$(/bin/light -G | /bin/awk '{ print int($1 / 1.4) }')\"" # move focus "$mod, left, movefocus, l" @@ -163,9 +162,10 @@ exec-once = [ "sleep 10 && ${pkgs.swayidle}/bin/swayidle -w timeout 10 'if ${pkgs.busybox}/bin/pgrep ${pkgs.swaylock-effects}/bin/swaylock; then hyprctl dispatch dpms off; fi' resume 'hyprctl dispatch dpms on' before-sleep '${pkgs.swaylock-effects}/bin/swaylock -f'" # Enables clipboard sync - "${pkgs.wl-clipboard}/bin/wl-paste -p | ${pkgs.wl-clipboard}/bin/wl-copy" - "${pkgs.wl-clipboard}/bin/wl-paste | ${pkgs.wl-clipboard}/bin/wl-copy -p" + "${pkgs.wl-clipboard}/bin/wl-paste -p | /bin/wl-copy" + "${pkgs.wl-clipboard}/bin/wl-paste | /bin/wl-copy -p" "${pkgs.swaynotificationcenter}/bin/swaync" + "/bin/waybar" ]; }; diff --git a/home-manager/modules/kitty/default.nix b/home-manager/modules/kitty/default.nix deleted file mode 100644 index 866241a..0000000 --- a/home-manager/modules/kitty/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - programs.kitty.enable = true; - - programs.kitty = { - shellIntegration.enableZshIntegration - }; -} diff --git a/home-manager/modules/kitty/mac.nix b/home-manager/modules/kitty/mac.nix deleted file mode 100644 index 4874e23..0000000 --- a/home-manager/modules/kitty/mac.nix +++ /dev/null @@ -1,144 +0,0 @@ -{...}: { - programs.alacritty.settings = { - decorations = "none"; - # window = [ - # { - # option_as_alt = "Both"; - # } - # ]; - - # Mac rebinds - keyboard.bindings = [ - { - key = "A"; - mods = "Command"; - chars = "\\x01"; - } - { - key = "B"; - mods = "Command"; - chars = "\\x02"; - } - { - key = "C"; - mods = "Command"; - chars = "\\x03"; - } - { - key = "D"; - mods = "Command"; - chars = "\\x04"; - } - { - key = "E"; - mods = "Command"; - chars = "\\x05"; - } - { - key = "F"; - mods = "Command"; - chars = "\\x06"; - } - { - key = "G"; - mods = "Command"; - chars = "\\x07"; - } - { - key = "H"; - mods = "Command"; - chars = "\\x08"; - } - { - key = "I"; - mods = "Command"; - chars = "\\x09"; - } - { - key = "J"; - mods = "Command"; - chars = "\\x0A"; - } - { - key = "K"; - mods = "Command"; - chars = "\\x0B"; - } - { - key = "L"; - mods = "Command"; - chars = "\\x0C"; - } - { - key = "M"; - mods = "Command"; - chars = "\\x0D"; - } - { - key = "N"; - mods = "Command"; - chars = "\\x0E"; - } - { - key = "O"; - mods = "Command"; - chars = "\\x0F"; - } - { - key = "P"; - mods = "Command"; - chars = "\\x10"; - } - { - key = "Q"; - mods = "Command"; - chars = "\\x11"; - } - { - key = "R"; - mods = "Command"; - chars = "\\x12"; - } - { - key = "S"; - mods = "Command"; - chars = "\\x13"; - } - { - key = "T"; - mods = "Command"; - chars = "\\x14"; - } - { - key = "U"; - mods = "Command"; - chars = "\\x15"; - } - { - key = "V"; - mods = "Command"; - chars = "\\x16"; - } - { - key = "W"; - mods = "Command"; - chars = "\\x17"; - } - { - key = "X"; - mods = "Command"; - chars = "\\x18"; - } - { - key = "Y"; - mods = "Command"; - chars = "\\x19"; - } - { - key = "Z"; - mods = "Command"; - chars = "\\x1A"; - } - ]; - }; -} diff --git a/home-manager/modules/waybar.nix b/home-manager/modules/waybar.nix index fabe57b..6162429 100644 --- a/home-manager/modules/waybar.nix +++ b/home-manager/modules/waybar.nix @@ -5,18 +5,18 @@ osConfig, ... }: let - networkInterface.eth = - if osConfig.networking.hostName == "planex" - then "enp5s0f0" - else if osConfig.networking.hostName == "amy" - then "wlp2s0" - else ""; - hwmon = - if osConfig.networking.hostName == "planex" - then "/sys/class/hwmon/hwmon2/temp1_input" - else if osConfig.networking.hostName == "amy" - then "/sys/class/hwmon/hwmon4/temp1_input" - else ""; + networkInterface.eth = ""; + #if osConfig.networking.hostName == "planex" + #then "enp5s0f0" + #else if osConfig.networking.hostName == "amy" + #then "wlp2s0" + #else ""; + hwmon = ""; + #if osConfig.networking.hostName == "planex" + #then "/sys/class/hwmon/hwmon2/temp1_input" + #else if osConfig.networking.hostName == "amy" + #then "/sys/class/hwmon/hwmon4/temp1_input" + #else ""; colors = config.lib.stylix.colors.withHashtag; primaryColor = colors.base04; altColor = colors.base0C; @@ -36,7 +36,7 @@ in { margin = "2px 2px 0px 2px"; modules-left = ["hyprland/workspaces"]; modules-center = ["hyprland/window" "gamemode"]; - modules-right = ["network" "cpu" "temperature" "memory" "disk" "pulseaudio" "battery" "tray" "clock" "privacy" "custom/notification"]; + modules-right = ["network" "cpu" "temperature" "memory" "disk" "battery" "tray" "clock" "privacy" "custom/notification"]; "hyprland/window" = { format = "{}"; @@ -131,24 +131,24 @@ in { "on-click" = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.networkmanager}/bin/nmtui"; }; - "pulseaudio" = { - "format" = "{volume}% {icon}"; - "format-bluetooth" = "{volume}% {icon}"; - "format-muted" = ""; - "format-icons" = { - "headphones" = ""; - "handsfree" = ""; - "headset" = ""; - "phone" = ""; - "portable" = ""; - "car" = ""; - "default" = [ - "" - "" - ]; - }; - "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; - }; + #"pulseaudio" = { + # "format" = "{volume}% {icon}"; + # "format-bluetooth" = "{volume}% {icon}"; + # "format-muted" = ""; + # "format-icons" = { + # "headphones" = ""; + # "handsfree" = ""; + # "headset" = ""; + # "phone" = ""; + # "portable" = ""; + # "car" = ""; + # "default" = [ + # "" + # "" + # ]; + # }; + # "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; + #}; "temperature" = { "hwmon-path" = "${hwmon}"; diff --git a/home-manager/modules/zsh/zshrc.nix b/home-manager/modules/zsh/zshrc.nix index e95643e..eff69e4 100644 --- a/home-manager/modules/zsh/zshrc.nix +++ b/home-manager/modules/zsh/zshrc.nix @@ -209,6 +209,7 @@ in { alias psearch='sudo xbps-query -Rs' alias pu='sudo xbps-install -Su' alias orphans='sudo xpbs-remove -o' + alias Hyprland='/bin/Hyprland' elif [ "$OS_DETECTION" = "mac" ]; then ## Package Manager - brew @@ -267,7 +268,7 @@ in { sudo apk cache clean fi if [ "$OS_DETECTION" = "void" ]; then - sudo xbps-remote -O + sudo xbps-remove -Oo fi if [ "$OS_DETECTION" = "gentoo" ]; then sudo eclean packages @@ -349,7 +350,7 @@ in { # ZSH Tmux plugin settings TMUX_MOTD=false - if [[ $(hostname) == "amy" ]] || [[ $(hostname) == "cubert" ]] || [[ $(hostname) == "planex" ]] ; then + if [[ $(hostname) == "amy" ]] || [[ $(hostname) == "cubert" ]] || [[ $(hostname) == "leela" ]] ; then # Disable autostart on local machines TMUX_AUTOSTART=false fi