themes: rename into workflows

More self-descriptive == better. Plus it does imply that themes only
change aesthetics which is not often the case with the usual modules
that are defined here.
This commit is contained in:
Gabriel Arazas 2022-08-23 18:24:44 +08:00
parent 0001047718
commit 6cb1515d91
23 changed files with 25 additions and 26 deletions

View File

@ -71,7 +71,7 @@
multimedia-archive.enable = true;
backup-archive.enable = true;
};
themes.themes.a-happy-gnome.enable = true;
workflows.workflows.a-happy-gnome.enable = true;
programs.pop-launcher = {
enable = true;

View File

@ -1,16 +0,0 @@
= Themes
:toc:
These are where my themes are defined and configured.
Basically, themes are mainly graphical sessions concerned with aesthetics.
It could also include system-wide workflows and configurations.
This is where modules will define how you're going to interact with the computer whether you should use something ranging from a full-fledged desktop environment with bells and whistles to a minimalist desktop environment only composing of a window manager, a terminal, and a bar.
The following list is the summary which can also serve as a guideline to developing a theme.
* Due to the bigger scope and importance of this module, there is a limit where you can only enable one theme at a time.
You can disable this with `config.modules.themes.disableLimit` set to `true`.
* Custom themes should be defined in `config.modules.themes.themes` attribute (e.g., `options.modules.themes.themes.a-happy-gnome`, `options.modules.themes.themes.simple-way`).
This makes up for a namespace entirely dedicated for setting themes.

View File

@ -0,0 +1,14 @@
= Workflows
:toc:
These are where my workflows are defined and configured.
Basically, workflows are mainly graphical sessions concerned with aesthetics, this may include Unix rices and good 'ol reliable desktop configurations like my link:./a-happy-gnome[GNOME config].
This is where modules will define how you're going to interact with the computer whether you should use something ranging from a full-fledged desktop environment with bells and whistles to a minimalist desktop environment only composing of a window manager, a terminal, and a bar.
The following list is the summary which can also serve as a guideline to developing a workflow module.
* Due to the bigger scope and importance of this module, there is a limit where you can only enable one theme at a time.
You can disable this with `config.workflows.disableLimit` set to `true`.
* Custom themes should be defined in `config.workflows.workflows` attribute (e.g., `options.workflows.workflows.a-happy-gnome`, `options.workflows.workflows.simple-way`).
This makes up for a namespace entirely dedicated for setting themes.

View File

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

View File

@ -2,7 +2,7 @@
let
name = "a-happy-gnome";
cfg = config.themes.themes.a-happy-gnome;
cfg = config.workflows.workflows.a-happy-gnome;
enabledExtensions = pkgs.writeTextFile {
name = "a-happy-gnome-extensions";
@ -19,7 +19,7 @@ let
'';
in
{
options.themes.themes.a-happy-gnome = {
options.workflows.workflows.a-happy-gnome = {
enable = lib.mkEnableOption "'A happy GNOME', foo-dogsquared's configuration of GNOME desktop environment";
shellExtensions = lib.mkOption {

View File

@ -3,14 +3,15 @@
# You can also show your desktop being modularized like this.
{ config, options, lib, pkgs, ... }:
let cfg = config.themes;
let cfg = config.workflows;
in {
options.themes.disableLimit = lib.mkOption {
options.workflows.disableLimit = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to unlock the limit for themes. Since themes may overlap with
packages and configurations, this should be enabled at your own risk.
Whether to unlock the limit for workflows. Since workflows may overlap
with packages and configurations, this should be enabled at your own
risk.
'';
};
@ -20,7 +21,7 @@ in {
config = {
assertions = [{
assertion =
let enabledThemes = lib.countAttrs (_: theme: theme.enable) cfg.themes;
let enabledThemes = lib.countAttrs (_: theme: theme.enable) cfg.workflows;
in cfg.disableLimit || (enabledThemes <= 1);
message = "Can't have more than one theme enabled at any given time.";
}];

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -1,9 +1,9 @@
{ config, options, lib, pkgs, ... }:
let
cfg = config.themes.themes.knome;
cfg = config.workflows.workflows.knome;
in {
options.themes.themes.knome.enable = lib.mkEnableOption "KNOME, an attempt to bring as much GNOME to KDE Plasma";
options.workflows.workflows.knome.enable = lib.mkEnableOption "KNOME, an attempt to bring as much GNOME to KDE Plasma";
config = lib.mkIf cfg.enable {
services.xserver = {