refactor: rework NixOS desktop module
This commit is contained in:
parent
b9d5f79703
commit
70b39e5e7f
4 changed files with 51 additions and 23 deletions
35
modules/nixos/desktop/sway/default.nix
Normal file
35
modules/nixos/desktop/sway/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.sway;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.sway = {
|
||||
enable = mkEnableOption "Enable Steam Platform";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
security.pam.services.swaylock = {};
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"gtk"
|
||||
];
|
||||
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue