diff options
author | Freya Murphy <freya@freyacat.org> | 2025-09-17 22:07:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-09-17 22:07:16 -0400 |
commit | 68d03fe362b7e0df11662d8d6a1e01eac0bfae77 (patch) | |
tree | a76abd05f662f73b4083ddb0d8bf0d72c29e5a74 /home/apps | |
parent | update commits (diff) | |
download | dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.gz dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.tar.bz2 dotfiles-nix-68d03fe362b7e0df11662d8d6a1e01eac0bfae77.zip |
refactor: remove modules folder, fully split home and system modules
Diffstat (limited to '')
-rw-r--r-- | home/apps/alacritty.nix | 97 | ||||
-rw-r--r-- | home/apps/astal.nix | 39 | ||||
-rw-r--r-- | home/apps/default.nix | 13 | ||||
-rw-r--r-- | home/apps/hyprlock.nix | 104 | ||||
-rw-r--r-- | home/apps/kitty.nix | 79 | ||||
-rw-r--r-- | home/apps/mako.nix | 33 | ||||
-rw-r--r-- | home/apps/waybar/default.nix | 85 | ||||
-rw-r--r-- | home/apps/waybar/style.nix (renamed from modules/apps/waybar/style.nix) | 0 | ||||
-rw-r--r-- | home/apps/wofi/default.nix | 27 | ||||
-rw-r--r-- | home/apps/wofi/style.nix (renamed from modules/apps/wofi/style.nix) | 0 |
10 files changed, 477 insertions, 0 deletions
diff --git a/home/apps/alacritty.nix b/home/apps/alacritty.nix new file mode 100644 index 0000000..5c47f65 --- /dev/null +++ b/home/apps/alacritty.nix @@ -0,0 +1,97 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.alacritty; +in { + config = mkIf cfg.enable { + default.terminal = lib.mkDefault "alacritty"; + + programs.alacritty = { + enable = true; + + settings = { + # Font + font = { + size = 11; + bold = { + style = "Bold"; + }; + bold_italic = { + style = "Bold Italic"; + }; + italic = { + style = "Italic"; + }; + normal = { + family = config.theme.font.monospace; + style = "Regular"; + }; + offset = { + x = 0; + y = 0; + }; + }; + + # Window + window = { + decorations = "full"; + dynamic_title = true; + padding = { + x = config.theme.outerGap; + y = config.theme.outerGap; + }; + opacity = config.theme.opacity; + }; + + # Colors + colors = { + normal = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit + (config.theme.colors.normal) + black + red + green + yellow + blue + magenta + cyan + white + ; + }; + + bright = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit + (config.theme.colors.bright) + black + red + green + yellow + blue + magenta + cyan + white + ; + }; + + cursor = { + background = "CellForeground"; + text = "CellBackground"; + }; + + selection = { + background = "CellForeground"; + text = "CellBackground"; + }; + + primary = { + foreground = "#${config.theme.colors.text}"; + background = "#${config.theme.colors.base}"; + }; + }; + }; + }; + }; +} diff --git a/home/apps/astal.nix b/home/apps/astal.nix new file mode 100644 index 0000000..0427e61 --- /dev/null +++ b/home/apps/astal.nix @@ -0,0 +1,39 @@ +{ + lib, + config, + pkgs, + inputs, + ... +}: let + astal = inputs.self.packages.${pkgs.system}; + inherit (lib) mkIf; + cfg = config.apps.astal; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkDefault "astal-launcher"; + + home.packages = [ + astal.astal.shell + astal.astal.launcher + ]; + + systemd.user.services.astal = { + Install = { + WantedBy = [config.default.session "tray.target"]; + }; + + Unit = { + ConditionEnvironment = "WAYLAND_DISPLAY"; + Description = "astal"; + After = [config.default.session]; + PartOf = [config.default.session "tray.target"]; + }; + + Service = { + ExecStart = "${astal.astal.shell}/bin/astal-shell"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} diff --git a/home/apps/default.nix b/home/apps/default.nix new file mode 100644 index 0000000..d755a12 --- /dev/null +++ b/home/apps/default.nix @@ -0,0 +1,13 @@ +{lib, ...}: let + inherit (lib) mkEnableOption; +in { + imports = [ + ./waybar + ./wofi + ./alacritty.nix + ./astal.nix + ./hyprlock.nix + ./kitty.nix + ./mako.nix + ]; +} diff --git a/home/apps/hyprlock.nix b/home/apps/hyprlock.nix new file mode 100644 index 0000000..6a0119f --- /dev/null +++ b/home/apps/hyprlock.nix @@ -0,0 +1,104 @@ +{ + config, + lib, + ... +}: let + text = "rgb(${config.theme.colors.text})"; + base = "rgb(${config.theme.colors.base})"; + error = "rgb(${config.theme.colors.error})"; + trans = "rgba(0,0,0,0)"; + + inherit (lib) mkIf optionals; + cfg = config.apps.hyprlock; +in { + config = mkIf cfg.enable { + default.lockScreen = lib.mkDefault "hyprlock"; + + programs.hyprlock = { + enable = true; + + settings = { + auth = { + "pam:enabled" = true; + "fingerprint:enabled" = config.fingerprint; + }; + + animations = { + enabled = true; + animation = [ + "fadeIn, 0" + "fadeOut, 0" + ]; + }; + + background = { + path = config.theme.lockscreen; + color = base; + blur_passes = 0; + blur_size = 2; + noise = 0; + contrast = 0; + brightness = 0; + vibrancy = 0; + vibrancy_darkness = 0.0; + }; + + # Password Input + input-field = { + size = "300, 50"; + outline_thickness = 0; + dots_size = 0.25; + dots_spacing = 0.55; + dots_center = true; + dots_rounding = -1; + outer_color = trans; + inner_color = trans; + font_color = text; + fade_on_empty = false; + placeholder_text = + "Enter Password" + + ( + if config.fingerprint + then " or Touch Fingerprint" + else "" + ); + hide_input = false; + check_color = error; + fail_color = error; + capslock_color = trans; + numlock_color = trans; + bothlock_color = trans; + invert_numlock = false; + swap_font_color = false; + font_family = config.theme.font.regular; + position = "0, 50"; + halign = "center"; + valign = "bottom"; + }; + + label = [ + # Date + { + text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; + color = text; + font_size = 20; + font_family = config.theme.font.header; + position = "0, -100"; + halign = "center"; + valign = "top"; + } + # Clock + { + text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\""; + color = text; + font_size = 90; + font_family = config.theme.font.header; + position = "0, -130"; + halign = "center"; + valign = "top"; + } + ]; + }; + }; + }; +} diff --git a/home/apps/kitty.nix b/home/apps/kitty.nix new file mode 100644 index 0000000..4253446 --- /dev/null +++ b/home/apps/kitty.nix @@ -0,0 +1,79 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.kitty; +in { + config = mkIf cfg.enable { + default.terminal = lib.mkDefault "kitty"; + + programs.kitty = { + enable = true; + environment = {}; + extraConfig = ""; + + settings = { + # Font + font_family = config.theme.font.monospace; + font_size = 11; + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; + + # Scrollback + scrollback_lines = 10000; + scrollback_pager_history_size = 300; # MB + + # Urls + detect_urls = true; + show_hyperlink_targets = false; + + # Window + window_padding_width = config.theme.outerGap; + window_border_width = 0; + draw_minimal_borders = true; + background_opacity = config.theme.opacity; + + # Disable audio + enable_audio_bell = false; + + # Disable close prompt + confirm_os_window_close = 0; + + # selection + selection_background = "#${config.theme.colors.surface}"; + selection_foreground = "none"; + + # cursor + url_color = "#${config.theme.colors.bright.yellow}"; + cursor = "#${config.theme.colors.text}"; + + # colors + background = "#${config.theme.colors.base}"; + foreground = "#${config.theme.colors.text}"; + + # normal + color0 = "#${config.theme.colors.normal.black}"; + color1 = "#${config.theme.colors.normal.red}"; + color2 = "#${config.theme.colors.normal.green}"; + color3 = "#${config.theme.colors.normal.yellow}"; + color4 = "#${config.theme.colors.normal.blue}"; + color5 = "#${config.theme.colors.normal.magenta}"; + color6 = "#${config.theme.colors.normal.cyan}"; + color7 = "#${config.theme.colors.normal.white}"; + + # bright + color8 = "#${config.theme.colors.bright.black}"; + color9 = "#${config.theme.colors.bright.red}"; + color10 = "#${config.theme.colors.bright.green}"; + color11 = "#${config.theme.colors.bright.yellow}"; + color12 = "#${config.theme.colors.bright.blue}"; + color13 = "#${config.theme.colors.bright.magenta}"; + color14 = "#${config.theme.colors.bright.cyan}"; + color15 = "#${config.theme.colors.bright.white}"; + }; + }; + }; +} diff --git a/home/apps/mako.nix b/home/apps/mako.nix new file mode 100644 index 0000000..52e7762 --- /dev/null +++ b/home/apps/mako.nix @@ -0,0 +1,33 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.mako; +in { + config = mkIf cfg.enable { + services.mako = { + enable = false; # now using astal + + settings = { + font = "${config.theme.font.monospace} 11"; + + margin = toString config.theme.outerGap; + padding = toString config.theme.innerGap; + + background-color = "#${config.theme.colors.base}"; + progress-color = "#${config.theme.colors.primary}"; + text-color = "#${config.theme.colors.text}"; + + border-color = "#${config.theme.colors.text}"; + border-size = config.theme.borderWidth; + border-radius = config.theme.outerRadius; + + default-timeout = 5000; + layer = "overlay"; + icons = true; + }; + }; + }; +} diff --git a/home/apps/waybar/default.nix b/home/apps/waybar/default.nix new file mode 100644 index 0000000..25acb8f --- /dev/null +++ b/home/apps/waybar/default.nix @@ -0,0 +1,85 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.waybar; +in { + config = mkIf cfg.enable { + programs.waybar = { + enable = true; + + settings = [ + { + height = 24; + layer = "top"; + position = "top"; + spacing = 4; + + modules-left = [ + "hyprland/workspaces" + ]; + modules-center = [ + "clock" + ]; + modules-right = [ + "battery" + "wireplumber" + "network" + "tray" + ]; + + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = true; + format = "{name}"; + }; + + battery = { + interval = 1; + states = { + warning = 30; + critical = 15; + }; + format = " {capacity}%"; + format-charging = " {capacity}%"; + format-plugged = " {capacity}%"; + format-full = " {capacity}%"; + format-warning = " {capacity}%"; + format-critical = " {capacity}%"; + }; + + wireplumber = { + format = " {volume}%"; + format-bluetooth = " {volume}%"; + format-muted = " muted"; + scroll-step = 1; + on-click = "pavucontrol"; + ignored-sinks = ["Easy Effects Sink"]; + }; + + network = { + format = " disconnected"; + format-wifi = " {essid}"; + format-ethernet = " {ipaddr}/{cidr}"; + format-disconnected = " disconnected"; + max-length = 50; + on-click = "nm-connection-editor"; + }; + + clock = { + interval = 1; + format = "{:%Y-%m-%d %a %H:%M:%S}"; + }; + + tray = { + spacing = config.theme.outerGap; + }; + } + ]; + + style = import ./style.nix {theme = config.theme;}; + }; + }; +} diff --git a/modules/apps/waybar/style.nix b/home/apps/waybar/style.nix index 21a8de5..21a8de5 100644 --- a/modules/apps/waybar/style.nix +++ b/home/apps/waybar/style.nix diff --git a/home/apps/wofi/default.nix b/home/apps/wofi/default.nix new file mode 100644 index 0000000..2de9f45 --- /dev/null +++ b/home/apps/wofi/default.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.wofi; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; + + programs.wofi = { + enable = true; + + settings = { + key_expand = "Tab"; + term = "kitty"; + matching = "multi-contains"; + insensitive = true; + gtk_dark = true; + hide_scroll = true; + }; + + style = import ./style.nix {theme = config.theme;}; + }; + }; +} diff --git a/modules/apps/wofi/style.nix b/home/apps/wofi/style.nix index 75a0a21..75a0a21 100644 --- a/modules/apps/wofi/style.nix +++ b/home/apps/wofi/style.nix |