diff options
author | Oleksii Filonenko <brightone@protonmail.com> | 2019-12-30 13:58:58 +0200 |
---|---|---|
committer | Oleksii Filonenko <brightone@protonmail.com> | 2019-12-30 13:59:52 +0200 |
commit | bf1726257864b7772e56467abfddf89540cbeb30 (patch) | |
tree | 6d9042a8fb7c08cf219c00662f9b210cc1b9ed85 /nixos | |
parent | 014ffad4086e44f2317361d748cdca34a31bd2f5 (diff) | |
download | nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar.gz nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar.bz2 nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar.lz nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar.xz nixlib-bf1726257864b7772e56467abfddf89540cbeb30.tar.zst nixlib-bf1726257864b7772e56467abfddf89540cbeb30.zip |
nixos/what: init
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/what.nix | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 914f9a878b0c..2dc3378bf005 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -159,6 +159,7 @@ ./programs/wavemon.nix ./programs/way-cooler.nix ./programs/waybar.nix + ./programs/what.nix ./programs/wireshark.nix ./programs/x2goserver.nix ./programs/xfs_quota.nix diff --git a/nixos/modules/programs/what.nix b/nixos/modules/programs/what.nix new file mode 100644 index 000000000000..02e4eaba723f --- /dev/null +++ b/nixos/modules/programs/what.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"; + }; + }; +} |