mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 08:49:44 +01:00
9f9e277b60
These (and the `*MD` functions apart from `literalMD`) are now no-ops in nixpkgs and serve no purpose other than to add additional noise and potentially mislead people into thinking unmarked DocBook documentation will still be accepted. Note that if backporting changes including documentation to 23.05, the `mdDoc` calls will need to be re-added. To reproduce this commit, run: $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \ nix shell nixpkgs#coreutils \ -c find . -name '*.nix' \ -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \ --strip {} + $ ./format
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.wofi;
|
|
|
|
toConfig = attrs:
|
|
''
|
|
# Generated by Home Manager.
|
|
'' + generators.toKeyValue { }
|
|
(filterAttrs (name: value: value != null) attrs);
|
|
in {
|
|
meta.maintainers = [ maintainers.christoph-heiss ];
|
|
|
|
options.programs.wofi = {
|
|
enable = mkEnableOption
|
|
"wofi: a launcher/menu program for wlroots based wayland compositors such as sway";
|
|
|
|
package = mkPackageOption pkgs "wofi" { };
|
|
|
|
settings = mkOption {
|
|
default = { };
|
|
type = types.attrs;
|
|
description = ''
|
|
Configuration options for wofi. See
|
|
{manpage}`wofi(5)`.
|
|
'';
|
|
example = literalExpression ''
|
|
{
|
|
location = "bottom-right";
|
|
allow_markup = true;
|
|
width = 250;
|
|
}
|
|
'';
|
|
};
|
|
|
|
style = mkOption {
|
|
default = null;
|
|
type = types.nullOr types.str;
|
|
description = ''
|
|
CSS style for wofi to use as a stylesheet. See
|
|
{manpage}`wofi(7)`.
|
|
'';
|
|
example = ''
|
|
* {
|
|
font-family: monospace;
|
|
}
|
|
|
|
window {
|
|
background-color: #7c818c;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions =
|
|
[ (hm.assertions.assertPlatform "programs.wofi" pkgs platforms.linux) ];
|
|
|
|
home.packages = [ cfg.package ];
|
|
|
|
xdg.configFile = mkMerge [
|
|
(mkIf (cfg.settings != { }) {
|
|
"wofi/config".text = toConfig cfg.settings;
|
|
})
|
|
(mkIf (cfg.style != null) { "wofi/style.css".text = cfg.style; })
|
|
];
|
|
};
|
|
}
|