Merge pull request #48916 from colemickens/sway-module
programs.sway-beta: module init (temporary until sway-beta becomes sway-1.0)
This commit is contained in:
commit
163adc5039
@ -120,6 +120,7 @@
|
||||
./programs/sysdig.nix
|
||||
./programs/systemtap.nix
|
||||
./programs/sway.nix
|
||||
./programs/sway-beta.nix
|
||||
./programs/thefuck.nix
|
||||
./programs/tmux.nix
|
||||
./programs/udevil.nix
|
||||
|
54
nixos/modules/programs/sway-beta.nix
Normal file
54
nixos/modules/programs/sway-beta.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.sway-beta;
|
||||
swayPackage = cfg.package;
|
||||
in {
|
||||
options.programs.sway-beta = {
|
||||
enable = mkEnableOption ''
|
||||
Sway, the i3-compatible tiling Wayland compositor. This module will be removed after the final release of Sway 1.0
|
||||
'';
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.sway-beta;
|
||||
defaultText = "pkgs.sway-beta";
|
||||
description = ''
|
||||
The package to be used for `sway`.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = with types; listOf package;
|
||||
default = with pkgs; [
|
||||
xwayland dmenu
|
||||
];
|
||||
defaultText = literalExample ''
|
||||
with pkgs; [ xwayland dmenu ];
|
||||
'';
|
||||
example = literalExample ''
|
||||
with pkgs; [
|
||||
xwayland
|
||||
i3status i3status-rust
|
||||
termite rofi light
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
Extra packages to be installed system wide.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ swayPackage ] ++ cfg.extraPackages;
|
||||
security.pam.services.swaylock = {};
|
||||
hardware.opengl.enable = mkDefault true;
|
||||
fonts.enableDefaultFonts = mkDefault true;
|
||||
programs.dconf.enable = mkDefault true;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user