diff options
author | Domen Kožar <domen@dev.si> | 2013-10-14 11:57:40 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2013-10-14 11:57:48 +0200 |
commit | 30933abb97616a4e48362c786e0b6e4c7b4cc2f4 (patch) | |
tree | b8e865c29fb6cb44aa53b1d0d48839be3518615b /nixos | |
parent | 75bb09986754fbc5d7a5fb856eaa7aec7dc4e829 (diff) | |
download | nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar.gz nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar.bz2 nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar.lz nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar.xz nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.tar.zst nixlib-30933abb97616a4e48362c786e0b6e4c7b4cc2f4.zip |
add prey: Proven tracking software that helps you find, lock and recover your devices when stolen or missing
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/security/prey.nix | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 977ca2518ecc..b835907c82f6 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -61,6 +61,7 @@ ./security/pam.nix ./security/pam_usb.nix ./security/polkit.nix + ./security/prey.nix ./security/rngd.nix ./security/rtkit.nix ./security/setuid-wrappers.nix diff --git a/nixos/modules/security/prey.nix b/nixos/modules/security/prey.nix new file mode 100644 index 000000000000..75b95d5fbb04 --- /dev/null +++ b/nixos/modules/security/prey.nix @@ -0,0 +1,42 @@ +{config, pkgs, ...}: + +with pkgs.lib; + +let + cfg = config.services.prey; + myPrey = pkgs."prey-bash-client".override { + apiKey = cfg.apiKey; + deviceKey = cfg.deviceKey; + }; +in { + options = { + + services.prey = { + enable = mkOption { + default = false; + type = types.bool; + description = '' + Enables http://preyproject.com/ bash client. Be sure to specify api and device keys. + Once setup, cronjob will run evert 15 minutes and report status. + ''; + }; + + deviceKey = mkOption { + type = types.string; + description = "Device Key obtained from https://panel.preyproject.com/devices (and clicking on the device)"; + }; + + apiKey = mkOption { + type = types.string; + description = "API key obtained from https://panel.preyproject.com/profile"; + }; + }; + + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ myPrey ]; + services.cron.systemCronJobs = [ "*/15 * * * * root ${myPrey}/prey.sh" ]; + }; + +} |