📦 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,5 +1,8 @@
{ lib, ... }:
let
common = import ../../common.nix;
theme = import ../../theme.nix;
in
{
wayland.windowManager.hyprland.settings = {
monitor = [
@ -25,98 +28,15 @@
];
env = [
"XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24"
"HYPRCURSOR_THEME,rose-pine-hyprcursor"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"HYPRSHOT_DIR,$HOME/Pictures/screenshots" # Store screenshots here
];
# TODO move to common file
"$rosewater" = "rgb(f5e0dc)";
"$rosewaterAlpha" = "f5e0dc";
"$flamingo" = "rgb(f2cdcd)";
"$flamingoAlpha" = "f2cdcd";
"$pink" = "rgb(f5c2e7)";
"$pinkAlpha" = "f5c2e7";
"$mauve" = "rgb(cba6f7)";
"$mauveAlpha" = "cba6f7";
"$red" = "rgb(f38ba8)";
"$redAlpha" = "f38ba8";
"$maroon" = "rgb(eba0ac)";
"$maroonAlpha" = "eba0ac";
"$peach" = "rgb(fab387)";
"$peachAlpha" = "fab387";
"$yellow" = "rgb(f9e2af)";
"$yellowAlpha" = "f9e2af";
"$green" = "rgb(a6e3a1)";
"$greenAlpha" = "a6e3a1";
"$teal" = "rgb(94e2d5)";
"$tealAlpha" = "94e2d5";
"$sky" = "rgb(89dceb)";
"$skyAlpha" = "89dceb";
"$sapphire" = "rgb(74c7ec)";
"$sapphireAlpha" = "74c7ec";
"$blue" = "rgb(89b4fa)";
"$blueAlpha" = "89b4fa";
"$lavender" = "rgb(b4befe)";
"$lavenderAlpha" = "b4befe";
"$text" = "rgb(cdd6f4)";
"$textAlpha" = "cdd6f4";
"$subtext1" = "rgb(bac2de)";
"$subtext1Alpha" = "bac2de";
"$subtext0" = "rgb(a6adc8)";
"$subtext0Alpha" = "a6adc8";
"$overlay2" = "rgb(9399b2)";
"$overlay2Alpha" = "9399b2";
"$overlay1" = "rgb(7f849c)";
"$overlay1Alpha" = "7f849c";
"$overlay0" = "rgb(6c7086)";
"$overlay0Alpha" = "6c7086";
"$surface2" = "rgb(585b70)";
"$surface2Alpha" = "585b70";
"$surface1" = "rgb(45475a)";
"$surface1Alpha" = "45475a";
"$surface0" = "rgb(313244)";
"$surface0Alpha" = "313244";
"$base" = "rgb(1e1e2e)";
"$baseAlpha" = "1e1e2e";
"$mantle" = "rgb(181825)";
"$mantleAlpha" = "181825";
"$crust" = "rgb(11111b)";
"$crustAlpha" = "11111b";
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = lib.mkDefault "$mauve $teal 45deg";
"col.inactive_border" = lib.mkDefault "rgba(595959aa)";
"col.active_border" = lib.mkDefault "${theme.mauveRgb} ${theme.tealRgb} 45deg";
"col.inactive_border" = lib.mkDefault "rgba(${theme.surface2Alpha}aa)";
resize_on_border = true;
allow_tearing = false;
layout = "dwindle";
@ -133,7 +53,7 @@
enabled = true;
range = 4;
render_power = 3;
color = lib.mkDefault "$base";
color = lib.mkDefault theme.baseRgb;
};
blur = {
@ -192,10 +112,9 @@
debug.disable_logs = false;
# TODO fetch values from common file. Must match configs in nixos!
input = {
kb_layout = "gb,no";
kb_options = "grp:alt_shift_toggle";
kb_layout = common.keymaps.layout;
kb_options = common.keymaps.options;
follow_mouse = 1;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
touchpad.natural_scroll = false;