This commit is contained in:
mjallen18
2024-08-24 01:46:53 -05:00
parent cd809e4156
commit f3c53ca33b
19 changed files with 1051 additions and 705 deletions

View File

@@ -219,6 +219,37 @@ in
sessionVariables = lib.mkDefault { STEAM_FORCE_DESKTOPUI_SCALING = "1"; };
etc."lact/config.yaml".text = ''
daemon:
log_level: info
admin_groups:
- wheel
- sudo
disable_clocks_cleanup: false
apply_settings_timer: 5
gpus:
1002:73BF-1002:0E3A-0000:03:00.0:
fan_control_enabled: true
fan_control_settings:
mode: curve
static_speed: 1.0
temperature_key: edge
interval_ms: 500
curve:
30: 0.0
40: 0.2
50: 0.35
60: 0.5
70: 0.75
80: 1.0
spindown_delay_ms: 0
change_threshold: 0
pmfw_options: {}
power_cap: 293.0
performance_level: auto
voltage_offset: 0
power_states: {}
'';
};
# Configure nixpkgs

View File

@@ -95,6 +95,7 @@ in
python312Packages.pytest
python312Packages.pytest-cov
python312Packages.pyaml
smile
sops
spotify
ssh-to-pgp

View File

@@ -6,6 +6,7 @@ in
".config/kitty/macchiato.conf".source = "${configDir}/kitty/macchiato.conf";
".config/wlogout".source = "${configDir}/wlogout"; #
".config/waybar/scripts".source = "${configDir}/waybar/scripts";
".config/waybar/macchiato.css".source = "${configDir}/waybar/macchiato.css";
".config/btop/themes/catppuccin_macchiato.theme".source = "${configDir}/btop/themes/catppuccin_macchiato.theme";
".config/nwg-drawer".source = "${configDir}/nwg-drawer";
".config/nwg-panel".source = "${configDir}/nwg-panel";

View File

@@ -30,7 +30,6 @@
bind = [
"$mod, Return, exec, kitty"
"$mod, Q, killactive, "
"$mod, mouse:274, killactive, "
"$mod, M, exec, wlogout --protocol layer-shell"
"$mod, E, exec, nautilus"
"$mod, V, togglefloating, "
@@ -40,6 +39,10 @@
"$mod SHIFT, Q, exec, hyprlock"
", PRINT, exec, hyprshot -m region --clipboard-only"
"$mod,F,exec,hyprctl dispatch fullscreen active"
"$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, DP-1"
"$mod, mouse:275, movecurrentworkspacetomonitor, DP-2"
# alt-tab between workspaces on active monitor
"ALT, Tab, workspace, m+1"
@@ -90,7 +93,7 @@
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
# middle mouse will grab a window, mod + middle mouse will close it
", mouse:274, movewindow"
"$mod SHIFT, mouse:274, movewindow"
];
bindel = [
@@ -212,6 +215,7 @@
# "float, class:Remote Desktop Connection,title:Remote Desktop Connection"
"float, class:Credential Manager UI Host,title:Windows Security"
"float, title:^(Media viewer)$"
"float, class:^(it.mijorus.smile)$,title:^(Smile)$"
# Picture in picture windows
# "float, class:pavucontrol,title:pavucontrol" # ?????
"float, title:^(Picture-in-Picture)$"
@@ -263,6 +267,8 @@
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nwg-look -a
exec-once = nm-applet
exec-once = blueberry
exec-once = [silent] firefox
exec-once = [silent] vesktop
exec-once = [silent] spotify

View File

@@ -1,5 +1,6 @@
{
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
# https://www.nerdfonts.com/cheat-sheet
programs.waybar = {
enable = true;
@@ -20,16 +21,18 @@
modules-right = [
"tray"
"custom/updates"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"pulseaudio"
"pulseaudio#microphone"
"network"
"clock"
"custom/weather"
];
"hyprland/window" = {
separate-outputs = true;
format = { };
};
@@ -38,7 +41,7 @@
all-outputs = true;
on-click = "activate";
persistent_workspaces = {
"1" = [ ];
"*" = 1;
};
};
@@ -58,6 +61,39 @@
return-type = "json";
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon4/temp1_input";
critical-threshold = 90;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = [
"" # fa-temperature-empty
"" # fa-temperature-quarter
"" # fa-temperature-half
"" # fa-temperature-three-quarters
"" # fa-temperature-full
"" # fa-temperature-high
];
tooltip-format = "CPU: {temperatureC}°C";
};
"temperature#gpu" = {
hwmon-path = "/sys/class/hwmon/hwmon0/temp1_input";
critical-threshold = 100;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = [
"" # fa-temperature-empty
"" # fa-temperature-quarter
"" # fa-temperature-half
"" # fa-temperature-three-quarters
"" # fa-temperature-full
"" # fa-temperature-high
];
on-click = "lact";
tooltip-format = "GPU: {temperatureC}°C";
};
tray = {
icon-size = 16;
spacing = 10;
@@ -78,13 +114,15 @@
on-scroll-down = "pamixer -d 5";
scroll-step = 5;
format-icons = {
headphone = "";
hands-free = "";
headset = "";
headphone = "󰋋";
headphone-muted = "󰟎";
hands-free = "󰋋";
headset = "󰋋";
phone = "";
portable = "";
portable = "󰋋";
car = "";
default = [
""
""
""
""
@@ -94,8 +132,8 @@
"pulseaudio#microphone" = {
format = "{format_source}";
format-source = "🎙{volume}%";
format-source-muted = "🎙Muted";
format-source = "";
format-source-muted = "";
on-click = "pamixer --default-source -t";
on-click-right = "pavucontrol -t 2";
on-scroll-up = "pamixer --default-source -i 5";
@@ -103,34 +141,23 @@
scroll-step = 5;
};
network = {
interface = "wlp9s0";
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ifname} ";
format-disconnected = ""; # An empty format will hide the module.
tooltip-format = "{ifname}";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
"keyboard-state#capslock" = {
capslock = true;
format = "{name} {icon}";
icon-size = 20;
format = "{icon}";
format-icons = {
locked = "";
unlocked = "";
locked = "󰪛";
unlocked = "";
};
};
"keyboard-state#numlock" = {
numlock = true;
format = "{name} {icon}";
icon-size = 30;
format = "{icon}";
format-icons = {
locked = "";
unlocked = "";
locked = "󰎣";
unlocked = "";
};
};
};
@@ -138,164 +165,191 @@
# https://catppuccin.com/palette
style = ''
@define-color rosewater #f4dbd6;
@define-color flamingo #f0c6c6;
@define-color pink #f5bde6;
@define-color mauve #c6a0f6;
@define-color red #ed8796;
@define-color maroon #ee99a0;
@define-color peach #f5a97f;
@define-color yellow #eed49f;
@define-color green #a6da95;
@define-color teal #8bd5ca;
@define-color sky #91d7e3;
@define-color sapphire #7dc4e4;
@define-color blue #8aadf4;
@define-color lavender #b7bdf8;
@define-color text #cad3f5;
@define-color subtext1 #b8c0e0;
@define-color subtext0 #a5adcb;
@define-color overlay2 #939ab7;
@define-color overlay1 #8087a2;
@define-color overlay0 #6e738d;
@define-color surface2 #5b6078;
@define-color surface1 #494d64;
@define-color surface0 #363a4f;
@define-color base #24273a;
@define-color mantle #1e2030;
@define-color crust #181926;
/*@import "macchiato.css";*/
* {
border: none;
border-radius: 0;
font-family:
Jetbrains Mono Nerd Font,
monospace;
font-weight: bold;
font-size: 14px;
min-height: 0;
}
window#waybar {
background: rgba(21, 18, 27, 0);
color: #cdd6f4;
}
tooltip {
background: #1e1e2e;
border-radius: 10px;
border-width: 2px;
border-style: solid;
border-color: #11111b;
}
#workspaces button {
padding: 5px;
color: #313244;
margin-right: 5px;
}
#workspaces button.active {
color: #a6adc8;
}
#workspaces button.focused {
color: #a6adc8;
background: #eba0ac;
border-radius: 10px;
}
#workspaces button.urgent {
color: #11111b;
background: #a6e3a1;
border-radius: 10px;
}
#workspaces button:hover {
background: #11111b;
color: #cdd6f4;
border-radius: 10px;
}
#custom-updates,
#custom-caffeine,
#custom-weather,
#window,
#clock,
#battery,
#pulseaudio,
#network,
#workspaces,
#keyboard-state.numlock,
#keyboard-state.capslock,
#tray,
#backlight {
background: #1e1e2e;
padding: 0px 10px;
margin: 3px 0px;
margin-top: 10px;
border: 1px solid #181825;
}
#tray {
border-radius: 10px;
margin-right: 10px;
#waybar {
background: transparent;
color: @text;
margin: 5px 5px;
}
#workspaces {
background: #1e1e2e;
border-radius: 10px;
margin-left: 10px;
padding-right: 0px;
padding-left: 5px;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 1rem;
background-color: @surface0;
opacity: 0.6;
margin-left: 1rem;
}
#custom-caffeine {
color: #89dceb;
border-radius: 10px 0px 0px 10px;
border-right: 0px;
margin-left: 10px;
#workspaces button {
color: @lavender;
border-radius: 1rem;
padding: 0.4rem;
}
#custom-updates {
color: #f5c2e7;
border-radius: 10px 0px 0px 10px;
border-left: 0px;
border-right: 0px;
#workspaces button.active {
color: @sky;
border-radius: 1rem;
}
#workspaces button:hover {
color: @sapphire;
border-radius: 1rem;
}
#workspaces button.focused {
color: @subtext0;
background: @yellow;
border-radius: 1rem;
}
#workspaces button.urgent {
color: @crust;
background: @subtext0;
border-radius: 1rem;
}
#tooltip {
background: @surface0;
border-radius: 1rem;
border-width: 1rem;
border-style: solid;
border-color: @crust;
}
#window {
border-radius: 10px;
margin-left: 60px;
margin-right: 60px;
color: @lavender;
background-color: @surface0;
opacity: 0.6;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 1rem;
margin-left: 6rem;
margin-right: 6rem;
}
#custom-weather {
color: @rosewater;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 1rem;
}
#clock {
color: #f5a97f;
border-radius: 10px 0px 0px 10px;
margin-left: 5px;
border-right: 0px;
color: @flamingo;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 1rem;
}
#keyboard-state.capslock {
color: #91d7e3;
border-left: 0px;
border-right: 0px;
}
/* ------------- */
#keyboard-state.numlock {
color: #7dc4e4;
border-left: 0px;
border-right: 0px;
}
#network {
color: #eed49f;
border-left: 0px;
border-right: 0px;
border-radius: 10px 10px 10px 10px;
margin-left: 5px;
padding-right: 15px;
#pulseaudio.microphone {
color: @mauve;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0rem 1rem 1rem 0rem;
}
#pulseaudio {
color: #8aadf4;
border-left: 0px;
border-right: 0px;
color: @red;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0;
}
#pulseaudio.microphone {
color: #c6a0f6;
border-radius: 0px 10px 10px 0px;
border-left: 0px;
border-right: 0px;
padding-top: 5px;
#keyboard-state.numlock {
color: @maroon;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0;
font-size: 50px;
}
#battery {
color: #a6e3a1;
border-radius: 0 10px 10px 0;
margin-right: 10px;
border-left: 0px;
#keyboard-state.capslock {
color: @peach;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0;
font-size: 18px;
}
#custom-weather {
border-radius: 0px 10px 10px 0px;
border-right: 0px;
margin-left: 0px;
#temperature.gpu {
color: @yellow;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0;
}
#temperature {
color: @green;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 0;
}
#custom-updates {
color: @teal;
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 1rem;
}
/* ------------- */
#tray {
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
margin-right: 1rem;
border-radius: 1rem;
}
'';
};

View File

@@ -0,0 +1,26 @@
@define-color rosewater #f4dbd6;
@define-color flamingo #f0c6c6;
@define-color pink #f5bde6;
@define-color mauve #c6a0f6;
@define-color red #ed8796;
@define-color maroon #ee99a0;
@define-color peach #f5a97f;
@define-color yellow #eed49f;
@define-color green #a6da95;
@define-color teal #8bd5ca;
@define-color sky #91d7e3;
@define-color sapphire #7dc4e4;
@define-color blue #8aadf4;
@define-color lavender #b7bdf8;
@define-color text #cad3f5;
@define-color subtext1 #b8c0e0;
@define-color subtext0 #a5adcb;
@define-color overlay2 #939ab7;
@define-color overlay1 #8087a2;
@define-color overlay0 #6e738d;
@define-color surface2 #5b6078;
@define-color surface1 #494d64;
@define-color surface0 #363a4f;
@define-color base #24273a;
@define-color mantle #1e2030;
@define-color crust #181926;

View File

@@ -52,7 +52,10 @@ def check():
updates = check_for_flake_updates()
updates_dict = parse_output(updates.stderr)
data["text"] = (str(len(updates_dict.keys())))
if len(updates_dict.keys()) > 0:
data["text"] = ("󰏕")
else:
data["text"] = ("")
if len(updates_dict.keys()) <= 0:
data["tooltip"] = ("flake inputs up to date")
else:

View File

@@ -5,61 +5,274 @@ from datetime import datetime
import requests
WEATHER_CODES = {
"113": "☀️ ",
"116": "",
"119": "☁️ ",
"122": "☁️ ",
"143": "☁️ ",
"176": "🌧️",
"179": "🌧️",
"182": "🌧️",
"185": "🌧️",
"200": "⛈️ ",
"227": "🌨️",
"230": "🌨️",
"248": "☁️ ",
"260": "☁️ ",
"263": "🌧️",
"266": "🌧️",
"281": "🌧️",
"284": "🌧️",
"293": "🌧️",
"296": "🌧️",
"299": "🌧️",
"302": "🌧️",
"305": "🌧️",
"308": "🌧️",
"311": "🌧️",
"314": "🌧️",
"317": "🌧️",
"320": "🌨️",
"323": "🌨️",
"326": "🌨️",
"329": "❄️ ",
"332": "❄️ ",
"335": "❄️ ",
"338": "❄️ ",
"350": "🌧️",
"353": "🌧️",
"356": "🌧️",
"359": "🌧️",
"362": "🌧️",
"365": "🌧️",
"368": "🌧️",
"371": "❄️",
"374": "🌨️",
"377": "🌨️",
"386": "🌨️",
"389": "🌨️",
"392": "🌧️",
"395": "❄️ ",
WWO_CODE = {
"113": "Sunny",
"116": "PartlyCloudy",
"119": "Cloudy",
"122": "VeryCloudy",
"143": "Fog",
"176": "LightShowers",
"179": "LightSleetShowers",
"182": "LightSleet",
"185": "LightSleet",
"200": "ThunderyShowers",
"227": "LightSnow",
"230": "HeavySnow",
"248": "Fog",
"260": "Fog",
"263": "LightShowers",
"266": "LightRain",
"281": "LightSleet",
"284": "LightSleet",
"293": "LightRain",
"296": "LightRain",
"299": "HeavyShowers",
"302": "HeavyRain",
"305": "HeavyShowers",
"308": "HeavyRain",
"311": "LightSleet",
"314": "LightSleet",
"317": "LightSleet",
"320": "LightSnow",
"323": "LightSnowShowers",
"326": "LightSnowShowers",
"329": "HeavySnow",
"332": "HeavySnow",
"335": "HeavySnowShowers",
"338": "HeavySnow",
"350": "LightSleet",
"353": "LightShowers",
"356": "HeavyShowers",
"359": "HeavyRain",
"362": "LightSleetShowers",
"365": "LightSleetShowers",
"368": "LightSnowShowers",
"371": "HeavySnowShowers",
"374": "LightSleetShowers",
"377": "LightSleet",
"386": "ThunderyShowers",
"389": "ThunderyHeavyRain",
"392": "ThunderySnowShowers",
"395": "HeavySnowShowers",
}
WEATHER_SYMBOL = {
"Unknown": "",
"Cloudy": "☁️",
"Fog": "🌫",
"HeavyRain": "🌧",
"HeavyShowers": "🌧",
"HeavySnow": "❄️",
"HeavySnowShowers": "❄️",
"LightRain": "🌦",
"LightShowers": "🌦",
"LightSleet": "🌧",
"LightSleetShowers": "🌧",
"LightSnow": "🌨",
"LightSnowShowers": "🌨",
"PartlyCloudy": "⛅️",
"Sunny": "☀️",
"ThunderyHeavyRain": "🌩",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "☁️",
}
WEATHER_CODES = {key: WEATHER_SYMBOL[value] for key, value in WWO_CODE.items()}
WIND_DIRECTION = [
"", "", "", "", "", "", "", "",
]
MOON_PHASES = (
"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"
)
WEATHER_SYMBOL_WI_DAY = {
"Unknown": "",
"Cloudy": "",
"Fog": "",
"HeavyRain": "",
"HeavyShowers": "",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "",
"LightShowers": "",
"LightSleet": "",
"LightSleetShowers": "",
"LightSnow": "",
"LightSnowShowers": "",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_CODES_WI_DAY = {key: WEATHER_SYMBOL_WI_DAY[value] for key, value in WWO_CODE.items()}
WEATHER_SYMBOL_WI_NIGHT = {
"Unknown": "",
"Cloudy": "",
"Fog": "",
"HeavyRain": "",
"HeavyShowers": "",
"HeavySnow": "",
"HeavySnowShowers": "",
"LightRain": "",
"LightShowers": "",
"LightSleet": "",
"LightSleetShowers": "",
"LightSnow": "",
"LightSnowShowers": "",
"PartlyCloudy": "",
"Sunny": "",
"ThunderyHeavyRain": "",
"ThunderyShowers": "",
"ThunderySnowShowers": "",
"VeryCloudy": "",
}
WEATHER_CODES_WI_NIGHT = {key: WEATHER_SYMBOL_WI_NIGHT[value] for key, value in WWO_CODE.items()}
WIND_DIRECTION_WI = [
"", "", "", "", "", "", "", "",
]
WIND_SCALE_WI = [
"", "", "", "", "", "", "", "", "", "", "", "", "",
]
MOON_PHASES_WI = (
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
"", "", "", "", "", "", "",
)
WEATHER_SYMBOL_WEGO = {
"Unknown": [
" .-. ",
" __) ",
" ( ",
" `- ",
""],
"Sunny": [
"\033[38;5;226m \\ / \033[0m",
"\033[38;5;226m .-. \033[0m",
"\033[38;5;226m ― ( ) ― \033[0m",
"\033[38;5;226m `- \033[0m",
"\033[38;5;226m / \\ \033[0m"],
"PartlyCloudy": [
"\033[38;5;226m \\ /\033[0m ",
"\033[38;5;226m _ /\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m \\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
" "],
"Cloudy": [
" ",
"\033[38;5;250m .--. \033[0m",
"\033[38;5;250m .-( ). \033[0m",
"\033[38;5;250m (___.__)__) \033[0m",
" "],
"VeryCloudy": [
" ",
"\033[38;5;240;1m .--. \033[0m",
"\033[38;5;240;1m .-( ). \033[0m",
"\033[38;5;240;1m (___.__)__) \033[0m",
" "],
"LightShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;111m \033[0m",
"\033[38;5;111m \033[0m"],
"HeavyShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;240;1m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;240;1m( ). \033[0m",
"\033[38;5;226m /\033[38;5;240;1m(___(__) \033[0m",
"\033[38;5;21;1m \033[0m",
"\033[38;5;21;1m \033[0m"],
"LightSnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;255m * * * \033[0m",
"\033[38;5;255m * * * \033[0m"],
"HeavySnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;240;1m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;240;1m( ). \033[0m",
"\033[38;5;226m /\033[38;5;240;1m(___(__) \033[0m",
"\033[38;5;255;1m * * * * \033[0m",
"\033[38;5;255;1m * * * * \033[0m"],
"LightSleetShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[38;5;255m* \033[0m",
"\033[38;5;255m *\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[0m"],
"ThunderyShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;228;5m ⚡\033[38;5;111;25m \033[38;5;228;5m⚡\033[38;5;111;25m \033[0m",
"\033[38;5;111m \033[0m"],
"ThunderyHeavyRain": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;21;1m \033[38;5;228;5m⚡\033[38;5;21;25m\033[38;5;228;5m⚡\033[38;5;21;25m \033[0m",
"\033[38;5;21;1m \033[38;5;228;5m⚡\033[38;5;21;25m \033[0m"],
"ThunderySnowShowers": [
"\033[38;5;226m _`/\"\"\033[38;5;250m.-. \033[0m",
"\033[38;5;226m ,\\_\033[38;5;250m( ). \033[0m",
"\033[38;5;226m /\033[38;5;250m(___(__) \033[0m",
"\033[38;5;255m *\033[38;5;228;5m⚡\033[38;5;255;25m*\033[38;5;228;5m⚡\033[38;5;255;25m* \033[0m",
"\033[38;5;255m * * * \033[0m"],
"LightRain": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;111m \033[0m",
"\033[38;5;111m \033[0m"],
"HeavyRain": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;21;1m \033[0m",
"\033[38;5;21;1m \033[0m"],
"LightSnow": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;255m * * * \033[0m",
"\033[38;5;255m * * * \033[0m"],
"HeavySnow": [
"\033[38;5;240;1m .-. \033[0m",
"\033[38;5;240;1m ( ). \033[0m",
"\033[38;5;240;1m (___(__) \033[0m",
"\033[38;5;255;1m * * * * \033[0m",
"\033[38;5;255;1m * * * * \033[0m"],
"LightSleet": [
"\033[38;5;250m .-. \033[0m",
"\033[38;5;250m ( ). \033[0m",
"\033[38;5;250m (___(__) \033[0m",
"\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[38;5;255m* \033[0m",
"\033[38;5;255m *\033[38;5;111m \033[38;5;255m*\033[38;5;111m \033[0m"],
"Fog": [
" ",
"\033[38;5;251m _ - _ - _ - \033[0m",
"\033[38;5;251m _ - _ - _ \033[0m",
"\033[38;5;251m _ - _ - _ - \033[0m",
" "],
}
data = {}
weather = requests.get("https://wttr.in/?format=j1").json()
weather = requests.get("https://wttr.in/u&?format=j1").json()
moon = requests.get("https://wttr.in/?format=%m").text
def format_time(time):
@@ -104,7 +317,7 @@ data["text"] = (
+ " "
+ extrachar
+ weather["current_condition"][0]["FeelsLikeF"]
+ "°"
+ "°F"
)
data["tooltip"] = (
@@ -113,6 +326,7 @@ data["tooltip"] = (
data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
data["tooltip"] += f"Wind: {weather['current_condition'][0]['windspeedMiles']}mph\n"
data["tooltip"] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
data["tooltip"] += f"Moon phase: {weather["weather"][0]['astronomy'][0]['moon_phase']} " + moon + "\n"
for i, day in enumerate(weather["weather"]):
data["tooltip"] += f"\n<b>"
if i == 0:
@@ -121,17 +335,21 @@ for i, day in enumerate(weather["weather"]):
data["tooltip"] += "Tomorrow, "
date = datetime.strptime(day['date'], "%Y-%m-%d").strftime("%a %b %d %Y")
data["tooltip"] += f"{date}</b>\n"
data["tooltip"] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° "
data["tooltip"] += f" {day['maxtempF']}°F  {day['mintempF']}°F"
data[
"tooltip"
] += f"☀️ {day['astronomy'][0]['sunrise']} 🌕 {day['astronomy'][0]['sunset']}\n"
] += f" {day['astronomy'][0]['sunrise']} {day['astronomy'][0]['sunset']}\n"
for hour in day["hourly"]:
if i == 0:
if int(format_24_time(hour["time"])) < datetime.now().hour - 2:
continue
if int(format_24_time(hour["time"])) > datetime.strptime(day['astronomy'][0]['sunset'], "%I:%M %p").hour or int(format_24_time(hour["time"])) < datetime.strptime(day['astronomy'][0]['sunrise'], "%I:%M %p").hour:
codes = WEATHER_CODES_WI_NIGHT
else:
codes = WEATHER_CODES_WI_DAY
data[
"tooltip"
] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
] += f"{format_time(hour['time'])} {codes[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
print(json.dumps(data))

View File

@@ -0,0 +1,166 @@
@import "macchiato.css";
* {
border: none;
border-radius: 0;
font-family:
Jetbrains Mono Nerd Font,
monospace;
font-weight: bold;
font-size: 14px;
min-height: 0;
}
#window.waybar {
background-color: shade(@base, 0.9);
color: @text;
}
#tooltip {
background: #1e1e2e;
border-radius: 10px;
border-width: 2px;
border-style: solid;
border-color: #11111b;
}
#workspaces button {
padding: 5px;
color: #313244;
margin-right: 5px;
}
#workspaces button.active {
color: #a6adc8;
}
#workspaces button.focused {
color: #a6adc8;
background: #eba0ac;
border-radius: 10px;
}
#workspaces button.urgent {
color: #11111b;
background: #a6e3a1;
border-radius: 10px;
}
#workspaces button:hover {
background: #11111b;
color: #cdd6f4;
border-radius: 10px;
}
/*#window,
#custom-weather,
#clock,
#network,
#pulseaudio,
#keyboard-state,
#temperature,
#custom-updates,
#tray,
#workspaces,*/
#workspaces {
/* background: #1e1e2e; */
background: #1e2030; /* Mantle */
border-radius: 10px;
margin-left: 10px;
padding-right: 0px;
padding-left: 5px;
}
#tray {
border-radius: 10px;
margin-right: 10px;
}
/* ------------- */
#custom-updates {
color: #f5c2e7;
border-radius: 10px 0px 0px 10px;
border-left: 0px;
border-right: 0px;
}
#window {
border-radius: 10px;
margin-left: 60px;
margin-right: 60px;
}
#temperature {
color: #a6da95;/* Green */
border-left: 0px;
border-right: 0px;
}
#temperature.gpu {
color: #eed49f;/* Yellow */
border-left: 0px;
border-right: 0px;
}
#keyboard-state.capslock {
color: #f5a97f;/* Peach */
border-left: 0px;
border-right: 0px;
}
#keyboard-state.numlock {
color: #ee99a0;/* Maroon */
border-left: 0px;
border-right: 0px;
}
#pulseaudio {
color: #ed8796;/* Red */
border-radius: 0px 0px 0px 0px;
border-left: 0px;
border-right: 0px;
margin-left: 0px;
padding-right: 0px;
padding-top: 0px;
}
#pulseaudio.microphone {
color: #c6a0f6; /* Mauve */
border-radius: 0px 10px 10px 0px;
border-left: 0px;
border-right: 0px;
padding-top: 5px;
}
/* ------------- */
#network {
color: #f5bde6; /* Pink */
border-left: 0px;
border-right: 0px;
border-radius: 10px 10px 10px 10px;
margin-left: 5px;
padding-right: 15px;
}
/* ------------- */
#clock {
color: #f0c6c6; /* Flamingo */
border-radius: 10px 0px 0px 10px;
margin-left: 5px;
border-right: 0px;
}
#custom-weather {
color: #f4dbd6; /* Rosewater */
border-radius: 0px 10px 10px 0px;
border-right: 0px;
margin-left: 0px;
}

View File

@@ -29,6 +29,8 @@ in
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
programs.nm-applet.enable = true;
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
@@ -80,6 +82,7 @@ in
};
fonts.packages = with pkgs; [
font-awesome
noto-fonts
noto-fonts-color-emoji
nerdfonts

View File

@@ -15,6 +15,7 @@ in
environment.systemPackages = with pkgs; [
adwaita-icon-theme
apple-cursor
blueberry
catppuccin
catppuccin-gtk
catppuccin-qt5ct

View File

@@ -6,6 +6,7 @@ in
{
# Configure bootloader with lanzaboot and secureboot
boot = {
kernelModules = [ "nct6775" ];
loader = {
systemd-boot = {
enable = true;

View File

@@ -213,6 +213,30 @@ in
};
};
hardware.fancontrol = {
enable = true;
config = ''
# Configuration file generated by pwmconfig, changes will be lost
# hwmon6/temp9_input -- chipset temp?
# hwmon2/temp1_input -- cpu temp?
# hwmon6/pwm5 -- chipset fan?
# hwmon6/pwm2, hwmon6/pwm3 -- cpu fans?
# hwmon6/pwm4 -- case fans?
INTERVAL=10
DEVPATH=hwmon2=devices/pci0000:00/0000:00:18.3 hwmon6=devices/platform/nct6775.656
DEVNAME=hwmon2=k10temp hwmon6=nct6798
FCTEMPS=hwmon6/pwm5=hwmon6/temp9_input hwmon6/pwm2=hwmon2/temp1_input hwmon6/pwm3=hwmon2/temp1_input hwmon6/pwm4=hwmon2/temp1_input
FCFANS=hwmon6/pwm5=hwmon6/fan5_input hwmon6/pwm2=hwmon6/fan2_input hwmon6/pwm3=hwmon6/fan3_input hwmon6/pwm4=hwmon6/fan4_input
MINTEMP=hwmon6/pwm5=20 hwmon6/pwm2=20 hwmon6/pwm3=20 hwmon6/pwm4=20
MAXTEMP=hwmon6/pwm5=60 hwmon6/pwm2=90 hwmon6/pwm3=90 hwmon6/pwm4=90
MINSTART=hwmon6/pwm5=16 hwmon6/pwm2=90 hwmon6/pwm3=45 hwmon6/pwm4=60
MINSTOP=hwmon6/pwm5=14 hwmon6/pwm2=0 hwmon6/pwm3=30 hwmon6/pwm4=45
MINPWM=hwmon6/pwm5=14 hwmon6/pwm2=0 hwmon6/pwm3=0 hwmon6/pwm4=0
MAXPWM=hwmon6/pwm5=255 hwmon6/pwm2=255 hwmon6/pwm3=255 hwmon6/pwm4=255
'';
};
# Virtualisation
virtualisation = {
docker = {

View File

@@ -11,6 +11,8 @@
mangohud.enable = true;
java.enable = true;
btop.enable = true;
zsh = {
enable = true;
enableCompletion = true;

36
hosts/nas/sensors.txt Normal file
View File

@@ -0,0 +1,36 @@
Common Settings:
INTERVAL=10
Settings of hwmon6/pwm5: -- chipset?
Depends on hwmon6/temp9_input
Controls hwmon6/fan5_input
MINTEMP=20
MAXTEMP=60
MINSTART=16
MINSTOP=14
MINPWM=14
Settings of hwmon6/pwm4: -- case?
Depends on hwmon2/temp1_input
Controls hwmon6/fan4_input
MINTEMP=20
MAXTEMP=90
MINSTART=60
MINSTOP=45
Settings of hwmon6/pwm3: -- cpu?
Depends on hwmon2/temp1_input
Controls hwmon6/fan3_input
MINTEMP=20
MAXTEMP=90
MINSTART=150
MINSTOP=0
MAXPWM=30
Settings of hwmon6/pwm2: -- cpu?
Depends on hwmon2/temp1_input
Controls hwmon6/fan2_input
MINTEMP=20
MAXTEMP=90
MINSTART=105
MINSTOP=0

View File

@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
let
enableDisplayManager = false;
hostname = "jallen-nas";
in
{
# Services configs
@@ -62,63 +61,6 @@ in
enable = true;
};
grafana = {
enable = false;
settings.server = {
http_port = 2342;
domain = hostname;
serve_from_sub_path = true;
http_addr = "";
};
dataDir = "/media/nas/ssd/nix-app-data/grafana";
};
prometheus = {
enable = false;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [
"diskstats"
"systemd"
];
port = 9002;
};
smartctl = {
enable = true;
group = "disk";
devices = [
"/dev/sda"
"/dev/sdb"
"/dev/sdc"
"/dev/sdd"
"/dev/sde"
"/dev/sdf"
"/dev/sdg"
"/dev/sdh"
"/dev/sdi"
"/dev/nvme0n1"
"/dev/nvme1n1"
];
};
};
scrapeConfigs = [
{
job_name = hostname;
static_configs = [
{
targets = [
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
"127.0.0.1:${toString config.services.prometheus.exporters.smartctl.port}"
];
}
];
}
];
};
tailscale = {
enable = true;
openFirewall = true;
@@ -209,40 +151,6 @@ in
'';
};
tailscale-autoconnect = {
enable = false;
description = "Automatic connection to Tailscale";
# make sure tailscale is running before trying to connect to tailscale
after = [
"network-pre.target"
"tailscale.service"
];
wants = [
"network-pre.target"
"tailscale.service"
];
wantedBy = [ "multi-user.target" ];
# set this service as a oneshot job
serviceConfig.Type = "oneshot";
# have the job run this shell script
script = with pkgs; ''
# wait for tailscaled to settle
sleep 2
# check if we are already authenticated to tailscale
status="$(${tailscale}/bin/tailscale status -json | ${jq}/bin/jq -r .BackendState)"
if [ $status = "Running" ]; then # if so, then do nothing
exit 0
fi
# otherwise authenticate with tailscale
${tailscale}/bin/tailscale up -authkey nodekey:e4557e761f8fa2cb51a189d32484092036d3954b61502b7e19688869a5107707
'';
};
glances-server = {
path = [
pkgs.bash