wip(home): refactor home modules *WILL NOT BUILD*
This commit is contained in:
parent
2033810429
commit
6a591ecbf7
115 changed files with 1028 additions and 791 deletions
|
|
@ -1,34 +0,0 @@
|
|||
{ lib, config, inputs, pkgs, ... }:
|
||||
let
|
||||
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) nixWallpaperFromScheme;
|
||||
inherit (lib) types mkDefault mkIf mkOption mkEnableOption;
|
||||
|
||||
cfg = config.ooknet.theme.wallpaper;
|
||||
in
|
||||
{
|
||||
options.ooknet.theme.wallpaper = {
|
||||
enable = mkEnableOption "Enable wallpaper module";
|
||||
path = mkOption {
|
||||
type = types.path;
|
||||
default = null;
|
||||
description = "Wallpaper Path";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
ooknet.theme.wallpaper.path =
|
||||
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
|
||||
mkDefault (nixWallpaperFromScheme
|
||||
{
|
||||
scheme = config.colorscheme;
|
||||
width = largestWidth;
|
||||
height = largestHeight;
|
||||
logoScale = 4;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue