diff --git a/flake.lock b/flake.lock index f501907..0c91cdc 100644 --- a/flake.lock +++ b/flake.lock @@ -51,6 +51,24 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -330,6 +348,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1709237383, @@ -346,6 +382,22 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1695644571, + "narHash": "sha256-asS9dCCdlt1lPq0DLwkVBbVoEKuEuz+Zi3DG7pR/RxA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6500b4580c2a1f3d0f980d32d285739d8e156d92", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-compat": "flake-compat", @@ -407,7 +459,8 @@ "hyprland-plugins": "hyprland-plugins", "kb-gui": "kb-gui", "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim" + "nixvim": "nixvim", + "wayland-pipewire-idle-inhibit": "wayland-pipewire-idle-inhibit" } }, "rust-overlay": { @@ -474,6 +527,46 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1704649711, + "narHash": "sha256-+qxqJrZwvZGilGiLQj3QbYssPdYCwl7ejwMImgH7VBQ=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "04f25d7bec9fb29d2c3bacaa48a3304840000d36", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "wayland-pipewire-idle-inhibit": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1707783103, + "narHash": "sha256-VOP1VOeXOyjn+AJfSHzVNT0l+rgm63ev9p4uTfMfYY0=", + "owner": "rafaelrc7", + "repo": "wayland-pipewire-idle-inhibit", + "rev": "328da9a7ec30648666434e05cdea614c54f71b46", + "type": "github" + }, + "original": { + "owner": "rafaelrc7", + "repo": "wayland-pipewire-idle-inhibit", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 43f4705..093cb4c 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,11 @@ kb-gui = { url = "github:zackartz/kb-gui"; }; + + wayland-pipewire-idle-inhibit = { + url = "github:rafaelrc7/wayland-pipewire-idle-inhibit"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 4bb5942..daa4020 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -11,6 +11,7 @@ imports = [ inputs.nixvim.homeManagerModules.nixvim + inputs.wayland-pipewire-idle-inhibit.homeModules.default ./swayidle.nix @@ -30,6 +31,22 @@ }; }; + services.wayland-pipewire-idle-inhibit = { + enable = true; + systemdTarget = "sway-session.target"; + settings = { + verbosity = "INFO"; + media_minimum_duration = 10; + sink_whitelist = [ + {name = "Scarlett Solo (3rd Gen.) Headphones / Line 1-2";} + ]; + node_blacklist = [ + {name = "spotify";} + {app_name = "Music Player Daemon";} + ]; + }; + }; + # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release # introduces backwards incompatible changes.