move automapaper module, and start improving customisability
This commit is contained in:
parent
580dd17b2a
commit
ad70e2885a
2 changed files with 64 additions and 25 deletions
|
|
@ -1,25 +0,0 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
let
|
||||
cfg = config.modules.automapaper;
|
||||
in
|
||||
{
|
||||
options.modules.automapaper = {
|
||||
enable = lib.mkEnableOption "enable automapaper";
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
inputs.automapaper.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"${config.xdg.configHome}/automapaper/config.toml".source = ./config.toml;
|
||||
"${config.xdg.configHome}/automapaper/config2nd.toml".source = ./config2nd.toml;
|
||||
"${config.xdg.configHome}/automapaper/state.frag".source = ./state.frag;
|
||||
"${config.xdg.configHome}/automapaper/init.frag".source = ./init.frag;
|
||||
"${config.xdg.configHome}/automapaper/display.frag".source = ./display.frag;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
64
modules/automapaper/default.nix
Normal file
64
modules/automapaper/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
let
|
||||
cfg = config.modules.automapaper;
|
||||
in
|
||||
{
|
||||
options.modules.automapaper = {
|
||||
enable = lib.mkEnableOption "enable automapaper";
|
||||
configurations = lib.mkOption {
|
||||
description = "automapaper configurations per monitor";
|
||||
type = with lib.types; attrsOf (submodule {
|
||||
options = {
|
||||
init = mkOption {
|
||||
type = str;
|
||||
description = "the shader executed to get the state for the initialisation, and re-initialisation steps";
|
||||
};
|
||||
state = mkOption {
|
||||
type = str;
|
||||
description = "the shader executed to increment the state to the next generation";
|
||||
};
|
||||
display = mkOption {
|
||||
type = str;
|
||||
description = "the shader executed to display the state to the monitor";
|
||||
};
|
||||
horizontal = mkOption {
|
||||
type = int;
|
||||
description = "the amount of horizontal cells in the state";
|
||||
};
|
||||
vertical = mkOption {
|
||||
type = int;
|
||||
description = "the amount of vertical cells in the state";
|
||||
};
|
||||
tps = {
|
||||
type = int;
|
||||
description = "the amount of ticks to simulate each second";
|
||||
};
|
||||
cycles = {
|
||||
type = int;
|
||||
description = "the amount of state increments before the init shader is called again";
|
||||
};
|
||||
frames_per_tick = {
|
||||
type = int;
|
||||
description = "the amount of times to call the display shader for each iteration of the state shader";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
inputs.automapaper.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"${config.xdg.configHome}/automapaper/config.toml".source = ./config.toml;
|
||||
"${config.xdg.configHome}/automapaper/config2nd.toml".source = ./config2nd.toml;
|
||||
"${config.xdg.configHome}/automapaper/state.frag".source = ./state.frag;
|
||||
"${config.xdg.configHome}/automapaper/init.frag".source = ./init.frag;
|
||||
"${config.xdg.configHome}/automapaper/display.frag".source = ./display.frag;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue