📦 Created config files with common code

- Created common.nix for various configs
- Created theme.nix for theme related configs
- Moved some code to more logical files
- Moved some standalone files into nix multiline strings, in order to
  inject data
This commit is contained in:
2025-01-07 20:18:30 +01:00
parent e223999ae1
commit 1133e01eff
31 changed files with 650 additions and 675 deletions

View File

@ -1,20 +1,12 @@
{ lib, ... }:
let
theme = import ../../../theme.nix;
in
{
programs.hyprlock = {
enable = true;
settings = {
"$base" = "rgb(1e1e2e)";
"$text" = "rgb(cdd6f4)";
"$textAlpha" = "cdd6f4";
"$mauve" = "rgb(cba6f7)";
"$mauveAlpha" = "cba6f7";
"$red" = "rgb(f38ba8)";
"$yellow" = "rgb(f9e2af)";
"$accent" = "$mauve";
"$accentAlpha" = "$mauveAlpha";
"$surface0" = "rgb(313244)";
"$font" = "JetBrainsMono Nerd Font";
"$font" = "${theme.nerdFont} Nerd Font";
# GENERAL
general = {
@ -26,29 +18,27 @@
label = [
{
text = "$LAYOUT";
color = "$text";
color = "${theme.textRgb}";
font_size = 25;
font_family = "$font";
position = "30, -30";
halign = "left";
valign = "top";
}
# TIME
{
text = "$TIME";
color = "$text";
color = "${theme.textRgb}";
font_size = 90;
font_family = "$font";
position = "-30, 0";
halign = "right";
valign = "top";
}
# DATE
{
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
color = "$text";
color = "${theme.textRgb}";
font_size = 25;
font_family = "$font";
position = "-30, -150";
@ -56,7 +46,6 @@
valign = "top";
}
];
# INPUT FIELD
input-field = {
size = "300, 60";
@ -64,17 +53,17 @@
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = lib.mkDefault "$accent";
inner_color = lib.mkDefault "$surface0";
font_color = lib.mkDefault "$text";
outer_color = lib.mkDefault "${theme.mauve}";
inner_color = lib.mkDefault "${theme.surface0Rgb}";
font_color = lib.mkDefault "${theme.textRgb}";
fade_on_empty = false;
placeholder_text = "<span foreground=\"##$textAlpha\"><i>󰌾 Logged in as </i><span foreground=\"##$accentAlpha\">$USER</span></span>";
placeholder_text = "<span foreground=\"##${theme.textAlpha}\"><i>󰌾 Logged in as </i><span foreground=\"##${theme.mauveAlpha}\">$USER</span></span>";
hide_input = false;
check_color = lib.mkDefault "$accent";
fail_color = lib.mkDefault "$red";
check_color = lib.mkDefault "${theme.mauve}";
fail_color = lib.mkDefault "${theme.redRgb}";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = lib.mkDefault "$yellow";
position = "0, -20%";
capslock_color = lib.mkDefault "${theme.yellowRgb}";
position = "0, -200"; # TODO change -200 to -20% at 25.05
halign = "center";
valign = "center";
};