1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-23 02:39:40 +01:00
home-manager/tests/modules/programs/qutebrowser/greasemonkey.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

34 lines
689 B
Nix

{ pkgs, ... }:
let
greasemonkeyScript = pkgs.writeText "qutebrowser-greasemonkey.js" ''
// ==UserScript==
// @name foo
// @namespace foo
// @match https://example.com/*
// @grant none
// ==/UserScript==
'';
in
{
programs.qutebrowser = {
enable = true;
greasemonkey = [ greasemonkeyScript ];
};
nmt.script =
let
scriptDir =
if pkgs.stdenv.hostPlatform.isDarwin then
".qutebrowser/greasemonkey"
else
".config/qutebrowser/greasemonkey";
in
''
assertFileContent \
home-files/${scriptDir}/qutebrowser-greasemonkey.js \
${greasemonkeyScript}
'';
}