From 994481e7fe4c7c7ef8ad78c4d72bcfe9a5c99122 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Fri, 13 Oct 2023 13:56:55 +0200 Subject: [PATCH] Changed name of binary --- flake.nix | 14 +++----------- nix/module.nix | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 888bf6d..e51299a 100644 --- a/flake.nix +++ b/flake.nix @@ -13,15 +13,15 @@ forAllSystems = nixpkgs.lib.genAttrs supportedSystems; pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); in { - # Formatter + # `nix fmt` formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - # Packages + # `nix build` packages = forAllSystems (system: { default = pkgs.${system}.poetry2nix.mkPoetryApplication {projectDir = self;}; }); - # Dev Shell + # `nix develop` devShells = forAllSystems (system: { default = pkgs.${system}.mkShellNoCC { packages = with pkgs.${system}; [ @@ -33,14 +33,6 @@ }; }); - # Run as apps - apps = forAllSystems (system: { - default = { - program = "${self.packages.${system}.default}/bin/outage_detector"; - type = "app"; - }; - }); - # TODO: Home Manager Module # homeManagerModules.default = import ./nix/hm-module.nix self; diff --git a/nix/module.nix b/nix/module.nix index c3a5152..7473674 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -43,7 +43,7 @@ in { systemd.services.outage-detector = mkIf (cfg.timer != null) { - script = "${package}/bin/outage_detector log ${cfg.settings.logFile} --host ${cfg.settings.host} --timeout ${toString cfg.settings.timeout}"; + script = "${package}/bin/outage-detector log ${cfg.settings.logFile} --host ${cfg.settings.host} --timeout ${toString cfg.settings.timeout}"; serviceConfig = { Type = "oneshot"; diff --git a/pyproject.toml b/pyproject.toml index cd9ee19..5a30b77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ python = "^3.10" requests = "2.29.0" [tool.poetry.scripts] -outage_detector = "outage_detector.main:main" +outage-detector = "outage_detector.main:main" [build-system] requires = ["poetry-core"]