From 54f3688a13af38d838f90ab878912e9904cf08f7 Mon Sep 17 00:00:00 2001 From: The_miro Date: Fri, 18 Oct 2024 15:47:06 +0200 Subject: [PATCH] created streamlined version of rednix --- Modules/HomeManager.nix | 11 + Modules/greetd.nix | 30 +++ Modules/home/HyprlandHMConf.nix | 362 ++++++++++++++++++++++++++++++++ Modules/home/Starship.nix | 137 ++++++++++++ Modules/home/bash.nix | 25 +++ Modules/home/dunstHMconf.nix | 23 ++ Modules/home/kitty.nix | 26 +++ Modules/home/waybarHMConf.nix | 136 ++++++++++++ Modules/home/waybarTheme.nix | 67 ++++++ Modules/home/wofi.nix | 73 +++++++ Modules/home/zshhome.nix | 35 +++ Modules/hyprland.nix | 67 ++++++ Modules/nanoconf.nix | 86 ++++++++ Modules/pkgs/AssortedTools.nix | 17 ++ Modules/pkgs/Fonts.nix | 19 ++ Modules/pkgs/NetworkTools.nix | 49 +++++ Modules/pkgs/Packages.nix | 43 ++++ Modules/pkgs/grimslurp.nix | 10 + Modules/pkgs/vnc.nix | 18 ++ Modules/sharedHome.nix | 14 ++ Modules/wlfixes.nix | 13 ++ Modules/zsh.nix | 7 + init-red.nix | 12 ++ 23 files changed, 1280 insertions(+) create mode 100644 Modules/HomeManager.nix create mode 100644 Modules/greetd.nix create mode 100644 Modules/home/HyprlandHMConf.nix create mode 100644 Modules/home/Starship.nix create mode 100644 Modules/home/bash.nix create mode 100644 Modules/home/dunstHMconf.nix create mode 100644 Modules/home/kitty.nix create mode 100644 Modules/home/waybarHMConf.nix create mode 100644 Modules/home/waybarTheme.nix create mode 100644 Modules/home/wofi.nix create mode 100644 Modules/home/zshhome.nix create mode 100644 Modules/hyprland.nix create mode 100644 Modules/nanoconf.nix create mode 100644 Modules/pkgs/AssortedTools.nix create mode 100644 Modules/pkgs/Fonts.nix create mode 100644 Modules/pkgs/NetworkTools.nix create mode 100644 Modules/pkgs/Packages.nix create mode 100644 Modules/pkgs/grimslurp.nix create mode 100644 Modules/pkgs/vnc.nix create mode 100644 Modules/sharedHome.nix create mode 100644 Modules/wlfixes.nix create mode 100644 Modules/zsh.nix create mode 100644 init-red.nix diff --git a/Modules/HomeManager.nix b/Modules/HomeManager.nix new file mode 100644 index 0000000..2057e91 --- /dev/null +++ b/Modules/HomeManager.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in +{ + imports = [ + (import "${home-manager}/nixos") + ]; + home-manager.backupFileExtension = "old"; + home-manager.sharedModules = [ ./sharedHome.nix ]; +} diff --git a/Modules/greetd.nix b/Modules/greetd.nix new file mode 100644 index 0000000..e70715e --- /dev/null +++ b/Modules/greetd.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: +let + tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; +in +{ + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${tuigreet} --time --remember --cmd Hyprland"; + user = "greeter"; + }; + }; + }; + + # this is a life saver. + # literally no documentation about this anywhere. + # might be good to write about this... + # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; # Without this errors will spam on screen + # Without these bootlogs will spam on screen + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; + }; +} diff --git a/Modules/home/HyprlandHMConf.nix b/Modules/home/HyprlandHMConf.nix new file mode 100644 index 0000000..5404c77 --- /dev/null +++ b/Modules/home/HyprlandHMConf.nix @@ -0,0 +1,362 @@ +{ config, pkgs, ... }: +{ + wayland.windowManager.hyprland = { + enable = true; + extraConfig = '' + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +#autogenerated = 0 # remove this line to remove the warning + +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +$terminal = kitty +$fileManager = kitty yazi +$menu = fuzzel + + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +# exec-once = $terminal +# exec-once = nm-applet & +# exec-once = waybar & hyprpaper & firefox + + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,40 +env = HYPRCURSOR_SIZE,40 + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 4 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = rgb(E40046) rgb(fc0588) 40deg + col.inactive_border = rgb(5018dd) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 20 + + # Change transparency of focused and unfocused windows + active_opacity = 1 + inactive_opacity = 0.8 + drop_shadow = true + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 3 + + vibrancy = 0.1696 + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = true + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = de + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = true +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +#################### +### KEYBINDINGSS ### +#################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, T, exec, $terminal +bind = $mainMod, Z, exec, $terminal btop +bind = $mainMod, K, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, F, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, H, exec, $menu +bind = $mainMod, D, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle +bind = $mainMod, L, exec, hyprctl dispatch exit 1 + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow +bindm = $mainMod SHIFT, mouse:272, resizewindow + +# Move/rezie windows with Keyboard + +#rofi keybind +bind = $mainMod, R, exec, wofi --show drun +bind = CTRL SHIFT, R, exec, wofi --show drun + +#window location edit mode source: https://www.reddit.com/r/hyprland/comments/14jehzj/comment/jpl5c8f/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button + +#bind = $mainMod, A, submap, fastedit +#submap = fastedit +bind = $mainMod ALT, right, resizeactive, 10 0 +bind = $mainMod ALT, left, resizeactive, -10 0 +bind = $mainMod ALT, up, resizeactive, 0 -10 +bind = $mainMod ALT, down, resizeactive, 0 10 + +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d +#bind = , escape, submap, reset +#submap = reset + +bind = $mainMod, ESC, exec, hyprctl kill + + + +#flameshot +#monitor=eDP-1, preferred, 0x0, 1 +#monitor=DP-1, preferred, 1920x0, 1 +# +#windowrule=fakefullscreen, flameshot +#windowrule=float,flameshot +#windowrule=monitor 0,flameshot +#windowrule=move 0 0,flameshot +#windowrule=workspace 0,flameshot +#windowrule=stayfocused,flameshot + +#screenshot capture +bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy +bind = $mainMod, P, exec, grim -g "$(slurp -d)" - | wl-copy + +#audio controls +binde =, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+ + +binde =, XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%- + +bind =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + +bindle=, XF86MonBrightnessUp, exec, bri --up +bindle=, XF86MonBrightnessDown, exec, bri --down + +bindl=, XF86AudioPlay, exec, playerctl play-pause + +#exec-once = flameshot +#bind = $mainMod, Print, exec, flameshot gui +#bind = $mainMod, Print, exec, XDG_CURRENT_DESKTOP=hyprland flameshot gui -r | wl-copy + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrule v1 +windowrule = float, ^(rofi)$ + +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + +#windowrulev2 = noborder, class:wofi +windowrulev2 = float, class:wofi +windowrulev2 = pin, class:wofi +windowrulev2 = center, class:wofi +windowrulev2 = stayfocused, class:wofi +windowrulev2 = nomaxsize, class:wofi +windowrulev2 = minsize 5 5, class:wofi +windowrulev2 = noshadow, class:wofi + +windowrulev2 = opacity 1 0.8, class:kitty +windowrulev2 = opacity 0.8 0.3, initialTitle:Spotify +windowrulev2 = float, initialTitle:Spotify + + +#sefix +windowrulev2 = float, class:Spaceengineers +windowrulev2 = stayfocused, class:Spaceengineers + +#rwfix +windowrulev2 = tile, class:RimWorldLinux + +windowrulev2 = float, class:Drill.+ +windowrulev2 = fakefullscreen, title:Drill.+ + +windowrule = fakefullscreen, class:steam_app_1217060 +windowrule = fakefullscreen, title:Gunfire Reborn + +windowrule = float, class:steam_app_1217060 +windowrule = float, title:Gunfire Reborn + +#windowrulev2 = fullscreen, class:steam_app_1217060 +#windowrulev2 = fullscreen, title:Gunfire Reborn + +#windowrulev2 = fakefullscreen, title:pico.+ + + +exec-once=bash swww img /ast/bg.jpg ; swww restore +exec-once=bash waybar +exec-once=bash dunst +exec-once=bash nm-applet --indicator + + ''; + }; +} diff --git a/Modules/home/Starship.nix b/Modules/home/Starship.nix new file mode 100644 index 0000000..89950df --- /dev/null +++ b/Modules/home/Starship.nix @@ -0,0 +1,137 @@ +{ config, pkgs, ... }: +{ + programs.starship = { + enable = true; + # Configuration written to ~/.config/starship.toml + settings = { + + add_newline = true; + format = "[](#f50505)$os$username[](bg:#E40046 fg:#f50505)$directory[](fg:#E40046 bg:#5018dd)$git_branch$git_status[](fg:#5018dd bg:#86BBD8)$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala[](fg:#86BBD8 bg:#06969A)$docker_context[](fg:#06969A bg:#5018dd)$time[ ](fg:#5018dd)"; + + # Disable the blank line at the start of the prompt + + + # You can also replace your username with a neat symbol like  or disable this + # and use the os module below + username = { + show_always = true; + style_user = "bg:#f50505"; + style_root = "bg:#f50505"; + format = "[$user ]($style)"; + disabled = false; + }; + + #An alternative to the username module which displays a symbol that + # represents the current operating system + os = { + style = "bg:#f50505"; + disabled = false; # Disabled by default + }; + + directory = { + style = "bg:#E40046"; + format = "[ $path ]($style)"; + truncation_length = 3; + truncation_symbol = "…/"; + }; + + # Here is how you can shorten some long paths by text replacement + # similar to mapped_locations in Oh My Posh: + directory.substitutions = { + "Documents" = "󰈙 "; + "Downloads" = " "; + "Music" = " "; + "Pictures" = " "; + }; + # Keep in mind that the order matters. For example: + # "Important Documents" = " 󰈙 " + # will not be replaced, because "Documents" was already substituted before. + # So either put "Important Documents" before "Documents" or use the substituted version: + # "Important 󰈙 " = " 󰈙 " + + c = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + docker_context = { + symbol = " "; + style = "bg:#06969A"; + format = "[ $symbol $context ]($style)"; + }; + elixir = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + elm = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + git_branch = { + symbol = ""; + style = "bg:#5018dd"; + format = "[ $symbol $branch ]($style)"; + }; + git_status = { + style = "bg:#5018dd"; + format = "[$all_status$ahead_behind ]($style)"; + }; + golang = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + gradle = { + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + haskell = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + java = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + julia = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + nodejs = { + symbol = ""; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + nim = { + symbol = "󰆥 "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + rust = { + symbol = ""; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + scala = { + symbol = " "; + style = "bg:#86BBD8"; + format = "[ $symbol ($version) ]($style)"; + }; + time = { + disabled = false; + time_format = "%R"; # Hour:Minute Format + style = "bg:#5018dd"; + format = "[  $time ]($style)"; + }; + }; + }; + +} + + + diff --git a/Modules/home/bash.nix b/Modules/home/bash.nix new file mode 100644 index 0000000..4e696ce --- /dev/null +++ b/Modules/home/bash.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: +{ +#bash + programs.bash = { + enableCompletion = true; + enable = true; + bashrcExtra = ""; + shellAliases = { + please = "sudo"; + plz = "sudo"; + ll = "ls -l -a"; + update = "sudo nixos-rebuild switch -v"; + ".." = "cd .."; + cdroot = "cd /"; + cdhome = "cd ~"; + snano = "sudo nano"; + cls = "clear"; + icat = "kitten icat --align left "; + ic = "icat"; + imgv = "icat"; + redmatrix = "cmatrix -a -C red"; + rmtx = "redmatrix"; + }; + }; +} diff --git a/Modules/home/dunstHMconf.nix b/Modules/home/dunstHMconf.nix new file mode 100644 index 0000000..fb60a7c --- /dev/null +++ b/Modules/home/dunstHMconf.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +{ + services.dunst.enable = true; + services.dunst.settings = { + global = { + width = 600; + height = 450; + offset = "30x50"; + origin = "top-center"; + transparency = 10; + frame_color = "#5018dd"; + font = "Agave Nerd Font Mono 11"; + corner_radius = 10; + }; + + urgency_normal = { + background = "#292929"; + foreground = "#e40046"; + timeout = 10; + }; + }; + +} diff --git a/Modules/home/kitty.nix b/Modules/home/kitty.nix new file mode 100644 index 0000000..ca840e1 --- /dev/null +++ b/Modules/home/kitty.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: +{ + programs.kitty.enable = true; + #programs.kitty.font.package = pkgs.nerdfonts; + + + + programs.kitty = { + font = { + name = "Agave Nerd Font Mono"; + size = 12; + }; + settings = { + confirm_os_window_close = 0; + dynamic_background_opacity = true; + enable_audio_bell = true; + window_padding_width = 10; + background_opacity = "0.25"; + background_blur = 0; + }; + }; + programs.kitty.shellIntegration.enableZshIntegration = true; +} + + + diff --git a/Modules/home/waybarHMConf.nix b/Modules/home/waybarHMConf.nix new file mode 100644 index 0000000..ed2f4d1 --- /dev/null +++ b/Modules/home/waybarHMConf.nix @@ -0,0 +1,136 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./waybarTheme.nix + ]; + programs.waybar = { + enable = true; + settings = [{ + layer = "top"; + position = "top"; + modules-center = [ + "hyprland/workspaces" + "hyprland/window" + ]; + modules-left = [ + "pulseaudio" + "cpu" + "memory" + "disk" + ]; + modules-right = [ + "battery" + "network" + "tray" + "clock" + ]; + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = "@"; + urgent = "!"; + }; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + format = ''{:L%H:%M}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = "None"; + }; + }; + "memory" = { + interval = 5; + format = "{}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = "{usage:2}%"; + tooltip = true; + }; + "disk" = { + format = "{free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = "  {bandwidthDownOctets}"; + format-wifi = " {icon} {signalStrength}%"; + format-disconnected = " 󰈂 no network"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = "{icon} {format_source}"; + format-muted = "{format_source}"; + format-source = "{volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" + ]; + }; + on-click = "sleep 0.1 && pavucontrol"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "  "; + deactivated = "  "; + }; + tooltip = "true"; + }; + "battery" = { + states = { + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-charging = "󰂄{capacity}%"; + format-plugged = "󱘖{capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + + }]; + }; +} diff --git a/Modules/home/waybarTheme.nix b/Modules/home/waybarTheme.nix new file mode 100644 index 0000000..d953c75 --- /dev/null +++ b/Modules/home/waybarTheme.nix @@ -0,0 +1,67 @@ +{ config, pkgs, ... }:{ programs.waybar.style = '' + + + * { + border: none; + font-family: Agave Nerd Font Mono, Arial, sans-serif; + font-size: 14pt; + background: transparent; + + padding-top: 2px; + padding-bottom: 2px; + padding-right: 6px; + padding-left: 6px; + + margin-top: 1px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 2px; + + border-radius: 30px; + } + + #workspaces button { + border: solid; + border-width: 3px; + background: #1a1a1a; + color: #5018dd; + } + + + #workspaces button.active { + border: solid; + border-width: 3px; + background: #1a1a1a; + color: #E40046; + + } + + #workspaces button.urgent { + border: solid; + border-width: 3px; + background: #E40046; + color: #1a1a1a; + + } + + + #clock, #disk, #window, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor { + border: solid; + border-width: 3px; + background: #1a1a1a; + color: #5018dd; + } + + #idle_inhibitor.activated { + border: solid; + border-width: 3px; + background: #1a1a1a; + color: #E40046; + + } + ''; + +} + + + diff --git a/Modules/home/wofi.nix b/Modules/home/wofi.nix new file mode 100644 index 0000000..05a7bd1 --- /dev/null +++ b/Modules/home/wofi.nix @@ -0,0 +1,73 @@ +{ config, pkgs, ... }: +{ + programs.wofi.enable = true; + programs.wofi.settings = { + location = "center"; + normal_window = true; + allow_markup = true; + width = 700; + height= 400; + }; + programs.wofi.style = + '' + * { + font-family: JetBrains Mono, Agave Nerd Font Mono, Arial, sans-serif; + border-radius: 15px; + font-size: 18pt; + background-color: #1a1a1a; + + padding-top: 1px; + padding-bottom: 1px; + padding-right: 6px; + padding-left: 6px; + + margin-top: 2px; + margin-bottom: 2px; + margin-right: 2px; + margin-left: 2px; + } + + window { + + color: #E40046; + } + #input { + border: solid; + border-width: 4px; + color: #5018dd; + border-radius: 30px; + + + + #padding-top: 15px; + + margin-top: 15px; + padding-right: 15px; + padding-left: 15px; + + margin-right: 15px; + margin-left: 15px; + } + + #entry:selected { + border: solid; + border-width: 4px; + color: #E40046; + border-radius: 30px; + + } + + #inner-box { + } + #scroll{ + margin-bottom: 15px; + padding-bottom: 15px; + + + + } + ''; +} + + + diff --git a/Modules/home/zshhome.nix b/Modules/home/zshhome.nix new file mode 100644 index 0000000..4387bf8 --- /dev/null +++ b/Modules/home/zshhome.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: +{ + #users.defaultUserShell = pkgs.zsh; + + programs.zsh = { + enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + #autosuggestions.enable = true; + shellAliases = { + please = "sudo"; + plz = "sudo"; + ll = "ls -l -a"; + update = "sudo nixos-rebuild switch -v"; + ".." = "cd .."; + cdroot = "cd /"; + cdhome = "cd ~"; + snano = "sudo nano"; + cls = "clear"; + icat = "kitten icat --align left "; + ic = "icat"; + imgv = "icat"; + redmatrix = "cmatrix -a -C red"; + rmtx = "redmatrix"; + }; + history = { + size = 10000; + path = "~/.zsh_history"; + share = true; + save = 10000; + }; + + + }; +} diff --git a/Modules/hyprland.nix b/Modules/hyprland.nix new file mode 100644 index 0000000..329a416 --- /dev/null +++ b/Modules/hyprland.nix @@ -0,0 +1,67 @@ +{ config, pkgs, ... }: +{ + + environment.systemPackages = [ + + pkgs.waybar + (pkgs.waybar.overrideAttrs (oldAttrs: { + mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];})) + + pkgs.dunst + pkgs.libnotify + pkgs.playerctl + pkgs.swww + pkgs.kitty + pkgs.webcord + pkgs.rofi-wayland + #pkgs.hyprlock + pkgs.nwg-dock-hyprland + pkgs.hyprcursor + ]; + + xdg.portal.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + + #security.pam.services.hyprlock = {}; + + sound.enable = true; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + + + + + programs.hyprland = { + enable = true; + #nvidiaPatches = true; + xwayland.enable = true; + }; + + environment.sessionVariables = { + #If your cursor becomes invisible + + WLR_NO_HARDWARE_CURSORS = "1"; + #Hint electron apps to use wayland + NIXOS_OZONE_WL = "1"; + }; + + #services.playerctld.enable = true; + + hardware = { + #Opengl + opengl.enable = true; + + #Most wayland compositors need this + nvidia.modesetting.enable = true; + }; + +} + + diff --git a/Modules/nanoconf.nix b/Modules/nanoconf.nix new file mode 100644 index 0000000..a4b0dd1 --- /dev/null +++ b/Modules/nanoconf.nix @@ -0,0 +1,86 @@ +{ config, pkgs, ... }: +{ + programs.nano.enable = true; + programs.nano.syntaxHighlight = true; + programs.nano.nanorc = '' + # Provides syntax highlighting for C# in nano + +syntax "C#" "\.cs$" +comment "//" + +# Statement Keywords +# Selection +color red "\<(if|else|switch|case)\>" +# Iteration +color red "\<(do|for|foreach|in|while)\>" +# Jumps +color red "\<(break|continue|default|goto|return|yield)\>" +# Exception Handling +color red "\<(throw|try|catch|finally)\>" +# Misc +color brightgreen "\<((un)?checked|fixed|lock)\>" + +# Method Parameters +color brightblue "\<(params|ref|out)\>" + +# Namespace Keywords +color cyan "\<(namespace|using|extern|alias)\>" + +# Operator Keywords +color brightgreen "\<(as|await|is|nameof|sizeof|typeof|stackalloc)\>" + +# Conversion Keywords +color cyan "\<(explicit|implicit|operator)\>" + +# Access Keywords +color green "\<(base|this)\>" + +# Query Keywords +color brightgreen "\<(from|where|select|group|into|orderby|join|let|on|equals|by|ascending|descending)\>" + +# Contextual Keywords +color brightgreen "\<(add|async|dynamic|get|global|remove|set|value|when)\>" + +# Modifiers +# Access +color cyan "\<(public|protected|internal|private)\>" +# Members +color cyan "\<(const|event|new|override|readonly|static|unsafe|virtual|volatile)\>" +# Classes +color cyan "\<(abstract|partial|sealed)\>" + +# Labels +color brightblue "\<.*:" + +# Types +# Primitives +color green "\<(bool|s?byte|char|decimal|double|float|u?int|u?long|u?short)\>" +# Reference types +color cyan "\<(class|struct|delegate|object|string)\>" +# Misc +color red "\<(void|var|enum)\>" + +# Literals +color brightyellow "\<(true|false|null)\>" +icolor brightyellow "\<0x[0-9a-f]+\>" +color brightyellow "\<[0-9]+\>" +color brightyellow "\<0b[01]+\>" +icolor brightyellow "\<[0-9]*\.[0-9]+(e[0-9]+)?\>" +color red "\"([^\"\\]|\\.)*\"" +color brightred "'.'" + +# Preprocessor Directives +color brightblue "#(if|else|elif|endif|define|undef|warning|error|line|(end)?region|pragma)" + +# Comments +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" + + ''; +} + + + diff --git a/Modules/pkgs/AssortedTools.nix b/Modules/pkgs/AssortedTools.nix new file mode 100644 index 0000000..7626a99 --- /dev/null +++ b/Modules/pkgs/AssortedTools.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.flameshot + pkgs.libreoffice + pkgs.gimp-with-plugins + pkgs.inkscape + pkgs.nyxt + pkgs.spotify + pkgs.vlc + pkgs.audacity + pkgs.obs-studio + pkgs.hollywood + pkgs.flameshot + pkgs.krita + ]; +} diff --git a/Modules/pkgs/Fonts.nix b/Modules/pkgs/Fonts.nix new file mode 100644 index 0000000..fa6cc04 --- /dev/null +++ b/Modules/pkgs/Fonts.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.nerdfonts + pkgs.winePackages.fonts + ]; + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + liberation_ttf + fira-code + fira-code-symbols + mplus-outline-fonts.githubRelease + dina-font + proggyfonts + nerdfonts + ]; +} diff --git a/Modules/pkgs/NetworkTools.nix b/Modules/pkgs/NetworkTools.nix new file mode 100644 index 0000000..8f54582 --- /dev/null +++ b/Modules/pkgs/NetworkTools.nix @@ -0,0 +1,49 @@ +{ config, pkgs, ... }: +{ + nixpkgs.config.permittedInsecurePackages = [ + "pulsar-1.117.0" + "tightvnc-1.3.10" + ]; + environment.systemPackages = [ + pkgs.wireshark + pkgs.angryipscanner + pkgs.drawio + pkgs.vscode + pkgs.mono + pkgs.fastfetch + pkgs.netrw + pkgs.netop + pkgs.netdata + #pkgs.pulsar + pkgs.wireguard-tools + pkgs.nmap + pkgs.wireshark-cli + #pkgs.pyqt5 + pkgs.python312Packages.manuf + pkgs.dig + pkgs.inetutils + #pkgs.wireguard + #pkgs.wireguard-tools + pkgs.dotnet-sdk_8 + pkgs.imagemagick + pkgs.exif + pkgs.netcat-gnu + pkgs.distrobox + pkgs.powershell + pkgs.pulsar + pkgs.tor + pkgs.torsocks + ]; + services.tor.enable = true; + #boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ]; + #environment.systemPackages = [ pkgs.wireguard pkgs.wireguard-tools ]; + +# programs.wireshark.enable = true; +# security.sudo.extraConfig = '' +# Defaults env_keep += "WAYLAND_DISPLAY wayland-1" +# ''; + + + programs.wireshark.enable = true; + +} diff --git a/Modules/pkgs/Packages.nix b/Modules/pkgs/Packages.nix new file mode 100644 index 0000000..aa18539 --- /dev/null +++ b/Modules/pkgs/Packages.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.fastfetch + pkgs.wget + pkgs.curl + pkgs.lynx + pkgs.gimp-with-plugins + pkgs.inkscape + pkgs.firefox-unwrapped + pkgs.rustdesk + pkgs.yazi + pkgs.git + pkgs.spotify + pkgs.python312Packages.gpustat + pkgs.nextcloud-client + pkgs.zip + pkgs.unzip + pkgs.swayimg + pkgs.virtualbox + pkgs.parted + pkgs.onlyoffice-bin + pkgs.lsof + pkgs.konsole + #pkgs.openrgb + pkgs.gtop + pkgs.btop + pkgs.nvtopPackages.full + pkgs.sl + pkgs.cmatrix + pkgs.aalib + pkgs.jp2a + pkgs.pipes + pkgs.tty-clock + pkgs.hackertyper + pkgs.hollywood + ]; + #services.hardware.openrgb.enable = true; + +} + + + diff --git a/Modules/pkgs/grimslurp.nix b/Modules/pkgs/grimslurp.nix new file mode 100644 index 0000000..dde1195 --- /dev/null +++ b/Modules/pkgs/grimslurp.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.grim + pkgs.slurp + ]; +} + + + diff --git a/Modules/pkgs/vnc.nix b/Modules/pkgs/vnc.nix new file mode 100644 index 0000000..3baa982 --- /dev/null +++ b/Modules/pkgs/vnc.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.wayvnc + pkgs.tigervnc + pkgs.xrdp + pkgs.wlvncc + pkgs.tightvnc + pkgs.turbovnc + pkgs.krdc + ]; + networking.firewall.enable = true; + networking.firewall.allowedTCPPorts = [ 5900 ]; + + nixpkgs.config.permittedInsecurePackages = [ + "tightvnc-1.3.10" + ]; +} diff --git a/Modules/sharedHome.nix b/Modules/sharedHome.nix new file mode 100644 index 0000000..54fe2d2 --- /dev/null +++ b/Modules/sharedHome.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ./home/bash.nix + ./home/dunstHMconf.nix + ./home/HyprlandHMConf.nix + ./home/kitty.nix + ./home/Starship.nix + ./home/waybarHMConf.nix + ./home/waybarTheme.nix + ./home/wofi.nix + ./home/zshhome.nix + ]; +} diff --git a/Modules/wlfixes.nix b/Modules/wlfixes.nix new file mode 100644 index 0000000..71823ce --- /dev/null +++ b/Modules/wlfixes.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.meson + pkgs.wayland-protocols + pkgs.wayland-utils + pkgs.wl-clipboard + pkgs.wlroots + ]; +} + + + diff --git a/Modules/zsh.nix b/Modules/zsh.nix new file mode 100644 index 0000000..0197697 --- /dev/null +++ b/Modules/zsh.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: +{ + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + environment.shells = with pkgs; [ zsh ]; + programs.zsh.autosuggestions.enable = true; +} diff --git a/init-red.nix b/init-red.nix new file mode 100644 index 0000000..d679747 --- /dev/null +++ b/init-red.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ./Modules/greetd.nix + ./Modules/HomeManager.nix + ./Modules/hyprland.nix + ./Modules/nanoconf.nix + ./Modules/sharedHome.nix + ./Modules/wlfixes.nix + ./Modules/zsh.nix + ]; +}