diff --git a/configuration.nix b/configuration.nix index 1b7c93e..ba44673 100644 --- a/configuration.nix +++ b/configuration.nix @@ -95,59 +95,7 @@ # }; }; - # Packages - environment.systemPackages = with pkgs; [ - # Games - modrinth-app - heroic - # Media - vlc - stremio - tauon - feishin - obs-studio - - # Social - signal-desktop - vesktop - element-desktop - - # Notification Manager - mako - - # Launcher - rofi - - # Other - gimp - zed-editor - lmms - vscodium - obsidian - nautilus - coppwr - ungoogled-chromium - - # CLI tools - wineWow64Packages.stagingFull # Wine - nh # Nix CLI helper - fd # Fast "find" command alternative - btop-cuda # CLI Task manager - gdu # filesize usage CLI tool - bat # Nicer "cat" alternative - dysk # Diskusage CLI tool - fastfetch # system information - - # Deps - polkit_gnome - gnome-keyring - gcr # Added for compatibility with gnome-keyring packages - niri # Niri DE - - # Theming (mostly for nautilus and other gnome apps) - adwaita-icon-theme - adw-gtk3 - ]; + nix.package = pkgs.lixPackageSets.stable.lix; # Programs configuration programs = { @@ -237,4 +185,5 @@ # This is used for compatibility. # Do NOT change this after installing. system.stateVersion = "25.11"; + } diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..bdc4b63 --- /dev/null +++ b/home.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + imports = [ + ./programs.nix + ./packages.nix + ./hyprland.nix + ./rofi.nix + ./hyprpanel.nix + ./spicetify.nix + ./services.nix + ]; + + home.username = "pissbrick"; + home.homeDirectory = "/home/pissbrick"; + home.stateVersion = "25.11"; + + gtk.gtk4.theme = null; +} diff --git a/hyprpanel.nix b/hyprpanel.nix new file mode 100644 index 0000000..6827a8c --- /dev/null +++ b/hyprpanel.nix @@ -0,0 +1,89 @@ +{ pkgs, lib, ... }: + +# Just put your API key in the path once you're on Nix +let + secretPath = "/etc/nixos"; + + weatherKey = "${secretPath}/weather-api-key.json"; + weatherLocation = lib.strings.trim (builtins.readFile ./weather-location.txt); + + staticLayout = { + left = [ + "workspaces" + "media" + "volume" + ]; + middle = [ + "notifications" + "clock" + ]; + right = [ + "systray" + "bluetooth" + "battery" + "power" + ]; + }; + + # Generate layout for monitors 0-10 plus a "default" entry + universalLayout = + builtins.listToAttrs ( + map (i: { + name = toString i; + value = staticLayout; + }) (lib.range 0 10) + ) + // { + "default" = staticLayout; + }; +in +{ + programs.hyprpanel = { + settings = { + "bar.layouts" = universalLayout; + "bar.clock.format" = "%I:%M %p"; + + # Optional: Change the refresh rate (in milliseconds) + "bar.cpu.interval" = 2000; + + # --- NOTIFICATIONS --- + "notifications.position" = "TOP"; + "bar.notifications.show_total" = true; + + # --- UNIFIED COLOR --- + "theme.bar.buttons.monochrome" = true; + "theme.bar.menus.monochrome" = true; + + "theme.bar.buttons.style" = "split"; + "theme.bar.buttons.workspaces.active" = "#89b4fa"; + "theme.bar.buttons.workspaces.active_background" = "#89b4fa"; + + "theme.bar.buttons.clock.color" = "#89b4fa"; + "theme.bar.buttons.notifications.color" = "#89b4fa"; + "theme.bar.buttons.volume.color" = "#89b4fa"; + "theme.bar.buttons.network.color" = "#89b4fa"; + "theme.bar.buttons.bluetooth.color" = "#89b4fa"; + "theme.bar.buttons.systray.color" = "#89b4fa"; + "theme.bar.buttons.power.color" = "#89b4fa"; + + "theme.osd.label" = "#89b4fa"; + "theme.bar.menus.text" = "#89b4fa"; + + # --- BAR HEIGHT & SCALING --- + "theme.font.size" = "14px"; + "theme.bar.buttons.padding_y" = "4px"; + "theme.bar.buttons.padding_x" = "12px"; + "theme.bar.outer_spacing" = "8px"; + "theme.bar.buttons.spacing" = "4px"; + + # --- VISUALS --- + "theme.bar.transparent" = true; + "theme.bar.buttons.background_opacity" = 80; + + "menus.dashboard.controls.media.show" = false; + "menus.clock.weather.unit" = "imperial"; + "menus.clock.weather.location" = weatherLocation; + "menus.clock.weather.key" = weatherKey; + }; + }; +} diff --git a/packages.nix b/packages.nix new file mode 100644 index 0000000..8464a87 --- /dev/null +++ b/packages.nix @@ -0,0 +1,81 @@ +{ pkgs, inputs, ... }: + +{ + home.packages = with pkgs; [ + + # Games + heroic + modrinth-app + + # Media + vlc + stremio + tauon + feishin + obs-studio + grayjay + lmms + + # Social + signal-desktop + vesktop + element-desktop + + # Launcher + rofi + + # Utility + hyprshot + gnome-calculator + gimp + + # Other + ntfs3g + exfat + git + lxqt.lxqt-openssh-askpass + libnotify + obsidian + nautilus + inputs.zen-browser.packages."${stdenv.hostPlatform.system}".twilight + usbutils + udiskie + gvfs + pavucontrol + bibata-cursors + brgenml1lpr + loupe + nixfmt + wineWow64Packages.stagingFull # Wine + nh # Nix CLI helper + fd # Fast "find" command alternative + btop-cuda # CLI Task manager + gdu # filesize usage CLI tool + bat # Nicer "cat" alternative + dysk # Diskusage CLI tool + fastfetch # system information + p7zip + lm_sensors + nixd + bluez + bluez-tools + openssl + rclone + hyprpolkitagent + qbittorrent + + # Deps + polkit-gnome + gnome-keyring + gcr # Added for compatibility with gnome-keyring packages + niri # Niri DE + + # theming (Most for nautilus and other gnome apps) + adwaitia-icon-theme + adw-gtk3 + ]; + + nix.package = pkgs.lixPackageSets.stable.lix; + # package manager that makes package management reliable and reproducible + +} diff --git a/rofi.nix b/rofi.nix new file mode 100644 index 0000000..5b37201 --- /dev/null +++ b/rofi.nix @@ -0,0 +1,100 @@ +{ config, pkgs, ... }: + +{ + programs.rofi = { + enable = true; + package = pkgs.rofi; + extraConfig = { + modi = "run,drun,window"; + show-icons = true; + terminal = "foot"; + drun-display-format = "{icon} {name}"; + location = 0; + disable-history = false; + hide-scrollbar = true; + display-drun = ""; + sidebar-mode = false; + }; + + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + # Pull colors dynamically from Stylix + c = config.lib.stylix.colors; + in + { + "*" = { + bg-col = mkLiteral "#${c.base00}cc"; # Background + 80% opacity + bg-col-light = mkLiteral "#${c.base00}"; + border-col = mkLiteral "#${c.base0D}"; # Accent color (Blue) + selected-col = mkLiteral "#${c.base02}"; # Selection highlight + blue = mkLiteral "#${c.base0D}"; + fg-col = mkLiteral "#${c.base05}"; # Main text color + grey = mkLiteral "#${c.base03}"; # Placeholder/Grey text + + width = 600; + font = "JetBrainsMono Nerd Font 11"; + }; + + "window" = { + height = mkLiteral "360px"; + border = mkLiteral "2px"; + border-color = mkLiteral "@blue"; + background-color = mkLiteral "@bg-col"; + border-radius = mkLiteral "12px"; + }; + + "mainbox" = { + background-color = mkLiteral "transparent"; + children = mkLiteral "[inputbar, listview]"; + }; + + "inputbar" = { + children = mkLiteral "[entry]"; + background-color = mkLiteral "transparent"; + border-radius = mkLiteral "5px"; + padding = mkLiteral "20px 20px 15px 20px"; + border = mkLiteral "0px 0px 1px 0px"; + border-color = mkLiteral "@grey"; + }; + + "prompt" = { + enabled = false; + }; + + "entry" = { + placeholder = "Search..."; + placeholder-color = mkLiteral "@grey"; + padding = mkLiteral "6px"; + margin = mkLiteral "0px 0px 0px 10px"; + text-color = mkLiteral "@fg-col"; + background-color = mkLiteral "transparent"; + }; + + "listview" = { + padding = mkLiteral "15px 20px 20px 20px"; + columns = 2; + lines = 5; + background-color = mkLiteral "transparent"; + border = mkLiteral "0px"; + }; + + "element" = { + padding = mkLiteral "5px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@fg-col"; + }; + + "element selected" = { + background-color = mkLiteral "@selected-col"; + text-color = mkLiteral "@blue"; + border-radius = mkLiteral "5px"; + }; + + "element-text, element-icon" = { + background-color = mkLiteral "transparent"; + text-color = mkLiteral "inherit"; + }; + }; + }; +} diff --git a/services.nix b/services.nix new file mode 100644 index 0000000..efd7971 --- /dev/null +++ b/services.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + services.kdeconnect = { + enable = true; + indicator = true; + }; + + services.udiskie.settings = { + automount = true; + notify = true; + use_tray = true; # Shows icon in system tray + }; +} diff --git a/spicetify.nix b/spicetify.nix new file mode 100644 index 0000000..fe90375 --- /dev/null +++ b/spicetify.nix @@ -0,0 +1,20 @@ +{ inputs, pkgs, ... }: +let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; +in +{ + imports = [ + inputs.spicetify-nix.homeManagerModules.default + ]; + + programs.spicetify = { + enable = true; + #theme = spicePkgs.themes.sleek; + + enabledExtensions = with spicePkgs.extensions; [ + adblockify + hidePodcasts + shuffle + ]; + }; +} diff --git a/system-programs.nix b/system-programs.nix new file mode 100644 index 0000000..5c937eb --- /dev/null +++ b/system-programs.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: + +{ + programs = { + fish = { + enable = true; + shellInit = '' + # Updated path for modern GCR/GNOME Keyring + set -gx SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/gcr/ssh" + ''; + }; + + nh = { + enable = true; + # Set this to the directory containing your flake.nix + flake = "/etc/nixos/"; + }; + + ssh = { + startAgent = true; + enableAskPassword = true; + askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass"; + }; + + steam.enable = true; + dconf.enable = true; + nix-ld.enable = true; + kdeconnect.enable = true; + }; +} diff --git a/system-service.nix b/system-service.nix new file mode 100644 index 0000000..2b42051 --- /dev/null +++ b/system-service.nix @@ -0,0 +1,108 @@ +{ pkgs, lib, ... }: + + +# modify the upower & logind.settings.login options +{ + services = { + upower = { + enable = true; + ignoreLid = true; + }; + + power-profiles-daemon.enable = true; + tlp.enable = lib.mkForce false; + + # Power profile switching on AC/Battery + udev.extraRules = '' + # On AC: Set performance profile + SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set performance" + + # On Battery: Set power-saver profile + SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver" + ''; + + pipewire = { + enable = true; + pulse.enable = true; + wireplumber = { + extraConfig = { + "99-custom-quantum.conf" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.allowed-rates" = [ + 44100 + 48000 + 96000 + ]; + "default.clock.quantum" = 1024; + "default.clock.min-quantum" = 512; + "default.clock.max-quantum" = 8192; + }; + "context.modules" = [ + { + name = "libpipewire-module-rt"; + args = { + "nice.level" = -20; + "rt.prio" = 99; + "rt.time.soft" = 200000; + "rt.time.hard" = 200000; + }; + flags = [ + "ifexists" + "nofail" + ]; + } + ]; + }; + }; + }; + }; + + blueman.enable = true; + + gvfs.enable = true; + udisks2.enable = true; + + displayManager.gdm.enable = true; + acpid.enable = true; + + geoclue2 = { + enable = true; + enableWifi = true; + }; + + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + xserver = { + xkb = { + layout = "us"; + variant = ""; + }; + }; + + openssh.enable = true; + libinput.enable = true; + + gnome = { + gnome-keyring.enable = true; + gcr-ssh-agent.enable = false; + }; + + dbus = { + enable = true; + packages = [ ]; + }; + + logind = { + settings.Login = { + HandleLidSwitch = "ignore"; + HandleLidSwitchExternalPower = "ignore"; + HandleLidSwitchDocked = "ignore"; + }; + }; + }; +}