use services for automapaper

This commit is contained in:
Noa Aarts 2024-11-22 20:19:45 +01:00
parent 0050156bde
commit 4b4736f6eb
Signed by: noa
GPG key ID: 1850932741EFF672
3 changed files with 64 additions and 48 deletions

View file

@ -9,56 +9,10 @@ let
launcher = "${self-pkgs.fuzzel-launch}/bin/fuzzel-launch";
power-menu = "${self-pkgs.fuzzel-power}/bin/fuzzel-power";
lockscreen = "${pkgs.swaylock}/bin/swaylock";
wallpapers =
let
automapaper-configs = builtins.map (
{
name,
horizontal,
vertical,
...
}:
let
display-shader = pkgs.substituteAll {
src = ../../modules/automapaper/display-with_vars.glsl;
background = inputs.nix-colors.lib.conversions.hexToGLSLVec "101012";
foreground = inputs.nix-colors.lib.conversions.hexToGLSLVec "192291";
};
state-shader = ../../modules/automapaper/state-game_of_life.glsl;
init-shader = ../../modules/automapaper/init.glsl;
# General configurations
cycles = 2000;
tps = 30;
horizontal-dot-size = 10;
vertical-dot-size = 10;
in
(import ../../modules/automapaper/config.nix {
inherit (pkgs) writeTextFile;
inherit
init-shader
state-shader
display-shader
tps
cycles
;
display = name;
horizontal = builtins.div horizontal horizontal-dot-size;
vertical = builtins.div vertical vertical-dot-size;
})
) displays;
in
pkgs.lib.strings.concatMapStringsSep "\n" (
file:
''spawn-at-startup "${
inputs.automapaper.packages.${pkgs.system}.automapaper
}/bin/automapaper" "-C" "${file}/config.toml"''
) automapaper-configs;
autostart-string =
"spawn-at-startup \""
+ pkgs.lib.strings.concatStringsSep "\nspawn-at-startup \"" [
"${pkgs.dunst}/bin/dunst\""
"${pkgs.xwayland-satellite}/bin/xwayland-satellite\""
"spotify\""
"keepassxc\""
"thunderbird\""
@ -91,7 +45,6 @@ pkgs.substituteAll {
launcher = launcher;
power_menu = power-menu;
lockscreen = lockscreen;
wallpapers = wallpapers;
displays = displays-string;
autostart = autostart-string;

View file

@ -119,7 +119,6 @@ layout {
// which may be more convenient to use.
// See the binds section below for more spawn examples.
// spawn-at-startup "alacritty" "-e" "fish"
@wallpapers@
@autostart@