mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
1c3ca96c1a
It is broken though because it cannot set things correctly. That may have something to do with the lack of setup like certain services are disabled or something. I'll just need help from the Cardboard maintainers for this.
56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{ config, options, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.programs.cardboard-wm;
|
|
|
|
cardboardPackage = cfg.package.overrideAttrs (super: rec {
|
|
passthru.providedSessions = [ "cardboard" ];
|
|
});
|
|
in {
|
|
options.programs.cardboard-wm = {
|
|
enable =
|
|
lib.mkEnableOption "Cardboard, a scrollable tiling Wayland compositor";
|
|
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = pkgs.cardboard;
|
|
defaultText = lib.literalExpression "pkgs.cardboard";
|
|
description = ''
|
|
The derivation containing the <command>cardboard</command>
|
|
and <command>cutter</command> binary.
|
|
'';
|
|
};
|
|
|
|
extraOptions = lib.mkOption {
|
|
type = with lib.types; listOf str;
|
|
default = [];
|
|
description = "Command-line arguments to be passed to Cardboard.";
|
|
};
|
|
|
|
extraPackages = lib.mkOption {
|
|
type = with lib.types; listOf package;
|
|
default = [];
|
|
description = ''
|
|
Extra packages to be installed with this program.
|
|
'';
|
|
example = lib.literalExpression ''
|
|
with pkgs; [
|
|
waybar
|
|
eww
|
|
]
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = [ cardboardPackage ] ++ cfg.extraPackages;
|
|
security.polkit.enable = true;
|
|
services.xserver.displayManager.sessionPackages = [ cardboardPackage ];
|
|
hardware.opengl.enable = true;
|
|
programs.xwayland.enable = true;
|
|
programs.dconf.enable = true;
|
|
fonts.enableDefaultFonts = true;
|
|
xdg.portal.wlr.enable = true;
|
|
};
|
|
}
|