diff --git a/flake.lock b/flake.lock index 5bc9ed6..fc5fdd2 100644 --- a/flake.lock +++ b/flake.lock @@ -45,6 +45,28 @@ "type": "github" } }, + "awww": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1779666993, + "narHash": "sha256-W0yA7Y37oj5BBzl4ojO8dtv9MuOvdrIZDxtRjs7kpdg=", + "ref": "refs/heads/main", + "rev": "9b7f47f7f394dce0a17a7b161e0d2fe391ce72b3", + "revCount": 1366, + "type": "git", + "url": "https://codeberg.org/LGFae/awww" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/LGFae/awww" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -187,6 +209,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -618,6 +656,7 @@ "inputs": { "aagl": "aagl", "alejandra": "alejandra", + "awww": "awww", "cookiez-assets": "cookiez-assets", "grub2-themes": "grub2-themes", "home-manager": "home-manager", @@ -671,6 +710,27 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "awww", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764038373, + "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "stylix": { "inputs": { "base16": "base16", diff --git a/flake.nix b/flake.nix index 985ee31..950ccfb 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + awww = { + url = "git+https://codeberg.org/LGFae/awww"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixvim = { url = "github:nix-community/nixvim"; #Do not use follows here as it will throw warnings with nixvim's built-in source @@ -81,6 +86,7 @@ grub2-themes, nix-flatpak, nix-index-database, + awww, ... }: let username = "cookiez"; @@ -105,6 +111,7 @@ inherit project; inherit alejandra; inherit cookiez-assets; + awwwPkg = awww.packages.${system}.awww; pam-fprint-grosshack-pkg = pam-fprint-grosshack.packages.${system}.default; host = hostname; }; diff --git a/modules/configuration.nix b/modules/configuration.nix index 0c18d80..3d3bc9b 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -14,6 +14,7 @@ version, system, pam-fprint-grosshack-pkg, + awwwPkg, ... }: { #Assign Swap to the PC @@ -110,7 +111,7 @@ useUserPackages = true; users.${username} = ./home.nix; backupFileExtension = "backup"; # Automatically backs up conflicting files during activation - extraSpecialArgs = {inherit inputs username project version system host;}; + extraSpecialArgs = {inherit inputs username project version system host awwwPkg;}; sharedModules = [inputs.plasma-manager.homeModules.plasma-manager]; }; diff --git a/modules/hyprpaper/default.nix b/modules/hyprpaper/default.nix deleted file mode 100644 index 03a5ddb..0000000 --- a/modules/hyprpaper/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - inputs, - pkgs, - ... -}: { - imports = [ - ]; - - home-manager.sharedModules = [ - ./home.nix - ]; - - environment.systemPackages = with pkgs; [ - hyprpaper - ]; -} diff --git a/modules/hyprpaper/home.nix b/modules/hyprpaper/home.nix deleted file mode 100644 index f5cadfc..0000000 --- a/modules/hyprpaper/home.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - pkgs, - inputs, - username, - project, - ... -}: { - imports = [ - ]; - - services = { - hyprpaper = { - enable = false; - - settings = { - wallpaper = [ - { - monitor = "eDP-1"; - path = "${inputs.cookiez-assets}/wallpapers/pixel-desert.png"; - fit_mode = "cover"; # optional, defaults to cover - } - ]; - }; - }; - }; -} diff --git a/niri/autostart.nix b/niri/autostart.nix index 9a15349..523a655 100644 --- a/niri/autostart.nix +++ b/niri/autostart.nix @@ -1,5 +1,6 @@ { config, + inputs, pkgs, username, project, @@ -7,31 +8,8 @@ }: { #To show logs of services run: #journalctl --user-unit={service-name} --user - systemd.user.services.niri-waybar = { - description = "Waybar status bar for Niri"; - # "wantedBy" replaces the [Install] section - wantedBy = ["graphical-session.target"]; - - # "partOf" and "after" replace the [Unit] section dependencies - partOf = ["graphical-session.target"]; - after = ["graphical-session.target"]; - - # [Unit] configuration goes here - unitConfig = { - # This checks the environment variable to ensure we are in Niri - ConditionEnvironment = "XDG_CURRENT_DESKTOP=niri"; - }; - - # [Service] configuration goes here - serviceConfig = { - ExecStart = "${pkgs.waybar}/bin/waybar"; - Restart = "on-failure"; - RestartSec = "1s"; - }; - }; - - # 2. The Niri Session Cleanup Service + # The Niri Session Cleanup Service # This service starts when the graphical session starts, and when it stops, # it forcibly stops the graphical-session.target to ensure a clean state for the next login. systemd.user.services.niri-session-manager = { diff --git a/niri/default.nix b/niri/default.nix index 365545d..ae9a6fa 100644 --- a/niri/default.nix +++ b/niri/default.nix @@ -2,12 +2,12 @@ config, inputs, pkgs, + system, ... }: { imports = [ ./autostart.nix ../modules/hyprlock - ../modules/hyprpaper ../modules/stylix ]; @@ -20,6 +20,7 @@ fuzzel waybar xwayland-satellite + inputs.awww.packages.${system}.awww ]; programs = { diff --git a/niri/home.nix b/niri/home.nix index 5ad3dbd..02d341c 100644 --- a/niri/home.nix +++ b/niri/home.nix @@ -1,6 +1,7 @@ { pkgs, inputs, + awwwPkg, ... }: { imports = [ @@ -38,6 +39,10 @@ } numlock } + mouse { + accel-profile "flat" + accel-speed -0.4 + } } prefer-no-csd @@ -83,11 +88,14 @@ } } - // spawn-at-startup "waybar" - spawn-at-startup "hyprpaper" + spawn-at-startup "${pkgs.waybar}/bin/waybar" spawn-at-startup "${pkgs.mako}/bin/mako" + //spawn-sh-at-startup "${awwwPkg}/bin/awww-daemon --no-cache & sleep 1; ${awwwPkg}/bin/awww img ${inputs.cookiez-assets}/wallpapers/pixel-desert.png" + spawn-sh-at-startup "${awwwPkg}/bin/awww-daemon --no-cache" + spawn-sh-at-startup "until ${awwwPkg}/bin/awww query >/dev/null 2>&1; do :; done; ${awwwPkg}/bin/awww img --transition-type none ${inputs.cookiez-assets}/wallpapers/pixel-desert.png" - // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" + spawn-sh-at-startup "${awwwPkg}/bin/awww-daemon --no-cache --namespace backdrop" + spawn-sh-at-startup "until ${awwwPkg}/bin/awww query -n backdrop >/dev/null 2>&1; do :; done; ${awwwPkg}/bin/awww img -n backdrop --transition-type none ${inputs.cookiez-assets}/wallpapers/pixel-desert.png" hotkey-overlay { // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. @@ -102,6 +110,11 @@ draw-border-with-background false } + layer-rule { + match namespace="^awww-daemonbackdrop$" + place-within-backdrop true + } + output "eDP-1" { mode "2880x1920@120.000" scale 2