1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

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 ];
};
}