diff --git a/flake.nix b/flake.nix index cca8263..1c4df80 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,6 @@ inherit (nixpkgs) lib; username = "alex"; useremail = "reizero@live.com"; - hostname = "luna"; libs = import ./libs; in rec { @@ -20,7 +19,7 @@ (profile: { name = profile; value = import ./profiles/${profile} { - inherit self libs inputs outputs username useremail; + inherit self inputs outputs libs username useremail; }; }) (attrNames (readDir ./profiles)) diff --git a/home/core.nix b/home/core.nix index fb39c85..2cd6d24 100644 --- a/home/core.nix +++ b/home/core.nix @@ -1,7 +1,7 @@ # This is your home-manager configuration file # Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) -{ outputs, lib, config, pkgs, username, useremail, sysversion, ... }: { +{ outputs, pkgs, username, useremail, sysversion, ... }: { home = { inherit username; diff --git a/home/desktop.nix b/home/desktop.nix index 7b3b1d6..b1741ef 100644 --- a/home/desktop.nix +++ b/home/desktop.nix @@ -1,7 +1,7 @@ # This is your home-manager configuration file # Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) -{ inputs, outputs, lib, config, pkgs, username, useremail, ... }: +{ inputs, outputs, pkgs, ... }: { # You can import other home-manager modules here imports = [ @@ -35,10 +35,10 @@ zip unzip - usbutils # lsusb etc. - lsof # lsof process util - htop # process monitor - pciutils # lspci etc. + usbutils # lsusb etc. + lsof # lsof process util + htop # process monitor + pciutils # lspci etc. ]; sessionVariables = { diff --git a/libs/default.nix b/libs/default.nix index da1b209..e6330fb 100644 --- a/libs/default.nix +++ b/libs/default.nix @@ -5,4 +5,7 @@ in { # 导出mkNixosSystem函数 inherit (mkNixosSystemLib) mkNixosSystem; + + # 转换相对路径到绝对路径 + absolutePath = path: "${builtins.path { name = "path"; path = path; }}"; } diff --git a/modules/home/hyprland/conf/hypr/scripts/cliphist.sh b/modules/home/hyprland/conf/hypr/scripts/cliphist.sh deleted file mode 100755 index 3f5208d..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/cliphist.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env sh - -theme_file="$HOME/.config/hypr/themes/theme.conf" -roconf="~/.config/rofi/clipboard.rasi" - - -# set position - -case $2 in - 1) # top left - pos="window {location: north west; anchor: north west; x-offset: 20px; y-offset: 20px;}" - ;; - 2) # top right - pos="window {location: north east; anchor: north east; x-offset: -20px; y-offset: 20px;}" - ;; - 3) # bottom left - pos="window {location: south east; anchor: south east; x-offset: -20px; y-offset: -20px;}" - ;; - 4) # bottom right - pos="window {location: south west; anchor: south west; x-offset: 20px; y-offset: -20px;}" - ;; -esac - - -# read hypr theme border - -hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $theme_file | sed 's/ //g'` -hypr_width=`awk -F '=' '{if($1~" border_size ") print $2}' $theme_file | sed 's/ //g'` -wind_border=$(( hypr_border * 3/2 )) -elem_border=`[ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border` -r_override="window {border: ${hypr_width}px; border-radius: ${wind_border}px;} entry {border-radius: ${elem_border}px;} element {border-radius: ${elem_border}px;}" - - -# read hypr font size - -#fnt_size=`awk '{if($6=="monospace-font-name") print $NF}' $theme_file | sed "s/'//g"` -fnt_override=`gsettings get org.gnome.desktop.interface monospace-font-name | awk '{gsub(/'\''/,""); print $NF}'` -fnt_override="configuration {font: \"JetBrainsMono Nerd Font ${fnt_override}\";}" - - -# clipboard action - -case $1 in - c) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Copy...\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf | cliphist decode | wl-copy - ;; - d) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf | cliphist delete - ;; - w) if [ `echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf` == "Yes" ] ; then - cliphist wipe - fi - ;; - *) echo -e "cliphist.sh [action] [position]\nwhere action," - echo "c : cliphist list and copy selected" - echo "d : cliphist list and delete selected" - echo "w : cliphist wipe database" - echo "where position," - echo "1 : top left" - echo "2 : top right" - echo "3 : bottom right" - echo "4 : bottom left" - exit 1 - ;; -esac - diff --git a/modules/home/hyprland/conf/hypr/scripts/create-dirs.sh b/modules/home/hyprland/conf/hypr/scripts/create-dirs.sh deleted file mode 100644 index a1d868e..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/create-dirs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# 创建截图目录 -mkdir -p $HOME/tmp/Screenshots diff --git a/modules/home/hyprland/conf/hypr/scripts/logoutlaunch.sh b/modules/home/hyprland/conf/hypr/scripts/logoutlaunch.sh deleted file mode 100755 index a596e89..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/logoutlaunch.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env sh - -# detect monitor y res -res=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2` - -# scale config layout and style -case $1 in - 1) wlColms=6 - export mgn=$(( res * 10 / 100 )) - export hvr=$(( res * 5 / 100 )) ;; - 2) wlColms=2 - export mgn=$(( res * 8 / 100 )) - export mgn2=$(( res * 65 / 100 )) - export hvr=$(( res * 3 / 100 )) - export hvr2=$(( res * 60 / 100 )) ;; - *) echo "Error: invalid parameter passed..." - exit 1 ;; -esac - -# scale font size -export fntSize=$(( res * 2 / 100 )) - -# detect gtk system theme -export gtkThm="Catppuccin-Latte" #`gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g"` -export csMode=`gsettings get org.gnome.desktop.interface color-scheme | sed "s/'//g" | awk -F '-' '{print $2}'` -export BtnCol=`[ "$csMode" == "dark" ] && ( echo "black" ) || ( echo "white" )` -export BtnBkg=`[ "$csMode" == "dark" ] && ( echo "color" ) || ( echo "bg" )` -export WindBg=`[ "$csMode" == "dark" ] && ( echo "rgba(0,0,0,0.5)" ) || ( echo "rgba(255,255,255,0.6)" )` -export wbarTheme="$HOME/.config/waybar/themes/${gtkThm}.css" - -# eval hypr border radius -hyprTheme="$HOME/.config/hypr/themes/${gtkThm}.conf" -hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $hyprTheme | sed 's/ //g'` -export active_rad=$(( hypr_border * 5 )) -export button_rad=$(( hypr_border * 8 )) - -# set file variables -wLayout="$HOME/.config/wlogout/layout_$1" -wlTmplt="$HOME/.config/wlogout/style_$1.css" - -# eval config files -wlStyle=`envsubst < $wlTmplt` - -# eval padding -y_pad=$(( res * 20 / 100 )) - -# launch wlogout -wlogout -b $wlColms -c 0 -r 0 -T $y_pad -B $y_pad --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell - diff --git a/modules/home/hyprland/conf/hypr/scripts/modeswitch.sh b/modules/home/hyprland/conf/hypr/scripts/modeswitch.sh deleted file mode 100755 index 86898ae..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/modeswitch.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env sh - -## main script ## -CFGDIR="$HOME/.config" -X_MODE=$1 - -## check mode ## -if [ "$X_MODE" == "dark" ] || [ "$X_MODE" == "light" ] ; then - S_MODE="$X_MODE" - -elif [ "$X_MODE" == "switch" ] ; then - X_MODE=`readlink $CFGDIR/swww/wall.set | awk -F "." '{print $NF}'` - - if [ "$X_MODE" == "dark" ] ; then - S_MODE="light" - flatpak --user override --env=GTK_THEME=Catppuccin-Latte - - elif [ "$X_MODE" == "light" ] ; then - S_MODE="dark" - flatpak --user override --env=GTK_THEME=Catppuccin-Mocha - - else - echo "ERROR: unable to fetch wallpaper mode." - fi - -else - echo "ERROR: unknown mode, use 'dark', 'light' or 'switch'." - exit 1 -fi - -### hyprland ### -ln -fs $CFGDIR/hypr/${S_MODE}.conf $CFGDIR/hypr/theme.conf -hyprctl reload - -### swwwallpaper ### -x=`echo $S_MODE | cut -c 1` -$CFGDIR/swww/swwwallpaper.sh -$x - -### qt5ct ### -ln -fs $CFGDIR/qt5ct/colors/${S_MODE}.conf $CFGDIR/qt5ct/colors/theme.conf - -### rofi ### -ln -fs $CFGDIR/rofi/${S_MODE}.rasi $CFGDIR/rofi/theme.rasi - -### kitty ### -ln -fs $CFGDIR/kitty/${S_MODE}.conf $CFGDIR/kitty/theme.conf -killall -SIGUSR1 kitty - -### waybar ### -ln -fs $CFGDIR/waybar/${S_MODE}.css $CFGDIR/waybar/style.css -sleep 1 -killall -SIGUSR2 waybar diff --git a/modules/home/hyprland/conf/hypr/scripts/systemupdate.sh b/modules/home/hyprland/conf/hypr/scripts/systemupdate.sh deleted file mode 100755 index 22e4784..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/systemupdate.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Check release -if [ ! -f /etc/arch-release ] ; then - exit 0 -fi - -# Check for updates -aur=$(yay -Qua | wc -l) -ofc=$(pacman -Qu | wc -l) - -# Calculate total available updates -upd=$(( ofc + aur )) -echo "$upd" - -# Show tooltip -if [ $upd -eq 0 ] ; then - echo " Packages are up to date" -else - echo "󱓽 Official $ofc 󱓾 AUR $aur" -fi - -# Trigger upgrade -if [ "$1" == "up" ] ; then - kitty --title systemupdate sh -c 'yay -Syu' -fi - diff --git a/modules/home/hyprland/conf/hypr/scripts/themeselect.sh b/modules/home/hyprland/conf/hypr/scripts/themeselect.sh deleted file mode 100755 index 6384166..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/themeselect.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env sh - -## set variables ## -BaseDir=`dirname $(realpath $0)` -ThemeCtl="$HOME/.config/swww/wall.ctl" -ThumbDir="$HOME/.config/swww/Themes-Ctl" -RofiConf="$HOME/.config/rofi/themeselect.rasi" -ThemeSet="$HOME/.config/hypr/themes/theme.conf" - - -## show and apply theme ## -if [ -z "$1" ] ; then - - hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $ThemeSet | sed 's/ //g'` - elem_border=$(( hypr_border * 5 )) - icon_border=$(( elem_border - 5 )) - r_override="element {border-radius: ${elem_border}px;} element-icon {border-radius: ${icon_border}px;}" - - ThemeSel=$(cat $ThemeCtl | while read line - do - thm=`echo $line | cut -d '|' -f 2` - wal=`echo $line | cut -d '|' -f 3` - echo -en "$thm\x00icon\x1f$ThumbDir/${thm}.png\n" - done | rofi -dmenu -theme-str "${r_override}" -config $RofiConf) - - if [ ! -z $ThemeSel ] ; then - ${BaseDir}/themeswitch.sh -s $ThemeSel - fi - -## regenerate thumbnails ## -elif [ "$1" == "T" ] ; then - - echo "refreshing thumbnails..." - cat $ThemeCtl | while read line - do - thm=`echo $line | cut -d '|' -f 2` - wal=`echo $line | cut -d '|' -f 3` - wal=`eval echo $wal` - - echo "croping image from wallpaper $ThumbDir/${thm}.png..." - convert $wal -thumbnail 500x500^ -gravity center -extent 500x500 $ThumbDir/${thm}.png - #convert $wal -gravity Center -crop 1080x1080+0+0 $ThumbDir/${thm}.png - #echo "applying rounded corner mask and generating $ThumbDir/${thm}.png..." - #convert -size 1080x1080 xc:none -draw "roundrectangle 0,0,1080,1080,80,80" $ThumbDir/roundedmask.png - #convert $ThumbDir/${thm}_tmp.png -matte $ThumbDir/roundedmask.png -compose DstIn -composite $ThumbDir/${thm}.png - done - -fi - diff --git a/modules/home/hyprland/conf/hypr/scripts/themeswitch.sh b/modules/home/hyprland/conf/hypr/scripts/themeswitch.sh deleted file mode 100755 index 13610db..0000000 --- a/modules/home/hyprland/conf/hypr/scripts/themeswitch.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env sh - -# set variables -BaseDir=`dirname $(realpath $0)` -ConfDir="$HOME/.config" -ThemeCtl="$ConfDir/swww/wall.ctl" - - -# evaluate options -while getopts "npst" option ; do - case $option in - - n ) # set next theme - ThemeSet=`head -1 $ThemeCtl | cut -d '|' -f 2` #default value - flg=0 - while read line - do - if [ $flg -eq 1 ] ; then - ThemeSet=`echo $line | cut -d '|' -f 2` - break - elif [ `echo $line | cut -d '|' -f 1` -eq 1 ] ; then - flg=1 - fi - done < $ThemeCtl - export xtrans="center" ;; - - p ) # set previous theme - ThemeSet=`tail -1 $ThemeCtl | cut -d '|' -f 2` #default value - flg=0 - while read line - do - if [ $flg -eq 1 ] ; then - ThemeSet=`echo $line | cut -d '|' -f 2` - break - elif [ `echo $line | cut -d '|' -f 1` -eq 1 ] ; then - flg=1 - fi - done < <( tac $ThemeCtl ) - export xtrans="outer" ;; - - s ) # set selected theme - shift $((OPTIND -1)) - ThemeSet=$1 ;; - - t ) # display tooltip - echo "" - echo "󰆊 Next/Previous Theme" - exit 0 ;; - - * ) # invalid option - echo "n : set next theme" - echo "p : set previous theme" - echo "s : set theme from parameter" - echo "t : display tooltip" - exit 1 ;; - esac -done - - -# update theme control -if [ `cat $ThemeCtl | awk -F '|' -v thm=$ThemeSet '{if($2==thm) print$2}' | wc -w` -ne 1 ] ; then - echo "Unknown theme selected: $ThemeSet" - echo "Available themes are:" - cat $ThemeCtl | cut -d '|' -f 2 - exit 1 -else - echo "Selected theme: $ThemeSet" - sed -i "s/^1/0/g" $ThemeCtl - awk -F '|' -v thm=$ThemeSet '{OFS=FS} {if($2==thm) $1=1; print$0}' $ThemeCtl > $BaseDir/tmp && mv $BaseDir/tmp $ThemeCtl -fi - - -# swwwallpaper -getWall=`grep '^1|' $ThemeCtl | cut -d '|' -f 3` -getWall=`eval echo $getWall` -ln -fs $getWall $ConfDir/swww/wall.set -$ConfDir/swww/swwwallpaper.sh - -if [ $? -ne 0 ] ; then - echo "ERROR: Unable to set wallpaper" - exit 1 -fi - - -# vs code -sed -i "/workbench.colorTheme/c\ \"workbench.colorTheme\": \"${ThemeSet}\"," $ConfDir/Code/User/settings.json - - -# kitty -ln -fs $ConfDir/kitty/themes/${ThemeSet}.conf $ConfDir/kitty/themes/theme.conf -killall -SIGUSR1 kitty - - -# qt5ct -sed -i "/^color_scheme_path=/c\color_scheme_path=$ConfDir/qt5ct/colors/${ThemeSet}.conf" $ConfDir/qt5ct/qt5ct.conf -IconSet=`awk -F "'" '$0 ~ /gsettings set org.gnome.desktop.interface icon-theme/{print $2}' $ConfDir/hypr/themes/${ThemeSet}.conf` -sed -i "/^icon_theme=/c\icon_theme=${IconSet}" $ConfDir/qt5ct/qt5ct.conf - - -# flatpak GTK -flatpak --user override --env=GTK_THEME="${ThemeSet}" -flatpak --user override --env=ICON_THEME="${IconSet}" - - -# rofi -ln -fs $ConfDir/rofi/themes/${ThemeSet}.rasi $ConfDir/rofi/themes/theme.rasi - - -# hyprland -ln -fs $ConfDir/hypr/themes/${ThemeSet}.conf $ConfDir/hypr/themes/theme.conf -hyprctl reload - - -# refresh thumbnails -$BaseDir/themeselect.sh T & - - -# send notification -ncolor="-h string:bgcolor:#343d46 -h string:fgcolor:#c0c5ce -h string:frcolor:#c0c5ce" -notify-send $ncolor "theme" -a " ${ThemeSet}" -i "~/.config/dunst/icons/paint.svg" -r 91190 -t 2200 - - -# waybar -$ConfDir/waybar/wbarconfgen.sh - diff --git a/modules/home/hyprland/conf/waybar/config.jsonc b/modules/home/hyprland/conf/waybar/config.jsonc index f71d442..3741e84 100644 --- a/modules/home/hyprland/conf/waybar/config.jsonc +++ b/modules/home/hyprland/conf/waybar/config.jsonc @@ -1,8 +1,4 @@ -// --// waybar config generated by wbarconfgen.sh //-- // - { - // sourced from header module // - "layer": "top", "position": "top", "mod": "dock", @@ -11,11 +7,11 @@ "passthrough": false, "gtk-layer-shell": true, - // positions generated based on config.ctl // - "modules-left": [ "custom/lr", "hyprland/workspaces", + "custom/rr", + "custom/lr", "hyprland/window", "custom/rr" ], @@ -37,7 +33,6 @@ "bluetooth", "wireplumber", "wireplumber#microphone", - "custom/cliphist", "custom/power", "custom/rr" ], @@ -46,32 +41,12 @@ "custom/power": { "format": "{}", - "exec": "echo ; echo  logout", + "exec": "echo ; echo  Power Manage", "on-click": "wlogout", "interval": 86400, // once every day "tooltip": true }, - "custom/cliphist": { - "format": "{}", - "exec": "echo ; echo 󰅇 clipboard history", - "on-click": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh c 1", - //"on-click-right": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh d", - "on-click-middle": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh w 1", - "interval": 86400, // once every day - "tooltip": true - }, - - "custom/mode": { - "format": "{}", - "exec": "echo ; echo 󰟡 switch mode", - "on-click": "~/.config/hypr/scripts/themeswitch.sh -n", - "on-click-right": "~/.config/hypr/scripts/themeswitch.sh -p", - "on-click-middle": "sleep 0.1 && ~/.config/hypr/scripts/themeselect.sh", - "interval": 86400, // once every day - "tooltip": true - }, - "hyprland/workspaces": { "disable-scroll": true, "on-click": "activate", @@ -86,6 +61,20 @@ "8": ["HDMI-A-2"], "9": ["HDMI-A-2"], "10": ["HDMI-A-2"] + }, + "format": "{icon} {windows}", + "format-window-separator": " ", + "window-rewrite-default": "", + "window-rewrite": { + "class": "", + "class title<.*youtube.*>": "", + "title<.*github.*>": "", + "kitty": "", + "code": "󰨞", + "Cursor": "󰅪", + "org.gnome.Nautilus": "󰪶", + "wechat": "", + "wps": "󰏆" } }, diff --git a/modules/home/hyprland/conf/waybar/style.css b/modules/home/hyprland/conf/waybar/style.css index 6abad11..25dd44c 100644 --- a/modules/home/hyprland/conf/waybar/style.css +++ b/modules/home/hyprland/conf/waybar/style.css @@ -19,83 +19,6 @@ min-height: 12px; } -window#waybar { - background: @bar-bg; -} - -tooltip { - background: @tool-bg; - color: @tool-color; - border-radius: 16px; - border-width: 1px; - border-style: solid; - border-color: @tool-border; -} - -#workspaces button { - box-shadow: none; - text-shadow: none; - padding: 0px; - border-radius: 8px; - margin-top: 2px; - margin-bottom: 2px; - margin-left: 2px; - margin-right: 2px; - padding-left: 2px; - padding-right: 2px; - color: @wb-color; - animation: gradient_f 20s ease-in infinite; - transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - -#workspaces button.active { - background: @wb-act-bg; - color: @wb-act-color; - animation: gradient_f 20s ease-in infinite; - transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - -#workspaces button:hover { - background: @wb-hvr-bg; - color: @wb-hvr-color; - padding-left: 2px; - padding-right: 2px; - animation: gradient_f 20s ease-in infinite; - transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - -#taskbar button { - box-shadow: none; - text-shadow: none; - padding: 0px; - border-radius: 8px; - margin-top: 2px; - margin-bottom: 2px; - margin-right: 2px; - padding-left: 2px; - padding-left: 2px; - padding-right: 2px; - color: @wb-color; - animation: gradient_f 20s ease-in infinite; - transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - -#taskbar button.active { - background: @wb-act-bg; - color: @wb-act-color; - animation: gradient_f 20s ease-in infinite; - transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - -#taskbar button:hover { - background: @wb-hvr-bg; - color: @wb-hvr-color; - padding-left: 2px; - padding-right: 2px; - animation: gradient_f 20s ease-in infinite; - transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); -} - #cpu, #memory, #temperature, @@ -120,9 +43,71 @@ tooltip { color: @main-color; background: @main-bg; opacity: 1; - margin: 2px 0px 2px 0px; - padding-left: 4px; - padding-right: 4px; + margin: 2px 0px; + padding: 0px 4px; +} + +window#waybar { + background: @bar-bg; +} + +tooltip { + background: @tool-bg; + color: @tool-color; + border-radius: 16px; + border-width: 1px; + border-style: solid; + border-color: @tool-border; +} + +#workspaces button { + margin: 2px; + padding: 0px 6px; + box-shadow: none; + text-shadow: none; + border-radius: 8px; + color: @wb-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +#workspaces button.active { + background: @wb-act-bg; + color: @wb-act-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +#workspaces button:hover { + background: @wb-hvr-bg; + color: @wb-hvr-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +#taskbar button { + box-shadow: none; + text-shadow: none; + padding: 0px 4px; + border-radius: 8px; + margin: 2px; + color: @wb-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +#taskbar button.active { + background: @wb-act-bg; + color: @wb-act-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); +} + +#taskbar button:hover { + background: @wb-hvr-bg; + color: @wb-hvr-color; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682); } #workspaces, diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index fcc5262..c87286b 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -1,8 +1,7 @@ -{ config, lib, pkgs, ... }: +{ config, libs, pkgs, ... }: let conf = [ "hypr" "waybar" "rofi" "kitty" "mako" "wlogout" ]; confPath = "${config.home.homeDirectory}/.nix/modules/home/hyprland/conf"; - inherit (lib.my) mkOutOfStoreSymlinks; in { imports = [ diff --git a/modules/home/vscode/default.nix b/modules/home/vscode/default.nix index ef6bdeb..bf19b24 100644 --- a/modules/home/vscode/default.nix +++ b/modules/home/vscode/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, libs, ... }: { imports = [ @@ -18,14 +18,16 @@ pkief.material-icon-theme ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ ]; - userSettings = builtins.fromJSON (builtins.readFile ./settings.json); }; }; }; - home = { - file.".config/Code/User/keybindings.json" = { - source = ./keybindings.json; + xdg.configFile = { + "Code/User/keybindings.json" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.nix/modules/home/vscode/keybindings.json"; + }; + "Code/User/settings.json" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.nix/modules/home/vscode/settings.json"; }; }; } diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix index 26fa278..a279300 100644 --- a/modules/nixos/user.nix +++ b/modules/nixos/user.nix @@ -59,7 +59,7 @@ in options = [ "NOPASSWD" ]; } { - command = "/run/wrappers/bin/umount"; + command = "/run/wrappers/bin/unmount"; options = [ "NOPASSWD" ]; } ]; @@ -67,4 +67,4 @@ in ]; }; } - + diff --git a/profiles/apollo/configuration.nix b/profiles/apollo/configuration.nix index 427427d..1337a29 100644 --- a/profiles/apollo/configuration.nix +++ b/profiles/apollo/configuration.nix @@ -1,18 +1,6 @@ -args@{ self, inputs, outputs, lib, pkgs, home-manager, username, useremail, hostname, sysversion, ... }: { - +args@{ self, pkgs, home-manager, username, sysversion, ... }: { # You can import other NixOS modules here imports = [ - # If you want to use modules your own flake exports (from modules/nixos): - # outputs.nixosModules.example - - # Or modules from other flakes (such as nixos-hardware): - # inputs.hardware.nixosModules.common-cpu-amd - # inputs.hardware.nixosModules.common-ssd - - # You can also split up your configuration and import pieces of it here: - # ./users.nix - - # Import your generated (nixos-generate-config) hardware configuration ./mount.nix ./network.nix ./hardware-configuration.nix @@ -21,6 +9,7 @@ args@{ self, inputs, outputs, lib, pkgs, home-manager, username, useremail, host "${self}/modules/nixos/fonts" "${self}/modules/nixos/user.nix" "${self}/modules/nixos/audio.nix" + "${self}/modules/nixos/samba.nix" "${self}/modules/nixos/virtualize/appimage.nix" "${self}/modules/nixos/virtualize/docker.nix" @@ -29,15 +18,17 @@ args@{ self, inputs, outputs, lib, pkgs, home-manager, username, useremail, host { # home-manager.useGlobalPkgs = true; # home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { - inherit self inputs outputs hostname username useremail sysversion; - }; - home-manager.users."${username}" = { ... }: { - imports = [ - ./hm - "${self}/home/desktop.nix" - "${self}/modules/home/develop.nix" - ]; + home-manager = { + extraSpecialArgs = { + inherit (args) self inputs outputs libs hostname username useremail sysversion; + }; + users."${username}" = { ... }: { + imports = [ + ./hm + "${self}/home/desktop.nix" + "${self}/modules/home/develop.nix" + ]; + }; }; } ]; diff --git a/profiles/gaea/configuration.nix b/profiles/gaea/configuration.nix index 780af7b..189c0bd 100644 --- a/profiles/gaea/configuration.nix +++ b/profiles/gaea/configuration.nix @@ -1,4 +1,4 @@ -args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, hostname, sysversion, ... }: { +args@{ self, pkgs, home-manager, username, sysversion, ... }: { # You can import other NixOS modules here imports = [ # If you want to use modules your own flake exports (from modules/nixos): @@ -34,7 +34,7 @@ args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, host # home-manager.useUserPackages = true; home-manager = { extraSpecialArgs = { - inherit inputs outputs hostname username useremail sysversion; + inherit (args) self inputs outputs libs hostname username useremail sysversion; }; users."${username}" = { ... }: { imports = [ diff --git a/profiles/luna/configuration.nix b/profiles/luna/configuration.nix index 90fc85c..3a61835 100644 --- a/profiles/luna/configuration.nix +++ b/profiles/luna/configuration.nix @@ -1,4 +1,4 @@ -args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, hostname, sysversion, ... }: { +args@{ self, home-manager, username, sysversion, ... }: { # You can import other NixOS modules here imports = [ @@ -26,7 +26,7 @@ args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, host # home-manager.useUserPackages = true; home-manager = { extraSpecialArgs = { - inherit inputs outputs hostname username useremail sysversion; + inherit (args) self inputs outputs libs hostname username useremail sysversion; }; users."${username}" = { ... }: { imports = [