From 19460ea48f278f88ed43f688c4e779f0b78a1e13 Mon Sep 17 00:00:00 2001 From: NullBite Date: Thu, 23 May 2024 02:45:41 -0400 Subject: [PATCH] Update default config to match stylix#244 --- home/stylix.nix | 22 +++++++++++++--------- system/stylix.nix | 20 ++++++++++++-------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/home/stylix.nix b/home/stylix.nix index 3d9fcaa..4ba329d 100644 --- a/home/stylix.nix +++ b/home/stylix.nix @@ -1,14 +1,18 @@ { pkgs, lib, config, inputs, ... }@args: { - imports = [ - inputs.stylix.homeManagerModules.stylix - ]; + imports = [ inputs.stylix.homeManagerModules.stylix ]; config = { - # only if styix is standalone - stylix = lib.mkIf (!(args ? osConfig && args.osConfig ? stylix )) { - autoEnable = lib.mkDefault false; - image = lib.mkDefault "${pkgs.nixfiles-assets}/share/wallpapers/nixfiles-static/Djayjesse-finding_life.png"; - base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; - }; + stylix = lib.mkMerge [ + { targets.vim.enable = lib.mkDefault false; } + # only if styix is standalone + (lib.mkIf (!(args ? osConfig && args.osConfig ? stylix)) { + # all of this is documented in system/stylix.nix + autoEnable = lib.mkDefault config.stylix.enable; + enable = lib.mkDefault false; + + image = lib.mkDefault "${pkgs.nixfiles-assets}/share/wallpapers/nixfiles-static/Djayjesse-finding_life.png"; + base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + }) + ]; }; } diff --git a/system/stylix.nix b/system/stylix.nix index 4bc7552..c391269 100644 --- a/system/stylix.nix +++ b/system/stylix.nix @@ -1,18 +1,22 @@ -{ pkgs, config, lib, inputs, ... } @ args: +{ pkgs, config, lib, inputs, ... }@args: { - imports = [ - inputs.stylix.nixosModules.stylix - ]; + imports = [ inputs.stylix.nixosModules.stylix ]; config = { # stylix defaults (this is an external module so i don't mind setting sane defaults right here). stylix = { - # don't mess with things by default. note: this still messes with things - # by default; the stylix.enable option is currently being added, see - # danth/stylix#244 - autoEnable = lib.mkDefault false; + # don't mess with things by default. + # + # this naming is confusing as shit + # this enables color theming of things by stylix + autoEnable = lib.mkDefault config.stylix.enable; + # this enables installation of fonts/images/etc + enable = lib.mkDefault false; + # an image i like image = lib.mkDefault "${pkgs.nixfiles-assets}/share/wallpapers/nixfiles-static/Djayjesse-finding_life.png"; + + # default theme base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; homeManagerIntegration = { # use system config in home-manager