diff --git a/flake.nix b/flake.nix index 59ce6fa..037efd4 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,9 @@ ''; }; + nixosModules.e11sync = import ./modules/e11sync; + nixosModules.default = self.nixosModules.e11sync; + apps = { e11sync-frontend = { type = "app"; diff --git a/modules/e11sync/default.nix b/modules/e11sync/default.nix new file mode 100644 index 0000000..6cce2d8 --- /dev/null +++ b/modules/e11sync/default.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + e11sync-backend, +}: { + options.e11sync = with lib.types; { + enable = lib.mkEnableOption "Enable e11sync"; + secretKeyPath = lib.mkOption {type = path;}; + }; + + config = lib.mkIf config.e11sync.enable { + environment.systemPackages = [e11sync-backend]; + }; +}