From 1544cc30ad41fd8faa7b3eba375a5fc0762f3bbc Mon Sep 17 00:00:00 2001 From: Sayuop Date: Thu, 20 Nov 2025 18:48:39 +0100 Subject: [PATCH] Inital commit for theming --- .gitignore | 7 -- configuration.nix | 29 +++++--- flake.nix | 5 +- hardware-configuration.nix | 13 ++-- home/home.nix | 59 ++++++++++------ home/hyprland.nix | 141 +++++++++++++++++++++++++++++++++++-- home/kitty.nix | 73 +++++++++++++++++++ home/rofi.nix | 91 ++++++++++++++++++++++++ home/waybar.nix | 113 ++++++++++++++--------------- modules/hyprland.nix | 21 +++--- modules/system.nix | 13 ++-- 11 files changed, 436 insertions(+), 129 deletions(-) create mode 100644 home/kitty.nix create mode 100644 home/rofi.nix diff --git a/.gitignore b/.gitignore index 21d65d4..ae28bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ -# Hardware configuration is machine-specific -# Uncomment if you don't want to track it -# hardware-configuration.nix - -# Flake lock file - comment out if you want reproducible builds -# flake.lock - # Result symlinks from nix build result result-* diff --git a/configuration.nix b/configuration.nix index 0879e50..10065bc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,20 +7,16 @@ ./modules/hyprland.nix ]; - # Bootloader - BIOS/Legacy (for Proxmox with legacy BIOS) + # Bootloader - BIOS/Legacy (forlegacy BIOS) boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; - - # If you're using UEFI instead, comment out above and use: - # boot.loader.systemd-boot.enable = true; - # boot.loader.efi.canTouchEfiVariables = true; # Networking - networking.hostName = "myhost"; # Change this to your hostname + networking.hostName = "MYHOST"; networking.networkmanager.enable = true; # Time zone - time.timeZone = "Europe/Oslo"; # Adjust to your timezone + time.timeZone = "Europe/Oslo"; # Locale i18n.defaultLocale = "en_US.UTF-8"; @@ -42,14 +38,29 @@ # User account users.users.YOURUSERNAME = { isNormalUser = true; - description = "Your Name"; + description = "Crib"; extraGroups = [ "networkmanager" "wheel" "video" "audio" ]; shell = pkgs.zsh; }; + # Auto-login to Hyprland + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; + user = "YOURUSERNAME"; + }; + initial_session = { + command = "Hyprland"; + user = "YOURUSERNAME"; + }; + }; + }; + # Allow unfree packages nixpkgs.config.allowUnfree = true; # System version - system.stateVersion = "24.05"; # Don't change this + system.stateVersion = "24.05"; } diff --git a/flake.nix b/flake.nix index a850770..3f89105 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "NixOS Configuration with Hyprland"; + description = "NixOS Configuration with Hyprland - Themed Setup"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -14,8 +14,7 @@ outputs = { self, nixpkgs, home-manager, hyprland, ... }@inputs: { nixosConfigurations = { - # Replace 'myhost' with your hostname - myhost = nixpkgs.lib.nixosSystem { + MYHOST = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 2b684a0..58c2fac 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,6 +1,5 @@ -# This is a template hardware configuration file -# On a fresh install, this will be replaced by the actual hardware configuration -# generated by nixos-generate-config or copied from /etc/nixos/hardware-configuration.nix +# This file will be generated automatically during installation +# by nixos-generate-config or copied from /etc/nixos/hardware-configuration.nix { config, lib, pkgs, modulesPath, ... }: @@ -9,21 +8,19 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - # This is a placeholder - it will be replaced during bootstrap - # Your actual hardware configuration will be generated based on your system - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + # These will be auto-generated fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; + device = "/dev/sda3"; fsType = "ext4"; }; fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; + device = "/dev/sda2"; fsType = "vfat"; }; diff --git a/home/home.nix b/home/home.nix index 873ab32..3714ea4 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,14 +1,13 @@ { config, pkgs, inputs, ... }: { - # Home Manager needs a bit of information about you and the paths it should manage - home.username = "crib"; - home.homeDirectory = "/home/crib"; + home.username = "YOURUSERNAME"; + home.homeDirectory = "/home/YOURUSERNAME"; # Packages to install for this user home.packages = with pkgs; [ # Browsers - firefox + chromium # Communication discord @@ -20,26 +19,35 @@ vscode # Terminal tools - neofetch + fastfetch # Additional ricing tools cava # Audio visualizer cmatrix # Matrix effect pipes # Animated pipes + + # Screenshot tools + slurp + grim + + # Color tools + python311Packages.pywal ]; - # Import Hyprland home config + # Import module configs imports = [ ./hyprland.nix ./waybar.nix + ./rofi.nix + ./kitty.nix ]; - # Git configuration (updated API) + # Git configuration programs.git = { enable = true; settings = { user = { - name = "Your Name"; + name = "YOURUSERNAME"; email = "your.email@example.com"; }; }; @@ -57,31 +65,42 @@ ls = "eza"; cat = "bat"; vim = "nvim"; - update = "sudo nixos-rebuild switch --flake ~/.config/nixos#myhost"; + update = "sudo nixos-rebuild switch --flake ~/.config/nixos#cribnix"; + rebuild = "sudo nixos-rebuild switch --flake ~/.config/nixos#cribnix"; }; oh-my-zsh = { enable = true; theme = "robbyrussell"; - plugins = [ "git" "sudo" "docker" "kubectl" ]; + plugins = [ "git" "sudo" ]; }; }; - # Kitty terminal configuration (updated API) - programs.kitty = { + # Starship prompt (vyrx uses this) + programs.starship = { enable = true; - themeFile = "tokyo_night_night"; - font.name = "JetBrainsMono Nerd Font"; - font.size = 12; settings = { - background_opacity = "0.9"; - confirm_os_window_close = 0; + add_newline = false; + format = "$directory$git_branch$git_status$character"; + + directory = { + truncation_length = 3; + truncate_to_repo = true; + }; + + character = { + success_symbol = "[❯](bold green)"; + error_symbol = "[❯](bold red)"; + }; + + git_branch = { + format = "[$symbol$branch]($style) "; + style = "bold purple"; + }; }; }; - # This value determines the Home Manager release + # Home Manager home.stateVersion = "24.05"; - - # Let Home Manager install and manage itself programs.home-manager.enable = true; } diff --git a/home/hyprland.nix b/home/hyprland.nix index 6436f3b..f2eaf48 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -6,18 +6,36 @@ xwayland.enable = true; settings = { + # Monitor configuration monitor = ",preferred,auto,1"; + # Startup applications exec-once = [ "waybar" - "dunst" + "swaync" + "swww init" + "nm-applet --indicator" + "blueman-applet" ]; + # Environment variables + env = [ + "XCURSOR_SIZE,24" + "QT_QPA_PLATFORMTHEME,qt5ct" + ]; + + # Input configuration input = { kb_layout = "us"; follow_mouse = 1; + sensitivity = 0; + + touchpad = { + natural_scroll = true; + }; }; + # General settings - Nord inspired general = { gaps_in = 5; gaps_out = 10; @@ -25,28 +43,143 @@ layout = "dwindle"; }; + # Decoration - clean minimal look decoration = { - rounding = 10; + rounding = 8; + + blur = { + enabled = true; + size = 6; + passes = 2; + }; + + drop_shadow = true; + shadow_range = 20; + shadow_render_power = 3; }; + # Animations - smooth like vyrx + animations = { + enabled = true; + + bezier = [ + "wind, 0.05, 0.9, 0.1, 1.05" + "winIn, 0.1, 1.1, 0.1, 1.1" + "winOut, 0.3, -0.3, 0, 1" + "liner, 1, 1, 1, 1" + ]; + + animation = [ + "windows, 1, 6, wind, slide" + "windowsIn, 1, 6, winIn, slide" + "windowsOut, 1, 5, winOut, slide" + "windowsMove, 1, 5, wind, slide" + "border, 1, 1, liner" + "borderangle, 1, 30, liner, loop" + "fade, 1, 10, default" + "workspaces, 1, 5, wind" + ]; + }; + + # Layout + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_is_master = true; + }; + + # Gestures + gestures = { + workspace_swipe = true; + }; + + # Misc + misc = { + force_default_wallpaper = 0; + disable_hyprland_logo = true; + disable_splash_rendering = true; + }; + + # Window rules + windowrulev2 = [ + "suppressevent maximize, class:.*" + "float, class:^(pavucontrol)$" + "float, class:^(blueman-manager)$" + "float, class:^(nm-connection-editor)$" + ]; + + # Keybindings "$mainMod" = "SUPER"; bind = [ + # Program launches "$mainMod, Return, exec, kitty" "$mainMod, Q, killactive," "$mainMod, M, exit," - "$mainMod, D, exec, wofi --show drun" + "$mainMod, E, exec, thunar" + "$mainMod, V, togglefloating," + "$mainMod, D, exec, rofi -show drun" + "$mainMod, P, pseudo," + "$mainMod, J, togglesplit," "$mainMod, F, fullscreen," + + # Screenshot + "$mainMod SHIFT, S, exec, grim -g \"$(slurp)\" - | wl-copy" + ", Print, exec, grim -g \"$(slurp)\" ~/Pictures/screenshot_$(date +%Y%m%d_%H%M%S).png" + + # Move focus + "$mainMod, left, movefocus, l" + "$mainMod, right, movefocus, r" + "$mainMod, up, movefocus, u" + "$mainMod, down, movefocus, d" + + # Switch workspaces "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" "$mainMod, 3, workspace, 3" "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to workspace + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + + # Scroll through workspaces + "$mainMod, mouse_down, workspace, e+1" + "$mainMod, mouse_up, workspace, e-1" ]; + # Mouse bindings bindm = [ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ]; + + # Volume and brightness keys + bindel = [ + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ", XF86MonBrightnessUp, exec, brightnessctl s 10%+" + ", XF86MonBrightnessDown, exec, brightnessctl s 10%-" + ]; }; }; -} \ No newline at end of file +} diff --git a/home/kitty.nix b/home/kitty.nix new file mode 100644 index 0000000..f0242a6 --- /dev/null +++ b/home/kitty.nix @@ -0,0 +1,73 @@ +{ config, pkgs, ... }: + +{ + programs.kitty = { + enable = true; + font = { + name = "JetBrainsMono Nerd Font"; + size = 12; + }; + + settings = { + # Nord theme colors + background = "#2e3440"; + foreground = "#d8dee9"; + + # Cursor + cursor = "#d8dee9"; + cursor_text_color = "#2e3440"; + + # Selection + selection_background = "#4c566a"; + selection_foreground = "#eceff4"; + + # Black + color0 = "#3b4252"; + color8 = "#4c566a"; + + # Red + color1 = "#bf616a"; + color9 = "#bf616a"; + + # Green + color2 = "#a3be8c"; + color10 = "#a3be8c"; + + # Yellow + color3 = "#ebcb8b"; + color11 = "#ebcb8b"; + + # Blue + color4 = "#81a1c1"; + color12 = "#81a1c1"; + + # Magenta + color5 = "#b48ead"; + color13 = "#b48ead"; + + # Cyan + color6 = "#88c0d0"; + color14 = "#8fbcbb"; + + # White + color7 = "#e5e9f0"; + color15 = "#eceff4"; + + # Window + background_opacity = "0.95"; + window_padding_width = 8; + + # Misc + confirm_os_window_close = 0; + enable_audio_bell = false; + + # Tab bar + tab_bar_style = "powerline"; + tab_powerline_style = "slanted"; + active_tab_foreground = "#2e3440"; + active_tab_background = "#88c0d0"; + inactive_tab_foreground = "#d8dee9"; + inactive_tab_background = "#3b4252"; + }; + }; +} diff --git a/home/rofi.nix b/home/rofi.nix new file mode 100644 index 0000000..1e2d338 --- /dev/null +++ b/home/rofi.nix @@ -0,0 +1,91 @@ +{ config, pkgs, ... }: + +{ + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + + theme = let + inherit (config.lib.formats.rasi) mkLiteral; + in { + "*" = { + bg = mkLiteral "#2e3440"; + bg-alt = mkLiteral "#3b4252"; + fg = mkLiteral "#eceff4"; + fg-alt = mkLiteral "#d8dee9"; + + accent = mkLiteral "#88c0d0"; + urgent = mkLiteral "#bf616a"; + + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@fg"; + + margin = 0; + padding = 0; + spacing = 0; + }; + + "window" = { + location = mkLiteral "center"; + width = 600; + background-color = mkLiteral "@bg"; + border = mkLiteral "2px"; + border-color = mkLiteral "@accent"; + border-radius = mkLiteral "12px"; + }; + + "inputbar" = { + padding = mkLiteral "12px"; + spacing = mkLiteral "12px"; + children = mkLiteral "[prompt, entry]"; + background-color = mkLiteral "@bg-alt"; + }; + + "prompt, entry, element-text, element-icon" = { + vertical-align = mkLiteral "0.5"; + }; + + "prompt" = { + text-color = mkLiteral "@accent"; + }; + + "listview" = { + lines = 8; + columns = 1; + padding = mkLiteral "8px 0"; + background-color = mkLiteral "@bg"; + }; + + "element" = { + padding = mkLiteral "8px 12px"; + spacing = mkLiteral "8px"; + background-color = mkLiteral "transparent"; + }; + + "element normal.normal" = { + text-color = mkLiteral "@fg"; + }; + + "element selected.normal" = { + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@accent"; + }; + + "element-icon" = { + size = mkLiteral "1em"; + }; + + "element-text" = { + text-color = mkLiteral "inherit"; + }; + }; + + extraConfig = { + modi = "drun,run"; + show-icons = true; + drun-display-format = "{name}"; + disable-history = false; + sidebar-mode = false; + }; + }; +} diff --git a/home/waybar.nix b/home/waybar.nix index 45fda7c..a954c35 100644 --- a/home/waybar.nix +++ b/home/waybar.nix @@ -8,7 +8,8 @@ mainBar = { layer = "top"; position = "top"; - height = 30; + height = 34; + spacing = 8; modules-left = [ "hyprland/workspaces" "hyprland/window" ]; modules-center = [ "clock" ]; @@ -18,53 +19,37 @@ format = "{icon}"; on-click = "activate"; format-icons = { - "1" = "󰲠"; - "2" = "󰲢"; - "3" = "󰲤"; - "4" = "󰲦"; - "5" = "󰲨"; - "6" = "󰲪"; - "7" = "󰲬"; - "8" = "󰲮"; - "9" = "󰲰"; - "10" = "󰿬"; + "1" = "一"; + "2" = "二"; + "3" = "三"; + "4" = "四"; + "5" = "五"; + "6" = "六"; + "7" = "七"; + "8" = "八"; + "9" = "九"; + "10" = "十"; + active = ""; + default = ""; }; }; "hyprland/window" = { format = "{}"; separate-outputs = true; + max-length = 50; }; clock = { - format = "󰃰 {:%H:%M}"; - format-alt = "󰃰 {:%A, %B %d, %Y (%R)}"; + format = "{:%H:%M}"; + format-alt = "{:%A, %B %d, %Y}"; tooltip-format = "{calendar}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; - }; - }; }; pulseaudio = { format = "{icon} {volume}%"; - format-muted = "󰝟 Muted"; + format-muted = "󰝟"; format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; default = [ "" "" "" ]; }; on-click = "pavucontrol"; @@ -72,10 +57,9 @@ network = { format-wifi = " {essid}"; - format-ethernet = "󰈀 Wired"; - format-disconnected = "󰤭 Disconnected"; - tooltip-format = "{ifname} via {gwaddr}"; - tooltip-format-wifi = "{essid} ({signalStrength}%)"; + format-ethernet = "󰈀"; + format-disconnected = "󰤭"; + tooltip-format = "{ifname}: {ipaddr}"; on-click = "nm-connection-editor"; }; @@ -86,7 +70,6 @@ memory = { format = " {}%"; - tooltip-format = "RAM: {used:0.1f}G / {total:0.1f}G"; }; battery = { @@ -97,11 +80,10 @@ format = "{icon} {capacity}%"; format-charging = "󰂄 {capacity}%"; format-plugged = " {capacity}%"; - format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" ]; }; tray = { - icon-size = 18; spacing = 10; }; }; @@ -109,37 +91,42 @@ style = '' * { - border: none; - border-radius: 0; font-family: "JetBrainsMono Nerd Font"; font-size: 13px; min-height: 0; + border: none; + border-radius: 0; } window#waybar { - background: rgba(30, 30, 46, 0.9); - color: #cdd6f4; + background: rgba(46, 52, 64, 0.95); + color: #eceff4; + } + + #workspaces { + margin: 0 4px; } #workspaces button { - padding: 0 10px; - color: #cdd6f4; + padding: 0 12px; + color: #d8dee9; background: transparent; border-bottom: 3px solid transparent; } #workspaces button.active { - color: #89b4fa; - border-bottom: 3px solid #89b4fa; + color: #88c0d0; + border-bottom: 3px solid #88c0d0; } #workspaces button:hover { - background: rgba(137, 180, 250, 0.2); + background: rgba(136, 192, 208, 0.1); } #window { - margin: 0 10px; - color: #cdd6f4; + margin: 0 8px; + color: #d8dee9; + font-weight: normal; } #clock, @@ -147,28 +134,32 @@ #cpu, #memory, #network, - #pulseaudio, - #tray { - padding: 0 10px; - margin: 0 2px; - background: rgba(49, 50, 68, 0.8); - border-radius: 5px; + #pulseaudio { + padding: 0 12px; + margin: 4px 2px; + background: rgba(59, 66, 82, 0.8); + border-radius: 8px; + color: #eceff4; } #battery.charging { - color: #a6e3a1; + color: #a3be8c; } #battery.warning:not(.charging) { - color: #f9e2af; + color: #ebcb8b; } #battery.critical:not(.charging) { - color: #f38ba8; + color: #bf616a; } #pulseaudio.muted { - color: #f38ba8; + color: #bf616a; + } + + #tray { + padding: 0 8px; } ''; }; diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 3944416..fdbd144 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -10,7 +10,7 @@ xwayland.enable = true; }; - # Hyprland-related packages + # Hyprland-related packages (using Rofi instead of Wofi) environment.systemPackages = with pkgs; [ # Core Hyprland tools hyprpaper # Wallpaper utility @@ -18,11 +18,12 @@ hypridle # Idle daemon hyprlock # Screen locker - # Wayland essentials + # Wayland essentials waybar # Status bar - wofi # Application launcher + rofi-wayland # Application launcher (vyrx uses Rofi) dunst # Notification daemon - swww # Wallpaper daemon (alternative to hyprpaper) + swww # Wallpaper daemon + swaync # Notification center (vyrx uses this) # Screenshot and recording grim # Screenshot tool @@ -47,18 +48,12 @@ # Brightness control brightnessctl - # Additional tools for ricing - jq # JSON processor (for scripts) - socat # Socket tools - wlogout # Logout menu - nwg-look # GTK theme config + # Additional tools for theming libsForQt5.qt5ct # Qt5 config kdePackages.qt6ct # Qt6 config + nwg-look # GTK theme config ]; - # XDG Desktop Portal is configured by Hyprland module - # No need to configure it again here - # Security - for screen locking security.pam.services.hyprlock = {}; @@ -70,6 +65,6 @@ font-awesome nerd-fonts.jetbrains-mono nerd-fonts.fira-code - nerd-fonts.droid-sans-mono + nerd-fonts.iosevka ]; } diff --git a/modules/system.nix b/modules/system.nix index 8c75bc5..c9494cd 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -23,7 +23,7 @@ ranger lf - # Terminal + # Terminals kitty alacritty @@ -44,9 +44,14 @@ eza tldr tree + jq + + # Theme tools + imagemagick + pywal ]; - # Enable sound with PipeWire (removed deprecated sound.enable) + # Enable sound with PipeWire services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -60,7 +65,7 @@ # Enable CUPS for printing services.printing.enable = true; - # Enable graphics (updated from hardware.opengl) + # Enable graphics hardware.graphics = { enable = true; enable32Bit = true; @@ -76,7 +81,7 @@ # Enable ZSH programs.zsh.enable = true; - # Enable dconf (required for some applications) + # Enable dconf programs.dconf.enable = true; # XDG portals for Wayland