diff --git a/flake.lock b/flake.lock index 30786fe..50b3267 100755 --- a/flake.lock +++ b/flake.lock @@ -37,10 +37,27 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1772736753, + "narHash": "sha256-au/m3+EuBLoSzWUCb64a/MZq6QUtOV8oC0D9tY2scPQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "917fec990948658ef1ccd07cef2a1ef060786846", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index dfda8c5..9084cae 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # used for some packages home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; @@ -14,15 +15,19 @@ # url = "github:nix-community/nixvim/nixos-25.11"; # }; - outputs = { self, nixpkgs, home-manager,... }@inputs: + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager,... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; + pkgs-unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = false; + }; in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs;}; + specialArgs = { inherit inputs pkgs-unstable;}; modules = [ ./hosts/laptop/configuration.nix ]; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index fb5a10e..87824e8 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, libs, inputs, ... }: +{ config, pkgs, pkgs-unstable, libs, inputs, ... }: { imports = [ # Include the results of the hardware scan. @@ -20,7 +20,7 @@ home-manager = { users = { tomasr = ./home.nix; }; - #extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit pkgs-unstable; }; }; @@ -70,9 +70,10 @@ services.xserver.excludePackages = [ pkgs.xterm ]; # enable hyprland WM programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; + enable = true; + package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features + withUWSM = true; + xwayland.enable = true; }; @@ -139,6 +140,7 @@ services.upower.enable = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ +# use pkgs-unstable if you want the package from the unstable channel #we need to install gnome and kde utils individually as we dont use gnome gnome-calculator snapshot diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 051b456..bfdca23 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -1,4 +1,4 @@ -{ config, pkgs,... }: +{ config, pkgs, pkgs-unstable, ... }: let wallpaper = ../../assets/wallpaper1.jpg; @@ -8,7 +8,7 @@ in #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ wayland.windowManager.hyprland.enable = true; - + wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; #hint Electron apps to use on wayland; home.sessionVariables.NIXOS_OZONE_WL="1"; @@ -333,99 +333,71 @@ in # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█ - windowrulev2 = [ -"opacity 0.90 0.90,class:^(firefox)$" -"opacity 0.90 0.90,class:^(Brave-browser)$" -"opacity 0.80 0.80,class:^(code-oss)$" -"opacity 0.80 0.80,class:^(Code)$" -"opacity 0.80 0.80,class:^(code-url-handler)$" -"opacity 0.80 0.80,class:^(code-insiders-url-handler)$" -"opacity 0.75 0.75,class:^(kitty)$" -"opacity 0.80 0.80,class:^(org.kde.dolphin)$" -"opacity 0.80 0.80,class:^(org.kde.ark)$" -"opacity 0.80 0.80,class:^(nwg-look)$" -"opacity 0.80 0.80,class:^(qt5ct)$" -"opacity 0.80 0.80,class:^(qt6ct)$" -"opacity 0.80 0.80,class:^(kvantummanager)$" -"opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$" -"opacity 0.80 0.70,class:^(blueman-manager)$" -"opacity 0.80 0.70,class:^(nm-applet)$" -"opacity 0.80 0.70,class:^(nm-connection-editor)$" -"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$" -"opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$" -"opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.gtk)$" -"opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.hyprland)$" -"opacity 0.70 0.70,class:^([Ss]team)$" -"opacity 0.70 0.70,class:^(steamwebhelper)$" -"opacity 0.70 0.70,class:^(Spotify)$" -"opacity 0.70 0.70,initialTitle:^(Spotify Free)$" -"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$" # Clapper-Gtk -"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$" # Flatseal-Gtk -"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$" # Cartridges-Gtk -"opacity 0.80 0.80,class:^(com.obsproject.Studio)$" # Obs-Qt -"opacity 0.80 0.80,class:^(gnome-boxes)$" # Boxes-Gtk -"opacity 0.80 0.80,class:^(discord)$" # Discord-Electron -"opacity 0.80 0.80,class:^(WebCord)$" # WebCord-Electron -"opacity 0.80 0.80,class:^(ArmCord)$" # ArmCord-Electron -"opacity 0.80 0.80,class:^(app.drey.Warp)$" # Warp-Gtk -"opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$" # ProtonUp-Qt -"opacity 0.80 0.80,class:^(yad)$" # Protontricks-Gtk -"opacity 0.80 0.80,class:^(Signal)$" # Signal-Gtk -"opacity 0.80 0.80,class:^(io.github.alainm23.planify)$" # planify-Gtk -"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$" # Upscaler-Gtk -"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$" # VideoDownloader-Gtk -"opacity 0.80 0.80,class:^(io.gitlab.adhami3310.Impression)$" # Impression-Gtk -"opacity 0.80 0.80,class:^(io.missioncenter.MissionCenter)$" # MissionCenter-Gtk -"opacity 0.80 0.80,class:^(io.github.flattool.Warehouse)$" # Warehouse-Gtk -"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$" -"float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$" -"float,class:^(firefox)$,title:^(Picture-in-Picture)$" -"float,class:^(firefox)$,title:^(Library)$" -"float,class:^(kitty)$,title:^(top)$" -"float,class:^(kitty)$,title:^(btop)$" -"float,class:^(kitty)$,title:^(htop)$" -"float,class:^(vlc)$" -"float,class:^(kvantummanager)$" -"float,class:^(qt5ct)$" -"float,class:^(qt6ct)$" -"float,class:^(nwg-look)$" -"float,class:^(org.kde.ark)$" -"float,class:^(org.pulseaudio.pavucontrol)$" -"float,class:^(blueman-manager)$" -"float,class:^(nm-applet)$" -"float,class:^(nm-connection-editor)$" -"float,class:^(org.kde.polkit-kde-authentication-agent-1)$" -"float,class:^(Signal)$" # Signal-Gtk -"float,class:^(com.github.rafostar.Clapper)$" # Clapper-Gtk -"float,class:^(app.drey.Warp)$" # Warp-Gtk -"float,class:^(net.davidotek.pupgui2)$" # ProtonUp-Qt -"float,class:^(yad)$" # Protontricks-Gtk -"float,class:^(eog)$" # Imageviewer-Gtk -"float,class:^(io.github.alainm23.planify)$" # planify-Gtk -"float,class:^(io.gitlab.theevilskeleton.Upscaler)$" # Upscaler-Gtk -"float,class:^(com.github.unrud.VideoDownloader)$" # VideoDownloader-Gkk -"float,class:^(io.gitlab.adhami3310.Impression)$" # Impression-Gtk -"float,class:^(io.missioncenter.MissionCenter)$" # MissionCenter-Gtk -"float,class:^(custom-librewolfprofiles)$" -"size 400 175, class:^(custom-librewolfprofiles)$" -"float,initialTitle:^(custom-pomodoro)$" -"size 600 600,initialTitle:^(custom-pomodoro)$" + windowrule = [ +"opacity 0.90 0.90, match:class ^(firefox)$" +"opacity 0.90 0.90, match:class ^(Brave-browser)$" +"opacity 0.80 0.80, match:class ^(code-oss)$" +"opacity 0.80 0.80, match:class ^(Code)$" +"opacity 0.80 0.80, match:class ^(code-url-handler)$" +"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$" +"opacity 0.75 0.75, match:class ^(kitty)$" +"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$" +"opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$" +"opacity 0.80 0.80, float on, match:class ^(nwg-look)$" +"opacity 0.80 0.80, float on, match:class ^(qt5ct)$" +"opacity 0.80 0.80, float on, match:class ^(qt6ct)$" +"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$" +"opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$" +"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$" +"opacity 0.80 0.70, float on, match:class ^(nm-applet)$" +"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$" +"opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$" +"opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$" +"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$" +"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$" +"opacity 0.70 0.70, match:class ^([Ss]team)$" +"opacity 0.70 0.70, match:class ^(steamwebhelper)$" +"opacity 0.70 0.70, match:class ^(Spotify)$" +"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$" +"opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$" +"opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$" +"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$" +"opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$" +"opacity 0.80 0.80, match:class ^(gnome-boxes)$" +"opacity 0.80 0.80, match:class ^(discord)$" +"opacity 0.80 0.80, match:class ^(WebCord)$" +"opacity 0.80 0.80, match:class ^(ArmCord)$" +"opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$" +"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$" +"opacity 0.80 0.80, float on, match:class ^(yad)$" +"opacity 0.80 0.80, float on, match:class ^(Signal)$" +"opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$" +"opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$" +"opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$" +"opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$" +"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$" +"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$" +"float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$" +"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$" +"float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$" +"float on, match:class ^(firefox)$, match:title ^(Library)$" +"float on, match:class ^(kitty)$, match:title ^(top)$" +"float on, match:class ^(kitty)$, match:title ^(btop)$" +"float on, match:class ^(kitty)$, match:title ^(htop)$" +"float on, match:class ^(vlc)$" +"float on, match:class ^(eog)$" +"float on, size 400 175, match:class ^(custom-librewolfprofiles)$" +"float on, size 600 600, match:initial_title ^(custom-pomodoro)$" +]; # add a float for tomato when in kitty #"plugin:imgborders:noimgborders, tag:noborder" - ]; - layerrule = [ -"blur,rofi" -"ignorezero,rofi" -"blur,notifications" -"ignorezero,notifications" -"blur,swaync-notification-window" -"ignorezero,swaync-notification-window" -"blur,swaync-control-center" -"ignorezero,swaync-control-center" -"blur,logout_dialog" - - ]; - +layerrule = [ +"blur on, ignore_alpha 0, match:namespace rofi" +"blur on, ignore_alpha 0, match:namespace notifications" +"blur on, ignore_alpha 0, match:namespace swaync-notification-window" +"blur on, ignore_alpha 0, match:namespace swaync-control-center" +"blur on, match:namespace logout_dialog" +]; }; }