nix-files/hosts/modules/gui/theme/default.nix

29 lines
654 B
Nix
Raw Normal View History

2023-09-05 16:13:23 +00:00
{ config, lib, pkgs, ... }:
let
cfg = config.sane.gui.theme.background;
in
{
options = with lib; {
sane.gui.theme.background = {
svg = mkOption {
type = types.path;
default = ./nixos-bg-02.svg;
};
png = mkOption {
type = types.path;
default = pkgs.runCommand
"nixos-bg.png"
{ nativeBuildInputs = [ pkgs.inkscape ]; }
''
inkscape ${cfg.svg} -o $out
'';
};
};
};
config = {
2024-02-21 23:18:57 +00:00
sane.programs.sway.config.background = lib.mkDefault cfg.png;
2023-09-05 16:13:23 +00:00
sane.gui.sxmo.settings.SXMO_BG_IMG = lib.mkDefault (builtins.toString cfg.png);
};
}