From 7d7ed8dfd4ad423a14a7673fff55dc1700cbddda Mon Sep 17 00:00:00 2001 From: iFargle Date: Thu, 31 Aug 2023 20:55:14 +0900 Subject: [PATCH] Probably tons of breakage --- .../hyprland/_default}/wlogout/hibernate.png | Bin .../desktops/hyprland/_default}/wlogout/lock.png | Bin .../desktops/hyprland/_default}/wlogout/logout.png | Bin .../desktops/hyprland/_default}/wlogout/reboot.png | Bin .../hyprland/_default}/wlogout/shutdown.png | Bin .../hyprland/_default}/wlogout/suspend.png | Bin .../desktops/hyprland/gruvbox/wlogout-conf.nix | 12 ++++++------ home-manager/common/software/cli/default.nix | 13 +++++++++++++ home-manager/common/software/cli/doom-emacs.nix | 4 ++-- .../common/software/cli/{ => gruvbox}/btop.nix | 0 .../cli/{ => gruvbox}/doom-emacs.d/config.el | 0 .../cli/{ => gruvbox}/doom-emacs.d/init.el | 0 .../cli/{ => gruvbox}/doom-emacs.d/packages.el | 0 home-manager/common/software/cli/kitty.nix | 4 ++-- home-manager/common/software/gui/firefox.nix | 6 ++++++ home-manager/default.nix | 11 ++--------- .../desktops/hyprland/gruvbox/hyprland-conf.nix | 6 +++--- .../{waybar => }/scripts/waybar-scripts.nix | 0 .../hyprland/gruvbox/{waybar => }/waybar-conf.nix | 4 ++-- 19 files changed, 36 insertions(+), 24 deletions(-) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/hibernate.png (100%) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/lock.png (100%) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/logout.png (100%) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/reboot.png (100%) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/shutdown.png (100%) rename home-manager/{hosts/nixos-laptop/desktops/hyprland/gruvbox => common/desktops/hyprland/_default}/wlogout/suspend.png (100%) create mode 100644 home-manager/common/software/cli/default.nix rename home-manager/common/software/cli/{ => gruvbox}/btop.nix (100%) rename home-manager/common/software/cli/{ => gruvbox}/doom-emacs.d/config.el (100%) rename home-manager/common/software/cli/{ => gruvbox}/doom-emacs.d/init.el (100%) rename home-manager/common/software/cli/{ => gruvbox}/doom-emacs.d/packages.el (100%) rename home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/{waybar => }/scripts/waybar-scripts.nix (100%) rename home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/{waybar => }/waybar-conf.nix (99%) diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/hibernate.png b/home-manager/common/desktops/hyprland/_default/wlogout/hibernate.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/hibernate.png rename to home-manager/common/desktops/hyprland/_default/wlogout/hibernate.png diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/lock.png b/home-manager/common/desktops/hyprland/_default/wlogout/lock.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/lock.png rename to home-manager/common/desktops/hyprland/_default/wlogout/lock.png diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/logout.png b/home-manager/common/desktops/hyprland/_default/wlogout/logout.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/logout.png rename to home-manager/common/desktops/hyprland/_default/wlogout/logout.png diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/reboot.png b/home-manager/common/desktops/hyprland/_default/wlogout/reboot.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/reboot.png rename to home-manager/common/desktops/hyprland/_default/wlogout/reboot.png diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/shutdown.png b/home-manager/common/desktops/hyprland/_default/wlogout/shutdown.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/shutdown.png rename to home-manager/common/desktops/hyprland/_default/wlogout/shutdown.png diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/suspend.png b/home-manager/common/desktops/hyprland/_default/wlogout/suspend.png similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/suspend.png rename to home-manager/common/desktops/hyprland/_default/wlogout/suspend.png diff --git a/home-manager/common/desktops/hyprland/gruvbox/wlogout-conf.nix b/home-manager/common/desktops/hyprland/gruvbox/wlogout-conf.nix index fd0a18e4..40522e4c 100644 --- a/home-manager/common/desktops/hyprland/gruvbox/wlogout-conf.nix +++ b/home-manager/common/desktops/hyprland/gruvbox/wlogout-conf.nix @@ -70,22 +70,22 @@ } #lock { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/lock.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/lock.png"); } #logout { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/logout.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/logout.png"); } #suspend { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/suspend.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/suspend.png"); } #hibernate { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/hibernate.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/hibernate.png"); } #shutdown { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/shutdown.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/shutdown.png"); } #reboot { - background-image: url("/etc/nixos/git/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/wlogout/reboot.png"); + background-image: url("/etc/nixos/git/home-manager/desktops/hyprland/_default/wlogout/reboot.png"); } ''; }; diff --git a/home-manager/common/software/cli/default.nix b/home-manager/common/software/cli/default.nix new file mode 100644 index 00000000..407c3105 --- /dev/null +++ b/home-manager/common/software/cli/default.nix @@ -0,0 +1,13 @@ +{ theme, hostname, ... }: { + imports = [ + ./bash.nix + ./doom-emacs.nix + ./git.nix + ./kitty.nix + ./neofetch.nix + ./neovim.nix + ./ranger.nix + + ./${theme}/btop.nix + ]; +} \ No newline at end of file diff --git a/home-manager/common/software/cli/doom-emacs.nix b/home-manager/common/software/cli/doom-emacs.nix index 0ef43805..2ab5c202 100644 --- a/home-manager/common/software/cli/doom-emacs.nix +++ b/home-manager/common/software/cli/doom-emacs.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: { +{ theme, pkgs, ... }: { programs.doom-emacs = { enable = true; - doomPrivateDir = ./doom-emacs.d; + doomPrivateDir = ./${theme}/doom-emacs.d; }; programs.ripgrep.enable = true; diff --git a/home-manager/common/software/cli/btop.nix b/home-manager/common/software/cli/gruvbox/btop.nix similarity index 100% rename from home-manager/common/software/cli/btop.nix rename to home-manager/common/software/cli/gruvbox/btop.nix diff --git a/home-manager/common/software/cli/doom-emacs.d/config.el b/home-manager/common/software/cli/gruvbox/doom-emacs.d/config.el similarity index 100% rename from home-manager/common/software/cli/doom-emacs.d/config.el rename to home-manager/common/software/cli/gruvbox/doom-emacs.d/config.el diff --git a/home-manager/common/software/cli/doom-emacs.d/init.el b/home-manager/common/software/cli/gruvbox/doom-emacs.d/init.el similarity index 100% rename from home-manager/common/software/cli/doom-emacs.d/init.el rename to home-manager/common/software/cli/gruvbox/doom-emacs.d/init.el diff --git a/home-manager/common/software/cli/doom-emacs.d/packages.el b/home-manager/common/software/cli/gruvbox/doom-emacs.d/packages.el similarity index 100% rename from home-manager/common/software/cli/doom-emacs.d/packages.el rename to home-manager/common/software/cli/gruvbox/doom-emacs.d/packages.el diff --git a/home-manager/common/software/cli/kitty.nix b/home-manager/common/software/cli/kitty.nix index 8cde16f4..daa19581 100644 --- a/home-manager/common/software/cli/kitty.nix +++ b/home-manager/common/software/cli/kitty.nix @@ -1,9 +1,9 @@ -{ config, pkgs, ... }: { +{ theme, ... }: { # Kitty Conf # https://sw.kovidgoyal.net/kitty/conf/ # Theme - imports = [ ./gruvbox/kitty-theme.nix ]; + imports = [ ./${theme}/kitty-theme.nix ]; home.file.".config/kitty/kitty.conf".text = '' sync_to_monitor yes diff --git a/home-manager/common/software/gui/firefox.nix b/home-manager/common/software/gui/firefox.nix index f457e187..cfc0f4e0 100644 --- a/home-manager/common/software/gui/firefox.nix +++ b/home-manager/common/software/gui/firefox.nix @@ -42,6 +42,12 @@ updateInterval = 24 * 60 * 60 * 1000; # every day definedAliases = [ "@nw" ]; }; + + "Home Manager Options" = { + urls = [{ template = "https://mipmip.github.io/home-manager-option-search/?query={searchTerms}" }]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@hm" ]; + }; }; }; }; diff --git a/home-manager/default.nix b/home-manager/default.nix index 97acdc2c..61a890ba 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -14,15 +14,8 @@ }; imports = [ - # Common app configs - Will apply to all users managed by home-manager - ./common/software/cli/bash.nix - ./common/software/cli/btop.nix - ./common/software/cli/git.nix - ./common/software/cli/kitty.nix - ./common/software/cli/neofetch.nix - ./common/software/cli/neovim.nix - ./common/software/cli/doom-emacs.nix - ./common/software/cli/ranger.nix + # Common configs + ./common/software/cli # User configs ./users/${username} diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/hyprland-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/hyprland-conf.nix index 3eba9706..32211b72 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/hyprland-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/hyprland-conf.nix @@ -1,4 +1,4 @@ -{ hostname, ... }: { +{ theme, ... }: { home.file = { ".config/hypr/hyprland.conf" = { enable = true; @@ -254,8 +254,8 @@ # Set the wallpaper swww init & - WALLPAPER_DIR=/etc/nixos/git/wallpapers/gruvbox - swww img $WALLPAPER_DIR/wallpaper9.jpg & + WALLPAPER_DIR=/etc/nixos/git/wallpapers/${theme} + swww img $WALLPAPER_DIR/`ls $WALLPAPER_DIR | shuf -n 1` & # Waybar waybar & diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/scripts/waybar-scripts.nix similarity index 100% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix rename to home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/scripts/waybar-scripts.nix diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix similarity index 99% rename from home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix rename to home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix index 38d25f35..aabd99fb 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix @@ -1,4 +1,4 @@ -{ hostname, ...}: { +{ ...}: { imports = [ ./scripts/waybar-scripts.nix ]; home.file = { @@ -142,9 +142,9 @@ "format-icons": ["", "", "", "", ""] }, } - ''; }; + # Waybar theming ".config/waybar/style.css" = { enable = true;