nix/hosts/modules/programs/mcsr/default.nix

89 lines
1.9 KiB
Nix
Raw Normal View History

2026-05-01 07:12:53 +01:00
{
inputs,
pkgs,
upkgs,
lib,
config,
...
}: let
cfg = config.programs.waywall;
mcsrPkgs = inputs.mcsr.packages.${pkgs.stdenv.hostPlatform.system};
# thin = pkgs.fetchurl {
# url = "https://v.uku.moe/u/thin.png";
# hash = "sha256-VzT9a0/+JMG+To80+xuQSo4x2w6+zavCvUJ6irBkpVg=";
# };
# wide = pkgs.fetchurl {
# url = "https://v.uku.moe/u/wide.png";
# hash = "sha256-xJX+QladHQiQYBdKZEB9kuEaxBWVZuuStf4r4gIv5uo=";
# };
# tall = pkgs.fetchurl {
# url = "https://v.uku.moe/u/tall.png";
# hash = "sha256-RLyV6iFVDlJKKEdA3CBAQR/sIj2WnhZVBAmLzVmS7JA=";
# };
in {
imports = [inputs.mcsr.nixosModules.waywall];
options = {
programs.waywall = {
width = lib.mkOption {
type = lib.types.int;
default = 1920;
};
height = lib.mkOption {
type = lib.types.int;
default = 1080;
};
};
};
config = {
nixpkgs.overlays = [
(final: prev: {
prismlauncher = prev.prismlauncher.override {
jdks = [
mcsrPkgs.graalvm-21
upkgs.openjdk8
];
additionalLibs = with pkgs; [
libx11
libxt
libxtst
libxcb
libxkbcommon
libxinerama
];
};
})
];
environment.systemPackages = with pkgs; [
prismlauncher
];
programs.waywall = {
enable = true;
config = {
enableWaywork = true;
programs = [mcsrPkgs.ninjabrain-bot];
files = {
eye_overlay = ./eye-overlay-trans.png;
# inherit thin wide tall;
};
text =
''
local resolution = { w = ${toString cfg.width}, h = ${toString cfg.height} }
-- end globals
''
+ (builtins.readFile ./waywall.lua);
# linkWithSystemd = false;
};
};
};
}