Guest User

Untitled

a guest
Jan 11th, 2021
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. { config, ... }:
  2.  
  3. {
  4.   # Common hardening flags. Define here, use in any file
  5.   options = {
  6.     my.commonFlags = lib.mkOption { types = lib.types.attrs; };
  7.   };
  8.  
  9.   # Set your flags here
  10.   config.my.commonFlags = { NoNewPrivileges = true; PrivateTmp = true; ProtectSystem = true; ProtectHome = true; };
  11.  
  12.   # Have to add config to the name, because we used "options" in this file
  13.   config.systemd.services.rtorrent.serviceConfig = config.my.commonFlags // { ProtectHome = "read-only"; };
  14. }
Add Comment
Please, Sign In to add comment