commit a0ec26104dd78a9be75711ceacf0afffeaec5354 Author: Paul Lopez Date: Mon Oct 27 09:14:51 2025 -0500 inital diff --git a/bin/svelte-ina-box b/bin/svelte-ina-box new file mode 100644 index 0000000..3786585 --- /dev/null +++ b/bin/svelte-ina-box @@ -0,0 +1,34 @@ +#!/bin/bash +clear + +if npx sv create $1 ; then + cd $1 || exit + + echo + echo =============================== + echo Running NPM Install Scripts + echo =============================== + echo + npm install + npm install -D postcss autoprefixer daisyui@latest + npm install lucide-svelte luxon + echo + echo =============================== + echo Initializing +layout.svelte + echo =============================== + echo + cd src/routes || exit + touch +layout.svelte + echo "" >> +layout.svelte + echo "" + echo "" >> +layout.svelte + echo "" >> +layout.svelte + echo "" + echo + echo "Project Created Successfully." + cd ../../ +fi diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..f0ac024 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,22 @@ +# configuration.nix +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./modules/system.nix + ./modules/home-manager.nix + ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.05"; # Did you read the comment? + +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..f50cdad --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/25b4e383-1924-4b25-89e1-9aa4edcef274"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp11s0f3u2.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/home-manager.nix b/modules/home-manager.nix new file mode 100644 index 0000000..c091075 --- /dev/null +++ b/modules/home-manager.nix @@ -0,0 +1,19 @@ +# ./modules/home.nix +# Define and configure users and userspace + +{ config, pkgs, ... }: + +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz"; +in +{ + imports = [ + (import "${home-manager}/nixos") + ./users.nix + ./users/psljr/home.nix + ]; + + # Set the home manager backup file extension, enabling 'nixos-rebuild switch' + home-manager.backupFileExtension = "bak"; + +} diff --git a/modules/system.nix b/modules/system.nix new file mode 100644 index 0000000..78ee2b2 --- /dev/null +++ b/modules/system.nix @@ -0,0 +1,183 @@ +# ./modules/system.nix +# Define and configure high-level system settings. + +{ config, pkgs, ... }: + +{ + config = { + # Configure the boot settings + boot = { + + # Configure the boot loader + loader = { + grub.enable = true; + grub.device = "/dev/nvme0n1"; + grub.useOSProber = true; + }; + + # Configure Plymouth + plymouth = { + enable = true; + themePackages = with pkgs; [ + nixos-bgrt-plymouth + ]; + theme = "nixos-bgrt"; + }; + + # Enable 'Silent Boot' + consoleLogLevel = 0; + initrd.verbose = false; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + }; + + # Configure Nix Garbage Collecter: + # Run weekly and delete all but the three most recent generations. + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than +3"; + }; + + # Enable networking + networking.networkmanager.enable = true; + + # Configure services + services = { + # Configure keymap in X11 + xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS for printing + printing.enable = true; + + # Enable sound via Pipewire + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa = { + enable = true; + support32Bit = true; + }; + pulse.enable = true; + }; + + # Enable GVFS + gvfs.enable = true; + }; + + # Enable hyprland and ly + services.displayManager.ly.enable = true; + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + programs.hyprlock.enable = true; + + # Configure security settings + security = { + rtkit.enable = true; + polkit.enable = true; + pam.services.hyprlock = {}; + }; + + # Set host name. + networking.hostName = "d5640-nixos"; + + # Set time zone. + time.timeZone = "America/Chicago"; + + # Set internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # Define environment variables and shell aliases. + environment = { + variables = { + EDITOR = "hx"; + SYSTEMD_EDITOR = "hx"; + }; + + shellAliases = { + using = "nix-shell --run fish -p"; + ccd = "clear; cd"; + reboot = "shutdown -r"; + }; + }; + + # Configure hardware settings + hardware = { + bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + # Show battery charge of connected devices when able + Experimental = true; + }; + }; + }; + }; + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # Declare packages installed in system profile + environment.systemPackages = with pkgs; [ + bat + direnv + dunst + helix + htop + hypridle + hyprlock + hyprpaper + hyprpicker + hyprshot + imv + killall + micro + nautilus + neofetch + nnn + p7zip + parted + pciutils + ripgrep + rofi-bluetooth + rofi-calc + rofi-network-manager + rofi-power-menu + rofi-wayland + tree + unzip + usbutils + vlc + waybar + + # Import scripts from ../bin + (writeScriptBin "svelte-ina-box" '' + ${builtins.readFile ../bin/svelte-ina-box} + '') + ]; + }; +} diff --git a/modules/users.nix b/modules/users.nix new file mode 100644 index 0000000..f12fb23 --- /dev/null +++ b/modules/users.nix @@ -0,0 +1,19 @@ +# ./modules/users.nix +# Define and configure user accounts + +{ config, pkgs, ... }: + +{ + # Configure the default user shell as fish + programs.fish.enable = true; + users.defaultUserShell = pkgs.fish; + + # Define user accounts + users.users = { + psljr = { + isNormalUser = true; + description = "Paul Lopez"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + }; +} diff --git a/modules/users/psljr/fish.nix b/modules/users/psljr/fish.nix new file mode 100644 index 0000000..19a2a96 --- /dev/null +++ b/modules/users/psljr/fish.nix @@ -0,0 +1,55 @@ +# ./modules/users/psljr/fish.nix +# Configure fish for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + programs.fish = { + enable = true; + + functions = { + fish_prompt = { + body = '' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Change the prompt when inside a nix-shell + set -l nix_shell_info ( + if test -n "$IN_NIX_SHELL" + echo -n " " + end + ) + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s ' ' (prompt_login)' ' (set_color -o ff9955) $nix_shell_info (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " " $prompt_status $suffix " " + ''; + }; + }; + }; + }; +} diff --git a/modules/users/psljr/git.nix b/modules/users/psljr/git.nix new file mode 100644 index 0000000..86f4537 --- /dev/null +++ b/modules/users/psljr/git.nix @@ -0,0 +1,18 @@ +# ./modules/users/psljr/git.fish +# Configure git for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + programs.git = { + enable = true; + + userName = "Paul Lopez"; + userEmail = "psljr@protonmail.com"; + extraConfig = { + init.defaultBranch = "main"; + }; + }; + }; +} diff --git a/modules/users/psljr/home.nix b/modules/users/psljr/home.nix new file mode 100644 index 0000000..c61221f --- /dev/null +++ b/modules/users/psljr/home.nix @@ -0,0 +1,100 @@ +# ./modules/users/psljr/home.nix +# Configure the home environment for user psljr + +{ config, pkgs, ... }: + +{ + imports = [ + ./fish.nix + ./git.nix + ./hyprland.nix + ./hyprlock.nix + ./kitty.nix + ./rofi.nix + ./waybar.nix + ]; + + # Configure users with home-manager + home-manager.users.psljr = { pkgs, ... }: { + # Declare home state version. This should match the version of the NixOS configuration, and should not change + home.stateVersion = "25.05"; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # Accept the EULA for Android Studio + nixpkgs.config.android_sdk.accept_license = true; + + # Define session variables for terminal use + home.sessionVariables = { + NIX="/etc/nixos"; + NIX_MODS="/etc/nixos/modules"; + NIX_USERS="/etc/nixos/modules/users"; + }; + + # Allow home-manager to manage fonts + fonts.fontconfig.enable = true; + + # Declare packages to be installed on the user profile + home.packages = with pkgs; [ + deluge + discord + chromium + font-awesome + gimp + gparted + helix + htop + inkscape + jetbrains-mono + jetbrains.webstorm + kitty + nerd-fonts.space-mono + nodejs_22 + signal-desktop + ]; + + # Configure services + services = { + # hyprpaper, the wallpaper manager + hyprpaper = { + enable = true; + settings = { + preload = [ + "/etc/nixos/modules/users/psljr/theme/wallpaper.jpg" + ]; + + wallpaper = ", /etc/nixos/modules/users/psljr/theme/wallpaper.jpg"; + }; + }; + + # hypridle, the idle daemon + hypridle = { + enable = true; + + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + }; + + listener = [ + { + on-resume = "brightnessctl -r"; + on-timeout = "brightnessctl -s set 10"; + timeout = 240; + } + { + timeout = 900; + on-timeout = "loginctl lock-session"; + } + ]; + }; + }; + + # hyprpolkitagent, the policykit agent + hyprpolkitagent = { + enable = true; + }; + }; + }; +} diff --git a/modules/users/psljr/hyperlock.nix b/modules/users/psljr/hyperlock.nix new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/users/psljr/hyperlock.nix @@ -0,0 +1 @@ + diff --git a/modules/users/psljr/hyprland.nix b/modules/users/psljr/hyprland.nix new file mode 100644 index 0000000..c557fd7 --- /dev/null +++ b/modules/users/psljr/hyprland.nix @@ -0,0 +1,148 @@ +# ./modules/users/psljr/hyprland.nix +# Configure hyprland for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + # Configure hyprland + wayland.windowManager.hyprland = { + enable = true; + settings = { + + # Define variables + "$mod" = "SUPER"; + "$primary_100" = "rgba(FF9955EE)"; + "$primary_200" = "rgba(EF7679EE)"; + "$primary_300" = "rgba(C26793EE)"; + "$primary_400" = "rgba(846294EE)"; + "$primary_500" = "rgba(4C587DEE)"; + "$primary_600" = "rgba(2F4858EE)"; + + # Define auto-run applications + exec-once=[ + "dunst" # Notification daemon + "hypridle" # Idle daemon + "hyprpaper" # Wallpaper + "waybar" # Status bar + ]; + + # Monitor setup + monitor = [ + "eDP-1, preferred, auto, 1" + "DVI-I-1, preferred, auto-left, 1" + ]; + + # Keybinds + bind = [ + "$mod, R, exec, rofi -show drun" + "$mod SHIFT, R, exec, rofi -show run" + "$mod, T, exec, kitty" + "$mod, F, exec, nautilus" + "$mod, C, killactive," + "$mod, M, exec, rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot/logout\"" + "$mod, L, exec, hyprlock" + ", PRINT, exec, hyprshot -m window" + "$mod, PRINT, exec, hyprshot -m output" + "$mod SHIFT, PRINT, exec, hyprshot -m region" + + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 10, workspace, 10" + + "$mod SHIFT, 1, movetoworkspace, 1" + "$mod SHIFT, 2, movetoworkspace, 2" + "$mod SHIFT, 3, movetoworkspace, 3" + "$mod SHIFT, 4, movetoworkspace, 4" + "$mod SHIFT, 5, movetoworkspace, 5" + "$mod SHIFT, 6, movetoworkspace, 6" + "$mod SHIFT, 7, movetoworkspace, 7" + "$mod SHIFT, 8, movetoworkspace, 8" + "$mod SHIFT, 9, movetoworkspace, 9" + "$mod SHIFT, 10, movetoworkspace, 10" + + "$mod, H, layoutmsg, preselect r" + "$mod, V, layoutmsg, preselect d" + "$mod SHIFT, right, resizeactive, 100 0" + "$mod SHIFT, left, resizeactive, -100 0" + + ]; + + # Mouse binds + bindm = [ + "$mod, mouse:272, movewindow" + ]; + + # Multimedia binds + bindel = [ + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ", XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" + ", XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" + ]; + + # Set window rules + windowrule = [ + "suppressevent maximize, class:*" + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" + ]; + + input = { + kb_layout = "us"; + follow_mouse = 1; + }; + + general = { + gaps_in = 4; + gaps_out = 8; + border_size = 2; + "col.active_border" = "$primary_100 $primary_300 45deg"; + "col.inactive_border" = "$primary_500"; + layout = "dwindle"; + }; + + decoration = { + rounding = 5; + rounding_power = 2; + + blur = { + enabled = true; + size = 4; + passes = 1; + }; + + dim_inactive = true; + dim_strength = 0.25; + + shadow = { + enabled = true; + range = 4; + render_power = 2; + color = "rgba(1a1a1aee)"; + }; + }; + + animations.enabled = true; + + dwindle = { + pseudotile = "yes"; + preserve_split = "yes"; + }; + }; + }; + }; +} diff --git a/modules/users/psljr/hyprlock.nix b/modules/users/psljr/hyprlock.nix new file mode 100644 index 0000000..5497b20 --- /dev/null +++ b/modules/users/psljr/hyprlock.nix @@ -0,0 +1,69 @@ +# ./modules/users/psljr/hyprlock.nix +# Configure hyprlock for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + programs.hyprlock = { + enable = true; + + settings = { + general = { + hide_cursor = false; + ignore_empty_input = true; + }; + + auth = { + pam = { + enabled = true; + }; + + fingerprint = { + enabled = true; + ready_message = "Scan fingerprint to unlock..."; + present_message = "Authenticating..."; + retry_delay = 250; + }; + }; + + animations = { + enabled = true; + fade_in = { + duration = 300; + bezier = "easeOutQuint"; + }; + fade_out = { + duration = 300; + bezier = "easeOutQuint"; + }; + }; + + background = [ + { + path = "/etc/nixos/modules/users/psljr/theme/wallpaper.jpg"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + monitor = ""; + size = "200, 50"; + position = "0, -80"; + dots_center = true; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + shadow_passes = 2; + placeholder_text = "Password..."; + hide_input = false; + halign = "center"; + } + ]; + }; + }; + }; +} diff --git a/modules/users/psljr/kitty.nix b/modules/users/psljr/kitty.nix new file mode 100644 index 0000000..a782520 --- /dev/null +++ b/modules/users/psljr/kitty.nix @@ -0,0 +1,82 @@ +# ./modules/users/psljr/kitty.nix +# Configure the kitty terminal emulator for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + programs.kitty = { + enable = true; + + # Set font values + font = { + name = "JetbrainsMono"; + size = 9; + }; + + settings = { + foreground = "#F7F7F7"; + selection_foreground = "#2F4858"; + selection_background = "#f2d5cf"; + dynamic_background_opacity = "yes"; + background_opacity="0.75"; + + cursor_text_color = "#2F4858"; + + url_color = "#f2d5cf"; + + active_tab_foreground = "#232634"; + active_tab_background = "#ca9ee6"; + inactive_tab_foreground = "#F7F7F7"; + inactive_tab_background = "#292c3c"; + tab_bar_background = "#232634"; + + mark1_foreground = "#2F4858"; + mark1_background = "#babbf1"; + mark2_foreground = "#2F4858"; + mark2_background = "#ca9ee6"; + mark3_foreground = "#2F4858"; + mark3_background = "#85c1dc"; + + # The 16 terminal colors + + # Black + color0 = "#51576d"; + color8 = "#626880"; + + # Red + color1 = "#e78284"; + color9 = "#e78284"; + + # Green + color2 = "#a6d189"; + color10 = "#a6d189"; + + # Yellow + color3 = "#e5c890"; + color11 = "#e5c890"; + + # Blue + color4 = "#8caaee"; + color12 = "#8caaee"; + + # Magenta + color5 = "#f4b8e4"; + color13 = "#f4b8e4"; + + # Cyan + color6 = "#81c8be"; + color14 = "#81c8be"; + + # White + color7 = "#b5bfe2"; + color15 = "#a5adce"; + }; + + keybindings = { + "ctrl+c" = "copy_or_interrupt"; + "ctrl+v" = "paste_from_clipboard"; + }; + }; + }; +} diff --git a/modules/users/psljr/rofi.nix b/modules/users/psljr/rofi.nix new file mode 100644 index 0000000..e7543f4 --- /dev/null +++ b/modules/users/psljr/rofi.nix @@ -0,0 +1,120 @@ +# ./modules/users/psljr/rofi.nix +# Configure the rofi launcher for user psljr. + +{ config, lib, pkgs, ... }: + +{ + home-manager.users.psljr = { + programs.rofi = { + enable = true; + + font = "JetbrainsMono 10"; + extraConfig = { + show-icons = true; + }; + + plugins = with pkgs; [ + rofi-calc + rofi-bluetooth + rofi-power-menu + rofi-network-manager + ]; + + theme = let + inherit (config.home-manager.users.psljr.lib.formats.rasi) mkLiteral; + in { + "*" = { + bg0 = mkLiteral "#262626"; + bg1 = mkLiteral "#303030"; + fg0 = mkLiteral "#F7F7F7"; + + accent-color = mkLiteral "#FF9955"; + urgent-color = mkLiteral "#DBBC7F"; + + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@fg0"; + + margin = mkLiteral "0"; + padding = mkLiteral "0"; + spacing = mkLiteral "0"; + }; + + "window" = { + location = mkLiteral "center"; + width = mkLiteral "480"; + border-radius = mkLiteral "5px"; + border = mkLiteral "1px"; + border-color = mkLiteral "#FF995555"; + background-color = mkLiteral "@bg0"; + }; + + "inputbar" = { + spacing = mkLiteral "8px"; + padding = mkLiteral "8px"; + background-color = mkLiteral "@bg1"; + }; + + "prompt, entry, element-icon, element-text" = { + vertical-align = mkLiteral "0.5"; + }; + + "prompt" = { + text-color = mkLiteral "@accent-color"; + }; + + "textbox" = { + padding = mkLiteral "8px"; + background-color = mkLiteral "@bg1"; + }; + + /* + "listview" = { + padding = mkLiteral "4px 0"; + lines = mkLiteral "8"; + columns = mkLiteral "1"; + fixed-height = mkLiteral "false"; + }; + */ + + "element" = { + padding = mkLiteral "8px"; + spaciong = mkLiteral "8px"; + }; + + "element normal normal, element alternate normal" = { + text-color = mkLiteral "@fg0"; + background-color = mkLiteral "@bg0"; + }; + + "element normal urgent, element alternate urgent" = { + text-color = mkLiteral "@urgent-color"; + }; + + "element normal active, element alternate active" = { + text-color = mkLiteral "@accent-color"; + }; + + "element selected" = { + text-color = mkLiteral "@bg0"; + }; + + "element selected normal, element selected active" = { + background-color = mkLiteral "@accent-color"; + text-color = mkLiteral "@bg0"; + }; + + "element selected urgent" = { + background-color = mkLiteral "@urgent-color"; + }; + + "element-icon" = { + size = mkLiteral "0.8em"; + }; + + "element-text" = { + text-color = mkLiteral "inherit"; + }; + }; + }; + }; +} diff --git a/modules/users/psljr/theme/wallpaper.jpg b/modules/users/psljr/theme/wallpaper.jpg new file mode 100644 index 0000000..d42c1d0 Binary files /dev/null and b/modules/users/psljr/theme/wallpaper.jpg differ diff --git a/modules/users/psljr/waybar.nix b/modules/users/psljr/waybar.nix new file mode 100644 index 0000000..6809261 --- /dev/null +++ b/modules/users/psljr/waybar.nix @@ -0,0 +1,162 @@ +# ./modules/users/psljr/waybar.nix +# Configure the waybar status bar for user psljr + +{ config, pkgs, ... }: + +{ + home-manager.users.psljr = { pkgs, ... }: { + programs.waybar = { + enable = true; + + settings = { + mainBar = { + layer = "top"; + position = "top"; + spacing = 4; + + # Define waybar modules + modules-left = [ + "hyprland/window" + ]; + # modules-center = []; + modules-right = [ + "idle_inhibitor" + "network" + "bluetooth" + "cpu" + "memory" + "battery" + "clock" + ]; + + # Module configuration + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + + "network" = { + "format-wifi" = " {essid} ({signalStrength}%)"; + "format-ethernet" = "{ipaddr}/{cidr} "; + "tooltip-format" = "{ifname} via {gwaddr} "; + "format-linked" = "{ifname} (No IP) "; + "format-disconnected" = "Disconnected ⚠"; + "on-click" = "rofi-network-manager"; + }; + + "bluetooth" = { + "format" = " {status}"; + "format-connected" = " {status}"; + "tooltip-format" = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; + "on-click" = "rofi-bluetooth"; + }; + + "cpu" = { + "format" = " {usage}%"; + "tooltip" = true; + }; + + "memory" = { + "format" = " {}%"; + "tooltip" = true; + }; + + "battery" = { + "states" = { + "warning" = 30; + "critical" = 15; + }; + + "format" = "{icon} {capacity}%"; + "format-full" = "{icon} {capacity}%"; + "format-charging" = " {capacity}%"; + "format-plugged" = " {capacity}%"; + "format-alt" = "{time} {icon}"; + "format-icons" = ["" "" "" "" ""]; + }; + + "clock" = { + "format" = "{:%H:%M | %e %B} "; + "tooltip-format" = "{:%Y %B}\n{calendar}"; + }; + }; + }; + + style = '' + * { + /* `otf-font-awesome` and SpaceMono Nerd Font are required to be installed for icons */ + font-family: JetbrainsMono, FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-size: 10px; + transition: background-color .3s ease-out; + } + + window#waybar { + background: rgba(38, 38, 38, 0.75); + color: #F7F7F7; + font-family: + SpaceMono Nerd Font, + feather; + transition: background-color .5s; + } + + .modules-left, + .modules-right + { + background: rgba(0, 0, 8, .7); + margin: 5px 10px; + padding: 5 5px; + border-radius: 10px; + } + .modules-left { + padding: 0 10px; + } + + #clock, + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #tray, + #mode, + #idle_inhibitor, + #scratchpad, + #power-profiles-daemon, + #language, + #mpd { + padding: 0 10px; + border-radius: 10px; + } + + #clock:hover, + #battery:hover, + #cpu:hover, + #memory:hover, + #disk:hover, + #temperature:hover, + #backlight:hover, + #network:hover, + #pulseaudio:hover, + #wireplumber:hover, + #custom-media:hover, + #tray:hover, + #mode:hover, + #idle_inhibitor:hover, + #scratchpad:hover, + #power-profiles-daemon:hover, + #language:hover, + #mpd:hover { + background: rgba(38, 38, 38, 0.9); + } + ''; + }; + }; +}