diff --git a/flake.lock b/flake.lock index 30c938ad..ad971932 100644 --- a/flake.lock +++ b/flake.lock @@ -548,11 +548,11 @@ ] }, "locked": { - "lastModified": 1717866166, - "narHash": "sha256-iOeRZXIhFpQJdxzNJ3nUAANyDfLqCslRhjGhLD2RstM=", + "lastModified": 1718013167, + "narHash": "sha256-L+IzjhovTTqOzqLXjrfGFsDPVuCLWZTah+rt7wRkGJ8=", "owner": "danth", "repo": "stylix", - "rev": "ca3247ed8cfbf369f3fe1b7a421579812a95c101", + "rev": "7682713f6af1d32a33f8c4e3d3d141af5ad1761a", "type": "github" }, "original": { diff --git a/modules/homeManager/programs/mpv/default.nix b/modules/homeManager/programs/mpv/default.nix index 2a27dd90..1aeec170 100644 --- a/modules/homeManager/programs/mpv/default.nix +++ b/modules/homeManager/programs/mpv/default.nix @@ -30,16 +30,17 @@ in { uosc = let colors = config.lib.stylix.colors; - in { - background = colors.base00; - background_text = colors.base05; - curtain = colors.base0D; - error = colors.base0F; - foreground = colors.base05; - foreground_text = colors.base00; - success = colors.base0A; - top_bar_controls = "no"; - }; + in + lib.mkIf config.stylix.enable { + background = colors.base00; + background_text = colors.base05; + curtain = colors.base0D; + error = colors.base0F; + foreground = colors.base05; + foreground_text = colors.base00; + success = colors.base0A; + top_bar_controls = "no"; + }; }; scripts = with pkgs.mpvScripts; [mpv-playlistmanager thumbfast uosc]; diff --git a/modules/stylix/default.nix b/modules/stylix/default.nix index e618ae45..b77a8362 100644 --- a/modules/stylix/default.nix +++ b/modules/stylix/default.nix @@ -10,61 +10,52 @@ in { imports = [inputs.stylix.homeManagerModules.stylix]; options.dotfiles.stylix.enable = lib.mkEnableOption module; - config = lib.mkMerge [ - # TODO: Patch an upstream 'stylix.enable' option [1] to merge the - # unconditional 'stylix.image' option with the conditional 'lib.mkIf - # config.dotfiles.stylix.enable' attribute set. - # - # [1]: https://github.com/danth/stylix/issues/216 - { - stylix.image = pkgs.fetchurl { - url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg"; - sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50="; + config = lib.mkIf config.dotfiles.stylix.enable { + home.activation.${module} = + lib.dotfiles.lib.hm.dag.entryBefore.writeBoundary.systemRequirement + module + "programs.dconf.enable = true;" + ""; + + stylix = { + cursor = { + name = "Bibata-Modern-Amber"; + package = pkgs.bibata-cursors; + size = 22; }; - } - ( - lib.mkIf config.dotfiles.stylix.enable { - home.activation.${module} = - lib.dotfiles.lib.hm.dag.entryBefore.writeBoundary.systemRequirement - module - "programs.dconf.enable = true;" - ""; + enable = true; - stylix = { - cursor = { - name = "Bibata-Modern-Amber"; - package = pkgs.bibata-cursors; - size = 22; - }; + fonts = { + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; - fonts = { - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; + monospace = { + package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; + name = "FiraCodeNerdFont"; + }; - monospace = { - package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; - name = "FiraCodeNerdFont"; - }; + sansSerif = { + package = pkgs.ibm-plex; + name = "IBMPlexSans"; + }; - sansSerif = { - package = pkgs.ibm-plex; - name = "IBMPlexSans"; - }; + serif = { + package = pkgs.crimson; + name = "Crimson"; + }; - serif = { - package = pkgs.crimson; - name = "Crimson"; - }; + sizes.terminal = 7; + }; - sizes.terminal = 7; - }; + image = pkgs.fetchurl { + url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg"; + sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50="; + }; - polarity = "dark"; - }; - } - ) - ]; + polarity = "dark"; + }; + }; }