abstract prusa wrapper

This commit is contained in:
twoneis 2024-09-18 07:47:54 +02:00
parent cf8067bbe7
commit 25b93c8e61
2 changed files with 15 additions and 14 deletions

View file

@ -1,12 +1,7 @@
{ lib, config, pkgs, ... }: let { lib, config, pkgs, ... }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
# Ugly workaround xwl-satellite crashes and prusa not being wayland-native mkSwayWrapper = import ./sway-wrapper.nix;
prusa-wrapper = pkgs.makeDesktopItem {
name = "prusa-wrapper";
desktopName = "Prusa";
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- i3";
};
in { in {
imports = [ imports = [
./firefox.nix ./firefox.nix
@ -27,15 +22,8 @@ in {
nautilus nautilus
libreoffice-qt6-fresh libreoffice-qt6-fresh
inkscape inkscape
prusa-wrapper
planify
# freecad -- broken dependency # freecad -- broken dependency
]; ] ++ [(mkSwayWrapper { lib = lib; pkgs = pkgs; app = "${pkgs.prusa-slicer}/bin/prusa-slicer"; name = "Prusa"; })];
xsession.windowManager.i3 = {
enable = true;
config.startup = [{ command = "${pkgs.prusa-slicer}/bin/prusa-slicer"; }];
};
home.file = { home.file = {
".config/vesktop/settings.json" = { ".config/vesktop/settings.json" = {

View file

@ -0,0 +1,13 @@
{ lib, pkgs, app, name, ... }: let
inherit (lib) concatStrings;
config = pkgs.writeTextFile {
name = concatStrings [ "i3-config" name ];
text = ''
exec ${app}
'';
};
in pkgs.makeDesktopItem {
name = name;
desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}";
}