From 81e47e6467b1c2483025a32f08b9c0ee200f06f4 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 5 Aug 2026 17:07:48 +0200 Subject: [PATCH] add wallpaper that gets recolored v2 and actually works now --- home-manager/home.nix | 12 +++++++++++- nixos/stylix/stylix.nix | 22 ++++++++-------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/home-manager/home.nix b/home-manager/home.nix index 2367a04..cf88558 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,10 +1,15 @@ { lib, pkgs, + config, inputs, ... }: - +let + palette = lib.strings.removePrefix "${pkgs.base16-schemes}/share/themes/" "${config.stylix.base16Scheme + }"; + cleanPalette = lib.strings.removeSuffix ".yaml" "${palette}"; +in { imports = [ ./stylix.nix @@ -23,6 +28,9 @@ home.homeDirectory = "/home/lucy"; home.stateVersion = "26.05"; home.activation = { + wallpaper = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + ${lib.getExe pkgs.lutgen} apply ${config.stylix.image} -p ${cleanPalette} -o ~/.walls/a.png + ''; reload-quickshell = lib.hm.dag.entryAfter [ @@ -30,6 +38,8 @@ ] '' ${lib.getExe pkgs.quickshell} ipc call config reload true + ${lib.getExe pkgs.quickshell} ipc call config setWall ~/.walls/a.png + ''; }; } diff --git a/nixos/stylix/stylix.nix b/nixos/stylix/stylix.nix index 2a26201..0d6243d 100644 --- a/nixos/stylix/stylix.nix +++ b/nixos/stylix/stylix.nix @@ -2,7 +2,6 @@ inputs, pkgs, lib, - config, ... }: let @@ -27,18 +26,13 @@ let map (n: "${dir}/${n}/${platform}.nix") ( builtins.filter (n: builtins.pathExists "${dir}/${n}/${platform}.nix") drop ); - wallpaper = ./wallpaper.png; - baseNames = map (c: "base0${c}") (lib.stringToCharacters "0123456789ABCDEF"); - palette = lib.concatMapStringsSep " " (n: config.lib.stylix.colors.withHashtag.${n}) baseNames; + palette = "gruvbox-dark-hard"; + stylixPalette = lib.strings.concatStrings [ + "${pkgs.base16-schemes}/share/themes/" + "${palette}" + ".yaml" + ]; - recolored = - pkgs.runCommand "wallpaper-stylix.png" - { - nativeBuildInputs = [ pkgs.lutgen ]; - } - '' - lutgen apply ${wallpaper} -o ~/.walls/stylix-bars.png -p ${palette} - ''; in { disabledModules = disable "nixos"; @@ -62,9 +56,9 @@ in stylix = { enable = true; autoEnable = false; - base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyodark.yaml"; + base16Scheme = stylixPalette; polarity = "dark"; - image = recolored; + image = ./wallpaper.png; targets = { console.enable = true; gtk.enable = true;