refactor(base profile): move base profile configurations into modules

This commit is contained in:
ooks-io 2024-04-01 15:00:37 +13:00
parent 51e9493c62
commit 692b18c0f6
7 changed files with 124 additions and 63 deletions

View file

@ -0,0 +1,30 @@
{ lib, config, inputs, pkgs, ... }:
let
cfg = config.homeModules.config.nixColors;
inherit (inputs.nix-colors) colorSchemes;
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) nixWallpaperFromScheme;
in
{
imports = [ inputs.nix-colors.homeManagerModule ];
config = lib.mkIf cfg.enable {
colorscheme = lib.mkDefault colorSchemes.gruvbox-material-dark-soft;
home.file.".colorscheme".text = config.colorscheme.slug;
wallpaper =
let
largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs));
largestWidth = largest (x: x.width) config.monitors;
largestHeight = largest (x: x.height) config.monitors;
in
lib.mkDefault (nixWallpaperFromScheme
{
scheme = config.colorscheme;
width = largestWidth;
height = largestHeight;
logoScale = 4;
});
};
}