From 61c22eb056fc17ca49b4145a3b09aef60062c732 Mon Sep 17 00:00:00 2001 From: wldhx Date: Sat, 28 Jan 2023 16:59:23 +0000 Subject: [PATCH] fixup! remove MODE, impl dry-run, refactor pin() --- flake.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 6519f19..a83a439 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,8 @@ inherit system; overlays = [ self.overlay ]; }; - in { + in + { defaultPackage = pkgs.myapp; devShell = @@ -33,18 +34,18 @@ nixosModules.default = with pkgs.lib; { config, ... }: let cfg = config.services.telegram-crm; - in { + in + { options.services.telegram-crm = { enable = mkEnableOption "Enable Telegram CRM oneshot service"; environmentFile = mkOption { type = types.str; }; - mode = mkOption { type = types.str; }; }; config = { systemd.services.telegram-crm = { serviceConfig = { Type = "simple"; ExecStart = - "${self.defaultPackage.${system}}/bin/telegram-crm ${cfg.mode}"; + "${self.defaultPackage.${system}}/bin/telegram-crm"; EnvironmentFile = cfg.environmentFile; DynamicUser = true; -- 2.45.2