nixos/katriawm: add module

This commit is contained in:
AndersonTorres 2022-12-16 18:08:10 -03:00
parent 11282edfe7
commit 4a194173b0

View File

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mdDoc mkEnableOption mkIf mkPackageOption singleton;
cfg = config.services.xserver.windowManager.katriawm;
in
{
###### interface
options = {
services.xserver.windowManager.katriawm = {
enable = mkEnableOption (mdDoc "katriawm");
package = mkPackageOption pkgs "katriawm" {};
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "katriawm";
start = ''
${cfg.package}/bin/katriawm &
waitPID=$!
'';
};
environment.systemPackages = [ cfg.package ];
};
}