diff options
author | Joerg Thalheim <joerg@thalheim.io> | 2017-10-17 15:09:42 +0100 |
---|---|---|
committer | Samuel Leathers <sam@appliedtrust.com> | 2017-10-19 10:46:31 -0400 |
commit | f8085cb1dd8f86253e57330371f00147a98ac3ae (patch) | |
tree | 0fbebe3013dc0b8deb9cf7490dd720be3a1c3aaa /nixos/modules/programs/sway.nix | |
parent | 1dc92fe688f5e5bba904b6e60dc6a47d127a0a0b (diff) |
nixos/sway: add module
Diffstat (limited to 'nixos/modules/programs/sway.nix')
-rw-r--r-- | nixos/modules/programs/sway.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix new file mode 100644 index 000000000000..fc8a06d106ae --- /dev/null +++ b/nixos/modules/programs/sway.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: + +with lib; +{ + options.programs.sway.enable = mkEnableOption "sway"; + + config = mkIf config.programs.sway.enable { + environment.systemPackages = [ pkgs.sway pkgs.xwayland ]; + security.wrappers.sway = { + source = "${pkgs.sway}/bin/sway"; + capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip"; + owner = "root"; + group = "sway"; + permissions = "u+rx,g+rx"; + }; + + users.extraGroups.sway = {}; + }; +} |