diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2018-10-28 10:16:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-28 10:16:54 +0000 |
commit | e5ce19f6ab6ccb773769aae76ef9343215d1e918 (patch) | |
tree | 9f8b7ce822c1adab0f89a27ef9f27150e2d6d407 | |
parent | 6b3bff4378a6a947554b57e0a870be8f2995618f (diff) | |
parent | 7469e68ddaf9efa67467586574996f9e00c138a3 (diff) | |
download | nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar.gz nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar.bz2 nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar.lz nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar.xz nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.tar.zst nixlib-e5ce19f6ab6ccb773769aae76ef9343215d1e918.zip |
Merge pull request #46330 from geistesk/wavemon-module
nixos/wavemon: create module
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/wavemon.nix | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index bd921f230bd0..660644eade8d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -126,6 +126,7 @@ ./programs/udevil.nix ./programs/venus.nix ./programs/vim.nix + ./programs/wavemon.nix ./programs/way-cooler.nix ./programs/wireshark.nix ./programs/xfs_quota.nix diff --git a/nixos/modules/programs/wavemon.nix b/nixos/modules/programs/wavemon.nix new file mode 100644 index 000000000000..ac665fe4a023 --- /dev/null +++ b/nixos/modules/programs/wavemon.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.wavemon; +in { + options = { + programs.wavemon = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to add wavemon to the global environment and configure a + setcap wrapper for it. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ wavemon ]; + security.wrappers.wavemon = { + source = "${pkgs.wavemon}/bin/wavemon"; + capabilities = "cap_net_admin+ep"; + }; + }; +} |