wip more font struggles
This commit is contained in:
		| @@ -49,3 +49,4 @@ This will create an iso image in the result directory. | ||||
| - https://github.com/Numb-0/nix-0 | ||||
| - https://github.com/Frost-Phoenix/nixos-config | ||||
| - https://github.com/elifouts/Dotfiles | ||||
| - https://github.com/nomadics9/nixcfg | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
|     imports = [ | ||||
|         ./configuration.nix | ||||
|         ./hardware-configuration.nix | ||||
|         ../../modules/nixos/bluetooth.nix | ||||
|         ../../modules/nixos/fonts.nix | ||||
|         ../../modules/nixos/hyprland.nix | ||||
|         ../../modules/nixos/monitoring.nix | ||||
|   | ||||
| @@ -4,57 +4,57 @@ | ||||
|  ... | ||||
| }: | ||||
| with lib; let | ||||
|   wallpapers = builtins.path { path = ../../../wallpapers; }; | ||||
|   # wallpapers = builtins.path { path = ../../../wallpapers; }; | ||||
|  | ||||
|   wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")"; | ||||
|   wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" '' | ||||
|     wallpapers=${wallpaperBashArray} | ||||
|     rand=$[$RANDOM % ''${#wallpapers[@]}] | ||||
|     wallpaper=''${wallpapers[$rand]} | ||||
|   # wallpaperBashArray = "(\"${strings.concatStrings (strings.intersperse "\" \"" (map (wallpaper: "${wallpaper}") wallpapers))}\")"; | ||||
|   # wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" '' | ||||
|   #   wallpapers=${wallpaperBashArray} | ||||
|   #   rand=$[$RANDOM % ''${#wallpapers[@]}] | ||||
|   #   wallpaper=''${wallpapers[$rand]} | ||||
|  | ||||
|     monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`) | ||||
|     hyprctl hyprpaper unload all | ||||
|     hyprctl hyprpaper preload $wallpaper | ||||
|     for m in ''${monitor[@]}; do | ||||
|       hyprctl hyprpaper wallpaper "$m,$wallpaper" | ||||
|     done | ||||
|   ''; | ||||
|   #   monitor=(`hyprctl monitors | grep Monitor | awk '{print $2}'`) | ||||
|   #   hyprctl hyprpaper unload all | ||||
|   #   hyprctl hyprpaper preload $wallpaper | ||||
|   #   for m in ''${monitor[@]}; do | ||||
|   #     hyprctl hyprpaper wallpaper "$m,$wallpaper" | ||||
|   #   done | ||||
|   # ''; | ||||
| in { | ||||
|   home.packages = [wallpaperRandomizer]; | ||||
|   # home.packages = [wallpaperRandomizer]; | ||||
|  | ||||
|   services.hyprpaper = { | ||||
|     enable = true; | ||||
|   # services.hyprpaper = { | ||||
|   #   enable = true; | ||||
|  | ||||
|     # settings = { | ||||
|     #   ipc = "on"; | ||||
|     #   splash = false; | ||||
|     #   splash_offset = 2.0; | ||||
|   #   # settings = { | ||||
|   #   #   ipc = "on"; | ||||
|   #   #   splash = false; | ||||
|   #   #   splash_offset = 2.0; | ||||
|   #   # }; | ||||
|   # }; | ||||
|   }; | ||||
|  | ||||
|   systemd.user = { | ||||
|     services.wallpaperRandomizer = { | ||||
|       Install = {WantedBy = ["graphical-session.target"];}; | ||||
|   # systemd.user = { | ||||
|   #   services.wallpaperRandomizer = { | ||||
|   #     Install = {WantedBy = ["graphical-session.target"];}; | ||||
|  | ||||
|       Unit = { | ||||
|         Description = "Set random desktop background using hyprpaper"; | ||||
|         After = ["graphical-session-pre.target"]; | ||||
|         PartOf = ["graphical-session.target"]; | ||||
|       }; | ||||
|   #     Unit = { | ||||
|   #       Description = "Set random desktop background using hyprpaper"; | ||||
|   #       After = ["graphical-session-pre.target"]; | ||||
|   #       PartOf = ["graphical-session.target"]; | ||||
|   #     }; | ||||
|  | ||||
|       Service = { | ||||
|         Type = "oneshot"; | ||||
|         ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer"; | ||||
|         IOSchedulingClass = "idle"; | ||||
|       }; | ||||
|     }; | ||||
|   #     Service = { | ||||
|   #       Type = "oneshot"; | ||||
|   #       ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer"; | ||||
|   #       IOSchedulingClass = "idle"; | ||||
|   #     }; | ||||
|   #   }; | ||||
|  | ||||
|     timers.wallpaperRandomizer = { | ||||
|       Unit = {Description = "Set random desktop background using hyprpaper on an interval";}; | ||||
|   #   timers.wallpaperRandomizer = { | ||||
|   #     Unit = {Description = "Set random desktop background using hyprpaper on an interval";}; | ||||
|  | ||||
|       Timer = {OnUnitActiveSec = "6h";}; | ||||
|   #     Timer = {OnUnitActiveSec = "6h";}; | ||||
|  | ||||
|       Install = {WantedBy = ["timers.target"];}; | ||||
|     }; | ||||
|   }; | ||||
|   #     Install = {WantedBy = ["timers.target"];}; | ||||
|   #   }; | ||||
|   # }; | ||||
| } | ||||
| @@ -6,7 +6,9 @@ | ||||
|     # waybar requires font-awesome | ||||
|     home.packages = [ | ||||
|         pkgs.font-awesome | ||||
|         pkgs.font-awesome_5 | ||||
|         pkgs.fira-code | ||||
|         pkgs.pavucontrol | ||||
|     ]; | ||||
|  | ||||
|     # enable waybar | ||||
| @@ -34,17 +36,18 @@ | ||||
|                 ]; | ||||
|                 modules-center = [ | ||||
|                     "clock" | ||||
|                     "custom/notification" | ||||
|                 ]; | ||||
|                 modules-right = [ | ||||
|                     "tray" | ||||
|                     # "temperature" | ||||
|                     "group/expand" | ||||
|                     "bluetooth" | ||||
|                     # "group/expand" | ||||
|                     # "bluetooth" | ||||
|                     "pulseaudio" | ||||
|                     # "network" | ||||
|                     "mpd" | ||||
|                     # "mpd" | ||||
|                     "battery" | ||||
|                     "backlight" | ||||
|                     "custom/notification" | ||||
|                     "tray" | ||||
|                 ]; | ||||
|  | ||||
|                 # module specific settings | ||||
| @@ -104,37 +107,243 @@ | ||||
|                     format = "{capacity}% {icon}"; | ||||
|                     format-charging = "{capacity}% "; | ||||
|                     format-plugged = "{capacity}%  "; | ||||
|                     format-alt = "{time} {icon}"; | ||||
|                     format-icons = [ "" "" "" "" "" "" ]; | ||||
|                 }; | ||||
|  | ||||
|                 "pulseaudio" = { | ||||
|                     reverse-scrolling = 1; | ||||
|                     format = "{volume}% {icon} {format_source}"; | ||||
|                     format-bluetooth = "{volume}% {icon} {format_source}"; | ||||
|                     format-bluetooth-muted = " {icon} {format_source}"; | ||||
|                     format-muted = "婢 {format_source}"; | ||||
|                     format-source = "{volume}% "; | ||||
|                     format-source-muted = ""; | ||||
|                     format-icons = { | ||||
|                         headphone = ""; | ||||
|                         hands-free = ""; | ||||
|                         headset = ""; | ||||
|                         phone = ""; | ||||
|                         portable = ""; | ||||
|                         car = ""; | ||||
|                         default = ["奄" "奔" "墳"]; | ||||
|                     }; | ||||
|                     on-click = "pavucontrol"; | ||||
|                     min-length = 13; | ||||
|                 }; | ||||
|                 "tray" = { | ||||
|                     spacing = 5; | ||||
|                 }; | ||||
|             }; | ||||
|         }; | ||||
|  | ||||
|         style = '' | ||||
|             * { | ||||
|                 border: none; | ||||
|                 border-radius: 5px; | ||||
|                 padding: 0px 5px 0px 5px; | ||||
|                 margin: 0px 5px 0px 5px; | ||||
|                 border-radius: 0; | ||||
|                 /* `otf-font-awesome` is required to be installed for icons */ | ||||
|                 font-family: Liberation Mono; | ||||
|                 min-height: 20px; | ||||
|             } | ||||
|  | ||||
|             window#waybar { | ||||
|                 background: transparent; | ||||
|             } | ||||
|  | ||||
|             window#waybar.hidden { | ||||
|                 opacity: 0.2; | ||||
|             } | ||||
|  | ||||
|             #workspaces { | ||||
|                 margin-right: 8px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #workspaces button { | ||||
|                 transition: none; | ||||
|                 color: #7c818c; | ||||
|                 background: transparent; | ||||
|                 padding: 5px; | ||||
|                 font-size: 18px; | ||||
|             } | ||||
|             window#waybar { | ||||
|                 background-color: transparent; | ||||
|  | ||||
|             #workspaces button.persistent { | ||||
|                 color: #7c818c; | ||||
|                 font-size: 12px; | ||||
|             } | ||||
|             #workspaces button { | ||||
|                 padding-left: 1px; | ||||
|                 padding-right: 1px; | ||||
|  | ||||
|             /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ | ||||
|             #workspaces button:hover { | ||||
|                 transition: none; | ||||
|                 box-shadow: inherit; | ||||
|                 text-shadow: inherit; | ||||
|                 border-radius: inherit; | ||||
|                 color: #383c4a; | ||||
|                 background: #7c818c; | ||||
|             } | ||||
|  | ||||
|             #workspaces button.focused { | ||||
|                 color: white; | ||||
|             } | ||||
|  | ||||
|             #language { | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 8px; | ||||
|                 border-radius: 10px 0px 0px 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #keyboard-state { | ||||
|                 margin-right: 8px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 0px 10px 10px 0px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #custom-pacman { | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 8px; | ||||
|                 border-radius: 10px 0px 0px 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #custom-mail { | ||||
|                 margin-right: 8px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 0px 10px 10px 0px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #mode { | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #clock { | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px 0px 0px 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #custom-weather { | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 0px 10px 10px 0px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #pulseaudio { | ||||
|                 margin-right: 8px; | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #pulseaudio.muted { | ||||
|                 background-color: #90b1b1; | ||||
|                 color: #2a5c45; | ||||
|             } | ||||
|  | ||||
|             #custom-mem { | ||||
|                 margin-right: 8px; | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #temperature { | ||||
|                 margin-right: 8px; | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #temperature.critical { | ||||
|                 background-color: #eb4d4b; | ||||
|             } | ||||
|  | ||||
|             #backlight { | ||||
|                 margin-right: 8px; | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #battery { | ||||
|                 margin-right: 8px; | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             #battery.charging { | ||||
|                 color: #ffffff; | ||||
|                 background-color: #26A65B; | ||||
|             } | ||||
|  | ||||
|             #battery.warning:not(.charging) { | ||||
|                 background-color: #ffbe61; | ||||
|                 color: black; | ||||
|             } | ||||
|  | ||||
|             #battery.critical:not(.charging) { | ||||
|                 background-color: #f53c3c; | ||||
|                 color: #ffffff; | ||||
|                 animation-name: blink; | ||||
|                 animation-duration: 0.5s; | ||||
|                 animation-timing-function: linear; | ||||
|                 animation-iteration-count: infinite; | ||||
|                 animation-direction: alternate; | ||||
|             } | ||||
|  | ||||
|             #tray { | ||||
|                 padding-left: 16px; | ||||
|                 padding-right: 16px; | ||||
|                 border-radius: 10px; | ||||
|                 transition: none; | ||||
|                 color: #ffffff; | ||||
|                 background: #383c4a; | ||||
|             } | ||||
|  | ||||
|             @keyframes blink { | ||||
|                 to { | ||||
|                     background-color: #ffffff; | ||||
|                     color: #000000; | ||||
|                 } | ||||
|             #workspaces { | ||||
|                 padding-left: 1px; | ||||
|                 padding-right: 1px; | ||||
|             } | ||||
|         ''; | ||||
|         # font-family: ${font}; | ||||
|         # font-weight: ${font_weight}; | ||||
|         # opacity: ${opacity}; | ||||
|         # font-size: ${font_size}; | ||||
|  | ||||
|     }; | ||||
| } | ||||
|      | ||||
							
								
								
									
										18
									
								
								modules/nixos/bluetooth.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/bluetooth.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| { | ||||
|   hardware.bluetooth = { | ||||
|     enable = true; | ||||
|     powerOnBoot = false; | ||||
|     settings = { | ||||
|       General = { | ||||
|         Name = "Hello"; | ||||
|         ControllerMode = "dual"; | ||||
|         FastConnectable = "true"; | ||||
|         Experimental = "true"; | ||||
|       }; | ||||
|       Policy = { | ||||
|         AutoEnable = "true"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   services.blueman.enable = true; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user