chunk flake into modules (part 1)
This commit is contained in:
45
modules/home-manager/darkman.nix
Normal file
45
modules/home-manager/darkman.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.modules.darkman = {
|
||||
enable = lib.mkEnableOption "Darkman service and integration";
|
||||
customLightModeScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to custom light mode script";
|
||||
};
|
||||
|
||||
customDarkModeScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to custom dark mode script";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.darkman.enable {
|
||||
home.packages = with pkgs; [ dconf ];
|
||||
|
||||
services.darkman = {
|
||||
enable = true;
|
||||
darkModeScripts = {
|
||||
theme = ''
|
||||
${pkgs.dconf}/bin/dconf write\
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||
'';
|
||||
|
||||
custom = config.modules.darkman.customDarkModeScript;
|
||||
pywalfox = "command -v pywalfox &>/dev/null && pywalfox dark && pywalfox update";
|
||||
};
|
||||
|
||||
lightModeScripts = {
|
||||
theme = ''
|
||||
${pkgs.dconf}/bin/dconf write\
|
||||
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||
'';
|
||||
|
||||
custom = config.modules.darkman.customLightModeScript;
|
||||
pywalfox = "command -v pywalfox &>/dev/null && pywalfox light && pywalfox update";
|
||||
};
|
||||
|
||||
settings.usegeoclue = true;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user