diff --git a/flake.nix b/flake.nix index ac7a282..53fd90a 100644 --- a/flake.nix +++ b/flake.nix @@ -19,10 +19,11 @@ tauron-scrapper = pkgs.callPackage ./package.nix {}; default = tauron-scrapper; }; - + }) + // { nixosModules = rec { - tauron-scrapper = pkgs.callPackage ./module.nix {inherit self;}; + tauron-scrapper = import ./module.nix self; default = tauron-scrapper; }; - }); + }; } diff --git a/module.nix b/module.nix index 4b37870..458d8c7 100644 --- a/module.nix +++ b/module.nix @@ -1,14 +1,12 @@ -{ +self: { config, - coreutils-full, - formats, + pkgs, system, - utils, lib, - self, ... }: with lib; let + inherit (pkgs) coreutils-full formats utils; inherit (utils.systemdUtils.unitOptions) unitOption; cfg = config.services.tauron-scrapper; yamlConfig = (formats.yaml {}).generate "tauron-scrapper-config.yaml" cfg.config;