mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
nixos/cardboard: init
Copy-inspired from river.
This commit is contained in:
parent
347ed6dca8
commit
6b2f0db256
@ -268,6 +268,7 @@
|
||||
./programs/usbtop.nix
|
||||
./programs/vim.nix
|
||||
./programs/wavemon.nix
|
||||
./programs/wayland/cardboard.nix
|
||||
./programs/wayland/river.nix
|
||||
./programs/wayland/sway.nix
|
||||
./programs/wayland/waybar.nix
|
||||
|
31
nixos/modules/programs/wayland/cardboard.nix
Normal file
31
nixos/modules/programs/wayland/cardboard.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.cardboard;
|
||||
in
|
||||
{
|
||||
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
|
||||
options.programs.cardboard = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "cardboard");
|
||||
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; nullOr package;
|
||||
default = pkgs.cardboard;
|
||||
defaultText = lib.literalExpression "pkgs.cardboard";
|
||||
description = lib.mdDoc ''
|
||||
cardboard package to use.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
# To make a cardboard session available for certain DMs like SDDM
|
||||
services.xserver.displayManager.sessionPackages = [ cfg.package ];
|
||||
}
|
||||
(import ./wayland-session.nix { inherit lib pkgs; })
|
||||
]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user