feat(wallpaper): Use themed nix wallpaper by default
This commit is contained in:
parent
01ed785bf0
commit
755638fe48
2 changed files with 169 additions and 8 deletions
141
assets/rainbow.svg
Normal file
141
assets/rainbow.svg
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="nixos-catpuccin.png"
|
||||
sodipodi:docname="catppuccinnix.svg"
|
||||
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
viewBox="0 0 3225.0001 1350"
|
||||
height="1440"
|
||||
width="3440"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
units="px"
|
||||
inkscape:document-rotation="0"
|
||||
fit-margin-bottom="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-top="0"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1440"
|
||||
inkscape:window-width="3440"
|
||||
showgrid="false"
|
||||
inkscape:current-layer="g2"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="745.58828"
|
||||
inkscape:cx="2124.2232"
|
||||
inkscape:zoom="0.63976327"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="1"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:deskcolor="#d1d1d1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="g2"
|
||||
inkscape:label="nix"
|
||||
inkscape:export-filename="2kwide.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:groupmode="layer">
|
||||
<rect
|
||||
style="display:inline;fill:#1e1e2e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.54331;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:stroke markers fill"
|
||||
id="rect1"
|
||||
width="3225"
|
||||
height="1350"
|
||||
x="0"
|
||||
y="0"
|
||||
inkscape:label="background"
|
||||
inkscape:export-filename="2kwidepng"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
transform="translate(-233.46209,403.59287)"
|
||||
style="display:inline;opacity:1"
|
||||
inkscape:label="logo"
|
||||
id="layer3"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
style="stroke-width:11.0512"
|
||||
transform="matrix(0.11707329,0,0,0.11707336,1503.267,99.424817)"
|
||||
id="g955">
|
||||
<g
|
||||
transform="matrix(11.047619,0,0,11.047619,-1572.2888,9377.7107)"
|
||||
id="g869"
|
||||
inkscape:export-filename="g869.svg"
|
||||
inkscape:export-xdpi="600"
|
||||
inkscape:export-ydpi="600">
|
||||
<g
|
||||
transform="rotate(-60,226.35754,-449.37199)"
|
||||
id="g932"
|
||||
style="fill:#f9e2af;fill-opacity:1;stroke-width:11.0512">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3336-6"
|
||||
d="m 449.71876,-420.51322 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8257 z"
|
||||
style="opacity:1;fill:#f9e2af;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4260-0"
|
||||
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8256 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fab387;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use3439-6"
|
||||
d="m 353.65459,-797.57947 -122.21762,211.66311 -28.53475,-48.37004 32.93837,-56.68746 -65.41521,-0.17187 -13.94166,-24.16966 14.23639,-24.72105 93.11171,0.294 33.46379,-57.6904 z"
|
||||
style="fill:#f38ba8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use3449-5"
|
||||
d="m 505.28844,-721.12474 -122.19683,-211.67512 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4901 33.22946,57.8257 z"
|
||||
style="fill:#89b4fa;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use4354-5"
|
||||
d="m 451.30201,-803.62004 -244.41444,-0.012 27.62231,-48.89684 65.56197,0.18174 -32.55876,-56.73718 13.96071,-24.15866 28.52725,-0.0314 46.30123,80.7841 66.69317,0.13525 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cba6f7;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use4362-2"
|
||||
d="m 460.90516,-633.96606 122.21762,-211.66312 28.53475,48.37004 -32.93837,56.68746 65.41521,0.17187 13.94166,24.16966 -14.23639,24.72105 -93.11171,-0.294 -33.46371,57.69035 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#a6e3a1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:33.1535;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
|
|
@ -4,9 +4,28 @@
|
|||
config,
|
||||
options,
|
||||
unstable,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
svg = ../../assets/rainbow.svg;
|
||||
sd = lib.getExe pkgs.sd;
|
||||
base16 = pkgs.callPackage inputs.base16.lib {};
|
||||
mkWallpaper = schemeStr: let
|
||||
scheme = base16.mkSchemeAttrs schemeStr;
|
||||
in
|
||||
pkgs.runCommand "rainbow.png" {} ''
|
||||
cat ${svg} \
|
||||
| ${sd} '#f9e2af' '#${scheme.base0A}' \
|
||||
| ${sd} '#fab387' '#${scheme.base09}' \
|
||||
| ${sd} '#f38ba8' '#${scheme.base08}' \
|
||||
| ${sd} '#89b4fa' '#${scheme.base0D}' \
|
||||
| ${sd} '#cba6f7' '#${scheme.base0E}' \
|
||||
| ${sd} '#a6e3a1' '#${scheme.base0B}' \
|
||||
| ${sd} '#1e1e2e' '#${scheme.base00}' \
|
||||
| ${lib.getExe pkgs.imagemagick} svg:- png:$out
|
||||
'';
|
||||
in {
|
||||
options.mods.stylix = {
|
||||
colorscheme = lib.mkOption {
|
||||
default = "catppuccin-mocha";
|
||||
|
|
@ -85,11 +104,16 @@
|
|||
description = "font config";
|
||||
};
|
||||
};
|
||||
config =
|
||||
config = let
|
||||
scheme =
|
||||
if builtins.isAttrs config.mods.stylix.colorscheme
|
||||
then config.mods.stylix.colorscheme
|
||||
else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml";
|
||||
in
|
||||
(lib.optionalAttrs (options ? stylix) {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = mkDashDefault ../../base/black.jpg;
|
||||
image = mkDashDefault (mkWallpaper scheme);
|
||||
polarity = mkDashDefault "dark";
|
||||
targets = {
|
||||
nixvim.enable = mkDashDefault false;
|
||||
|
|
@ -97,11 +121,7 @@
|
|||
};
|
||||
fonts = config.mods.stylix.fonts;
|
||||
cursor = config.mods.stylix.cursor;
|
||||
base16Scheme = (
|
||||
if builtins.isAttrs config.mods.stylix.colorscheme
|
||||
then config.mods.stylix.colorscheme
|
||||
else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml"
|
||||
);
|
||||
base16Scheme = scheme;
|
||||
};
|
||||
})
|
||||
// lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue