nixos/what: init
This commit is contained in:
parent
014ffad408
commit
bf17262578
|
@ -159,6 +159,7 @@
|
||||||
./programs/wavemon.nix
|
./programs/wavemon.nix
|
||||||
./programs/way-cooler.nix
|
./programs/way-cooler.nix
|
||||||
./programs/waybar.nix
|
./programs/waybar.nix
|
||||||
|
./programs/what.nix
|
||||||
./programs/wireshark.nix
|
./programs/wireshark.nix
|
||||||
./programs/x2goserver.nix
|
./programs/x2goserver.nix
|
||||||
./programs/xfs_quota.nix
|
./programs/xfs_quota.nix
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.programs.what;
|
||||||
|
in {
|
||||||
|
meta.maintainers = with maintainers; [ filalex77 ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
programs.what = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to add what to the global environment and configure a
|
||||||
|
setcap wrapper for it.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ what ];
|
||||||
|
security.wrappers.what = {
|
||||||
|
source = "${pkgs.what}/bin/what";
|
||||||
|
capabilities = "cap_net_raw,cap_net_admin+ep";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue