abstract prusa wrapper
This commit is contained in:
parent
cf8067bbe7
commit
25b93c8e61
2 changed files with 15 additions and 14 deletions
|
@ -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" = {
|
||||||
|
|
13
modules/apps/sway-wrapper.nix
Normal file
13
modules/apps/sway-wrapper.nix
Normal 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}";
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue