lol

nixos/services.flexget: remove `with lib;`

+16 -19
+16 -19
nixos/modules/services/torrent/flexget.nix
··· 4 4 pkgs, 5 5 ... 6 6 }: 7 - 8 - with lib; 9 - 10 7 let 11 8 cfg = config.services.flexget; 12 9 pkg = cfg.package; 13 10 ymlFile = pkgs.writeText "flexget.yml" '' 14 11 ${cfg.config} 15 12 16 - ${optionalString cfg.systemScheduler "schedules: no"} 13 + ${lib.optionalString cfg.systemScheduler "schedules: no"} 17 14 ''; 18 15 configFile = "${toString cfg.homeDir}/flexget.yml"; 19 16 in 20 17 { 21 18 options = { 22 19 services.flexget = { 23 - enable = mkEnableOption "FlexGet daemon"; 20 + enable = lib.mkEnableOption "FlexGet daemon"; 24 21 25 - package = mkPackageOption pkgs "flexget" { }; 22 + package = lib.mkPackageOption pkgs "flexget" { }; 26 23 27 - user = mkOption { 24 + user = lib.mkOption { 28 25 default = "deluge"; 29 26 example = "some_user"; 30 - type = types.str; 27 + type = lib.types.str; 31 28 description = "The user under which to run flexget."; 32 29 }; 33 30 34 - homeDir = mkOption { 31 + homeDir = lib.mkOption { 35 32 default = "/var/lib/deluge"; 36 33 example = "/home/flexget"; 37 - type = types.path; 34 + type = lib.types.path; 38 35 description = "Where files live."; 39 36 }; 40 37 41 - interval = mkOption { 38 + interval = lib.mkOption { 42 39 default = "10m"; 43 40 example = "1h"; 44 - type = types.str; 41 + type = lib.types.str; 45 42 description = "When to perform a {command}`flexget` run. See {command}`man 7 systemd.time` for the format."; 46 43 }; 47 44 48 - systemScheduler = mkOption { 45 + systemScheduler = lib.mkOption { 49 46 default = true; 50 47 example = false; 51 - type = types.bool; 48 + type = lib.types.bool; 52 49 description = "When true, execute the runs via the flexget-runner.timer. If false, you have to specify the settings yourself in the YML file."; 53 50 }; 54 51 55 - config = mkOption { 52 + config = lib.mkOption { 56 53 default = ""; 57 - type = types.lines; 54 + type = lib.types.lines; 58 55 description = "The YAML configuration for FlexGet."; 59 56 }; 60 57 }; 61 58 }; 62 59 63 - config = mkIf cfg.enable { 60 + config = lib.mkIf cfg.enable { 64 61 65 62 environment.systemPackages = [ pkg ]; 66 63 ··· 81 78 wantedBy = [ "multi-user.target" ]; 82 79 }; 83 80 84 - flexget-runner = mkIf cfg.systemScheduler { 81 + flexget-runner = lib.mkIf cfg.systemScheduler { 85 82 description = "FlexGet Runner"; 86 83 after = [ "flexget.service" ]; 87 84 wants = [ "flexget.service" ]; ··· 94 91 }; 95 92 }; 96 93 97 - systemd.timers.flexget-runner = mkIf cfg.systemScheduler { 94 + systemd.timers.flexget-runner = lib.mkIf cfg.systemScheduler { 98 95 description = "Run FlexGet every ${cfg.interval}"; 99 96 wantedBy = [ "timers.target" ]; 100 97 timerConfig = {